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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37888 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-06-28 10:02:19 +00:00
parent 607641864f
commit a196640640
2 changed files with 17 additions and 4 deletions
+7 -4
View File
@@ -191,19 +191,22 @@ function wp_install_defaults( $user_id ) {
$wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $cat_tt_id, 'object_id' => 1) );
// Default comment
$first_comment_author = __('Mr WordPress');
$first_comment_author = __( 'A WordPress Commenter' );
$first_comment_email = 'wapuu@wordpress.example';
$first_comment_url = 'https://wordpress.org/';
$first_comment = __('Hi, this is a comment.
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.');
$first_comment = __( '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>.' );
if ( is_multisite() ) {
$first_comment_author = get_site_option( 'first_comment_author', $first_comment_author );
$first_comment_email = get_site_option( 'first_comment_email', $first_comment_email );
$first_comment_url = get_site_option( 'first_comment_url', network_home_url() );
$first_comment = get_site_option( 'first_comment', $first_comment );
}
$wpdb->insert( $wpdb->comments, array(
'comment_post_ID' => 1,
'comment_author' => $first_comment_author,
'comment_author_email' => '',
'comment_author_email' => $first_comment_email,
'comment_author_url' => $first_comment_url,
'comment_date' => $now,
'comment_date_gmt' => $now_gmt,