Changeset 13918 for trunk/wp-admin/ms-themes.php
- Timestamp:
- 04/01/2010 09:21:27 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/ms-themes.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-themes.php
r13771 r13918 1 1 <?php 2 require_once( 'admin.php');2 require_once( './admin.php' ); 3 3 4 $title = __( 'Network Themes');4 $title = __( 'Network Themes' ); 5 5 $parent_file = 'ms-admin.php'; 6 require_once( 'admin-header.php');6 require_once( './admin-header.php' ); 7 7 8 8 if ( ! current_user_can( 'manage_network_themes' ) ) 9 wp_die( __( 'You do not have permission to access this page.') );9 wp_die( __( 'You do not have permission to access this page.' ) ); 10 10 11 if ( isset( $_GET['updated']) ) {11 if ( isset( $_GET['updated'] ) ) { 12 12 ?> 13 <div id="message" class="updated fade"><p><?php _e( 'Site themes saved.') ?></p></div>13 <div id="message" class="updated fade"><p><?php _e( 'Site themes saved.' ) ?></p></div> 14 14 <?php 15 15 } … … 19 19 ?> 20 20 <div class="wrap"> 21 <form action= 'ms-edit.php?action=updatethemes' method='post'>21 <form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post"> 22 22 <?php screen_icon(); ?> 23 <h2><?php _e( 'Network Themes') ?></h2>24 <p><?php _e( 'Disable themes network-wide. You can enable themes on a site by site basis.') ?></p>23 <h2><?php _e( 'Network Themes' ) ?></h2> 24 <p><?php _e( 'Disable themes network-wide. You can enable themes on a site by site basis.' ) ?></p> 25 25 <table class="widefat"> 26 26 <thead> 27 27 <tr> 28 <th style="width:15%;text-align:center;"><?php _e( 'Active') ?></th>29 <th style="width:25%;"><?php _e( 'Theme') ?></th>30 <th style="width:10%;"><?php _e( 'Version') ?></th>31 <th style="width:60%;"><?php _e( 'Description') ?></th>28 <th style="width:15%;text-align:center;"><?php _e( 'Active' ) ?></th> 29 <th style="width:25%;"><?php _e( 'Theme' ) ?></th> 30 <th style="width:10%;"><?php _e( 'Version' ) ?></th> 31 <th style="width:60%;"><?php _e( 'Description' ) ?></th> 32 32 </tr> 33 33 </thead> … … 38 38 foreach ( (array) $themes as $key => $theme ) { 39 39 $total_theme_count++; 40 $theme_key = esc_html( $theme['Stylesheet']);41 $class = ( 'alt' == $class) ? '' : 'alt';40 $theme_key = esc_html( $theme['Stylesheet'] ); 41 $class = ( 'alt' == $class ) ? '' : 'alt'; 42 42 $class1 = $enabled = $disabled = ''; 43 $enabled = $disabled = false; 43 44 44 if ( isset( $allowed_themes[ $theme_key] ) == true ) {45 $enabled = 'checked="checked" ';45 if ( isset( $allowed_themes[$theme_key] ) == true ) { 46 $enabled = true; 46 47 $activated_themes_count++; 47 $class1 = ' active';48 $class1 = 'active'; 48 49 } else { 49 $disabled = 'checked="checked" ';50 $disabled = true; 50 51 } 51 52 ?> 52 <tr valign="top" class="<?php echo $class .$class1; ?>">53 <tr valign="top" class="<?php echo $class, $class1; ?>"> 53 54 <td style="text-align:center;"> 54 <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="enabled_<?php echo $theme_key ?>" value="enabled" <?php echo $enabled ?> /> <?php _e('Yes') ?></label>55 <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="enabled_<?php echo $theme_key ?>" value="enabled" <?php checked( $enabled ) ?> /> <?php _e( 'Yes' ) ?></label> 55 56 56 <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="disabled_<?php echo $theme_key ?>" value="disabled" <?php echo $disabled ?> /> <?php _e('No') ?></label>57 <label><input name="theme[<?php echo $theme_key ?>]" type="radio" id="disabled_<?php echo $theme_key ?>" value="disabled" <?php checked( $disabled ) ?> /> <?php _e( 'No' ) ?></label> 57 58 </td> 58 59 <th scope="row" style="text-align:left;"><?php echo $key ?></th> … … 65 66 66 67 <p class="submit"> 67 <input type= 'submit' value='<?php _e('Update Themes') ?>'/></p>68 <input type="submit" value="<?php _e( 'Update Themes' ) ?>" /></p> 68 69 </form> 69 70 70 <h3><?php _e( 'Total')?></h3>71 <h3><?php _e( 'Total' )?></h3> 71 72 <p> 72 <?php printf( __('Themes Installed: %d'), $total_theme_count); ?>73 <?php printf( __( 'Themes Installed: %d' ), $total_theme_count); ?> 73 74 <br /> 74 <?php printf( __('Themes Activated: %d'), $activated_themes_count); ?>75 <?php printf( __( 'Themes Activated: %d' ), $activated_themes_count); ?> 75 76 </p> 76 77 </div> 77 78 78 <?php include( 'admin-footer.php'); ?>79 <?php include( './admin-footer.php' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.