Make WordPress Core

Ticket #34306: 34306.diff

File 34306.diff, 3.3 KB (added by dd32, 10 years ago)
  • src/wp-admin/includes/schema.php

    function populate_options() { 
    356356        $guessurl = wp_guess_url();
    357357        /**
    358358         * Fires before creating WordPress options and populating their default values.
    359359         *
    360360         * @since 2.6.0
    361361         */
    362362        do_action( 'populate_options' );
    363363
    364364        if ( ini_get('safe_mode') ) {
    365365                // Safe mode can break mkdir() so use a flat structure by default.
    366366                $uploads_use_yearmonth_folders = 0;
    367367        } else {
    368368                $uploads_use_yearmonth_folders = 1;
    369369        }
    370370
    371         $template = WP_DEFAULT_THEME;
     371        $template = $stylesheet = WP_DEFAULT_THEME;
     372        if ( defined( 'WP_DEFAULT_THEME_NEW_DEFAULT' ) ) {
     373                $theme = wp_get_theme( WP_DEFAULT_THEME_NEW_DEFAULT );
     374                if ( ! $theme->errors() ) {
     375                        $template = $stylesheet = WP_DEFAULT_THEME_NEW_DEFAULT;
     376                }
     377        }
     378
    372379        // If default theme is a child theme, we need to get its template
    373380        $theme = wp_get_theme( $template );
    374381        if ( ! $theme->errors() )
    375382                $template = $theme->get_template();
    376383
    377384        $timezone_string = '';
    378385        $gmt_offset = 0;
    379386        /* translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14)
    380387           or a valid timezone string (America/New_York). See http://us3.php.net/manual/en/timezones.php
    381388           for all timezone strings supported by PHP.
    382389        */
    383390        $offset_or_tz = _x( '0', 'default GMT offset or timezone string' );
    384391        if ( is_numeric( $offset_or_tz ) )
    385392                $gmt_offset = $offset_or_tz;
    386393        elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list() ) )
    function populate_options() { 
    420427        'comment_moderation' => 0,
    421428        'moderation_notify' => 1,
    422429        'permalink_structure' => '',
    423430        'blog_charset' => 'UTF-8',
    424431        'moderation_keys' => '',
    425432        'active_plugins' => array(),
    426433        'category_base' => '',
    427434        'ping_sites' => 'http://rpc.pingomatic.com/',
    428435        'comment_max_links' => 2,
    429436        'gmt_offset' => $gmt_offset,
    430437
    431438        // 1.5
    432439        'default_email_category' => 1,
    433440        'recently_edited' => '',
    434441        'template' => $template,
    435         'stylesheet' => WP_DEFAULT_THEME,
     442        'stylesheet' => $stylesheet,
    436443        'comment_whitelist' => 1,
    437444        'blacklist_keys' => '',
    438445        'comment_registration' => 0,
    439446        'html_type' => 'text/html',
    440447
    441448        // 1.5.1
    442449        'use_trackback' => 0,
    443450
    444451        // 2.0
    445452        'default_role' => 'subscriber',
    446453        'db_version' => $wp_db_version,
    447454
    448455        // 2.0.1
    449456        'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders,
    450457        'upload_path' => '',
  • src/wp-includes/default-constants.php

    function wp_templating_constants() { 
    339339         */
    340340        define('TEMPLATEPATH', get_template_directory());
    341341
    342342        /**
    343343         * Filesystem path to the current active template stylesheet directory
    344344         * @since 2.1.0
    345345         */
    346346        define('STYLESHEETPATH', get_stylesheet_directory());
    347347
    348348        /**
    349349         * Slug of the default theme for this install.
    350350         * Used as the default theme when installing new sites.
    351351         * Will be used as the fallback if the current theme doesn't exist.
    352352         * @since 3.0.0
    353353         */
    354         if ( !defined('WP_DEFAULT_THEME') )
     354        if ( !defined('WP_DEFAULT_THEME') ) {
    355355                define( 'WP_DEFAULT_THEME', 'twentyfifteen' );
     356                define( 'WP_DEFAULT_THEME_NEW_DEFAULT', 'twentysixteen' );
     357        }
    356358
    357359}