WordPress.org

Make WordPress Core

Changeset 38919


Ignore:
Timestamp:
10/25/2016 07:59:31 PM (4 years ago)
Author:
ocean90
Message:

Install: Update sidebars_widgets option for Twenty Seventeen to match its three sidebars.

See #38372.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r38893 r38919  
    254254    update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
    255255    update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
    256     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 ) );
    257 
     256    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 ) );
    258257    if ( ! is_multisite() )
    259258        update_user_meta( $user_id, 'show_welcome_panel', 1 );
  • trunk/tests/phpunit/tests/customize/widgets.php

    r38858 r38919  
    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' ), array_keys( wp_get_sidebars_widgets() ) );
     35        $this->assertEqualSets( array( 'wp_inactive_widgets', 'sidebar-1', 'sidebar-2', 'sidebar-3' ), 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.