X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/80b7979fccf09a75af3f4c111fa27060ae6dbf85..refs/tags/wordpress-3.5-scripts:/wp-admin/themes.php diff --git a/wp-admin/themes.php b/wp-admin/themes.php index c892705e..7852a721 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -20,7 +20,7 @@ if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) { $theme = wp_get_theme( $_GET['stylesheet'] ); if ( ! $theme->exists() || ! $theme->is_allowed() ) wp_die( __( 'Cheatin’ uh?' ) ); - switch_theme($_GET['template'], $_GET['stylesheet']); + switch_theme( $theme->get_stylesheet() ); wp_redirect( admin_url('themes.php?activated=true') ); exit; } elseif ( 'delete' == $_GET['action'] ) { @@ -64,6 +64,8 @@ if ( current_user_can( 'install_themes' ) ) { ) ); } +add_thickbox(); + endif; // switch_themes if ( current_user_can( 'edit_theme_options' ) ) { @@ -106,10 +108,8 @@ if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>

-

Visit site.' ), home_url( '/' ) ); ?>

- -

widgets settings screen to configure them.'), admin_url( 'widgets.php' ) ); ?>

+

Visit site' ), home_url( '/' ) ); ?>

+

Visit site' ), home_url( '/' ) ); ?>

@@ -145,6 +145,11 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
  • display('Version') ); ?>
  • display('Description'); ?>

    + parent() ) { + printf( '

    ' . __( 'This child theme requires its parent theme, %2$s.' ) . '

    ', + __( 'http://codex.wordpress.org/Child_Themes' ), + $ct->parent()->display( 'Name' ) ); + } ?> @@ -167,7 +172,10 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na else $options[] = "{$item[0]}"; } else if ( current_user_can($item[1]) ) { - if ( file_exists(ABSPATH . 'wp-admin/' . $item[2]) ) { + $menu_file = $item[2]; + if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) + $menu_file = substr( $menu_file, 0, $pos ); + if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { $options[] = "{$item[0]}"; } else { $options[] = "{$item[0]}"; @@ -191,9 +199,11 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
  • +