Make WordPress Core

Ticket #38533: 38533.1.diff

File 38533.1.diff, 1.8 KB (added by ocean90, 7 years ago)
  • src/wp-admin/includes/schema.php

     
    518518        'medium_large_size_h' => 0,
    519519        );
    520520
     521        // 4.7.0
     522        'fresh_site' => 1,
     523
    521524        // 3.3
    522525        if ( ! is_multisite() ) {
    523526                $options['initial_db_version'] = ! empty( $wp_current_db_version ) && $wp_current_db_version < $wp_db_version
  • src/wp-includes/default-filters.php

     
    188188// Email filters
    189189add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
    190190
     191// Mark site as no longer fresh
     192if ( get_option( 'fresh_site' ) ) {
     193        foreach ( array( 'save_post_post', 'save_post_page', 'wp_ajax_save-widget', 'wp_ajax_widgets-order', 'customize_save_after' ) as $action ) {
     194                add_action( $action, '_delete_option_fresh_site' );
     195        }
     196}
     197
    191198// Misc filters
    192199add_filter( 'option_ping_sites',        'privacy_ping_filter'                 );
    193200add_filter( 'option_blog_charset',      '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
  • src/wp-includes/functions.php

     
    32413241}
    32423242
    32433243/**
     3244 * Delete the fresh site option.
     3245 *
     3246 * @since 4.7.0
     3247 * @access private
     3248 */
     3249function _delete_option_fresh_site() {
     3250        update_option( 'fresh_site', 0 );
     3251}
     3252
     3253/**
    32443254 * Set the localized direction for MCE plugin.
    32453255 *
    32463256 * Will only set the direction to 'rtl', if the WordPress locale has