Make WordPress Core

Changeset 43954


Ignore:
Timestamp:
11/30/2018 08:24:42 PM (6 years ago)
Author:
mcsf
Message:

Update sidebars_widgets to match Twenty Nineteen's single widget area

  • Also update the customizer tests to match it.

Props SergeyBiryukov, pento.

Location:
branches/5.0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/class-wp-theme-install-list-table.php

    r41683 r43954  
    231231     *     An object that contains theme data returned by the WordPress.org API.
    232232     *
    233      *     @type string $name           Theme name, e.g. 'Twenty Seventeen'.
    234      *     @type string $slug           Theme slug, e.g. 'twentyseventeen'.
     233     *     @type string $name           Theme name, e.g. 'Twenty Nineteen'.
     234     *     @type string $slug           Theme slug, e.g. 'twentynineteen'.
    235235     *     @type string $version        Theme version, e.g. '1.1'.
    236236     *     @type string $author         Theme author username, e.g. 'melchoyce'.
    237      *     @type string $preview_url    Preview URL, e.g. 'http://2017.wordpress.net/'.
    238      *     @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentyseventeen/'.
     237     *     @type string $preview_url    Preview URL, e.g. 'http://2019.wordpress.net/'.
     238     *     @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentynineteen/'.
    239239     *     @type float  $rating         Rating score.
    240240     *     @type int    $num_ratings    The number of ratings.
    241      *     @type string $homepage       Theme homepage, e.g. 'https://wordpress.org/themes/twentyseventeen/'.
     241     *     @type string $homepage       Theme homepage, e.g. 'https://wordpress.org/themes/twentynineteen/'.
    242242     *     @type string $description    Theme description.
    243243     *     @type string $download_link  Theme ZIP download URL.
  • branches/5.0/src/wp-admin/includes/upgrade.php

    r43921 r43954  
    331331    update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
    332332    update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
    333     update_option( 'sidebars_widgets', array( 'wp_inactive_widgets' => array(), 'sidebar-1' => array( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2' ), 'sidebar-2' => array(), 'sidebar-3' => array(), 'array_version' => 3 ) );
     333    update_option( 'sidebars_widgets', array( 'wp_inactive_widgets' => array(), 'sidebar-1' => array( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2' ), 'array_version' => 3 ) );
    334334    if ( ! is_multisite() )
    335335        update_user_meta( $user_id, 'show_welcome_panel', 1 );
  • branches/5.0/src/wp-admin/nav-menus.php

    r42811 r43954  
    520520    $overview  = '<p>' . __( 'This screen is used for managing your navigation menus.' ) . '</p>';
    521521    /* translators: 1: Widgets admin screen URL, 2 and 3: The name of the default themes */
    522     $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the navigation menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Sixteen', 'Twenty Seventeen' ) . '</p>';
     522    $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the navigation menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Seventeen', 'Twenty Nineteen' ) . '</p>';
    523523    $overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
    524524    $overview .= '<ul><li>' . __( 'Create, edit, and delete menus' ) . '</li>';
  • branches/5.0/tests/phpunit/tests/customize/widgets.php

    r41935 r43954  
    3333        unset( $GLOBALS['_wp_sidebars_widgets'] ); // clear out cache set by wp_get_sidebars_widgets()
    3434        $sidebars_widgets = wp_get_sidebars_widgets();
    35         $this->assertEqualSets( array( 'wp_inactive_widgets', 'sidebar-1', 'sidebar-2', 'sidebar-3' ), array_keys( wp_get_sidebars_widgets() ) );
     35        $this->assertEqualSets( array( 'wp_inactive_widgets', 'sidebar-1' ), array_keys( wp_get_sidebars_widgets() ) );
    3636        $this->assertContains( 'search-2', $sidebars_widgets['sidebar-1'] );
    3737        $this->assertContains( 'categories-2', $sidebars_widgets['sidebar-1'] );
Note: See TracChangeset for help on using the changeset viewer.