web/wp-admin/network/site-themes.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
    10 /** Load WordPress Administration Bootstrap */
    10 /** Load WordPress Administration Bootstrap */
    11 require_once( './admin.php' );
    11 require_once( './admin.php' );
    12 
    12 
    13 if ( ! is_multisite() )
    13 if ( ! is_multisite() )
    14 	wp_die( __( 'Multisite support is not enabled.' ) );
    14 	wp_die( __( 'Multisite support is not enabled.' ) );
    15 
       
    16 $menu_perms = get_site_option( 'menu_items', array() );
       
    17 
       
    18 if ( empty( $menu_perms['themes'] ) && ! is_super_admin() )
       
    19 	wp_die( __( 'Cheatin’ uh?' ) );
       
    20 
    15 
    21 if ( ! current_user_can( 'manage_sites' ) )
    16 if ( ! current_user_can( 'manage_sites' ) )
    22 	wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
    17 	wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
    23 
    18 
    24 get_current_screen()->add_help_tab( array(
    19 get_current_screen()->add_help_tab( array(
   175 </form>
   170 </form>
   176 
   171 
   177 <?php $wp_list_table->views(); ?>
   172 <?php $wp_list_table->views(); ?>
   178 
   173 
   179 <form method="post" action="site-themes.php?action=update-site">
   174 <form method="post" action="site-themes.php?action=update-site">
   180 	<?php wp_nonce_field( 'edit-site' ); ?>
       
   181 	<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
   175 	<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
   182 
   176 
   183 <?php $wp_list_table->display(); ?>
   177 <?php $wp_list_table->display(); ?>
   184 
   178 
   185 </form>
   179 </form>