From 5563639dd54fa2cfb67baedd8a13032cfd1b6848 Mon Sep 17 00:00:00 2001 From: azaozz Date: Fri, 17 Apr 2009 12:55:03 +0000 Subject: [PATCH] Keep the same name and remove unused core, see [10987] git-svn-id: http://svn.automattic.com/wordpress/trunk@10988 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 33 --------------------------------- wp-admin/admin.php | 2 +- wp-admin/includes/misc.php | 2 +- 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index a64813c403..a29489b1b2 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -1025,39 +1025,6 @@ case 'meta-box-order': if ( $page_columns ) update_usermeta($user->ID, "screen_layout_$page", $page_columns); - die('1'); - break; -case 'set-screen-option': - check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' ); - if ( ! $user = wp_get_current_user() ) - die(-1); - $option = $_POST['option']; - $value = $_POST['value']; - - if ( !preg_match( '/^[a-z_-]+$/', $option ) ) - die(-1); - - $option = str_replace('-', '_', $option); - - switch ( $option ) { - case 'edit_per_page': - case 'edit_pages_per_page': - case 'edit_comments_per_page': - case 'upload_per_page': - case 'categories_per_page': - case 'edit_tags_per_page': - $value = (int) $value; - if ( $value < 1 || $value > 999 ) - die(-1); - break; - default: - $value = apply_filters('set-screen-option', false, $option, $value); - if ( false === $value ) - die(-1); - break; - } - - update_usermeta($user->ID, $option, $value); die('1'); break; case 'get-permalink': diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 95a7346158..1168293747 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -41,7 +41,7 @@ nocache_headers(); update_category_cache(); -save_screen_options(); +set_screen_options(); $posts_per_page = get_option('posts_per_page'); $what_to_show = get_option('what_to_show'); diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index a461bf3c53..06a686aee8 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -323,7 +323,7 @@ jQuery('#template').submit(function(){ * * @since 2.8 **/ -function save_screen_options() { +function set_screen_options() { if ( isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options']) ) { check_admin_referer( 'screen-options-nonce', 'screenoptionnonce' );