Changeset 18941
- Timestamp:
- 10/11/2011 07:29:09 PM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r18911 r18941 190 190 191 191 $current_screen->add_help_tab( array( 192 'id' => 'publish-box', 192 193 'title' => __('Publish Box'), 193 194 'content' => $publish_box, … … 198 199 199 200 $current_screen->add_help_tab( array( 201 'id' => 'discussion-settings', 200 202 'title' => __('Discussion Settings'), 201 203 'content' => $discussion_settings, … … 209 211 ); 210 212 } elseif ( 'page' == $post_type ) { 211 $current_screen->add_help_tab( 'about-pages', __('About Pages'), '<p>' . __('Pages are similar to Posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest Pages under other Pages by making one the “Parent” of the other, creating a group of Pages.') . '</p>' . 212 '<p>' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the new in 3.2 distraction-free writing space, available in both the Visual and HTML modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box:') . '</p>' ); 213 $current_screen->add_help_tab('page-attributes', ('Page Attributes'), 214 '<p>' . __('<strong>Parent</strong> - You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how many levels you can nest pages.') . '</p>' . 215 '<p>' . __('<strong>Template</strong> - Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them in this dropdown menu.') . '</p>' . 216 '<p>' . __('<strong>Order</strong> - Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '</p>' ); 213 $about_pages = '<p>' . __('Pages are similar to Posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest Pages under other Pages by making one the “Parent” of the other, creating a group of Pages.') . '</p>' . 214 '<p>' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the new in 3.2 distraction-free writing space, available in both the Visual and HTML modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box:') . '</p>'; 215 216 $current_screen->add_help_tab( array( 217 'id' => 'about-pages', 218 'title' => __('About Pages'), 219 'content' => $about_pages, 220 ) ); 221 222 $page_attributes = '<p>' . __('<strong>Parent</strong> - You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how many levels you can nest pages.') . '</p>' . 223 '<p>' . __('<strong>Template</strong> - Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them in this dropdown menu.') . '</p>' . 224 '<p>' . __('<strong>Order</strong> - Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '</p>'; 225 226 $current_screen->add_help_tab( array( 227 'id' => 'page-attributes', 228 'title' => __('Page Attributes'), 229 'content' => $page_attributes, 230 ) ); 231 217 232 $current_screen->add_help_sidebar( 218 233 '<p><strong>' . __('For more information:') . '</strong></p>' . -
trunk/wp-admin/includes/screen.php
r18915 r18941 591 591 * @param array $args 592 592 * - string - title - Title for the tab. 593 * - string - id - Tab ID. Optional.593 * - string - id - Tab ID. Must be HTML-safe. 594 594 * - string - content - Help tab content in plain text or HTML. Optional. 595 595 * - callback - callback - A callback to generate the tab content. Optional. … … 605 605 $args = wp_parse_args( $args, $defaults ); 606 606 607 // Ensure we have a title. 608 if ( ! $args['title'] ) 607 $args['id'] = sanitize_html_class( $args['id'] ); 608 609 // Ensure we have an ID and title. 610 if ( ! $args['id'] || ! $args['title'] ) 609 611 return; 610 611 // Create an id from the title if one is not provided.612 if ( ! $args['id'] )613 $args['id'] = sanitize_html_class( $args['title'] );614 612 615 613 $this->_help_tabs[] = $args; … … 643 641 $_wp_contextual_help = apply_filters( 'contextual_help_list', $_wp_contextual_help, $this ); 644 642 645 if ( isset( $_wp_contextual_help[ $this->id ] ) ) {643 if ( isset( $_wp_contextual_help[ $this->id ] ) || ! $this->_help_tabs ) { 646 644 // Call old contextual_help filter. 647 $contextual_help = apply_filters( 'contextual_help', $_wp_contextual_help[ $this->id ], $this->id, $this ); 645 if ( isset( $_wp_contextual_help[ $this->id ] ) ) 646 $contextual_help = apply_filters( 'contextual_help', $_wp_contextual_help[ $this->id ], $this->id, $this ); 647 648 if ( empty( $contextual_help ) ) { 649 $default_help = __( '<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>' ); 650 $default_help .= '<br />'; 651 $default_help .= __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ); 652 $contextual_help = '<p>' . apply_filters( 'default_contextual_help', $default_help ) . '</p>'; 653 } 648 654 649 655 $this->add_help_tab( array( 656 'id' => 'contextual-help', 650 657 'title' => __('Screen Info'), 651 658 'content' => $contextual_help, … … 656 663 if ( $this->show_screen_options() ) { 657 664 $this->add_help_tab( array( 665 'id' => 'screen-options', 658 666 'title' => __('Screen Options'), 659 667 'callback' => array( $this, 'render_screen_options' ), -
trunk/wp-admin/index.php
r18914 r18941 37 37 38 38 $current_screen->add_help_tab( array( 39 'id' => 'help-navigation', 39 40 'title' => __('Navigation'), 40 41 'content' => $help_navigation, … … 47 48 48 49 $current_screen->add_help_tab( array( 50 'id' => 'help-layout', 49 51 'title' => __('Layout'), 50 52 'content' => $help_layout, … … 62 64 63 65 $current_screen->add_help_tab( array( 66 'id' => 'help-content', 64 67 'title' => __('Content'), 65 68 'content' => $help_content,
Note: See TracChangeset
for help on using the changeset viewer.