Chain off of get_current_screen() instead of using global. see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c59f813e32
commit
97d61ca5a2
|
@ -163,7 +163,7 @@ add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
|
||||||
if ( 'post' == $post_type ) {
|
if ( 'post' == $post_type ) {
|
||||||
$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>';
|
$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>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'customize-display',
|
'id' => 'customize-display',
|
||||||
'title' => __('Customizing This Display'),
|
'title' => __('Customizing This Display'),
|
||||||
'content' => $customize_display,
|
'content' => $customize_display,
|
||||||
|
@ -172,7 +172,7 @@ if ( 'post' == $post_type ) {
|
||||||
$title_and_editor = '<p>' . __('<strong>Title</strong> - Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.') . '</p>';
|
$title_and_editor = '<p>' . __('<strong>Title</strong> - Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.') . '</p>';
|
||||||
$title_and_editor .= '<p>' . __('<strong>Post editor</strong> - Enter the text for your 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. You can go the distraction-free writing screen, new in 3.2, via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in HTML mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular post editor.') . '</p>';
|
$title_and_editor .= '<p>' . __('<strong>Post editor</strong> - Enter the text for your 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. You can go the distraction-free writing screen, new in 3.2, via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in HTML mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular post editor.') . '</p>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'title-post-editor',
|
'id' => 'title-post-editor',
|
||||||
'title' => __('Title and Post Editor'),
|
'title' => __('Title and Post Editor'),
|
||||||
'content' => $title_and_editor,
|
'content' => $title_and_editor,
|
||||||
|
@ -188,7 +188,7 @@ if ( 'post' == $post_type ) {
|
||||||
$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>';
|
$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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'publish-box',
|
'id' => 'publish-box',
|
||||||
'title' => __('Publish Box'),
|
'title' => __('Publish Box'),
|
||||||
'content' => $publish_box,
|
'content' => $publish_box,
|
||||||
|
@ -197,13 +197,13 @@ if ( 'post' == $post_type ) {
|
||||||
$discussion_settings = '<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 to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>';
|
$discussion_settings = '<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 to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>';
|
||||||
$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>';
|
$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>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'discussion-settings',
|
'id' => 'discussion-settings',
|
||||||
'title' => __('Discussion Settings'),
|
'title' => __('Discussion Settings'),
|
||||||
'content' => $discussion_settings,
|
'content' => $discussion_settings,
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$current_screen->add_help_sidebar(
|
get_current_screen()->add_help_sidebar(
|
||||||
'<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'options-writing.php') . '</p>' .
|
'<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'options-writing.php') . '</p>' .
|
||||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Posts_Add_New_Screen" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .
|
'<p>' . __('<a href="http://codex.wordpress.org/Posts_Add_New_Screen" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .
|
||||||
|
@ -213,7 +213,7 @@ if ( 'post' == $post_type ) {
|
||||||
$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>' .
|
$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>' .
|
||||||
'<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>';
|
'<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>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'about-pages',
|
'id' => 'about-pages',
|
||||||
'title' => __('About Pages'),
|
'title' => __('About Pages'),
|
||||||
'content' => $about_pages,
|
'content' => $about_pages,
|
||||||
|
@ -223,13 +223,13 @@ if ( 'post' == $post_type ) {
|
||||||
'<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>' .
|
'<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>' .
|
||||||
'<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>';
|
'<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>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'page-attributes',
|
'id' => 'page-attributes',
|
||||||
'title' => __('Page Attributes'),
|
'title' => __('Page Attributes'),
|
||||||
'content' => $page_attributes,
|
'content' => $page_attributes,
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$current_screen->add_help_sidebar(
|
get_current_screen()->add_help_sidebar(
|
||||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_Screen" target="_blank">Documentation on Adding New Pages</a>') . '</p>' .
|
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_Screen" target="_blank">Documentation on Adding New Pages</a>') . '</p>' .
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' .
|
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' .
|
||||||
|
|
|
@ -37,7 +37,7 @@ add_screen_option( 'overview', $overview );
|
||||||
$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>';
|
$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>';
|
||||||
$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>';
|
$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>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'help-navigation',
|
'id' => 'help-navigation',
|
||||||
'title' => __('Navigation'),
|
'title' => __('Navigation'),
|
||||||
'content' => $help_navigation,
|
'content' => $help_navigation,
|
||||||
|
@ -48,7 +48,7 @@ $help_layout .= '<p>' . __('<strong>Screen Options</strong> - Use the Screen Opt
|
||||||
$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>';
|
$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>';
|
||||||
$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>';
|
$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>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'help-layout',
|
'id' => 'help-layout',
|
||||||
'title' => __('Layout'),
|
'title' => __('Layout'),
|
||||||
'content' => $help_layout,
|
'content' => $help_layout,
|
||||||
|
@ -64,13 +64,13 @@ $help_content .= '<p>' . __('<strong>WordPress Blog</strong> - Latest news from
|
||||||
$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>';
|
$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>';
|
||||||
$help_content .= '<p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '</p>';
|
$help_content .= '<p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '</p>';
|
||||||
|
|
||||||
$current_screen->add_help_tab( array(
|
get_current_screen()->add_help_tab( array(
|
||||||
'id' => 'help-content',
|
'id' => 'help-content',
|
||||||
'title' => __('Content'),
|
'title' => __('Content'),
|
||||||
'content' => $help_content,
|
'content' => $help_content,
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$current_screen->add_help_sidebar(
|
get_current_screen()->add_help_sidebar(
|
||||||
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
|
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
|
||||||
'<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' .
|
'<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' .
|
||||||
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
||||||
|
|
Loading…
Reference in New Issue