Ticket #21583: 21583.7.diff
File 21583.7.diff, 21.5 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' => '<span class="ab-icon"></span>', 665 'href' => '', 666 ) ); 667 668 get_current_screen()->render_options( 'screen-options', $wp_admin_bar ); 669 } 659 670 /** 660 671 * Add secondary menus. 661 672 * -
wp-includes/js/admin-bar.js
10 10 node.attr('tabindex', '0').attr('tabindex', tab); 11 11 }; 12 12 13 $('#wpadminbar').removeClass('nojq').removeClass('nojs').find('li.menupop'). hoverIntent({13 $('#wpadminbar').removeClass('nojq').removeClass('nojs').find('li.menupop').not('.sticky').hoverIntent({ 14 14 over: function(e){ 15 15 $(this).addClass('hover'); 16 16 }, … … 22 22 interval: 100 23 23 }); 24 24 25 $('.sticky', '#wpadminbar').click(function(e){ 26 e.preventDefault(); 27 $(this).toggleClass('hover'); 28 }); 29 25 30 $('#wp-admin-bar-get-shortlink').click(function(e){ 26 31 e.preventDefault(); 27 32 $(this).addClass('selected').children('.shortlink-input').blur(function(){ -
wp-includes/css/admin-bar.css
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
310 310 } 311 311 312 312 /** 313 * Screen Options 314 */ 315 316 #wpadminbar #wp-admin-bar-screen-options ul { 317 min-width: 200px; 318 padding: 0 0 15px; 319 } 320 321 #wpadminbar #wp-admin-bar-screen-options li { 322 padding: 0 12px; 323 } 324 325 #wpadminbar #wp-admin-bar-screen-options h5 { 326 padding: 15px 0 0; 327 color: #888; 328 font-size: 11px; 329 text-transform: uppercase; 330 } 331 332 #wpadminbar #wp-admin-bar-screen-options label { 333 display: block; 334 } 335 336 #wpadminbar #wp-admin-bar-per-page-1 label { 337 display: inline; 338 } 339 340 #wpadminbar li.ab-title:hover, 341 #wpadminbar li.ab-title:focus, 342 #wpadminbar li.ab-inline:hover, 343 #wpadminbar li.ab-inline:focus { 344 background: transparent; 345 } 346 347 #wpadminbar li#wp-admin-bar-column-layout, 348 #wpadminbar li#wp-admin-bar-per-page { 349 margin-top: 15px; 350 border-top: 1px solid #e0e0e0; 351 } 352 353 #wpadminbar li.ab-inline { 354 display: inline-block; 355 padding-right: 5px !important; 356 } 357 358 #wpadminbar #wp-admin-bar-screen-options li.ab-inline * { 359 display: inline; 360 } 361 362 #wpadminbar #wp-admin-bar-screen-options input[type=checkbox] { 363 margin: 2px 10px 0 0; 364 } 365 366 #wpadminbar #wp-admin-bar-screen-options input[type=radio] { 367 margin: 2px 5px 0 0; 368 } 369 370 #wpadminbar #wp-admin-bar-screen-options .postbox-title-action { 371 display: none; 372 } 373 374 375 /** 313 376 * My Account 314 377 */ 315 378 #wp-admin-bar-my-account > ul { … … 517 580 } 518 581 519 582 /** 583 * Sticky menu toggle arrows 584 */ 585 #wpadminbar .sticky .sticky-indicator { 586 position: relative; 587 float: right; 588 width: 20px; 589 height: 16px; 590 margin-top: 6px; 591 background-image: url("../images/admin-bar-sprite.png"); 592 background-position: 0 -254px; 593 background-repeat: no-repeat; 594 cursor: pointer; 595 } 596 597 #wpadminbar .sticky.hover .sticky-indicator { 598 background-position: 0 -228px; 599 } 600 601 /** 520 602 * WP Logo icon 521 603 */ 522 604 #wp-admin-bar-wp-logo > .ab-item .ab-icon { … … 573 655 } 574 656 575 657 /** 658 * Screen Settings icon 659 */ 660 #wpadminbar #wp-admin-bar-screen-options > .ab-item .ab-icon { 661 background-image: url(../images/admin-bar-sprite.png?d=20111130); 662 background-position: -3px -252px; 663 background-repeat: no-repeat; 664 } 665 666 #wpadminbar.nojs #wp-admin-bar-screen-options:hover > .ab-item .ab-icon, 667 #wpadminbar #wp-admin-bar-screen-options.hover > .ab-item .ab-icon { 668 background-image: url(../images/admin-bar-sprite.png?d=20111130); 669 background-position: -3px -228px; 670 background-repeat: no-repeat; 671 } 672 673 /** 576 674 * Customize support classes 577 675 */ 578 676 .no-customize-support .hide-if-no-customize, … … 590 688 #wp-admin-bar-wp-logo > .ab-item .ab-icon, 591 689 #wp-admin-bar-updates > .ab-item .ab-icon, 592 690 #wp-admin-bar-comments > .ab-item .ab-icon, 593 #wpadminbar #wp-admin-bar-new-content > .ab-item .ab-icon { 594 background-image: url(../images/admin-bar-sprite-2x.png?d=20120516); 595 background-size: 20px 220px; 691 #wpadminbar #wp-admin-bar-new-content > .ab-item .ab-icon, 692 #wpadminbar #wp-admin-bar-screen-options > .ab-item .ab-icon, 693 #wpadminbar .sticky .sticky-indicator { 694 background-image: url("../images/admin-bar-sprite-2x.png?d=20120516"); 695 background-size: 20px 276px; 596 696 } 597 697 } 598 698 -
wp-includes/class-wp-admin-bar.php
104 104 'parent' => false, 105 105 'href' => false, 106 106 'group' => false, 107 'sticky' => false, 107 108 'meta' => array(), 108 109 ); 109 110 … … 396 397 397 398 $is_parent = ! empty( $node->children ); 398 399 $has_link = ! empty( $node->href ); 400 $has_title = ! empty( $node->title ); 401 $is_sticky = $node->sticky === true ? true : false; 399 402 400 403 $tabindex = isset( $node->meta['tabindex'] ) ? (int) $node->meta['tabindex'] : ''; 401 404 $aria_attributes = $tabindex ? 'tabindex="' . $tabindex . '"' : ''; … … 410 413 if ( ! empty( $node->meta['class'] ) ) 411 414 $menuclass .= $node->meta['class']; 412 415 416 if ( $is_sticky ) 417 $menuclass .= 'sticky'; 418 413 419 if ( $menuclass ) 414 420 $menuclass = ' class="' . esc_attr( trim( $menuclass ) ) . '"'; 415 421 416 422 ?> 417 423 418 424 <li id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>"<?php echo $menuclass; ?>><?php 419 if ( $has_link ): 420 ?><a class="ab-item" <?php echo $aria_attributes; ?> href="<?php echo esc_url( $node->href ) ?>"<?php 421 if ( ! empty( $node->meta['onclick'] ) ) : 422 ?> onclick="<?php echo esc_js( $node->meta['onclick'] ); ?>"<?php 425 if ( $has_title ): 426 if ( $has_link ): 427 ?><a class="ab-item" <?php echo $aria_attributes; ?> href="<?php echo esc_url( $node->href ) ?>"<?php 428 if ( ! empty( $node->meta['onclick'] ) ) : 429 ?> onclick="<?php echo esc_js( $node->meta['onclick'] ); ?>"<?php 430 endif; 431 if ( ! empty( $node->meta['target'] ) ) : 432 ?> target="<?php echo esc_attr( $node->meta['target'] ); ?>"<?php 423 433 endif; 424 if ( ! empty( $node->meta['target'] ) ) : 425 ?> target="<?php echo esc_attr( $node->meta['target'] ); ?>"<?php 434 if ( ! empty( $node->meta['title'] ) ) : 435 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php 436 endif; 437 ?>><?php 438 else: 439 ?><div class="ab-item ab-empty-item" <?php echo $aria_attributes; 440 if ( ! empty( $node->meta['title'] ) ) : 441 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php 442 endif; 443 ?>><?php 426 444 endif; 427 if ( ! empty( $node->meta['title'] ) ) : 428 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php 445 446 echo $node->title; 447 448 if ( $is_sticky ) : 449 ?><span class="sticky-indicator"></span><?php 429 450 endif; 430 ?>><?php 431 else:432 ?><div class="ab-item ab-empty-item" <?php echo $aria_attributes;433 if ( ! empty( $node->meta['title'] ) ):434 ?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php451 452 if ( $has_link ) : 453 ?></a><?php 454 else: 455 ?></div><?php 435 456 endif; 436 ?>><?php437 457 endif; 438 458 439 echo $node->title;440 441 if ( $has_link ) :442 ?></a><?php443 else:444 ?></div><?php445 endif;446 447 459 if ( $is_parent ) : 448 460 ?><div class="ab-sub-wrapper"><?php 449 461 foreach ( $node->children as $group ) { … … 483 495 } 484 496 add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 ); 485 497 498 if ( is_admin() ) 499 add_action( 'admin_bar_menu', 'wp_admin_bar_screen_options', 90 ); 500 486 501 add_action( 'admin_bar_menu', 'wp_admin_bar_add_secondary_groups', 200 ); 487 502 488 503 do_action( 'add_admin_bar_menus' ); -
wp-admin/includes/screen.php
49 49 * @param string|WP_Screen $screen 50 50 */ 51 51 function meta_box_prefs( $screen ) { 52 global $wp_meta_boxes; 53 54 if ( is_string( $screen ) ) 55 $screen = convert_to_screen( $screen ); 56 57 if ( empty($wp_meta_boxes[$screen->id]) ) 58 return; 59 60 $hidden = get_hidden_meta_boxes($screen); 61 62 foreach ( array_keys($wp_meta_boxes[$screen->id]) as $context ) { 63 foreach ( array_keys($wp_meta_boxes[$screen->id][$context]) as $priority ) { 64 foreach ( $wp_meta_boxes[$screen->id][$context][$priority] as $box ) { 65 if ( false == $box || ! $box['title'] ) 66 continue; 67 // Submit box cannot be hidden 68 if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) 69 continue; 70 $box_id = $box['id']; 71 echo '<label for="' . $box_id . '-hide">'; 72 echo '<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"' : '') . ' />'; 73 echo "{$box['title']}</label>\n"; 74 } 75 } 76 } 52 return; 77 53 } 78 54 79 55 /** … … 870 846 * @since 3.3.0 871 847 */ 872 848 public function render_screen_options() { 873 global $wp_meta_boxes, $wp_list_table; 849 return; 850 } 874 851 852 /* 853 * Render screen options in the admin bar 854 * 855 */ 856 function render_options( $parent, $wp_admin_bar ) { 857 $this->render_show_on_screen( $parent, $wp_admin_bar ); 858 $this->render_layout( $parent, $wp_admin_bar ); 859 $this->render_per_page( $parent, $wp_admin_bar ); 860 // @todo $this->_screen_settings 861 } 862 863 function render_show_on_screen( $parent, $wp_admin_bar ) { 864 global $wp_meta_boxes; 865 866 if ( ! $this->show_screen_options() ) 867 return; 868 875 869 $columns = get_column_headers( $this ); 876 $hidden = get_hidden_columns( $this );877 870 878 ?> 879 <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>"> 880 <form id="adv-settings" action="" method="post"> 881 <?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?> 882 <h5><?php _e( 'Show on screen' ); ?></h5> 883 <?php 884 endif; 871 if ( ! isset( $wp_meta_boxes[ $this->id ] ) && ( ! $columns || isset( $columns['_title'] ) ) ) 872 return; 885 873 886 if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?> 887 <div class="metabox-prefs"> 888 <?php 889 meta_box_prefs( $this ); 874 $wp_admin_bar->add_menu( array( 875 'id' => 'show-on-screen', 876 'parent' => $parent, 877 'href' => '', 878 'meta' => array( 879 'html' => '<h5 class="ab-item">' . __( 'Show on screen' ) . '</h5>', 880 'class' => 'ab-title' 881 ), 882 ) ); 890 883 891 if ( 'dashboard' === $this->id && current_user_can( 'edit_theme_options' ) ) { 892 if ( isset( $_GET['welcome'] ) ) { 893 $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1; 894 update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked ); 895 } else { 896 $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); 897 if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) 898 $welcome_checked = false; 899 } 900 echo '<label for="wp_welcome_panel-hide">'; 901 echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />'; 902 echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n"; 884 // Render meta box show/hide. 885 if ( isset( $wp_meta_boxes[ $this->id ] ) ) { 886 $hidden = get_hidden_meta_boxes($this); 887 888 foreach ( array_keys($wp_meta_boxes[$this->id]) as $context ) { 889 foreach ( array_keys($wp_meta_boxes[$this->id][$context]) as $priority ) { 890 foreach ( $wp_meta_boxes[$this->id][$context][$priority] as $box ) { 891 if ( false == $box || ! $box['title'] ) 892 continue; 893 // Submit box cannot be hidden 894 if ( 'submitdiv' == $box['id'] || 'linksubmitdiv' == $box['id'] ) 895 continue; 896 $box_id = $box['id']; 897 $html = '<label class="ab-item" for="' . $box_id . '-hide">' . 898 '<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"' : '') . ' />' . 899 "{$box['title']}</label>\n"; 900 $wp_admin_bar->add_menu( array( 901 'id' => 'show-on-screen-' . $box_id, 902 'parent' => $parent, 903 'href' => '', 904 'meta' => array( 'html' => $html ), 905 ) ); 903 906 } 904 ?> 905 <br class="clear" /> 906 </div> 907 <?php endif; 908 if ( $columns ) : 909 if ( ! empty( $columns['_title'] ) ) : ?> 910 <h5><?php echo $columns['_title']; ?></h5> 911 <?php endif; ?> 912 <div class="metabox-prefs"> 913 <?php 914 $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname'); 907 } 908 } 915 909 916 foreach ( $columns as $column => $title ) { 917 // Can't hide these for they are special 918 if ( in_array( $column, $special ) ) 919 continue; 920 if ( empty( $title ) ) 921 continue; 922 923 if ( 'comments' == $column ) 924 $title = __( 'Comments' ); 925 $id = "$column-hide"; 926 echo '<label for="' . $id . '">'; 927 echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( !in_array($column, $hidden), true, false ) . ' />'; 928 echo "$title</label>\n"; 910 if ( 'dashboard' === $this->id && current_user_can( 'edit_theme_options' ) ) { 911 if ( isset( $_GET['welcome'] ) ) { 912 $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1; 913 update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked ); 914 } else { 915 $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); 916 if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) 917 $welcome_checked = false; 929 918 } 930 ?> 931 <br class="clear" /> 932 </div> 933 <?php endif; 919 $html = '<label class="ab-item" for="wp_welcome_panel-hide">' . 920 '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />' . 921 _x( 'Welcome', 'Welcome panel' ) . "</label>\n"; 922 $wp_admin_bar->add_menu( array( 923 'id' => 'show-on-screen-' . $box_id, 924 'parent' => $parent, 925 'href' => '', 926 'meta' => array( 'html' => $html ), 927 ) ); 928 } 929 } 934 930 935 $this->render_screen_layout();936 $this->render_per_page_options();937 echo $this->_screen_settings;931 // Render column show/hide. 932 if ( $columns ) { 933 $hidden = get_hidden_columns( $this ); 938 934 939 ?> 940 <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> 941 </form> 942 </div> 943 <?php 935 if ( ! empty( $columns['_title'] ) ) { 936 echo '<h5>' . $columns['_title'] . '</h5>'; 937 } 938 939 $special = array( '_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname' ); 940 941 foreach ( $columns as $column => $title ) { 942 // Can't hide these for they are special 943 if ( in_array( $column, $special ) ) 944 continue; 945 if ( empty( $title ) ) 946 continue; 947 948 if ( 'comments' == $column ) 949 $title = __( 'Comments' ); 950 $id = "$column-hide"; 951 $html = '<label class="ab-item" for="' . $id . '">' . 952 '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( !in_array($column, $hidden), true, false ) . ' />' . 953 "$title</label>\n"; 954 $wp_admin_bar->add_menu( array( 955 'id' => 'show-on-screen-' . $column, 956 'parent' => $parent, 957 'href' => '', 958 'meta' => array( 'html' => $html ), 959 ) ); 960 } 961 } 944 962 } 945 963 946 /** 947 * Render the option for number of columns on the page 948 * 949 * @since 3.3.0 950 */ 951 function render_screen_layout() { 964 function render_layout( $parent, $wp_admin_bar ) { 965 // Back compat for plugins using the filter instead of add_screen_option() 966 $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this ); 967 968 if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) ) 969 $this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) ); 970 971 if ( $this->get_option( 'layout_columns' ) ) { 972 $this->columns = (int) get_user_option("screen_layout_$this->id"); 973 974 if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) ) 975 $this->columns = $this->get_option( 'layout_columns', 'default' ); 976 } 977 $GLOBALS[ 'screen_layout_columns' ] = $this->columns; // Set the global for back-compat. 978 952 979 if ( ! $this->get_option('layout_columns') ) 953 980 return; 954 981 955 982 $screen_layout_columns = $this->get_columns(); 956 983 $num = $this->get_option( 'layout_columns', 'max' ); 957 984 958 ?> 959 <h5 class="screen-layout"><?php _e('Screen Layout'); ?></h5> 960 <div class='columns-prefs'><?php 961 _e('Number of Columns:'); 962 for ( $i = 1; $i <= $num; ++$i ): 963 ?> 964 <label class="columns-prefs-<?php echo $i; ?>"> 965 <input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>' 966 <?php checked( $screen_layout_columns, $i ); ?> /> 967 <?php echo esc_html( $i ); ?> 968 </label> 969 <?php 970 endfor; ?> 971 </div> 972 <?php 985 $wp_admin_bar->add_menu( array( 986 'id' => 'column-layout', 987 'parent' => $parent, 988 'href' => '', 989 'meta' => array( 990 'html' => '<h5 class="ab-item">' . __( 'Column Layout' ) . '</h5>', 991 'class' => 'ab-title' 992 ), 993 ) ); 994 995 for ( $i = 1; $i <= $num; ++$i ) { 996 $html = '<label class="ab-item" class="columns-prefs-' . $i . '">' . 997 "<input type='radio' name='screen_columns' value='" . $i . "'" . 998 checked( $screen_layout_columns, $i, false ) . '/>' . 999 esc_html( $i ) . 1000 '</label>'; 1001 1002 $wp_admin_bar->add_menu( array( 1003 'id' => 'column-layout-' . $i, 1004 'parent' => $parent, 1005 'href' => '', 1006 'meta' => array( 1007 'html' => $html, 1008 'class' => 'ab-inline' 1009 ), 1010 ) ); 1011 } 973 1012 } 974 1013 975 1014 /** 976 1015 * Render the items per page option 977 1016 * 978 * @since 3. 3.01017 * @since 3.5.0 979 1018 */ 980 function render_per_page_options() { 1019 function render_per_page( $parent, $wp_admin_bar ) { 1020 // @todo form and nonce 1021 // wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); 1022 981 1023 if ( ! $this->get_option( 'per_page' ) ) 982 1024 return; 983 1025 … … 1007 1049 if ( isset( $this->post_type ) ) 1008 1050 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type ); 1009 1051 1010 ?> 1011 <div class="screen-options"> 1012 <?php if ( $per_page_label ) : ?> 1013 <input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]" 1014 id="<?php echo esc_attr( $option ); ?>" maxlength="3" 1015 value="<?php echo esc_attr( $per_page ); ?>" /> 1016 <label for="<?php echo esc_attr( $option ); ?>"> 1017 <?php echo esc_html( $per_page_label ); ?> 1018 </label> 1019 <?php endif; 1052 $wp_admin_bar->add_menu( array( 1053 'id' => 'per-page', 1054 'parent' => $parent, 1055 'href' => '', 1056 'meta' => array( 1057 'html' => '<h5 class="ab-item">' . __( 'Items Per Page' ) . '</h5>', 1058 'class' => 'ab-title' 1059 ), 1060 ) ); 1020 1061 1021 echo get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ); ?> 1022 <input type='hidden' name='wp_screen_options[option]' value='<?php echo esc_attr($option); ?>' /> 1023 </div> 1024 <?php 1062 if ( $per_page_label ) { 1063 $html = '<input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]" 1064 id="' . esc_attr( $option ) . '" maxlength="3" value="' . esc_attr( $per_page ) . '" />' . 1065 '<label class="ab-item" for="' . esc_attr( $option ) . '">' . 1066 esc_html( $per_page_label ) . 1067 '</label>'; 1068 $wp_admin_bar->add_menu( array( 1069 'id' => 'per-page-1', 1070 'parent' => $parent, 1071 'href' => '', 1072 'meta' => array( 1073 'html' => $html, 1074 'class' => 'ab-inline' 1075 ), 1076 ) ); 1077 } 1078 1079 $html = get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ) . 1080 "<input type='hidden' name='wp_screen_options[option]' value='" . esc_attr($option) . "' />"; 1081 1082 $wp_admin_bar->add_menu( array( 1083 'id' => 'per-page-submit', 1084 'parent' => $parent, 1085 'href' => '', 1086 'meta' => array( 'html' => $html ), 1087 ) ); 1025 1088 } 1089 1090 /** 1091 * Render the option for number of columns on the page 1092 * 1093 * @since 3.3.0 1094 */ 1095 function render_screen_layout() { 1096 return; 1097 } 1098 1099 /** 1100 * Render the items per page option 1101 * 1102 * @since 3.3.0 1103 */ 1104 function render_per_page_options() { 1105 return; 1106 } 1026 1107 } -
wp-admin/admin-header.php
115 115 <div id="wpcontent"> 116 116 117 117 <?php 118 $current_screen->set_parentage( $parent_file ); 118 119 do_action('in_admin_header'); 119 120 ?> 120 121 … … 122 123 <?php 123 124 unset($title_class, $blog_name, $total_update_count, $update_title); 124 125 125 $current_screen->set_parentage( $parent_file );126 127 126 ?> 128 127 129 128 <div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>"> 130 129 <?php 131 130 132 $current_screen->render_screen_meta();133 134 131 if ( is_network_admin() ) 135 132 do_action('network_admin_notices'); 136 133 elseif ( is_user_admin() )