diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-23 12:12:03 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-23 12:12:03 +0000 |
| commit | 010766f5e3a1f8d21634746669c19dad650b94c0 (patch) | |
| tree | 5ef3c777bf18a4bad44e5dbde5e3cb4e9ed18982 | |
| parent | 3f5b7f0e0000f1e20930311fb6967c3af5971c0a (diff) | |
Moved admin themes to their own tab.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@215 7be80a69-a1ef-0310-a953-fb0f7c49ff36
| -rw-r--r-- | wp-inst/wp-admin/menu.php | 3 | ||||
| -rw-r--r-- | wp-inst/wp-admin/wpmu-blogs.php | 37 | ||||
| -rw-r--r-- | wp-inst/wp-admin/wpmu-edit.php | 2 | ||||
| -rw-r--r-- | wp-inst/wp-admin/wpmu-themes.php | 52 |
4 files changed, 55 insertions, 39 deletions
diff --git a/wp-inst/wp-admin/menu.php b/wp-inst/wp-admin/menu.php index 6f90bec..05c37f6 100644 --- a/wp-inst/wp-admin/menu.php +++ b/wp-inst/wp-admin/menu.php @@ -67,7 +67,8 @@ if( is_site_admin() ) { $submenu[ 'wpmu-admin.php' ][5] = array( 'Blogs', '10', 'wpmu-blogs.php' ); $submenu[ 'wpmu-admin.php' ][10] = array( 'Users', '10', 'wpmu-users.php' ); $submenu[ 'wpmu-admin.php' ][15] = array( 'Feeds', '10', 'wpmu-feeds.php' ); - $submenu[ 'wpmu-admin.php' ][20] = array( 'Options', '10', 'wpmu-options.php' ); + $submenu[ 'wpmu-admin.php' ][20] = array( 'Themes', '10', 'wpmu-themes.php' ); + $submenu[ 'wpmu-admin.php' ][25] = array( 'Options', '10', 'wpmu-options.php' ); } // Create list of page plugin hook names. diff --git a/wp-inst/wp-admin/wpmu-blogs.php b/wp-inst/wp-admin/wpmu-blogs.php index 93a064d..ef5f52f 100644 --- a/wp-inst/wp-admin/wpmu-blogs.php +++ b/wp-inst/wp-admin/wpmu-blogs.php @@ -355,43 +355,6 @@ print "</table>"; <?php } // end if ($blogs) - $themes = get_themes(); - $allowed_themes = get_site_option( "allowed_themes" ); - if( $allowed_themes == false ) { - $allowed_themes = array_keys( $themes ); - } - - print "<br />"; - print "<form action='wpmu-edit.php?action=updatethemes' method='POST'>"; - print "<h3>Site Themes</h3>"; - print '<table border="0" cellspacing="2" cellpadding="5" class="editform">'; - print "<caption>Disable themes site-wide. You can enable themes on a blog by blog basis.</caption>"; - print '<tr><th>Theme</th><th>Description</th><th>Disabled</th></tr>'; - while( list( $key, $val ) = each( $themes ) ) { - $enabled = ''; - $disabled = ''; - if( isset( $allowed_themes[ $key ] ) == true ) { - $enabled = 'checked '; - } else { - $disabled = 'checked '; - } - ?> - <tr valign="top"> - <th scope="row"><?php echo $key ?></th> - <td><?php echo $val[ 'Description' ] ?></td> - <td> - <input name="theme[<?php echo $key ?>]" type="radio" id="<?php echo $key ?>" value="disabled" <?php echo $disabled ?>/> Yes - - <input name="theme[<?php echo $key ?>]" type="radio" id="<?php echo $key ?>" value="enabled" <?php echo $enabled ?>/> No - </td> - </tr> - <?php - } - ?> - </table> - <input type='submit' value='Update Themes'> - </form> - <?php break; } // end switch( $action ) ?> diff --git a/wp-inst/wp-admin/wpmu-edit.php b/wp-inst/wp-admin/wpmu-edit.php index cf9e650..23ecd5f 100644 --- a/wp-inst/wp-admin/wpmu-edit.php +++ b/wp-inst/wp-admin/wpmu-edit.php @@ -212,7 +212,7 @@ switch( $_GET[ 'action' ] ) { } update_site_option( 'allowed_themes', $allowed_themes ); } - header( "Location: wpmu-blogs.php?updated=true" ); + header( "Location: wpmu-themes.php?updated=true" ); break; default: header( "Location: wpmu-admin.php" ); diff --git a/wp-inst/wp-admin/wpmu-themes.php b/wp-inst/wp-admin/wpmu-themes.php new file mode 100644 index 0000000..f03d79d --- /dev/null +++ b/wp-inst/wp-admin/wpmu-themes.php @@ -0,0 +1,52 @@ +<?php +require_once('admin.php'); + +$title = __('WPMU Admin'); +$parent_file = 'wpmu-admin.php'; +require_once('admin-header.php'); +if( is_site_admin() == false ) { + die( __('<p>You do not have permission to access this page.</p>') ); +} +if (isset($_GET['updated'])) { + ?><div id="message" class="updated fade"><p><?php _e('Options saved.') ?></p></div><?php +} +print '<div class="wrap">'; +$themes = get_themes(); +$allowed_themes = get_site_option( "allowed_themes" ); +if( $allowed_themes == false ) { + $allowed_themes = array_keys( $themes ); +} + +print "<br />"; +print "<form action='wpmu-edit.php?action=updatethemes' method='POST'>"; +print "<h3>Site Themes</h3>"; +print '<table border="0" cellspacing="2" cellpadding="5" class="editform">'; +print "<caption>Disable themes site-wide. You can enable themes on a blog by blog basis.</caption>"; +print '<tr><th>Theme</th><th>Description</th><th>Disabled</th></tr>'; +while( list( $key, $val ) = each( $themes ) ) { + $enabled = ''; + $disabled = ''; + if( isset( $allowed_themes[ $key ] ) == true ) { + $enabled = 'checked '; + } else { + $disabled = 'checked '; + } + ?> + <tr valign="top"> + <th scope="row"><?php echo $key ?></th> + <td><?php echo $val[ 'Description' ] ?></td> + <td> + <input name="theme[<?php echo $key ?>]" type="radio" id="<?php echo $key ?>" value="disabled" <?php echo $disabled ?>/> Yes + + <input name="theme[<?php echo $key ?>]" type="radio" id="<?php echo $key ?>" value="enabled" <?php echo $enabled ?>/> No + </td> + </tr> + <?php +} +?> +</table> +<input type='submit' value='Update Themes'> +</form> + +</div> +<?php include('admin-footer.php'); ?> |
