X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/d3b1ea255664edd2deef17f900a655613d20820d..refs/tags/wordpress-2.9.1:/wp-admin/themes.php diff --git a/wp-admin/themes.php b/wp-admin/themes.php index f008307e..c5fd70c6 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -9,6 +9,9 @@ /** WordPress Administration Bootstrap */ require_once('admin.php'); +if ( !current_user_can('switch_themes') ) + wp_die( __( 'Cheatin’ uh?' ) ); + if ( isset($_GET['action']) ) { if ( 'activate' == $_GET['action'] ) { check_admin_referer('switch-theme_' . $_GET['template']); @@ -124,21 +127,21 @@ function theme_update_available( $theme ) {
-

+

screenshot ) : ?> -<?php _e('Current theme preview'); ?> +<?php _e('Current theme preview'); ?>

title, $ct->version, $ct->author) ; ?>

description; ?>

parent_theme) { ?> -

%2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $ct->title, $ct->template_dir, $ct->stylesheet_dir, $ct->title, $ct->parent_theme); ?>

+

%2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ), $ct->title, $ct->parent_theme); ?>

-

%2$s.'), $ct->title, $ct->template_dir, $ct->stylesheet_dir); ?>

+

%2$s.'), $ct->title, str_replace( WP_CONTENT_DIR, '', $ct->template_dir ), str_replace( WP_CONTENT_DIR, '', $ct->stylesheet_dir ) ); ?>

tags ) : ?>

tags); ?>

@@ -200,6 +203,8 @@ foreach ( $cols as $col => $theme_name ) { $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir']; $template_dir = $themes[$theme_name]['Template Dir']; $parent_theme = $themes[$theme_name]['Parent Theme']; + $theme_root = $themes[$theme_name]['Theme Root']; + $theme_root_uri = $themes[$theme_name]['Theme Root URI']; $preview_link = esc_url(get_option('home') . '/'); if ( is_ssl() ) $preview_link = str_replace( 'http://', 'https://', $preview_link ); @@ -220,7 +225,7 @@ foreach ( $cols as $col => $theme_name ) { ?> - +

$theme_name ) { -

%2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $title, $template_dir, $stylesheet_dir, $title, $parent_theme); ?>

+

%2$s. The stylesheet files are located in %3$s. %4$s uses templates from %5$s. Changes made to the templates will affect both themes.'), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme); ?>

-

%2$s.'), $title, $template_dir, $stylesheet_dir); ?>

+

%2$s.'), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?>

@@ -267,7 +272,7 @@ if ( count($broken_themes) ) {

- +