Make WordPress Core


Ignore:
Timestamp:
05/12/2010 07:19:57 PM (14 years ago)
Author:
nacin
Message:

Use the edit_theme_options capability. fixes #13290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/nav-menus.php

    r14571 r14581  
    1717
    1818// Permissions Check
    19 if ( ! current_user_can('switch_themes') )
    20     wp_die( __( 'Cheatin’ uh?' ));
     19if ( ! current_user_can('edit_theme_options') )
     20    wp_die( __( 'Cheatin’ uh?' ) );
    2121
    2222// Nav Menu CSS
     
    5252switch ( $action ) {
    5353    case 'add-menu-item':
    54         if ( current_user_can( 'switch_themes' ) ) {
    55             check_admin_referer( 'add-menu_item', 'menu-settings-column-nonce' );
    56             if ( isset( $_REQUEST['menu-item'] ) ) {
    57                 wp_save_nav_menu_item( $nav_menu_selected_id, $_REQUEST['menu-item'] );
    58             }
    59         }
     54        check_admin_referer( 'add-menu_item', 'menu-settings-column-nonce' );
     55        if ( isset( $_REQUEST['menu-item'] ) )
     56            wp_save_nav_menu_item( $nav_menu_selected_id, $_REQUEST['menu-item'] );
    6057        break;
    6158    case 'move-down-menu-item' :
Note: See TracChangeset for help on using the changeset viewer.