WordPress 3.0 beta 1 documentation kindly provided to you by Hay Kranen
| [ Index ] |
PHP Cross Reference of WordPress 3.0 beta 1 |
|
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 require_once ( './admin.php' ); 3 4 if ( ! current_user_can( 'manage_network_themes' ) ) 5 wp_die( __( 'You do not have permission to access this page.' ) ); 6 7 $title = __( 'Network Themes' ); 8 $parent_file = 'ms-admin.php'; 9 require_once ( './admin-header.php' ); 10 11 if ( isset( $_GET['updated'] ) ) { 12 ?> 13 <div id="message" class="updated fade"><p><?php _e( 'Site themes saved.' ) ?></p></div> 14 <?php 15 } 16 17 $themes = get_themes(); 18 $allowed_themes = get_site_allowed_themes(); 19 ?> 20 <div class="wrap"> 21 <form action="<?php echo esc_url( admin_url( 'ms-edit.php?action=updatethemes' ) ); ?>" method="post"> 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> 25 <table class="widefat"> 26 <thead> 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> 32 </tr> 33 </thead> 34 <tbody id="plugins"> 35 <?php 36 $total_theme_count = $activated_themes_count = 0; 37 $class = ''; 38 foreach ( (array) $themes as $key => $theme ) { 39 $total_theme_count++; 40 $theme_key = esc_html( $theme['Stylesheet'] ); 41 $class = ( 'alt' == $class ) ? '' : 'alt'; 42 $class1 = $enabled = $disabled = ''; 43 $enabled = $disabled = false; 44 45 if ( isset( $allowed_themes[$theme_key] ) == true ) { 46 $enabled = true; 47 $activated_themes_count++; 48 $class1 = 'active'; 49 } else { 50 $disabled = true; 51 } 52 ?> 53 <tr valign="top" class="<?php echo $class, $class1; ?>"> 54 <td style="text-align:center;"> 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> 56 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> 58 </td> 59 <th scope="row" style="text-align:left;"><?php echo $key ?></th> 60 <td><?php echo $theme['Version'] ?></td> 61 <td><?php echo $theme['Description'] ?></td> 62 </tr> 63 <?php } ?> 64 </tbody> 65 </table> 66 67 <p class="submit"> 68 <input type="submit" value="<?php _e( 'Update Themes' ) ?>" /></p> 69 </form> 70 71 <h3><?php _e( 'Total' )?></h3> 72 <p> 73 <?php printf( __( 'Themes Installed: %d' ), $total_theme_count); ?> 74 <br /> 75 <?php printf( __( 'Themes Activated: %d' ), $activated_themes_count); ?> 76 </p> 77 </div> 78 79 <?php include ( './admin-footer.php' ); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Apr 5 14:26:09 2010 | Cross-referenced by PHPXref 0.7 |