WordPress.org

Make WordPress Core

Changeset 14929


Ignore:
Timestamp:
05/26/10 03:36:04 (4 years ago)
Author:
ryan
Message:

Post and page help. see #13467

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r14868 r14929  
    166166do_action('do_meta_boxes', $post_type, 'side', $post); 
    167167 
    168 add_contextual_help($current_screen, '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes that allow you to add metadata to your post using drag and drop, and can minimize or expand them by clicking the title bar of the box. You can also hide any of the boxes by using the Screen Options tab, where you can also choose a 1- or 2-column layout for this screen.') . '</p>' . 
     168if ( 'post' == $post_type ) { 
     169    add_contextual_help($current_screen, '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes that allow you to add metadata to your post using drag and drop, and can minimize or expand them by clicking the title bar of the box. You can also hide any of the boxes by using the Screen Options tab, where you can also choose a 1- or 2-column layout for this screen.') . '</p>' . 
    169170    '<p>' . __('<strong>Title</strong> - Enter a title for your post. After you enter a title, you&#8217;ll see the permalink below, which you can edit.') . '</p>' . 
    170171    '<p>' . __('<strong>Post editor</strong> - Enter the text for you post. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The HTML mode allows you to enter raw HTML along with your post text. You can insert media files by clicking the icons above the post editor and following the directions.') . '</p>' . 
     
    173174    '<p>' . __('<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy blog systems that you’ve linked to them. Enter the URL(s) you want to send trackbacks. If you link other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>' . 
    174175    '<p>' . __('<strong>Discussion</strong> - You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.') . '</p>' . 
    175     '<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'tools.php') . '</p>' 
    176 ); 
     176    '<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'tools.php') . '</p>' . 
     177    '<p>' . __('For more information:') . '</p>' . 
     178    '<p>' . sprintf(__('<a href="%s">Writing Posts Documentation</a>'), 'http://codex.wordpress.org/Writing_Posts') . '</p>' . 
     179    '<p>' . sprintf(__('<a href="%s">Support Forums</a>'), 'http://wordpress.org/support/') . '</p>' 
     180    ); 
     181} elseif ( 'page' == $post_type ) { 
     182    add_contextual_help($current_screen, '<p>' . __('Pages are similar to 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>' . 
     183    '<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. The Page editor mostly works the same Post editor, but there are some Page-specific features in the Attributes box:') . '</p>' . 
     184    '<p>' . __('<strong>Parent</strong> - You can arrange your pages in hierarchies. For example, you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how many levels you can nest pages.') . '</p>' . 
     185    '<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&#8217;ll see them in this dropdown menu.') . '</p>' . 
     186    '<p>' . __('<strong>Order</strong> - Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in.') . '</p>' . 
     187    '<p>' . __('For more information:') . '</p>' . 
     188    '<p>' . sprintf(__('<a href="%s">Page Creation Documentation</a>'), 'http://codex.wordpress.org/Pages_Add_New_SubPanel') . '</p>' . 
     189    '<p>' . sprintf(__('<a href="%s">Support Forums</a>'), 'http://wordpress.org/support/') . '</p>' 
     190    ); 
     191} 
    177192 
    178193require_once('./admin-header.php'); 
  • trunk/wp-admin/edit.php

    r14855 r14929  
    157157$title = $post_type_object->labels->name; 
    158158 
    159 add_contextual_help($current_screen, '<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' . 
     159if ( 'post' == $post_type ) { 
     160    add_contextual_help($current_screen, '<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' . 
    160161    '<ul>' . 
    161162    '<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' . 
     
    171172    '<li>' . __('Preview will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.') . '</li>' . 
    172173    '</ul>' . 
    173     '<p>' . __('You can also edit multiple posts at once. Select the posts you want to edit using the checkboxes, select Edit from the Bulk Actions menu and click Apply. You will be able to change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>' 
    174 ); 
     174    '<p>' . __('You can also edit multiple posts at once. Select the posts you want to edit using the checkboxes, select Edit from the Bulk Actions menu and click Apply. You will be able to change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>' . 
     175    '<p>' . __('For more information:') . '</p>' . 
     176    '<p>' . sprintf(__('<a href="%s">Edit Posts Documentation</a>'), 'http://codex.wordpress.org/Posts_Edit_SubPanel') . '</p>' . 
     177    '<p>' . sprintf(__('<a href="%s">Support Forums</a>'), 'http://wordpress.org/support/') . '</p>' 
     178    ); 
     179} elseif ( 'page' == $post_type ) { 
     180    add_contextual_help($current_screen, '<p>' . __('Pages are similar to 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>' . 
     181    '<p>' . __('Managing Pages is very similar to managing Posts, and the screens can be customized in the same way. ') . '</p>' . 
     182    '<p>' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a Page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple Pages at once.') . '</p>' . 
     183    '<p>' . __('For more information:') . '</p>' . 
     184    '<p>' . sprintf(__('<a href="%s">Page Management Documentation</a>'), 'http://codex.wordpress.org/Pages_Edit_SubPanel') . '</p>' . 
     185    '<p>' . sprintf(__('<a href="%s">Support Forums</a>'), 'http://wordpress.org/support/') . '</p>' 
     186    ); 
     187} 
    175188 
    176189require_once('./admin-header.php'); 
  • trunk/wp-admin/includes/template.php

    r14924 r14929  
    36353635    $contextual_help = ''; 
    36363636    if ( isset($_wp_contextual_help[$screen->id]) ) { 
    3637         if ( !empty($title) ) 
    3638             $contextual_help .= '<h5>' . sprintf(__('Get help with &#8220;%s&#8221;'), $title) . '</h5>'; 
    3639         else 
    3640             $contextual_help .= '<h5>' . __('Get help with this page') . '</h5>'; 
    36413637        $contextual_help .= '<div class="metabox-prefs">' . $_wp_contextual_help[$screen->id] . "</div>\n"; 
    3642  
    3643         $contextual_help .= '<h5>' . __('Other Help') . '</h5>'; 
    36443638    } else { 
    3645         $contextual_help .= '<h5>' . __('Help') . '</h5>'; 
    3646     } 
    3647  
    3648     $contextual_help .= '<div class="metabox-prefs">'; 
    3649     $default_help = __('<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>'); 
    3650     $default_help .= '<br />'; 
    3651     $default_help .= __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>'); 
    3652     $contextual_help .= apply_filters('default_contextual_help', $default_help); 
    3653     $contextual_help .= "</div>\n"; 
     3639        $contextual_help .= '<div class="metabox-prefs">'; 
     3640        $default_help = __('<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>'); 
     3641        $default_help .= '<br />'; 
     3642        $default_help .= __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>'); 
     3643        $contextual_help .= apply_filters('default_contextual_help', $default_help); 
     3644        $contextual_help .= "</div>\n"; 
     3645    } 
     3646 
    36543647    echo apply_filters('contextual_help', $contextual_help, $screen->id, $screen); 
    36553648    ?> 
Note: See TracChangeset for help on using the changeset viewer.