Make WordPress Core


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

Use the edit_theme_options capability. fixes #13290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-header.php

    r14443 r14581  
    6262         */
    6363        function init() {
    64                 if ( ! current_user_can('switch_themes') )
     64                if ( ! current_user_can('edit_theme_options') )
    6565                        return;
    6666
    67                 $page = add_theme_page(__('Header'), __('Header'), 'switch_themes', 'custom-header', array(&$this, 'admin_page'));
     67                $page = add_theme_page(__('Header'), __('Header'), 'edit_theme_options', 'custom-header', array(&$this, 'admin_page'));
    6868
    6969                add_action("admin_print_scripts-$page", array(&$this, 'js_includes'));
     
    126126         */
    127127        function take_action() {
    128                 if ( ! current_user_can('switch_themes') )
     128                if ( ! current_user_can('edit_theme_options') )
    129129                        return;
    130130
     
    598598         */
    599599        function admin_page() {
    600                 if ( ! current_user_can('switch_themes') )
     600                if ( ! current_user_can('edit_theme_options') )
    601601                        wp_die(__('You do not have permission to customize headers.'));
    602602                $step = $this->step();
Note: See TracChangeset for help on using the changeset viewer.