Ticket #21583: 21583.diff
File 21583.diff, 3.6 KB (added by , 12 years ago) |
---|
-
wp-includes/admin-bar.php
656 656 ) ); 657 657 } 658 658 659 function wp_admin_bar_screen_options( $wp_admin_bar ) { 660 661 $wp_admin_bar->add_menu( array( 662 'parent' => 'top-secondary', 663 'id' => 'screen-options', 664 'title' => '(cog)', 665 'href' => '', 666 ) ); 667 668 get_current_screen()->render_admin_bar_screen_options( 'screen-options', $wp_admin_bar ); 669 } 659 670 /** 660 671 * Add secondary menus. 661 672 * -
wp-includes/class-wp-admin-bar.php
483 483 } 484 484 add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 ); 485 485 486 if ( is_admin() ) 487 add_action( 'admin_bar_menu', 'wp_admin_bar_screen_options', 90 ); 488 486 489 add_action( 'admin_bar_menu', 'wp_admin_bar_add_secondary_groups', 200 ); 487 490 488 491 do_action( 'add_admin_bar_menus' ); -
wp-admin/includes/screen.php
943 943 <?php 944 944 } 945 945 946 function render_admin_bar_screen_options( $parent, $wp_admin_bar ) { 947 global $wp_meta_boxes, $wp_list_table; 948 949 if ( $this->show_screen_options() ) { 950 if ( isset( $wp_meta_boxes[ $this->id ] ) || ( $columns && empty( $columns['_title'] ) ) ) { 951 $wp_admin_bar->add_menu( array( 952 'id' => 'show-on-screen', 953 'parent' => $parent, 954 'href' => '', 955 'meta' => array( 'html' => '<h5>' . __( 'Show on screen' ) . '</h5>' ), 956 ) ); 957 958 if ( isset( $wp_meta_boxes[ $this->id ] ) ) { 959 $hidden = get_hidden_meta_boxes($this); 960 961 foreach ( array_keys($wp_meta_boxes[$this->id]) as $context ) { 962 foreach ( array_keys($wp_meta_boxes[$this->id][$context]) as $priority ) { 963 foreach ( $wp_meta_boxes[$this->id][$context][$priority] as $box ) { 964 if ( false == $box || ! $box['title'] ) 965 continue; 966 // Submit box cannot be hidden 967 if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) 968 continue; 969 $box_id = $box['id']; 970 $html = '<label for="' . $box_id . '-hide">' . 971 '<input class="hide-postbox-tog" name="' . $box_id . '-hide" type="checkbox" id="' . $box_id . '-hide" value="' . $box_id . '"' . (! in_array($box_id, $hidden) ? ' checked="checked"' : '') . ' />' . 972 "{$box['title']}</label>\n"; 973 $wp_admin_bar->add_menu( array( 974 'id' => 'show-on-screen-' . $box_id, 975 'parent' => $parent, 976 'href' => '', 977 'meta' => array( 'html' => $html ), 978 ) ); 979 } 980 } 981 } 982 } 983 } 984 } 985 } 986 946 987 /** 947 988 * Render the option for number of columns on the page 948 989 * -
wp-admin/admin-header.php
112 112 <div id="wpcontent"> 113 113 114 114 <?php 115 $current_screen->set_parentage( $parent_file ); 115 116 do_action('in_admin_header'); 116 117 ?> 117 118 … … 119 120 <?php 120 121 unset($title_class, $blog_name, $total_update_count, $update_title); 121 122 122 $current_screen->set_parentage( $parent_file );123 124 123 ?> 125 124 126 125 <div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>"> 127 126 <?php 128 127 129 $current_screen->render_screen_meta();130 131 128 if ( is_network_admin() ) 132 129 do_action('network_admin_notices'); 133 130 elseif ( is_user_admin() )