Make WordPress Core

Changeset 41704


Ignore:
Timestamp:
10/03/2017 01:08:48 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Comments: Change IP references in moderation option labels and email notifications to IP address for clarity.

Props mako09, gk.loveweb, bradparbs.
Fixes #40382.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-discussion.php

    r40779 r41704  
    158158<p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr(get_option('comment_max_links')) . '" class="small-text" />' ); ?></label></p>
    159159
    160 <p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
     160<p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP address, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
    161161<p>
    162162<textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php echo esc_textarea( get_option( 'moderation_keys' ) ); ?></textarea>
     
    167167<th scope="row"><?php _e('Comment Blacklist'); ?></th>
    168168<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Blacklist'); ?></span></legend>
    169 <p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
     169<p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP address, it will be put in the trash. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
    170170<p>
    171171<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
  • trunk/src/wp-includes/comment.php

    r41689 r41704  
    791791 *
    792792 * @param bool   $is_flood  Is a comment flooding occurring?
    793  * @param string $ip        Comment IP.
    794  * @param string $email     Comment author email address.
     793 * @param string $ip        Comment author's IP address.
     794 * @param string $email     Comment author's email address.
    795795 * @param string $date      MySQL time string.
    796796 * @param bool   $avoid_die When true, a disallowed comment will result in the function
     
    11571157 * @param string $url The url used in the comment
    11581158 * @param string $comment The comment content
    1159  * @param string $user_ip The comment author IP address
     1159 * @param string $user_ip The comment author's IP address
    11601160 * @param string $user_agent The author's browser user agent
    11611161 * @return bool True if comment contains blacklisted content, false if comment does not
     
    18351835    $commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] );
    18361836    /**
    1837      * Filters the comment author's IP before it is set.
     1837     * Filters the comment author's IP address before it is set.
    18381838     *
    18391839     * @since 1.5.0
    18401840     *
    1841      * @param string $comment_author_ip The comment author's IP.
     1841     * @param string $comment_author_ip The comment author's IP address.
    18421842     */
    18431843    $commentdata['comment_author_IP'] = apply_filters( 'pre_comment_user_ip', $commentdata['comment_author_IP'] );
  • trunk/src/wp-includes/pluggable.php

    r41686 r41704  
    14701470            /* translators: 1: Post title */
    14711471            $notify_message  = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
    1472             /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
    1473             $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1472            /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1473            $notify_message .= sprintf( __('Website: %1$s (IP address: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    14741474            $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    14751475            $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
     
    14811481            /* translators: 1: Post title */
    14821482            $notify_message  = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
    1483             /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
    1484             $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1483            /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1484            $notify_message .= sprintf( __('Website: %1$s (IP address: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    14851485            $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    14861486            $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
     
    14911491        default: // Comments
    14921492            $notify_message  = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
    1493             /* translators: 1: comment author, 2: author IP, 3: author domain */
    1494             $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1493            /* translators: 1: comment author, 2: comment author's IP address, 3: comment author's hostname */
     1494            $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    14951495            $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    14961496            $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     
    16311631            $notify_message  = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
    16321632            $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
    1633             /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
    1634             $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1633            /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1634            $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    16351635            /* translators: 1: Trackback/pingback/comment author URL */
    16361636            $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     
    16411641            $notify_message  = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
    16421642            $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
    1643             /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
    1644             $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1643            /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1644            $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    16451645            /* translators: 1: Trackback/pingback/comment author URL */
    16461646            $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     
    16511651            $notify_message  = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
    16521652            $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
    1653             /* translators: 1: Comment author name, 2: comment author's IP, 3: comment author IP's hostname */
    1654             $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1653            /* translators: 1: Comment author name, 2: comment author's IP address, 3: comment author's hostname */
     1654            $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    16551655            /* translators: 1: Comment author URL */
    16561656            $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
Note: See TracChangeset for help on using the changeset viewer.