Docs: Standardize filter docs in wp-includes/comment.php to use third-person singular verbs per the inline documentation standards for PHP.
See #36913. git-svn-id: https://develop.svn.wordpress.org/trunk@37512 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1dc4b17e93
commit
53a58c6933
|
@ -51,7 +51,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
|
||||||
$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
|
$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the maximum number of links allowed in a comment.
|
* Filters the maximum number of links allowed in a comment.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
|
@ -270,7 +270,7 @@ function get_default_comment_status( $post_type = 'post', $comment_type = 'comme
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the default comment status for the given post type.
|
* Filters the default comment status for the given post type.
|
||||||
*
|
*
|
||||||
* @since 4.3.0
|
* @since 4.3.0
|
||||||
*
|
*
|
||||||
|
@ -504,7 +504,7 @@ function wp_set_comment_cookies($comment, $user) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the lifetime of the comment cookie in seconds.
|
* Filters the lifetime of the comment cookie in seconds.
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*
|
*
|
||||||
|
@ -528,7 +528,7 @@ function wp_set_comment_cookies($comment, $user) {
|
||||||
function sanitize_comment_cookies() {
|
function sanitize_comment_cookies() {
|
||||||
if ( isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ) {
|
if ( isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ) {
|
||||||
/**
|
/**
|
||||||
* Filter the comment author's name cookie before it is set.
|
* Filters the comment author's name cookie before it is set.
|
||||||
*
|
*
|
||||||
* When this filter hook is evaluated in wp_filter_comment(),
|
* When this filter hook is evaluated in wp_filter_comment(),
|
||||||
* the comment author's name string is passed.
|
* the comment author's name string is passed.
|
||||||
|
@ -545,7 +545,7 @@ function sanitize_comment_cookies() {
|
||||||
|
|
||||||
if ( isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) ) {
|
if ( isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) ) {
|
||||||
/**
|
/**
|
||||||
* Filter the comment author's email cookie before it is set.
|
* Filters the comment author's email cookie before it is set.
|
||||||
*
|
*
|
||||||
* When this filter hook is evaluated in wp_filter_comment(),
|
* When this filter hook is evaluated in wp_filter_comment(),
|
||||||
* the comment author's email string is passed.
|
* the comment author's email string is passed.
|
||||||
|
@ -562,7 +562,7 @@ function sanitize_comment_cookies() {
|
||||||
|
|
||||||
if ( isset( $_COOKIE['comment_author_url_' . COOKIEHASH] ) ) {
|
if ( isset( $_COOKIE['comment_author_url_' . COOKIEHASH] ) ) {
|
||||||
/**
|
/**
|
||||||
* Filter the comment author's URL cookie before it is set.
|
* Filters the comment author's URL cookie before it is set.
|
||||||
*
|
*
|
||||||
* When this filter hook is evaluated in wp_filter_comment(),
|
* When this filter hook is evaluated in wp_filter_comment(),
|
||||||
* the comment author's URL string is passed.
|
* the comment author's URL string is passed.
|
||||||
|
@ -696,7 +696,7 @@ function wp_allow_comment( $commentdata ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter a comment's approval status before it is set.
|
* Filters a comment's approval status before it is set.
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
*
|
*
|
||||||
|
@ -748,7 +748,7 @@ function check_comment_flood_db( $ip, $email, $date ) {
|
||||||
$time_lastcomment = mysql2date('U', $lasttime, false);
|
$time_lastcomment = mysql2date('U', $lasttime, false);
|
||||||
$time_newcomment = mysql2date('U', $date, false);
|
$time_newcomment = mysql2date('U', $date, false);
|
||||||
/**
|
/**
|
||||||
* Filter the comment flood status.
|
* Filters the comment flood status.
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
*
|
*
|
||||||
|
@ -1101,7 +1101,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||||
$post_id = (int) $post_id;
|
$post_id = (int) $post_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the comments count for a given post.
|
* Filters the comments count for a given post.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
|
@ -1508,7 +1508,7 @@ function wp_get_current_commenter() {
|
||||||
$comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
|
$comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the current commenter's name, email, and URL.
|
* Filters the current commenter's name, email, and URL.
|
||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*
|
*
|
||||||
|
@ -1629,7 +1629,7 @@ function wp_insert_comment( $commentdata ) {
|
||||||
function wp_filter_comment($commentdata) {
|
function wp_filter_comment($commentdata) {
|
||||||
if ( isset( $commentdata['user_ID'] ) ) {
|
if ( isset( $commentdata['user_ID'] ) ) {
|
||||||
/**
|
/**
|
||||||
* Filter the comment author's user id before it is set.
|
* Filters the comment author's user id before it is set.
|
||||||
*
|
*
|
||||||
* The first time this filter is evaluated, 'user_ID' is checked
|
* The first time this filter is evaluated, 'user_ID' is checked
|
||||||
* (for back-compat), followed by the standard 'user_id' value.
|
* (for back-compat), followed by the standard 'user_id' value.
|
||||||
|
@ -1645,7 +1645,7 @@ function wp_filter_comment($commentdata) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the comment author's browser user agent before it is set.
|
* Filters the comment author's browser user agent before it is set.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
|
@ -1655,7 +1655,7 @@ function wp_filter_comment($commentdata) {
|
||||||
/** This filter is documented in wp-includes/comment.php */
|
/** This filter is documented in wp-includes/comment.php */
|
||||||
$commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] );
|
$commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] );
|
||||||
/**
|
/**
|
||||||
* Filter the comment content before it is set.
|
* Filters the comment content before it is set.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
|
@ -1663,7 +1663,7 @@ function wp_filter_comment($commentdata) {
|
||||||
*/
|
*/
|
||||||
$commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] );
|
$commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] );
|
||||||
/**
|
/**
|
||||||
* Filter the comment author's IP before it is set.
|
* Filters the comment author's IP before it is set.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
|
@ -1745,7 +1745,7 @@ function wp_new_comment( $commentdata ) {
|
||||||
$prefiltered_user_id = ( isset( $commentdata['user_id'] ) ) ? (int) $commentdata['user_id'] : 0;
|
$prefiltered_user_id = ( isset( $commentdata['user_id'] ) ) ? (int) $commentdata['user_id'] : 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter a comment's data before it is sanitized and inserted into the database.
|
* Filters a comment's data before it is sanitized and inserted into the database.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
|
@ -1862,7 +1862,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) {
|
||||||
$maybe_notify = get_option( 'comments_notify' );
|
$maybe_notify = get_option( 'comments_notify' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter whether to send the post author new comment notification emails,
|
* Filters whether to send the post author new comment notification emails,
|
||||||
* overriding the site setting.
|
* overriding the site setting.
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
|
@ -1998,7 +1998,7 @@ function wp_update_comment($commentarr) {
|
||||||
$data = wp_unslash( $commentarr );
|
$data = wp_unslash( $commentarr );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the comment content before it is updated in the database.
|
* Filters the comment content before it is updated in the database.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
|
@ -2421,7 +2421,7 @@ function pingback($content, $post_ID) {
|
||||||
$client = new WP_HTTP_IXR_Client($pingback_server_url);
|
$client = new WP_HTTP_IXR_Client($pingback_server_url);
|
||||||
$client->timeout = 3;
|
$client->timeout = 3;
|
||||||
/**
|
/**
|
||||||
* Filter the user agent sent when pinging-back a URL.
|
* Filters the user agent sent when pinging-back a URL.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
|
@ -2651,7 +2651,7 @@ function _close_comments_for_old_posts( $posts, $query ) {
|
||||||
return $posts;
|
return $posts;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the list of post types to automatically close comments for.
|
* Filters the list of post types to automatically close comments for.
|
||||||
*
|
*
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue