Make WordPress Core

Changeset 22813


Ignore:
Timestamp:
11/22/2012 09:00:39 AM (12 years ago)
Author:
nacin
Message:

Updates to post.php help text for posts and pages, including a new section on inserting media. props DrewAPicture, Ipstenu. see #22451.

File:
1 edited

Legend:

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

    r22796 r22813  
    174174
    175175if ( 'post' == $post_type ) {
    176     $customize_display = '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '</p>';
     176    $customize_display = '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '</p>';
    177177
    178178    get_current_screen()->add_help_tab( array(
     
    189189        'title'   => __('Title and Post Editor'),
    190190        'content' => $title_and_editor,
    191     ) );
    192 
    193     $publish_box = '<p>' . __('<strong>Publish</strong> - You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.') . '</p>';
    194 
    195     if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) {
    196         $publish_box .= '<p>' . __( '<strong>Post Format</strong> - This designates how your theme will display a specific post. For example, you could have a <em>standard</em> blog post with a title and paragraphs, or a short <em>aside</em> that omits the title and contains a short text blurb. Please refer to the Codex for <a href="http://codex.wordpress.org/Post_Formats#Supported_Formats">descriptions of each post format</a>. Your theme could enable all or some of 10 possible formats.' ) . '</p>';
    197     }
    198 
    199     if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) {
    200         $publish_box .= '<p>' . __('<strong>Featured Image</strong> - This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the featured image as a post thumbnail on the home page, a custom header, etc.') . '</p>';
    201     }
    202 
    203     get_current_screen()->add_help_tab( array(
    204         'id'      => 'publish-box',
    205         'title'   => __('Publish Box'),
    206         'content' => $publish_box,
    207     ) );
    208 
    209     $discussion_settings  = '<p>' . __('<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>';
    210     $discussion_settings .= '<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>';
    211 
    212     get_current_screen()->add_help_tab( array(
    213         'id'      => 'discussion-settings',
    214         'title'   => __('Discussion Settings'),
    215         'content' => $discussion_settings,
    216191    ) );
    217192
     
    232207    ) );
    233208
    234     $page_attributes = '<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>' .
    235         '<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>' .
    236         '<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>';
    237 
    238     get_current_screen()->add_help_tab( array(
    239         'id' => 'page-attributes',
    240         'title' => __('Page Attributes'),
    241         'content' => $page_attributes,
    242     ) );
    243 
    244209    get_current_screen()->set_help_sidebar(
    245210            '<p><strong>' . __('For more information:') . '</strong></p>' .
     
    264229    '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    265230    );
     231}
     232
     233if ( 'post' == $post_type || 'page' == $post_type ) {
     234    $inserting_media = '<p>' . ('<strong>Add Media</strong> - You can upload and insert media (images, audio, document files, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, simply select multiple images to add.') . '</p>';
     235    $inserting_media .= '<p>' . ('<strong>Embed Media</strong> - With oEmbed, you can easily embed media from popular websites such as Twitter, YouTube, Instagram, SoundCloud, and others. All you need to do is copy the URL of that media, and paste it directly into the text of your page/post on its own line. Remember to make sure that the URL is on its own line and not hyperlinked. Please refer to the Codex to <a href="http://codex.wordpress.org/Embeds">learn more about oEmbed</a>.');
     236
     237    get_current_screen()->add_help_tab( array(
     238        'id'        => 'inserting-media',
     239        'title'     => __( 'Inserting Media' ),
     240        'content'   => $inserting_media,
     241    ) );
     242}
     243
     244if ( 'post' == $post_type ) {
     245    $publish_box = '<p>' . __('Several boxes on this screen contain settings for how your content will be published, including:') . '</p>';
     246    $publish_box .= '<ul><li>' . __('<strong>Publish</strong> - You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.') . '</li>';
     247
     248    if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) {
     249        $publish_box .= '<li>' . __( '<strong>Format</strong> - Post Formats designate how your theme will display a specific post. For example, you could have a <em>standard</em> blog post with a title and paragraphs, or a short <em>aside</em> that omits the title and contains a short text blurb. Please refer to the Codex for <a href="http://codex.wordpress.org/Post_Formats#Supported_Formats">descriptions of each post format</a>. Your theme could enable all or some of 10 possible formats.' ) . '</li>';
     250    }
     251
     252    if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) {
     253        $publish_box .= '<li>' . __('<strong>Featured Image</strong> - This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the featured image as a post thumbnail on the home page, a custom header, etc.') . '</li>';
     254    }
     255
     256    $publish_box .= '</ul>';
     257
     258    get_current_screen()->add_help_tab( array(
     259        'id'      => 'publish-box',
     260        'title'   => __('Publish Settings'),
     261        'content' => $publish_box,
     262    ) );
     263
     264    $discussion_settings  = '<p>' . __('<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>';
     265    $discussion_settings .= '<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>';
     266
     267    get_current_screen()->add_help_tab( array(
     268        'id'      => 'discussion-settings',
     269        'title'   => __('Discussion Settings'),
     270        'content' => $discussion_settings,
     271    ) );
     272} elseif ( 'page' == $post_type ) {
     273    $page_attributes = '<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>' .
     274        '<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>' .
     275        '<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>';
     276
     277    get_current_screen()->add_help_tab( array(
     278        'id' => 'page-attributes',
     279        'title' => __('Page Attributes'),
     280        'content' => $page_attributes,
     281    ) );
    266282}
    267283
Note: See TracChangeset for help on using the changeset viewer.