Action hook 'comment_add_author_url'

in WP Core File wp-content/plugins/akismet/class.akismet-admin.php at line 592

View Source

comment_add_author_url

Action Hook
Description
Add help to the Akismet page

Hook Information

File Location wp-content/plugins/akismet/class.akismet-admin.php View on GitHub
Hook Type Action
Line Number 592

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into comment_add_author_url
add_action('comment_add_author_url', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-content/plugins/akismet/class.akismet-admin.php:592 - How this hook is used in WordPress core
<?php
 587  		if ( ! empty( $_POST['id'] ) && ! empty( $_POST['url'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) {
 588  			$comment_id = intval( $_POST['id'] );
 589  			$comment    = get_comment( $comment_id, ARRAY_A );
 590  			if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) {
 591  				$comment['comment_author_url'] = esc_url( $_POST['url'] );
 592  				do_action( 'comment_add_author_url' );
 593  				print( wp_update_comment( $comment ) );
 594  				die();
 595  			}
 596  		}
 597  	}

PHP Documentation

<?php
/**
	 * Add help to the Akismet page
	 *
	 * @return false if not the Akismet page
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-content/plugins/akismet/class.akismet-admin.php
Related Hooks

Related hooks will be displayed here in future updates.