WordPress.org

Make WordPress Core

Changeset 37888


Ignore:
Timestamp:
06/28/2016 10:02:19 AM (4 years ago)
Author:
ocean90
Message:

Comments: Improve author and content of the default comment.

The new comment:

A WordPress Commenter <wapuu@wordpress.example>:

Hi, this is a comment.
To moderate comments, just log in. There you will have the option to edit or delete them.
Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.

Also introduces a network setting to set the email address of the first comment author on a new site.

Props Ipstenu, rachelbaker, jorbin, jeremyfelt.
Fixes #36702, #14268.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r37854 r37888  
    192192
    193193    // Default comment
    194     $first_comment_author = __('Mr WordPress');
     194    $first_comment_author = __( 'A WordPress Commenter' );
     195    $first_comment_email = 'wapuu@wordpress.example';
    195196    $first_comment_url = 'https://wordpress.org/';
    196     $first_comment = __('Hi, this is a comment.
    197 To delete a comment, just log in and view the post&#039;s comments. There you will have the option to edit or delete them.');
     197    $first_comment = __( 'Hi, this is a comment.
     198To moderate comments, just log in. There you will have the option to edit or delete them.
     199Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.' );
    198200    if ( is_multisite() ) {
    199201        $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author );
     202        $first_comment_email = get_site_option( 'first_comment_email', $first_comment_email );
    200203        $first_comment_url = get_site_option( 'first_comment_url', network_home_url() );
    201204        $first_comment = get_site_option( 'first_comment', $first_comment );
     
    204207        'comment_post_ID' => 1,
    205208        'comment_author' => $first_comment_author,
    206         'comment_author_email' => '',
     209        'comment_author_email' => $first_comment_email,
    207210        'comment_author_url' => $first_comment_url,
    208211        'comment_date' => $now,
  • trunk/src/wp-admin/network/settings.php

    r37488 r37888  
    6363        'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled',
    6464        'illegal_names', 'limited_email_domains', 'banned_email_domains', 'WPLANG', 'admin_email',
     65        'first_comment_email',
    6566    );
    6667
     
    262263                    <p class="description" id="first-comment-author-desc">
    263264                        <?php _e( 'The author of the first comment on a new site.' ) ?>
     265                    </p>
     266                </td>
     267            </tr>
     268            <tr>
     269                <th scope="row"><label for="first_comment_email"><?php _e( 'First Comment Email' ) ?></label></th>
     270                <td>
     271                    <input type="text" size="40" name="first_comment_email" id="first_comment_email" aria-describedby="first-comment-email-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_email' ) ); ?>" />
     272                    <p class="description" id="first-comment-email-desc">
     273                        <?php _e( 'The email address of the first comment author on a new site.' ) ?>
    264274                    </p>
    265275                </td>
Note: See TracChangeset for help on using the changeset viewer.