Make WordPress Core

Ticket #34619: 34619.3.patch

File 34619.3.patch, 2.2 KB (added by SergeyBiryukov, 11 years ago)
  • src/wp-admin/includes/schema.php

     
    983983                'illegal_names' => array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator', 'files' ),
    984984                'wpmu_upgrade_site' => $wp_db_version,
    985985                'welcome_email' => $welcome_email,
    986                 'first_post' => __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ),
     986                /* translators: %s: site link */
     987                'first_post' => __( 'Welcome to %s. This is your first post. Edit or delete it, then start blogging!' ),
    987988                // @todo - network admins should have a method of editing the network siteurl (used for cookie hash)
    988989                'siteurl' => get_option( 'siteurl' ) . '/',
    989990                'add_new_users' => '0',
  • src/wp-admin/includes/upgrade.php

     
    155155        if ( is_multisite() ) {
    156156                $first_post = get_site_option( 'first_post' );
    157157
    158                 if ( empty($first_post) )
    159                         $first_post = __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start writing!' );
     158                if ( ! $first_post ) {
     159                        /* translators: %s: site link */
     160                        $first_post = __( 'Welcome to %s. This is your first post. Edit or delete it, then start blogging!' ),
     161                }
    160162
    161                 $first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post );
    162                 $first_post = str_replace( "SITE_NAME", get_current_site()->site_name, $first_post );
     163                $first_post = sprintf( $first_post,
     164                        sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_current_site()->site_name )
     165                );
     166
     167                // Back-compat for pre-4.4
     168                $first_post = str_replace( 'SITE_URL', esc_url( network_home_url() ), $first_post );
     169                $first_post = str_replace( 'SITE_NAME', get_current_site()->site_name, $first_post );
    163170        } else {
    164171                $first_post = __( 'Welcome to WordPress. This is your first post. Edit or delete it, then start writing!' );
    165172        }