X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/a6f44f0edcda2471c5a33e4156c1c9488c7f3210..refs/tags/wordpress-3.7:/wp-admin/themes.php diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 14ed887d..edb0cad9 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -7,13 +7,15 @@ */ /** WordPress Administration Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') ) wp_die( __( 'Cheatin’ uh?' ) ); $wp_list_table = _get_list_table('WP_Themes_List_Table'); +$_SERVER['REQUEST_URI'] = remove_query_arg( array( 's', 'features', '_ajax_fetch_list_nonce', '_wp_http_referer', 'paged' ), $_SERVER['REQUEST_URI'] ); + if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) { if ( 'activate' == $_GET['action'] ) { check_admin_referer('switch-theme_' . $_GET['stylesheet']); @@ -91,7 +93,7 @@ get_current_screen()->set_help_sidebar( wp_enqueue_script( 'theme' ); wp_enqueue_script( 'customize-loader' ); -require_once('./admin-header.php'); +require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
display('Na display('Name'); ?> +errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) { + echo '

' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '

'; +} + +// Certain error codes are less fatal than others. We can still display theme information in most cases. +if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) + && in_array( $ct->errors()->get_error_code(), array( 'theme_no_parent', 'theme_parent_invalid', 'theme_no_index' ) ) ) ) : ?> +

'; - require( './admin-footer.php' ); + require( ABSPATH . 'wp-admin/admin-footer.php' ); exit; } ?> @@ -292,11 +305,9 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_ + " . $broken_theme->get('Name') ." " . $broken_theme->errors()->get_error_message() . " "; @@ -308,4 +319,4 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_ ?>
- +