WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/17/2010 06:47:34 PM (9 years ago)
Author:
ryan
Message:

Pinking shears

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-themes-list-table.php

    r16361 r16438  
    88 */
    99class WP_MS_Themes_List_Table extends WP_List_Table {
    10    
     10
    1111    var $site_id;
    1212    var $is_site_themes;
     
    3535        ) );
    3636    }
    37    
     37
    3838    function check_permissions() {
    3939        if ( is_multisite() ) {
     
    4646        }
    4747
    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') )
    5151            wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) );
    5252    }
     
    6565        );
    6666
    67         $site_allowed_themes = get_site_allowed_themes(); 
     67        $site_allowed_themes = get_site_allowed_themes();
    6868        if ( !$this->is_site_themes ) {
    6969            $allowed_themes = $site_allowed_themes;
     
    7373            $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' );
    7474        }
    75        
     75
    7676        $current = get_site_transient( 'update_themes' );
    7777
     
    9090                $themes['upgrade'][$key] = $themes['all'][$key];
    9191
    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] );
    9696            }
    9797        }
     
    132132        ) );
    133133    }
    134    
     134
    135135    function _search_callback( $theme ) {
    136136        static $term;
     
    212212            }
    213213
    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
    217217                $url = 'themes.php';
    218218
     
    237237        if ( current_user_can( 'update_themes' ) )
    238238            $actions['update-selected'] = __( 'Update' );
    239            
     239
    240240        return $actions;
    241241    }
     
    333333
    334334                    echo "</div></td>";
    335                     break; 
     335                    break;
    336336                    break;
    337337                default:
Note: See TracChangeset for help on using the changeset viewer.