' . __( 'Cheatin’ uh?' ) . '' . '
' . __( 'You are not allowed to edit theme options on this site.' ) . '
', 403 ); } if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) { if ( 'activate' == $_GET['action'] ) { check_admin_referer('switch-theme_' . $_GET['stylesheet']); // SitePad pre switch theme function apply_filters('pre_switch_theme', $_GET['stylesheet']); $theme = wp_get_theme( $_GET['stylesheet'] ); if ( ! $theme->exists() || ! $theme->is_allowed() ) { wp_die( '' . __( 'The requested theme does not exist.' ) . '
', 403 ); } switch_theme( $theme->get_stylesheet() ); wp_redirect( admin_url('themes.php?activated=true') ); exit; } elseif ( 'delete' == $_GET['action'] ) { check_admin_referer('delete-theme_' . $_GET['stylesheet']); $theme = wp_get_theme( $_GET['stylesheet'] ); if ( ! current_user_can( 'delete_themes' ) ) { wp_die( '' . __( 'You are not allowed to delete this item.' ) . '
', 403 ); } if ( ! $theme->exists() ) { wp_die( '' . __( 'The requested theme does not exist.' ) . '
', 403 ); } $active = wp_get_theme(); if ( $active->get( 'Template' ) == $_GET['stylesheet'] ) { wp_redirect( admin_url( 'themes.php?delete-active-child=true' ) ); } else { delete_theme( $_GET['stylesheet'] ); wp_redirect( admin_url( 'themes.php?deleted=true' ) ); } exit; } } wp_enqueue_script( 'script_handle', plugin_dir_url( __FILE__ ) . 'script.js', array( 'jquery', 'wp-util' ), '1.0', true ); $title = __('Manage Themes'); $parent_file = 'themes.php'; if ( current_user_can( 'switch_themes' ) ) { $themes = wp_prepare_themes_for_js(); } else { $themes = wp_prepare_themes_for_js( array( wp_get_theme() ) ); } require_once( ABSPATH . 'site-admin/admin-header.php' ); ?>Visit site' ), home_url( '/' ) ); ?>
'.__('Your new theme has been activated. You will now be redirected to the').' '.BRAND_SM_EDITOR.'
Visit site' ), home_url( '/' ) ); ?>