From 5c5be8cd439ae03a063fb6b728b07b7523f2a6a4 Mon Sep 17 00:00:00 2001 From: wpmuguru Date: Tue, 19 Jan 2010 20:03:11 +0000 Subject: [PATCH] add multisite theme admin, See #11644 git-svn-id: http://svn.automattic.com/wordpress/trunk@12769 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/schema.php | 4 +- wp-admin/ms-themes.php | 77 ++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 wp-admin/ms-themes.php diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index c55bafda02..bf200f9498 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -640,9 +640,9 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam $template = get_option( 'template' ); $stylesheet = get_option( 'stylesheet' ); if ( $template != $stylesheet ) - $allowed_themes = array( $template, $stylesheet ); + $allowed_themes = array( $template => true, $stylesheet => true ); else - $allowed_themes = array( $stylesheet ); + $allowed_themes = array( $stylesheet => true ); $wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'site_name', %s)", $network_id, $site_name ) ); $wpdb->query( $wpdb->prepare( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, %d, 'admin_email', %s)", $network_id, $site_user->user_email ) ); diff --git a/wp-admin/ms-themes.php b/wp-admin/ms-themes.php new file mode 100644 index 0000000000..49059e4c4d --- /dev/null +++ b/wp-admin/ms-themes.php @@ -0,0 +1,77 @@ + +

+ +
+
+

+

+ + + + + + + + + + + $theme ) { + $total_theme_count++; + $theme_key = wp_specialchars($theme['Stylesheet']); + $class = ('alt' == $class) ? '' : 'alt'; + $class1 = $enabled = $disabled = ''; + + if( isset( $allowed_themes[ $theme_key ] ) == true ) { + $enabled = 'checked="checked" '; + $activated_themes_count++; + $class1 = ' active'; + } else { + $disabled = 'checked="checked" '; + } + ?> + + + + + + + + +
+ +     + +
+ +

+ ' />

+
+ +

+

+ +
+ +

+
+ +