WordPress.org

Make WordPress Core

Changeset 10988


Ignore:
Timestamp:
04/17/2009 12:55:03 PM (9 years ago)
Author:
azaozz
Message:

Keep the same name and remove unused core, see [10987]

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r10957 r10988  
    10281028    die('1');
    10291029    break;
    1030 case 'set-screen-option':
    1031     check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
    1032     if ( ! $user = wp_get_current_user() )
    1033         die(-1);
    1034     $option = $_POST['option'];
    1035     $value = $_POST['value'];
    1036 
    1037     if ( !preg_match( '/^[a-z_-]+$/', $option ) )
    1038         die(-1);
    1039 
    1040     $option = str_replace('-', '_', $option);
    1041 
    1042     switch ( $option ) {
    1043         case 'edit_per_page':
    1044         case 'edit_pages_per_page':
    1045         case 'edit_comments_per_page':
    1046         case 'upload_per_page':
    1047         case 'categories_per_page':
    1048         case 'edit_tags_per_page':
    1049             $value = (int) $value;
    1050             if ( $value < 1 || $value > 999 )
    1051                 die(-1);
    1052             break;
    1053         default:
    1054             $value = apply_filters('set-screen-option', false, $option, $value);
    1055             if ( false === $value )
    1056                 die(-1);
    1057             break;
    1058     }
    1059 
    1060     update_usermeta($user->ID, $option, $value);
    1061     die('1');
    1062     break;
    10631030case 'get-permalink':
    10641031    check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
  • trunk/wp-admin/admin.php

    r10987 r10988  
    4242update_category_cache();
    4343
    44 save_screen_options();
     44set_screen_options();
    4545
    4646$posts_per_page = get_option('posts_per_page');
  • trunk/wp-admin/includes/misc.php

    r10987 r10988  
    324324 * @since 2.8
    325325**/
    326 function save_screen_options() {
     326function set_screen_options() {
    327327
    328328    if ( isset($_POST['wp_screen_options']) && is_array($_POST['wp_screen_options']) ) {
Note: See TracChangeset for help on using the changeset viewer.