- Timestamp:
- 11/17/2010 06:47:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r16361 r16438 8 8 */ 9 9 class WP_MS_Themes_List_Table extends WP_List_Table { 10 10 11 11 var $site_id; 12 12 var $is_site_themes; … … 35 35 ) ); 36 36 } 37 37 38 38 function check_permissions() { 39 39 if ( is_multisite() ) { … … 46 46 } 47 47 48 if ( $this->is_site_themes && !current_user_can('manage_sites') ) 49 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 50 else if ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) 48 if ( $this->is_site_themes && !current_user_can('manage_sites') ) 49 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 50 else if ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) 51 51 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); 52 52 } … … 65 65 ); 66 66 67 $site_allowed_themes = get_site_allowed_themes(); 67 $site_allowed_themes = get_site_allowed_themes(); 68 68 if ( !$this->is_site_themes ) { 69 69 $allowed_themes = $site_allowed_themes; … … 73 73 $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' ); 74 74 } 75 75 76 76 $current = get_site_transient( 'update_themes' ); 77 77 … … 90 90 $themes['upgrade'][$key] = $themes['all'][$key]; 91 91 92 if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { 93 unset( $themes['all'][$key] ); 94 unset( $themes['enabled'][$key] ); 95 unset( $themes['disabled'][$key] ); 92 if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { 93 unset( $themes['all'][$key] ); 94 unset( $themes['enabled'][$key] ); 95 unset( $themes['disabled'][$key] ); 96 96 } 97 97 } … … 132 132 ) ); 133 133 } 134 134 135 135 function _search_callback( $theme ) { 136 136 static $term; … … 212 212 } 213 213 214 if ( $this->is_site_themes ) 215 $url = 'site-themes.php?id=' . $this->site_id; 216 else 214 if ( $this->is_site_themes ) 215 $url = 'site-themes.php?id=' . $this->site_id; 216 else 217 217 $url = 'themes.php'; 218 218 … … 237 237 if ( current_user_can( 'update_themes' ) ) 238 238 $actions['update-selected'] = __( 'Update' ); 239 239 240 240 return $actions; 241 241 } … … 333 333 334 334 echo "</div></td>"; 335 break; 335 break; 336 336 break; 337 337 default:
Note: See TracChangeset
for help on using the changeset viewer.