Add screen_options with contextual content, see #18690
git-svn-id: http://svn.automattic.com/wordpress/trunk@18864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f626113f33
commit
3575537e5f
|
@ -111,6 +111,10 @@ else
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
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>' .
|
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>' .
|
||||||
'<p>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</p>' .
|
'<p>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</p>' .
|
||||||
'<p>' . __( 'In the Author column, in addition to the author’s name, email address, and blog URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
|
'<p>' . __( 'In the Author column, in addition to the author’s name, email address, and blog URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
|
||||||
|
|
|
@ -161,13 +161,17 @@ do_action('do_meta_boxes', $post_type, 'side', $post);
|
||||||
|
|
||||||
$current_screen->add_option('layout_columns', array('max' => 2, 'default' => 'auto') );
|
$current_screen->add_option('layout_columns', array('max' => 2, 'default' => 'auto') );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
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(
|
$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
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$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>';
|
||||||
|
|
|
@ -39,15 +39,18 @@ do_action('do_meta_boxes', 'link', 'side', $link);
|
||||||
|
|
||||||
add_screen_option('layout_columns', array('max' => 2, 'default' => 'auto') );
|
add_screen_option('layout_columns', array('max' => 2, 'default' => 'auto') );
|
||||||
|
|
||||||
add_contextual_help($current_screen,
|
$current_screen->add_screen_options(
|
||||||
'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link’s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
|
'<p>test</p>'
|
||||||
'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don’t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
|
|
||||||
'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>' .
|
|
||||||
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
|
|
||||||
'<p>' . __( '<a href="http://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>' .
|
|
||||||
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_contextual_help( $current_screen, '
|
||||||
|
<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link’s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>
|
||||||
|
<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don’t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>
|
||||||
|
<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>
|
||||||
|
<p><strong>' . __( 'For more information:' ) . '</strong></p>
|
||||||
|
<p>' . __( '<a href="http://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>
|
||||||
|
<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' );
|
||||||
|
|
||||||
require_once ('admin-header.php');
|
require_once ('admin-header.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,10 @@ if ( 'post' != $post_type ) {
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') );
|
add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
switch ( $wp_list_table->current_action() ) {
|
switch ( $wp_list_table->current_action() ) {
|
||||||
|
|
||||||
case 'add-tag':
|
case 'add-tag':
|
||||||
|
|
|
@ -148,6 +148,12 @@ wp_enqueue_script('inline-edit-post');
|
||||||
|
|
||||||
$title = $post_type_object->labels->name;
|
$title = $post_type_object->labels->name;
|
||||||
|
|
||||||
|
add_screen_option( 'per_page', array('label' => $title, 'default' => 20) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
if ( 'post' == $post_type ) {
|
if ( 'post' == $post_type ) {
|
||||||
add_contextual_help($current_screen,
|
add_contextual_help($current_screen,
|
||||||
'<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' .
|
'<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' .
|
||||||
|
@ -180,8 +186,6 @@ if ( 'post' == $post_type ) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => $title, 'default' => 20) );
|
|
||||||
|
|
||||||
require_once('./admin-header.php');
|
require_once('./admin-header.php');
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
|
|
@ -642,6 +642,7 @@ final class WP_Screen {
|
||||||
// Call old contextual_help_list filter.
|
// Call old contextual_help_list filter.
|
||||||
if ( ! isset( $_wp_contextual_help ) )
|
if ( ! isset( $_wp_contextual_help ) )
|
||||||
$_wp_contextual_help = array();
|
$_wp_contextual_help = array();
|
||||||
|
|
||||||
$_wp_contextual_help = apply_filters( 'contextual_help_list', $_wp_contextual_help, $this );
|
$_wp_contextual_help = apply_filters( 'contextual_help_list', $_wp_contextual_help, $this );
|
||||||
|
|
||||||
if ( isset( $_wp_contextual_help[ $this->id ] ) ) {
|
if ( isset( $_wp_contextual_help[ $this->id ] ) ) {
|
||||||
|
@ -654,14 +655,6 @@ final class WP_Screen {
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add screen options tab
|
|
||||||
if ( $this->show_screen_options() ) {
|
|
||||||
$this->add_help_tab( array(
|
|
||||||
'title' => __('Screen Options'),
|
|
||||||
'callback' => array( $this, 'render_screen_options' ),
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Time to render!
|
// Time to render!
|
||||||
?>
|
?>
|
||||||
<div id="screen-meta" class='metabox-prefs'>
|
<div id="screen-meta" class='metabox-prefs'>
|
||||||
|
@ -712,7 +705,7 @@ final class WP_Screen {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show_screen_options() {
|
public function show_screen_options() { // not needed?
|
||||||
global $wp_meta_boxes, $wp_list_table;
|
global $wp_meta_boxes, $wp_list_table;
|
||||||
|
|
||||||
if ( is_bool( $this->_show_screen_options ) )
|
if ( is_bool( $this->_show_screen_options ) )
|
||||||
|
@ -746,6 +739,15 @@ final class WP_Screen {
|
||||||
return $this->_show_screen_options;
|
return $this->_show_screen_options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function add_screen_options($before = '') {
|
||||||
|
$this->add_help_tab( array(
|
||||||
|
'title' => __('Screen Options'),
|
||||||
|
'id' => 'screen-options',
|
||||||
|
'callback' => array( $this, 'render_screen_options' ),
|
||||||
|
'content' => $before
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the screen options tab.
|
* Render the screen options tab.
|
||||||
*
|
*
|
||||||
|
@ -756,6 +758,13 @@ final class WP_Screen {
|
||||||
|
|
||||||
$columns = get_column_headers( $this );
|
$columns = get_column_headers( $this );
|
||||||
$hidden = get_hidden_columns( $this );
|
$hidden = get_hidden_columns( $this );
|
||||||
|
$this->_screen_settings = apply_filters( 'screen_settings', '', $this );
|
||||||
|
|
||||||
|
switch ( $this->id ) {
|
||||||
|
case 'widgets':
|
||||||
|
$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";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form id="adv-settings" action="" method="post">
|
<form id="adv-settings" action="" method="post">
|
||||||
|
|
|
@ -27,6 +27,9 @@ if ( is_user_admin() )
|
||||||
else
|
else
|
||||||
add_screen_option('layout_columns', array('max' => 4, 'default' => 'auto') );
|
add_screen_option('layout_columns', array('max' => 4, 'default' => 'auto') );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
// Help tabs
|
// Help tabs
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,10 @@ $wp_list_table->prepare_items();
|
||||||
$title = __('Links');
|
$title = __('Links');
|
||||||
$this_file = $parent_file = 'link-manager.php';
|
$this_file = $parent_file = 'link-manager.php';
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
add_contextual_help( $current_screen,
|
add_contextual_help( $current_screen,
|
||||||
'<p>' . sprintf(__('You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the WordPress community are included as examples.'), 'widgets.php') . '</p>' .
|
'<p>' . sprintf(__('You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the WordPress community are included as examples.'), 'widgets.php') . '</p>' .
|
||||||
'<p>' . __('Links may be separated into categories; these are different than the categories used on your posts.') . '</p>' .
|
'<p>' . __('Links may be separated into categories; these are different than the categories used on your posts.') . '</p>' .
|
||||||
|
|
|
@ -445,14 +445,17 @@ wp_initial_nav_menu_meta_boxes();
|
||||||
if ( ! current_theme_supports( 'menus' ) && ! wp_get_nav_menus() )
|
if ( ! current_theme_supports( 'menus' ) && ! wp_get_nav_menus() )
|
||||||
$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>';
|
$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>';
|
||||||
|
|
||||||
$help = '<p>' . __('This feature allows you to use a custom menu in place of your theme’s default menus. If your theme does not support the custom menus feature yet (the new and old default themes, Twenty Eleven and Twenty Ten, do), you can learn about adding this support by following the Documentation link in this tab. You can still use the “Custom Menu” widget to add menus to a sidebar.') . '</p>';
|
$current_screen->add_screen_options(
|
||||||
$help .= '<p>' . __('You can create custom menus for your site. These menus may contain links to pages, categories, custom links or other content types (use the Screen Options tab to decide which ones to show on the screen). You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.') . '</p>';
|
'<p>test</p>'
|
||||||
$help .= '<p>' . __('To create a new custom menu, click on the + tab, give the menu a name, and click Create Menu. Next, add menu items from the appropriate boxes. You’ll be able to edit the information for each menu item, and can drag and drop to put them in order. You can also drag a menu item a little to the right to make it a submenu, to create menus with hierarchy. Drop the item into its new nested placement when the dotted rectangle target shifts over, also a little to the right. Don’t forget to click Save when you’re finished.') . '</p>';
|
);
|
||||||
$help .= '<p><strong>' . __('For more information:') . '</strong></p>';
|
|
||||||
$help .= '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>';
|
|
||||||
$help .= '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
|
|
||||||
|
|
||||||
add_contextual_help($current_screen, $help);
|
add_contextual_help( $current_screen, '
|
||||||
|
<p>' . __('This feature allows you to use a custom menu in place of your theme’s default menus. If your theme does not support the custom menus feature yet (the new and old default themes, Twenty Eleven and Twenty Ten, do), you can learn about adding this support by following the Documentation link in this tab. You can still use the “Custom Menu” widget to add menus to a sidebar.') . '</p>
|
||||||
|
<p>' . __('You can create custom menus for your site. These menus may contain links to pages, categories, custom links or other content types (use the Screen Options tab to decide which ones to show on the screen). You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.') . '</p>
|
||||||
|
<p>' . __('To create a new custom menu, click on the + tab, give the menu a name, and click Create Menu. Next, add menu items from the appropriate boxes. You’ll be able to edit the information for each menu item, and can drag and drop to put them in order. You can also drag a menu item a little to the right to make it a submenu, to create menus with hierarchy. Drop the item into its new nested placement when the dotted rectangle target shifts over, also a little to the right. Don’t forget to click Save when you’re finished.') . '</p>
|
||||||
|
<p><strong>' . __('For more information:') . '</strong></p>
|
||||||
|
<p>' . __('<a href="http://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>
|
||||||
|
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' );
|
||||||
|
|
||||||
// Get the admin header
|
// Get the admin header
|
||||||
require_once( './admin-header.php' );
|
require_once( './admin-header.php' );
|
||||||
|
|
|
@ -40,6 +40,10 @@ add_thickbox();
|
||||||
|
|
||||||
add_screen_option('layout_columns', array('max' => 4, 'default' => 'auto') );
|
add_screen_option('layout_columns', array('max' => 4, 'default' => 'auto') );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
require_once( '../admin-header.php' );
|
require_once( '../admin-header.php' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -124,6 +124,10 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) );
|
add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
|
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
|
||||||
$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
|
$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
|
||||||
$title = sprintf( __('Edit Site: %s'), $site_url_no_http );
|
$title = sprintf( __('Edit Site: %s'), $site_url_no_http );
|
||||||
|
|
|
@ -155,6 +155,10 @@ if ( isset( $_GET['action'] ) && 'update-site' == $_GET['action'] ) {
|
||||||
|
|
||||||
add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) );
|
add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
|
$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
|
||||||
$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
|
$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
|
||||||
$title = sprintf( __('Edit Site: %s'), $site_url_no_http );
|
$title = sprintf( __('Edit Site: %s'), $site_url_no_http );
|
||||||
|
|
|
@ -24,6 +24,10 @@ $parent_file = 'sites.php';
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
add_contextual_help($current_screen,
|
add_contextual_help($current_screen,
|
||||||
'<p>' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '</p>' .
|
'<p>' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '</p>' .
|
||||||
'<p>' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '</p>' .
|
'<p>' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '</p>' .
|
||||||
|
|
|
@ -175,6 +175,10 @@ add_thickbox();
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
add_contextual_help($current_screen,
|
add_contextual_help($current_screen,
|
||||||
'<p>' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '</p>' .
|
'<p>' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '</p>' .
|
||||||
'<p>' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.') . '</p>' .
|
'<p>' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.') . '</p>' .
|
||||||
|
|
|
@ -229,6 +229,10 @@ $parent_file = 'users.php';
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
|
||||||
|
|
||||||
|
$current_screen->add_screen_options(
|
||||||
|
'<p>test</p>'
|
||||||
|
);
|
||||||
|
|
||||||
add_contextual_help($current_screen,
|
add_contextual_help($current_screen,
|
||||||
'<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' .
|
'<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' .
|
||||||
'<p>' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to his or her Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '</p>' .
|
'<p>' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to his or her Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '</p>' .
|
||||||
|
|
|
@ -35,16 +35,19 @@ $body_id = $tab;
|
||||||
|
|
||||||
do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information.
|
do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information.
|
||||||
|
|
||||||
add_contextual_help($current_screen,
|
$current_screen->add_screen_options(
|
||||||
'<p>' . sprintf(__('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from WordPress core by thousands of developers all over the world. All plugins in the official <a href="%s" target="_blank">WordPress.org Plugin Directory</a> are compatible with the license WordPress uses. You can find new plugins to install by searching or browsing the Directory right here in your own Plugins section.'), 'http://wordpress.org/extend/plugins/') . '</p>' .
|
'<p>test</p>'
|
||||||
'<p>' . __('If you know what you’re looking for, Search is your best bet. The Search screen has options to search the WordPress.org Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting a popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>' .
|
|
||||||
'<p>' . __('If you just want to get an idea of what’s available, you can browse Featured, Popular, Newest, and Recently Updated plugins by using the links in the upper left of the screen. These sections rotate regularly.') . '</p>' .
|
|
||||||
'<p>' . __('If you want to install a plugin that you’ve downloaded elsewhere, click Upload in the upper left. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.') . '</p>' .
|
|
||||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Plugins_Add_New_Screen" target="_blank">Documentation on Installing Plugins</a>') . '</p>' .
|
|
||||||
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_contextual_help( $current_screen, '
|
||||||
|
<p>' . sprintf(__('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from WordPress core by thousands of developers all over the world. All plugins in the official <a href="%s" target="_blank">WordPress.org Plugin Directory</a> are compatible with the license WordPress uses. You can find new plugins to install by searching or browsing the Directory right here in your own Plugins section.'), 'http://wordpress.org/extend/plugins/') . '</p>
|
||||||
|
<p>' . __('If you know what you’re looking for, Search is your best bet. The Search screen has options to search the WordPress.org Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting a popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>
|
||||||
|
<p>' . __('If you just want to get an idea of what’s available, you can browse Featured, Popular, Newest, and Recently Updated plugins by using the links in the upper left of the screen. These sections rotate regularly.') . '</p>
|
||||||
|
<p>' . __('If you want to install a plugin that you’ve downloaded elsewhere, click Upload in the upper left. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.') . '</p>
|
||||||
|
<p><strong>' . __('For more information:') . '</strong></p>
|
||||||
|
<p>' . __('<a href="http://codex.wordpress.org/Plugins_Add_New_Screen" target="_blank">Documentation on Installing Plugins</a>') . '</p>
|
||||||
|
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' );
|
||||||
|
|
||||||
include(ABSPATH . 'wp-admin/admin-header.php');
|
include(ABSPATH . 'wp-admin/admin-header.php');
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
|
|
@ -318,16 +318,19 @@ add_thickbox();
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' )) );
|
||||||
|
|
||||||
add_contextual_help($current_screen,
|
$current_screen->add_screen_options(
|
||||||
'<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .
|
'<p>test</p>'
|
||||||
'<p>' . sprintf(__('You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your <code>/wp-content/plugins</code> directory. Once a plugin has been installed, you can activate it here.'), 'plugin-install.php', 'http://wordpress.org/extend/plugins/') . '</p>' .
|
|
||||||
'<p>' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin’s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '</p>' .
|
|
||||||
'<p>' . sprintf( __('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), WP_PLUGIN_DIR) . '</p>' .
|
|
||||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Managing_Plugins#Plugin_Management" target="_blank">Documentation on Managing Plugins</a>') . '</p>' .
|
|
||||||
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_contextual_help( $current_screen, '
|
||||||
|
<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>
|
||||||
|
<p>' . sprintf(__('You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your <code>/wp-content/plugins</code> directory. Once a plugin has been installed, you can activate it here.'), 'plugin-install.php', 'http://wordpress.org/extend/plugins/') . '</p>
|
||||||
|
<p>' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin’s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '</p>
|
||||||
|
<p>' . sprintf( __('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), WP_PLUGIN_DIR) . '</p>
|
||||||
|
<p><strong>' . __('For more information:') . '</strong></p>
|
||||||
|
<p>' . __('<a href="http://codex.wordpress.org/Managing_Plugins#Plugin_Management" target="_blank">Documentation on Managing Plugins</a>') . '</p>
|
||||||
|
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' );
|
||||||
|
|
||||||
$title = __('Plugins');
|
$title = __('Plugins');
|
||||||
$parent_file = 'plugins.php';
|
$parent_file = 'plugins.php';
|
||||||
|
|
||||||
|
|
|
@ -139,16 +139,19 @@ wp_enqueue_script( 'media' );
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) );
|
||||||
|
|
||||||
add_contextual_help( $current_screen,
|
$current_screen->add_screen_options(
|
||||||
'<p>' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the <em>Screen Options</em> tab to customize the display of this screen.' ) . '</p>' .
|
'<p>test</p>'
|
||||||
'<p>' . __( 'You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by date using the dropdown menu above the media table.' ) . '</p>' .
|
|
||||||
'<p>' . __( 'Hovering over a row reveals action links: <em>Edit</em>, <em>Delete Permanently</em>, and <em>View</em>. Clicking <em>Edit</em> or on the media file’s name displays a simple screen to edit that individual file’s metadata. Clicking <em>Delete Permanently</em> will delete the file from the media library (as well as from any posts to which it is currently attached). <em>View</em> will take you to the display page for that file.' ) . '</p>' .
|
|
||||||
'<p>' . __( 'If a media file has not been attached to any post, you will see that in the <em>Attached To</em> column, and can click on <em>Attach File</em> to launch a small popup that will allow you to search for a post and attach the file.' ) . '</p>' .
|
|
||||||
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
|
|
||||||
'<p>' . __( '<a href="http://codex.wordpress.org/Media_Library_Screen" target="_blank">Documentation on Media Library</a>' ) . '</p>' .
|
|
||||||
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_contextual_help( $current_screen, '
|
||||||
|
<p>' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the <em>Screen Options</em> tab to customize the display of this screen.' ) . '</p>
|
||||||
|
<p>' . __( 'You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by date using the dropdown menu above the media table.' ) . '</p>
|
||||||
|
<p>' . __( 'Hovering over a row reveals action links: <em>Edit</em>, <em>Delete Permanently</em>, and <em>View</em>. Clicking <em>Edit</em> or on the media file’s name displays a simple screen to edit that individual file’s metadata. Clicking <em>Delete Permanently</em> will delete the file from the media library (as well as from any posts to which it is currently attached). <em>View</em> will take you to the display page for that file.' ) . '</p>
|
||||||
|
<p>' . __( 'If a media file has not been attached to any post, you will see that in the <em>Attached To</em> column, and can click on <em>Attach File</em> to launch a small popup that will allow you to search for a post and attach the file.' ) . '</p>
|
||||||
|
<p><strong>' . __( 'For more information:' ) . '</strong></p>
|
||||||
|
<p>' . __( '<a href="http://codex.wordpress.org/Media_Library_Screen" target="_blank">Documentation on Media Library</a>' ) . '</p>
|
||||||
|
<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' );
|
||||||
|
|
||||||
require_once('./admin-header.php');
|
require_once('./admin-header.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -19,17 +19,19 @@ $parent_file = 'users.php';
|
||||||
|
|
||||||
add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
|
add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
|
||||||
|
|
||||||
// contextual help - choose Help on the top right of admin panel to preview this.
|
$current_screen->add_screen_options(
|
||||||
add_contextual_help($current_screen,
|
'<p>test</p>'
|
||||||
'<p>' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.') . '</p>' .
|
|
||||||
'<p>' . __('You can customize the display of information on this screen as you can on other screens, by using the Screen Options tab and the on-screen filters.') . '</p>' .
|
|
||||||
'<p>' . __('To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.') . '</p>' .
|
|
||||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Users_Screen" target="_blank">Documentation on Managing Users</a>') . '</p>' .
|
|
||||||
'<p>' . __('<a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Descriptions of Roles and Capabilities</a>') . '</p>' .
|
|
||||||
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_contextual_help( $current_screen, '
|
||||||
|
<p>' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.') . '</p>
|
||||||
|
<p>' . __('You can customize the display of information on this screen as you can on other screens, by using the Screen Options tab and the on-screen filters.') . '</p>
|
||||||
|
<p>' . __('To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.') . '</p>
|
||||||
|
<p><strong>' . __('For more information:') . '</strong></p>
|
||||||
|
<p>' . __('<a href="http://codex.wordpress.org/Users_Screen" target="_blank">Documentation on Managing Users</a>') . '</p>
|
||||||
|
<p>' . __('<a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Descriptions of Roles and Capabilities</a>') . '</p>
|
||||||
|
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' );
|
||||||
|
|
||||||
if ( empty($_REQUEST) ) {
|
if ( empty($_REQUEST) ) {
|
||||||
$referer = '<input type="hidden" name="wp_http_referer" value="'. esc_attr(stripslashes($_SERVER['REQUEST_URI'])) . '" />';
|
$referer = '<input type="hidden" name="wp_http_referer" value="'. esc_attr(stripslashes($_SERVER['REQUEST_URI'])) . '" />';
|
||||||
} elseif ( isset($_REQUEST['wp_http_referer']) ) {
|
} elseif ( isset($_REQUEST['wp_http_referer']) ) {
|
||||||
|
|
|
@ -31,18 +31,20 @@ do_action( 'sidebar_admin_setup' );
|
||||||
$title = __( 'Widgets' );
|
$title = __( 'Widgets' );
|
||||||
$parent_file = 'themes.php';
|
$parent_file = 'themes.php';
|
||||||
|
|
||||||
$help = '
|
$current_screen->add_screen_options(
|
||||||
<p>' . __('Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.') . '</p>
|
'<p>test</p>'
|
||||||
<p>' . __('The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.') . '</p>
|
);
|
||||||
<p>' . __('If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.') . '</p>
|
|
||||||
<p>' . __('Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.') . '</p>
|
add_contextual_help( $current_screen, '
|
||||||
<p>' . __('Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.') . '</p>
|
<p>' . __('Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.') . '</p>
|
||||||
<p>' . __('Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.') . '</p>
|
<p>' . __('The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.') . '</p>
|
||||||
';
|
<p>' . __('If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.') . '</p>
|
||||||
$help .= '<p><strong>' . __('For more information:') . '</strong></p>';
|
<p>' . __('Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.') . '</p>
|
||||||
$help .= '<p>' . __('<a href="http://codex.wordpress.org/Appearance_Widgets_Screen" target="_blank">Documentation on Widgets</a>') . '</p>';
|
<p>' . __('Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.') . '</p>
|
||||||
$help .= '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
|
<p>' . __('Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.') . '</p>
|
||||||
add_contextual_help($current_screen, $help);
|
<p><strong>' . __('For more information:') . '</strong></p>
|
||||||
|
<p>' . __('<a href="http://codex.wordpress.org/Appearance_Widgets_Screen" target="_blank">Documentation on Widgets</a>') . '</p>
|
||||||
|
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' );
|
||||||
|
|
||||||
// These are the widgets grouped by sidebar
|
// These are the widgets grouped by sidebar
|
||||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||||
|
|
Loading…
Reference in New Issue