Remove non-translatable HTML code from the first post content in populate_network() and wp_install_defaults().

Add translator comment.

Props ramiy.
Fixes #34619.

git-svn-id: https://develop.svn.wordpress.org/trunk@35614 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2015-11-11 20:54:20 +00:00
parent 242709ce40
commit de44d6b375
2 changed files with 13 additions and 5 deletions
+11 -4
View File
@@ -155,11 +155,18 @@ function wp_install_defaults( $user_id ) {
if ( is_multisite() ) {
$first_post = get_site_option( 'first_post' );
if ( empty($first_post) )
$first_post = __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start writing!' );
if ( ! $first_post ) {
/* translators: %s: site link */
$first_post = __( 'Welcome to %s. This is your first post. Edit or delete it, then start blogging!' );
}
$first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post );
$first_post = str_replace( "SITE_NAME", get_current_site()->site_name, $first_post );
$first_post = sprintf( $first_post,
sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_current_site()->site_name )
);
// Back-compat for pre-4.4
$first_post = str_replace( 'SITE_URL', esc_url( network_home_url() ), $first_post );
$first_post = str_replace( 'SITE_NAME', get_current_site()->site_name, $first_post );
} else {
$first_post = __( 'Welcome to WordPress. This is your first post. Edit or delete it, then start writing!' );
}