Changeset 13043
- Timestamp:
- 02/10/2010 04:49:16 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r13041 r13043 53 53 */ 54 54 function init() { 55 if ( ! current_user_can('switch_themes') ) 56 return; 57 55 58 $page = add_theme_page(__('Custom Background'), __('Custom Background'), 'switch_themes', 'custom-background', array(&$this, 'admin_page')); 56 59 … … 84 87 */ 85 88 function take_action() { 89 if ( ! current_user_can('switch_themes') ) 90 return; 91 86 92 if ( isset($_POST['reset-background']) ) { 87 93 check_admin_referer('custom-background'); … … 235 241 */ 236 242 function admin_page() { 243 if ( ! current_user_can('switch_themes') ) 244 wp_die(__('You do not have permission to customize the background.')); 237 245 $step = $this->step(); 238 246 if ( 1 == $step ) -
trunk/wp-admin/custom-header.php
r12890 r13043 53 53 */ 54 54 function init() { 55 $page = add_theme_page(__('Custom Header'), __('Custom Header'), 'edit_themes', 'custom-header', array(&$this, 'admin_page')); 55 if ( ! current_user_can('switch_themes') ) 56 return; 57 58 $page = add_theme_page(__('Custom Header'), __('Custom Header'), 'switch_themes', 'custom-header', array(&$this, 'admin_page')); 56 59 57 60 add_action("admin_print_scripts-$page", array(&$this, 'js_includes')); … … 114 117 */ 115 118 function take_action() { 119 if ( ! current_user_can('switch_themes') ) 120 return; 121 116 122 if ( isset( $_POST['textcolor'] ) ) { 117 123 check_admin_referer('custom-header'); … … 484 490 */ 485 491 function admin_page() { 492 if ( ! current_user_can('switch_themes') ) 493 wp_die(__('You do not have permission to customize headers.')); 486 494 $step = $this->step(); 487 495 if ( 1 == $step )
Note: See TracChangeset
for help on using the changeset viewer.