diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 0f253703b4..63a31a138d 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -11,11 +11,16 @@ * * @since unknown */ -if ( !defined('WP_ADMIN') ) +if ( ! defined('WP_ADMIN') ) define('WP_ADMIN', TRUE); -if ( !defined('WP_NETWORK_ADMIN') ) { +if ( ! defined('WP_NETWORK_ADMIN') ) define('WP_NETWORK_ADMIN', FALSE); + +if ( ! defined('WP_USER_ADMIN') ) + define('WP_USER_ADMIN', FALSE); + +if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) { define('WP_BLOG_ADMIN', TRUE); } @@ -97,6 +102,8 @@ else if ( WP_NETWORK_ADMIN ) require(ABSPATH . 'wp-admin/network/menu.php'); +elseif ( WP_USER_ADMIN ) + require(ABSPATH . 'wp-admin/user/menu.php'); else require(ABSPATH . 'wp-admin/menu.php'); diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 71d17c61dd..68abda1f32 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -105,6 +105,8 @@ if ( $post_id ) else $title = __('Comments'); +add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) ); + add_contextual_help( $current_screen, '
' . __('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.') . '
' . '' . __('A yellow row means the comment is waiting for you to moderate it.') . '
' . '' . __('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.') . '
' . diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index aa0dcfc8a0..239c2ec590 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -163,6 +163,8 @@ do_action('do_meta_boxes', $post_type, 'normal', $post); do_action('do_meta_boxes', $post_type, 'advanced', $post); do_action('do_meta_boxes', $post_type, 'side', $post); +add_screen_option('layout_columns', array('max' => 2) ); + if ( 'post' == $post_type ) { add_contextual_help($current_screen, '' . __('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.') . '
' . diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 29e28623f4..f5bc0304ce 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -37,6 +37,8 @@ do_action('do_meta_boxes', 'link', 'normal', $link); do_action('do_meta_boxes', 'link', 'advanced', $link); do_action('do_meta_boxes', 'link', 'side', $link); +add_screen_option('layout_columns', array('max' => 2) ); + add_contextual_help($current_screen, '' . __( '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.' ) . '
' . '' . __( '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.' ) . '
' . diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index e106efd019..1bed218539 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -22,6 +22,8 @@ if ( 'post' != $post_type ) { $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; } +add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') ); + switch ( $wp_list_table->current_action() ) { case 'add-tag': diff --git a/wp-admin/edit.php b/wp-admin/edit.php index fb622fe76c..fdf92fa76c 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -163,6 +163,8 @@ if ( 'post' == $post_type ) { ); } +add_screen_option( 'per_page', array('label' => $title, 'default' => 20) ); + require_once('./admin-header.php'); ?>' . __('Welcome to your WordPress Dashboard! You will find helpful tips in the Help tab of each screen to assist you as you get to know the application.') . '
' . @@ -42,7 +47,7 @@ add_contextual_help($current_screen, '' . __('Support Forums') . '
' ); -require_once('./admin-header.php'); +include (ABSPATH . 'wp-admin/admin-header.php'); $today = current_time('mysql', 1); ?> diff --git a/wp-admin/js/dashboard.dev.js b/wp-admin/js/dashboard.dev.js index 4969113ccc..a305467629 100644 --- a/wp-admin/js/dashboard.dev.js +++ b/wp-admin/js/dashboard.dev.js @@ -42,7 +42,7 @@ jQuery(document).ready( function($) { }; ajaxPopulateWidgets(); - postboxes.add_postbox_toggles('dashboard', { pbshow: ajaxPopulateWidgets } ); + postboxes.add_postbox_toggles(pagenow, { pbshow: ajaxPopulateWidgets } ); /* QuickPress */ quickPressLoad = function() { diff --git a/wp-admin/js/dashboard.js b/wp-admin/js/dashboard.js index f391e1342e..4450ab3a8e 100644 --- a/wp-admin/js/dashboard.js +++ b/wp-admin/js/dashboard.js @@ -1 +1 @@ -var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins","dashboard_quick_press"];ajaxPopulateWidgets=function(b){show=function(g,c){var f,d=a("#"+g+" div.inside:visible").find(".widget-loading");if(d.length){f=d.parent();setTimeout(function(){f.load("index-extra.php?jax="+g,"",function(){f.hide().slideDown("normal",function(){a(this).css("display","");if("dashboard_plugins"==g&&a.isFunction(tb_init)){tb_init("#dashboard_plugins a.thickbox")}if("dashboard_quick_press"==g&&a.isFunction(tb_init)){tb_init("#dashboard_quick_press a.thickbox");quickPressLoad()}})})},c*500)}};if(b){b=b.toString();if(a.inArray(b,ajaxWidgets)!=-1){show(b,0)}}else{a.each(ajaxWidgets,function(c){show(this,c)})}};ajaxPopulateWidgets();postboxes.add_postbox_toggles("dashboard",{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var b=a("#quickpost-action"),c;c=a("#quick-press").submit(function(){a("#dashboard_quick_press #publishing-action img.waiting").css("visibility","visible");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","disabled");if("post"==b.val()){b.val("post-quickpress-publish")}a("#dashboard_quick_press div.inside").load(c.attr("action"),c.serializeArray(),function(){a("#dashboard_quick_press #publishing-action img.waiting").css("visibility","hidden");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","");a("#dashboard_quick_press ul").next("p").remove();a("#dashboard_quick_press ul").find("li").each(function(){a("#dashboard_recent_drafts ul").prepend(this)}).end().remove();tb_init("a.thickbox");quickPressLoad()});return false});a("#publish").click(function(){b.val("post-quickpress-publish")})}}); \ No newline at end of file +var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins","dashboard_quick_press"];ajaxPopulateWidgets=function(b){show=function(g,c){var f,d=a("#"+g+" div.inside:visible").find(".widget-loading");if(d.length){f=d.parent();setTimeout(function(){f.load("index-extra.php?jax="+g,"",function(){f.hide().slideDown("normal",function(){a(this).css("display","");if("dashboard_plugins"==g&&a.isFunction(tb_init)){tb_init("#dashboard_plugins a.thickbox")}if("dashboard_quick_press"==g&&a.isFunction(tb_init)){tb_init("#dashboard_quick_press a.thickbox");quickPressLoad()}})})},c*500)}};if(b){b=b.toString();if(a.inArray(b,ajaxWidgets)!=-1){show(b,0)}}else{a.each(ajaxWidgets,function(c){show(this,c)})}};ajaxPopulateWidgets();postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var b=a("#quickpost-action"),c;c=a("#quick-press").submit(function(){a("#dashboard_quick_press #publishing-action img.waiting").css("visibility","visible");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","disabled");if("post"==b.val()){b.val("post-quickpress-publish")}a("#dashboard_quick_press div.inside").load(c.attr("action"),c.serializeArray(),function(){a("#dashboard_quick_press #publishing-action img.waiting").css("visibility","hidden");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr("disabled","");a("#dashboard_quick_press ul").next("p").remove();a("#dashboard_quick_press ul").find("li").each(function(){a("#dashboard_recent_drafts ul").prepend(this)}).end().remove();tb_init("a.thickbox");quickPressLoad()});return false});a("#publish").click(function(){b.val("post-quickpress-publish")})}}); \ No newline at end of file diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 192fa14bb3..7d92deca95 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -232,6 +232,6 @@ $compat = array( 'themes' => 'appearance', ); -require(ABSPATH . 'wp-admin/includes/menu.php'); +require_once(ABSPATH . 'wp-admin/includes/menu.php'); ?> diff --git a/wp-admin/network/edit.php b/wp-admin/network/edit.php index a5e065cc1f..e041aff1a7 100644 --- a/wp-admin/network/edit.php +++ b/wp-admin/network/edit.php @@ -52,8 +52,8 @@ function confirm_delete_users( $users ) { $user_dropdown = "