X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/41497a896330304904ef6d5783c724ea713739f6..c55863f11e8589bf8d4a5698bf15752406654f1c:/wp-admin/themes.php diff --git a/wp-admin/themes.php b/wp-admin/themes.php index cbcde87c..edb0cad9 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -7,20 +7,22 @@ */ /** 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']); $theme = wp_get_theme( $_GET['stylesheet'] ); if ( ! $theme->exists() || ! $theme->is_allowed() ) wp_die( __( 'Cheatin’ uh?' ) ); - switch_theme( $theme->get_template(), $theme->get_stylesheet() ); + switch_theme( $theme->get_stylesheet() ); wp_redirect( admin_url('themes.php?activated=true') ); exit; } elseif ( 'delete' == $_GET['action'] ) { @@ -54,7 +56,7 @@ if ( current_user_can( 'install_themes' ) ) { if ( is_multisite() ) { $help_install = '
' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '
'; } else { - $help_install = '' . sprintf( __('If you would like to see more themes to choose from, click on the “Install Themes” tab and you will be able to browse or search for additional themes from the WordPress.org Theme Directory. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), 'http://wordpress.org/extend/themes/' ) . '
'; + $help_install = '' . sprintf( __('If you would like to see more themes to choose from, click on the “Install Themes” tab and you will be able to browse or search for additional themes from the WordPress.org Theme Directory. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), 'http://wordpress.org/themes/' ) . '
'; } get_current_screen()->add_help_tab( array( @@ -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' ); ?>Visit site.' ), home_url( '/' ) ); ?>
widgets settings screen to configure them.'), admin_url( 'widgets.php' ) ); ?>
Visit site' ), home_url( '/' ) ); ?>
Visit site' ), home_url( '/' ) ); ?>
display('Description'); ?>
+ parent() ) { + printf( '' . __( 'This child theme requires its parent theme, %2$s.' ) . '
', + __( 'http://codex.wordpress.org/Child_Themes' ), + $ct->parent()->display( 'Name' ) ); + } ?>