Make WordPress Core


Ignore:
Timestamp:
11/23/2011 06:30:45 PM (13 years ago)
Author:
nacin
Message:

Change show/hide storage mechanism for show_welcome_panel. 0 = hide, 1 = show, 2 = show if the multisite owner. Make welcome panel dismissable without JS (openable too via the URL). fixes #19338, fixes #19127.

File:
1 edited

Legend:

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

    r19410 r19418  
    283283    update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
    284284    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 ( ), 'sidebar-4' => array ( ), 'sidebar-5' => array ( ), 'array_version' => 3 ) );
     285
     286    if ( ! is_multisite() )
     287        update_user_meta( $user_id, 'show_welcome_panel', 1 );
     288    elseif ( ! is_super_admin( $user_id ) && ! metadata_exists( 'user', $user_id, 'show_welcome_panel' ) )
     289        update_user_meta( $user_id, 'show_welcome_panel', 2 );
    285290
    286291    if ( is_multisite() ) {
Note: See TracChangeset for help on using the changeset viewer.