Changeset 18867
- Timestamp:
- 10/03/2011 04:00:57 AM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.dev.css
r18866 r18867 1507 1507 #screen-options-wrap h5, 1508 1508 #contextual-help-wrap h5 { 1509 margin: 8px 0;1509 margin: 12px 0 2px; 1510 1510 font-size: 13px; 1511 1511 } 1512 1512 1513 1513 .metabox-prefs label { 1514 display: inline-block;1515 1514 padding-right: 15px; 1516 1515 white-space: nowrap; 1517 line-height: 30px;1518 1516 } 1519 1517 -
trunk/wp-admin/edit-comments.php
r18864 r18867 110 110 $title = __('Comments'); 111 111 112 add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) ); 113 114 $current_screen->add_screen_options( 115 '<p>test</p>' 116 ); 112 $current_screen->add_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) ); 113 $current_screen->add_option_context( '<p>test</p>' ); 117 114 118 115 add_contextual_help( $current_screen, '<p>' . __( 'You can manage comments made on your site similar to the way you manage Posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>' . -
trunk/wp-admin/edit-form-advanced.php
r18864 r18867 162 162 $current_screen->add_option('layout_columns', array('max' => 2, 'default' => 'auto') ); 163 163 164 $current_screen->add_ screen_options(164 $current_screen->add_option_context( 165 165 '<p>test</p>' 166 166 ); -
trunk/wp-admin/edit-link-form.php
r18864 r18867 38 38 do_action('do_meta_boxes', 'link', 'side', $link); 39 39 40 add_screen_option('layout_columns', array('max' => 2, 'default' => 'auto') );40 $current_screen->add_option('layout_columns', array('max' => 2, 'default' => 'auto') ); 41 41 42 $current_screen->add_ screen_options(42 $current_screen->add_option_context( 43 43 '<p>test</p>' 44 44 ); -
trunk/wp-admin/edit-tags.php
r18864 r18867 29 29 } 30 30 31 add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') );32 33 $current_screen->add_ screen_options(31 $current_screen->add_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') ); 32 33 $current_screen->add_option_context( 34 34 '<p>test</p>' 35 35 ); -
trunk/wp-admin/edit.php
r18864 r18867 149 149 $title = $post_type_object->labels->name; 150 150 151 add_screen_option( 'per_page', array('label' => $title, 'default' => 20) ); 152 153 $current_screen->add_screen_options( 154 '<p>test</p>' 155 ); 151 $current_screen->add_option( 'per_page', array('label' => $title, 'default' => 20) ); 152 $current_screen->add_option_context( '<p>test</p>' ); 156 153 157 154 if ( 'post' == $post_type ) { -
trunk/wp-admin/includes/screen.php
r18866 r18867 15 15 * @return array Containing the headers in the format id => UI String 16 16 */ 17 function get_column_headers( $screen ) { 17 function get_column_headers( $screen ) { // TODO: fold into WP_Screen 18 18 if ( is_string( $screen ) ) 19 19 $screen = convert_to_screen( $screen ); … … 36 36 * @return array 37 37 */ 38 function get_hidden_columns( $screen ) { 38 function get_hidden_columns( $screen ) { // TODO: fold into WP_Screen 39 39 if ( is_string( $screen ) ) 40 40 $screen = convert_to_screen( $screen ); … … 50 50 * @param unknown_type $screen 51 51 */ 52 function meta_box_prefs($screen) { 52 function meta_box_prefs($screen) { // TODO: fold into WP_Screen 53 53 global $wp_meta_boxes; 54 54 … … 86 86 * @return array Hidden Meta Boxes 87 87 */ 88 function get_hidden_meta_boxes( $screen ) { 88 function get_hidden_meta_boxes( $screen ) { // TODO: fold into WP_Screen 89 89 if ( is_string( $screen ) ) 90 90 $screen = convert_to_screen( $screen ); … … 109 109 * @since 2.7.0 110 110 */ 111 function favorite_actions( $screen = null ) { 111 function favorite_actions( $screen = null ) { // TODO: deprecate and remove? 112 112 $default_action = false; 113 113 … … 224 224 * @return object An object containing the safe screen name and id 225 225 */ 226 function convert_to_screen( $screen ) { 226 function convert_to_screen( $screen ) { // TODO: fold into WP_Screen 227 227 $screen = str_replace( array('.php', '-new', '-add', '-network', '-user' ), '', $screen); 228 228 … … 232 232 $screen .= '-user'; 233 233 234 $screen = (string) apply_filters( 'screen_meta_screen', $screen );234 // why do we need this? $screen = (string) apply_filters( 'screen_meta_screen', $screen ); 235 235 $screen = (object) array('id' => $screen, 'base' => $screen); 236 236 return $screen; … … 246 246 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. 247 247 * @param string $help The content of a 'Screen Info' help tab. 248 * 249 * @todo: deprecate? 250 */ 251 function add_contextual_help($screen, $help) { 248 */ 249 function add_contextual_help($screen, $help) { // TODO: deprecate 252 250 global $_wp_contextual_help; 253 251 … … 270 268 * @return void 271 269 */ 272 function add_screen_option( $option, $args = array() ) { 270 function add_screen_option( $option, $args = array() ) { // TODO: set deprecated 273 271 $current_screen = get_current_screen(); 274 272 … … 279 277 } 280 278 281 function screen_icon( $screen = '' ) { 279 function screen_icon( $screen = '' ) { // TODO: fold into WP_Screen 282 280 echo get_screen_icon( $screen ); 283 281 } 284 282 285 function get_screen_icon( $screen = '' ) { 283 function get_screen_icon( $screen = '' ) { // TODO: fold into WP_Screen 286 284 global $current_screen, $typenow; 287 285 … … 339 337 * @param string $id Screen id, optional. 340 338 */ 341 function set_current_screen( $id = 339 function set_current_screen( $id = '' ) { 342 340 global $current_screen; 343 341 342 if ( is_a( $current_screen, 'WP_Screen' ) ) 343 return; 344 344 345 $current_screen = new WP_Screen( $id ); 345 346 346 $current_screen = apply_filters('current_screen', $current_screen);347 // why do we need this? $current_screen = apply_filters('current_screen', $current_screen); 347 348 } 348 349 … … 465 466 * @access private 466 467 */ 467 private $_options = array(); 468 469 470 /** 471 * Stores the result of the public show_screen_options function. 468 private $_options = array( 469 '_context' => '', 470 '_screen_settings' => '' 471 ); 472 473 /** 474 * Show screen options if any. 472 475 * 473 476 * @since 3.3.0 … … 475 478 * @access private 476 479 */ 477 private $_show_ screen_options;480 private $_show_options = false; 478 481 479 482 /** … … 484 487 * @access private 485 488 */ 486 private $_screen_settings ;489 private $_screen_settings = ''; 487 490 488 491 /** … … 501 504 $screen = $hook_suffix; 502 505 $screen = str_replace('.php', '', $screen); 506 503 507 if ( preg_match('/-add|-new$/', $screen) ) 504 508 $action = 'add'; 509 505 510 $screen = str_replace('-new', '', $screen); 506 511 $screen = str_replace('-add', '', $screen); … … 508 513 } else { 509 514 $id = sanitize_key( $id ); 515 510 516 if ( false !== strpos($id, '-') ) { 511 517 list( $id, $typenow ) = explode('-', $id, 2); 518 512 519 if ( taxonomy_exists( $typenow ) ) { 513 520 $id = 'edit-tags'; … … 524 531 if ( 'index' == $this->base ) 525 532 $this->base = 'dashboard'; 533 526 534 if ( 'index' == $this->id ) 527 535 $this->id = 'dashboard'; … … 530 538 if ( empty($typenow) ) 531 539 $typenow = 'post'; 540 532 541 $this->id .= '-' . $typenow; 533 542 $this->post_type = $typenow; … … 535 544 if ( empty($typenow) ) 536 545 $typenow = 'post'; 546 537 547 $this->id = $typenow; 538 548 $this->post_type = $typenow; … … 540 550 if ( empty($taxnow) ) 541 551 $taxnow = 'post_tag'; 552 542 553 $this->id = 'edit-' . $taxnow; 543 554 $this->taxonomy = $taxnow; … … 572 583 /** 573 584 * Adds an option for the screen. 574 * Call this in template files after admin.php is loaded and before admin-header.php is loadedto add screen options.585 * Use the 'add_screen_help_and_options' action to add screen options. 575 586 * 576 587 * @since 3.3.0 577 588 * 578 589 * @param string $option Option ID 579 * @param array $args Associative array of arguments particular to the given $option. 580 */ 581 public function add_option( $option, $args = array() ) { 582 $this->_options[ $option ] = $args; 590 * @param mixed $args Associative array of arguments particular to the default $option or the HTML string to be printed in the Screen Options tab. 591 */ 592 public function add_option( $option = false, $args ) { 593 if ( is_array($args) && !empty($option) ) 594 $this->_options[ $option ] = $args; 595 elseif ( is_string($args) ) 596 $this->_options['_screen_settings'] .= $args; 597 598 $this->_show_options = true; 599 } 600 601 /** 602 * Adds option context. 603 * Use the 'add_screen_help_and_options' action to add it. Will not be shown if there aren't any screen options. 604 * 605 * @since 3.3.0 606 * 607 * @param string $text 608 */ 609 public function add_option_context( $text ) { 610 $this->_options['_context'] .= $text; 583 611 } 584 612 585 613 /** 586 614 * Add a help tab to the contextual help for the screen. 587 * Call this in template files after admin.php is loaded and before admin-header.php is loadedto add contextual help tabs.615 * Use the 'add_screen_help_and_options' action to add contextual help tabs. 588 616 * 589 617 * @since 3.3.0 … … 591 619 * @param array $args 592 620 * - string - title - Title for the tab. 621 * - string - id - Tab ID. 593 622 * - string - section - Section title for the tab. Optional. 594 * - string - id - Tab ID. Optional.595 623 * - string - content - Help tab content in plain text or HTML. Optional. 596 624 * - callback - callback - A callback to generate the tab content. Optional. … … 600 628 $defaults = array( 601 629 'title' => false, 630 'id' => false, 602 631 'section' => false, 603 'id' => false,604 632 'content' => '', 605 'callback' => false ,633 'callback' => false 606 634 ); 607 635 $args = wp_parse_args( $args, $defaults ); 608 636 609 // Ensure we have a title.610 if ( ! $args['title'] )637 // Ensure we have title and ID. 638 if ( ! $args['title'] || ! $args['id'] ) 611 639 return; 612 640 613 // Create an id from the title if one is not provided.614 if ( ! $args['id'] )615 $args['id'] = sanitize_html_class( $args['title'] );616 617 641 $this->_help_tabs[] = $args; 618 642 } … … 620 644 /** 621 645 * Add a sidebar to the contextual help for the screen. 622 * Call this in template files after admin.php is loaded and before admin-header.php is loadedto add a sidebar to the contextual help.646 * Use the 'add_screen_help_and_options' action to add a sidebar to the contextual help. 623 647 * 624 648 * @since 3.3.0 … … 627 651 */ 628 652 public function add_help_sidebar( $content ) { 629 $this->_help_sidebar = $content; 653 if ( empty($this->_help_sidebar) ) // add only one 654 $this->_help_sidebar = $content; 630 655 } 631 656 … … 639 664 public function render_screen_meta() { 640 665 global $_wp_contextual_help; 666 667 do_action('add_screen_help_and_options'); 641 668 642 669 // Call old contextual_help_list filter. … … 644 671 $_wp_contextual_help = array(); 645 672 646 $_wp_contextual_help = apply_filters( 'contextual_help_list', $_wp_contextual_help, $this );673 // why are we filtering a global? $_wp_contextual_help = apply_filters( 'contextual_help_list', $_wp_contextual_help, $this ); 647 674 648 675 if ( isset( $_wp_contextual_help[ $this->id ] ) ) { 649 676 // Call old contextual_help filter. 677 // why are we filtering the same global second time?? 650 678 $contextual_help = apply_filters( 'contextual_help', $_wp_contextual_help[ $this->id ], $this->id, $this ); 651 679 652 680 $this->add_help_tab( array( 653 'title' => __('Screen Info'), 654 'content' => $contextual_help, 681 'title' => __('Screen Info'), 682 'id' => 'screen-info', 683 'content' => $_wp_contextual_help[ $this->id ] 655 684 ) ); 656 685 } … … 662 691 <div class="contextual-help-tabs"> 663 692 <ul> 664 <?php foreach ( $this->_help_tabs as $i => $tab ):665 $link_id = "tab-link-{$tab['id']}"; 666 $panel_id = "tab-panel-{$tab['id']}";667 $class es = ( $i == 0 ) ? 'active' : '';693 <?php 694 695 if ( $this->_show_options ) { 696 $class = true; 668 697 ?> 669 670 <li id="<?php echo esc_attr( $link_id ); ?>" class="<?php echo esc_attr( $classes ); ?>"> 671 <a href="<?php echo esc_url( "#$panel_id" ); ?>"> 698 <li id="tab-link-screen-options" class="active"> 699 <a href="#tab-panel-screen-options"> 700 <?php _e('Screen Options'); ?> 701 </a> 702 </li> 703 <?php 704 } 705 706 foreach ( $this->_help_tabs as $i => $tab ) { 707 $id = esc_attr($tab['id']); 708 $class = empty($class) && $i == 0 ? ' class="active"' : ''; 709 ?> 710 <li id="<?php echo "tab-link-$id"; ?>"<?php echo $class; ?>> 711 <a href="<?php echo "#tab-panel-$id"; ?>"> 672 712 <?php echo esc_html( $tab['title'] ); ?> 673 713 </a> 674 714 </li> 675 <?php endforeach;?>715 <?php } ?> 676 716 </ul> 677 717 </div> 678 679 <div class="contextual-help-sidebar"> 680 <?php echo $this->_help_sidebar; ?> 681 </div> 682 718 <?php 719 720 if ( $this->_help_sidebar ) 721 echo '<div class="contextual-help-sidebar">' . $this->_help_sidebar . '</div>'; 722 723 ?> 683 724 <div class="contextual-help-tabs-wrap"> 684 <?php foreach ( $this->_help_tabs as $i => $tab ): 685 $panel_id = "tab-panel-{$tab['id']}"; 686 $classes = ( $i == 0 ) ? 'active' : ''; 687 $classes .= ' help-tab-content'; 725 <?php 726 727 if ( $this->_show_options ) { 728 $class2 = true; 729 echo '<div id="tab-panel-screen-options" class="help-tab-content active">'; 730 731 if ( !empty($this->_options['_context']) ) 732 echo $this->_options['_context']; 733 734 $this->render_screen_options(); 735 echo '</div>'; 736 } 737 738 foreach ( $this->_help_tabs as $i => $tab ) { 739 $class2 = empty($class2) && $i == 0 ? ' active' : ''; 688 740 ?> 689 741 690 <div id="<?php echo esc_attr( $panel_id ); ?>" class="<?php echo esc_attr( $classes ); ?>">742 <div id="<?php echo esc_attr( "tab-panel-{$tab['id']}" ); ?>" class="help-tab-content<?php echo $class2; ?>"> 691 743 <?php 692 744 if ( $tab['section'] ) … … 701 753 ?> 702 754 </div> 703 <?php endforeach;?>755 <?php } ?> 704 756 </div> 705 757 </div> … … 708 760 } 709 761 710 public function show_screen_options() { // not needed? 711 global $wp_meta_boxes, $wp_list_table; 712 713 if ( is_bool( $this->_show_screen_options ) ) 714 return $this->_show_screen_options; 715 716 $columns = get_column_headers( $this ); 717 718 $show_screen = false; 719 if ( ! empty( $wp_meta_boxes[ $this->id ] ) || ! empty( $columns ) ) 720 $show_screen = true; 721 722 // Check if there are per-page options. 723 $show_screen = $show_screen || isset( $this->_options['per_page'] ); 724 725 $this->_screen_settings = apply_filters( 'screen_settings', '', $this ); 726 762 /** 763 * Render the screen options tab. 764 * 765 * @since 3.3.0 766 */ 767 public function render_screen_options() { 768 769 $screen_settings = $this->_options['_screen_settings']; 770 771 // Default screen_settings for various screens. 772 // TODO: should probably be set on these screens, not here. 727 773 switch ( $this->id ) { 728 774 case 'widgets': 729 $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n"; 730 $show_screen = true; 775 $screen_settings .= '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n"; 731 776 break; 732 777 } 733 778 734 if ( ! empty( $this->_screen_settings ) ) 735 $show_screen = true; 736 737 if ( ! empty( $this->_options ) ) 738 $show_screen = true; 739 740 $this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this ); 741 return $this->_show_screen_options; 742 } 743 744 public function add_screen_options($before = '') { 745 $this->add_help_tab( array( 746 'title' => __('Screen Options'), 747 'id' => 'screen-options', 748 'callback' => array( $this, 'render_screen_options' ), 749 'content' => $before 750 )); 751 } 752 753 /** 754 * Render the screen options tab. 755 * 756 * @since 3.3.0 757 */ 758 public function render_screen_options() { 759 global $wp_meta_boxes, $wp_list_table; 760 761 $columns = get_column_headers( $this ); 762 $hidden = get_hidden_columns( $this ); 763 $this->_screen_settings = apply_filters( 'screen_settings', '', $this ); 764 765 switch ( $this->id ) { 766 case 'widgets': 767 $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n"; 768 break; 769 } 779 // TODO: deprecate 780 $screen_settings = apply_filters( 'screen_settings', $screen_settings, $this ); 770 781 771 782 ?> 772 783 <form id="adv-settings" action="" method="post"> 773 <?php if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?> 774 <h5><?php _ex('Show on screen', 'Metaboxes') ?></h5> 775 <div class="metabox-prefs"> 776 <?php meta_box_prefs( $this ); ?> 777 <br class="clear" /> 778 </div> 779 <?php endif; 780 if ( ! empty( $columns ) ) : ?> 784 <?php 785 786 $this->render_table_columns_prefs(); 787 $this->render_metabox_prefs(); 788 $this->render_screen_layout(); 789 $this->render_per_page_options(); 790 echo $screen_settings; 791 792 wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?> 793 </form> 794 <?php 795 } 796 797 /** 798 * Render the option for hiding table columns on the page 799 * 800 * @since 3.3.0 801 */ 802 function render_table_columns_prefs() { 803 $columns = get_column_headers( $this ); 804 805 if ( ! empty( $columns ) ) { 806 $hidden = get_hidden_columns( $this ); 807 ?> 781 808 <h5><?php echo ( isset( $columns['_title'] ) ? $columns['_title'] : _x('Show on screen', 'Columns') ) ?></h5> 782 809 <div class="metabox-prefs"> … … 793 820 if ( 'comments' == $column ) 794 821 $title = __( 'Comments' ); 822 795 823 $id = "$column-hide"; 796 824 echo '<label for="' . $id . '">'; … … 801 829 <br class="clear" /> 802 830 </div> 803 <?php endif; 804 805 $this->render_screen_layout(); 806 $this->render_per_page_options(); 807 echo $this->_screen_settings; 808 809 ?> 810 <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> 811 </form> 812 <?php 831 <?php } 832 } 833 834 /** 835 * Render the option for hiding metaboxes on the page 836 * 837 * @since 3.3.0 838 */ 839 function render_metabox_prefs() { 840 global $wp_meta_boxes; 841 842 if ( isset( $wp_meta_boxes[ $this->id ] ) ) { 843 ?> 844 <h5><?php _ex('Show on screen', 'Metaboxes') ?></h5> 845 <div class="metabox-prefs"> 846 <?php meta_box_prefs( $this ); ?> 847 <br class="clear" /> 848 </div> 849 <?php 850 } 813 851 } 814 852 … … 822 860 823 861 // Back compat for plugins using the filter instead of add_screen_option() 862 // TODO: deprecate it 824 863 $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this ); 825 864 826 865 if ( ! empty( $columns ) && isset( $columns[ $this->id ] ) ) 827 add_screen_option( 'layout_columns', array('max' => $columns[ $this->id ] ) );866 $this->add_option( 'layout_columns', array('max' => $columns[ $this->id ] ) ); 828 867 829 868 if ( ! isset( $this->_options['layout_columns'] ) ) { … … 870 909 */ 871 910 function render_per_page_options() { 872 if ( ! isset( $this->_options['per_page'] ) )911 if ( empty( $this->_options['per_page'] ) ) 873 912 return; 874 913 … … 920 959 } 921 960 } 961 -
trunk/wp-admin/index.php
r18864 r18867 24 24 25 25 if ( is_user_admin() ) 26 add_screen_option('layout_columns', array('max' => 4, 'default' => 1) );26 $current_screen->add_option('layout_columns', array('max' => 4, 'default' => 1) ); 27 27 else 28 add_screen_option('layout_columns', array('max' => 4, 'default' => 'auto') );28 $current_screen->add_option('layout_columns', array('max' => 4, 'default' => 'auto') ); 29 29 30 $current_screen->add_ screen_options(30 $current_screen->add_option_context( 31 31 '<p>test</p>' 32 32 ); … … 34 34 // Help tabs 35 35 36 $help _overview= '<p>' . __('Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the top bar.') . '</p>';36 $help = '<p>' . __('Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the top bar.') . '</p>'; 37 37 38 38 $current_screen->add_help_tab( array( 39 39 'title' => __('Overview'), 40 'content' => $help_overview, 40 'id' => 'overview', 41 'content' => $help 41 42 ) ); 42 43 43 $help _navigation = '<p>' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '</p>';44 $help_navigation .= '<p>' . __('Links in the “admin bar” at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '</p>';44 $help = '<p>' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '</p> 45 <p>' . __('Links in the “admin bar” at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '</p>'; 45 46 46 47 $current_screen->add_help_tab( array( 47 48 'title' => __('Navigation'), 48 'content' => $help_navigation, 49 'id' => 'navigation', 50 'content' => $help 49 51 ) ); 50 52 51 $help _layout = '<p>' . __('You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.') . '</p>';52 $help_layout .= '<p>' . __('<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.') . '</p>'; 53 $help_layout .= '<p>' . __('<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '</p>'; 54 $help_layout .= '<p>' . __('<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '</p>';53 $help = '<p>' . __('You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.') . '</p> 54 <p>' . __('<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.') . '</p> 55 <p>' . __('<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '</p> 56 <p>' . __('<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '</p>'; 55 57 56 58 $current_screen->add_help_tab( array( 57 59 'title' => __('Layout'), 58 'content' => $help_layout, 60 'id' => 'layout', 61 'content' => $help 59 62 ) ); 60 63 61 $help _content = '<p>' . __('The boxes on your Dashboard screen are:') . '</p>';62 $help_content .= '<p>' . __('<strong>Right Now</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.') . '</p>'; 63 $help_content .= '<p>' . __('<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '</p>'; 64 $help_content .= '<p>' . __('<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.') . '</p>'; 65 $help_content .= '<p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.') . '</p>'; 66 $help_content .= '<p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you’ve started.') . '</p>'; 67 $help_content .= '<p>' . __('<strong>WordPress Blog</strong> - Latest news from the official WordPress project.') . '</p>'; 68 $help_content .= '<p>' . __('<strong>Other WordPress News</strong> - Shows the <a href="http://planet.wordpress.org" target="_blank">WordPress Planet</a> feed. You can configure it to show a different feed of your choosing.') . '</p>'; 69 $help_content .= '<p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '</p>';64 $help = '<p>' . __('The boxes on your Dashboard screen are:') . '</p> 65 <p>' . __('<strong>Right Now</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.') . '</p> 66 <p>' . __('<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '</p> 67 <p>' . __('<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.') . '</p> 68 <p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.') . '</p> 69 <p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you’ve started.') . '</p> 70 <p>' . __('<strong>WordPress Blog</strong> - Latest news from the official WordPress project.') . '</p> 71 <p>' . __('<strong>Other WordPress News</strong> - Shows the <a href="http://planet.wordpress.org" target="_blank">WordPress Planet</a> feed. You can configure it to show a different feed of your choosing.') . '</p> 72 <p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '</p>'; 70 73 71 74 $current_screen->add_help_tab( array( 72 75 'title' => __('Content'), 73 'content' => $help_content, 76 'id' => 'content', 77 'content' => $help 74 78 ) ); 75 79 76 $current_screen->add_help_sidebar( 77 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 78 '<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' . 79 '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 80 );80 $current_screen->add_help_sidebar(' 81 <p><strong>' . __( 'For more information:' ) . '</strong></p> 82 <p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p> 83 <p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p> 84 '); 81 85 82 86 -
trunk/wp-admin/link-manager.php
r18864 r18867 41 41 $this_file = $parent_file = 'link-manager.php'; 42 42 43 $current_screen->add_ screen_options(43 $current_screen->add_option_context( 44 44 '<p>test</p>' 45 45 ); -
trunk/wp-admin/nav-menus.php
r18864 r18867 446 446 $messages[] = '<div id="message" class="updated"><p>' . __('The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar.') . '</p></div>'; 447 447 448 $current_screen->add_ screen_options(448 $current_screen->add_option_context( 449 449 '<p>test</p>' 450 450 ); -
trunk/wp-admin/network/index.php
r18864 r18867 39 39 add_thickbox(); 40 40 41 add_screen_option('layout_columns', array('max' => 4, 'default' => 'auto') );41 $current_screen->add_option('layout_columns', array('max' => 4, 'default' => 'auto') ); 42 42 43 $current_screen->add_ screen_options(43 $current_screen->add_option_context( 44 44 '<p>test</p>' 45 45 ); -
trunk/wp-admin/network/site-themes.php
r18864 r18867 123 123 124 124 add_thickbox(); 125 add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) );125 $current_screen->add_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) ); 126 126 127 $current_screen->add_ screen_options(127 $current_screen->add_option_context( 128 128 '<p>test</p>' 129 129 ); -
trunk/wp-admin/network/site-users.php
r18864 r18867 154 154 } 155 155 156 add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) );157 158 $current_screen->add_ screen_options(156 $current_screen->add_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) ); 157 158 $current_screen->add_option_context( 159 159 '<p>test</p>' 160 160 ); -
trunk/wp-admin/network/sites.php
r18864 r18867 23 23 $parent_file = 'sites.php'; 24 24 25 add_screen_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) );26 27 $current_screen->add_ screen_options(25 $current_screen->add_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) ); 26 27 $current_screen->add_option_context( 28 28 '<p>test</p>' 29 29 ); -
trunk/wp-admin/network/themes.php
r18864 r18867 174 174 add_thickbox(); 175 175 176 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) );177 178 $current_screen->add_ screen_options(176 $current_screen->add_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) ); 177 178 $current_screen->add_option_context( 179 179 '<p>test</p>' 180 180 ); -
trunk/wp-admin/network/users.php
r18864 r18867 228 228 $parent_file = 'users.php'; 229 229 230 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );231 232 $current_screen->add_ screen_options(230 $current_screen->add_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); 231 232 $current_screen->add_option_context( 233 233 '<p>test</p>' 234 234 ); -
trunk/wp-admin/plugin-install.php
r18864 r18867 36 36 do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information. 37 37 38 $current_screen->add_ screen_options(38 $current_screen->add_option_context( 39 39 '<p>test</p>' 40 40 ); -
trunk/wp-admin/plugins.php
r18864 r18867 317 317 add_thickbox(); 318 318 319 add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' )) );320 321 $current_screen->add_ screen_options(319 $current_screen->add_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' )) ); 320 321 $current_screen->add_option_context( 322 322 '<p>test</p>' 323 323 ); -
trunk/wp-admin/upload.php
r18864 r18867 138 138 wp_enqueue_script( 'media' ); 139 139 140 add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) );141 142 $current_screen->add_ screen_options(140 $current_screen->add_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) ); 141 142 $current_screen->add_option_context( 143 143 '<p>test</p>' 144 144 ); -
trunk/wp-admin/users.php
r18864 r18867 18 18 $parent_file = 'users.php'; 19 19 20 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );21 22 $current_screen->add_ screen_options(20 $current_screen->add_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); 21 22 $current_screen->add_option_context( 23 23 '<p>test</p>' 24 24 ); -
trunk/wp-admin/widgets.php
r18864 r18867 32 32 $parent_file = 'themes.php'; 33 33 34 $current_screen->add_ screen_options(34 $current_screen->add_option_context( 35 35 '<p>test</p>' 36 36 );
Note: See TracChangeset
for help on using the changeset viewer.