Changeset 16194
- Timestamp:
- 11/04/2010 08:49:30 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r16182 r16194 96 96 } 97 97 98 $themes_per_page = $this->get_items_per_page( 'themes_ per_page', 999);98 $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' ); 99 99 100 100 $start = ( $page - 1 ) * $themes_per_page; -
trunk/wp-admin/includes/class-wp-plugins-list-table.php
r16190 r16194 20 20 if ( $status != $default_status && 'search' != $status ) 21 21 update_user_meta( get_current_user_id(), 'plugins_last_view', $status ); 22 23 $page = $this->get_pagenum(); 22 24 23 25 parent::WP_List_Table( array( … … 56 58 ); 57 59 58 if ( ! is_multisite() || ( is_network_admin()&& current_user_can('manage_network_plugins') ) ) {60 if ( ! is_multisite() || ( $this->_screen->is_network && current_user_can('manage_network_plugins') ) ) { 59 61 if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) 60 62 $plugins['mustuse'] = get_mu_plugins(); … … 84 86 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 85 87 // Filter into individual sections 86 if ( is_plugin_active_for_network($plugin_file) && ! is_network_admin()) {88 if ( is_plugin_active_for_network($plugin_file) && !$this->_screen->is_network ) { 87 89 unset( $plugins['all'][ $plugin_file ] ); 88 90 continue; 89 91 } elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) { 90 92 $plugins['network'][ $plugin_file ] = $plugin_data; 91 } elseif ( ( ! is_network_admin()&& is_plugin_active( $plugin_file ) )92 || ( is_network_admin()&& is_plugin_active_for_network( $plugin_file ) ) ) {93 } elseif ( ( !$this->_screen->is_network && is_plugin_active( $plugin_file ) ) 94 || ( $this->_screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) { 93 95 $plugins['active'][ $plugin_file ] = $plugin_data; 94 96 } else { 95 if ( ! is_network_admin()&& isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated?97 if ( !$this->_screen->is_network && isset( $recently_activated[ $plugin_file ] ) ) // Was the plugin recently activated? 96 98 $plugins['recently_activated'][ $plugin_file ] = $plugin_data; 97 99 $plugins['inactive'][ $plugin_file ] = $plugin_data; … … 127 129 } 128 130 129 $plugins_per_page = $this->get_items_per_page( 'plugins_per_page', 999);131 $plugins_per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->_screen->id}_per_page" ) ); 130 132 131 133 $start = ( $page - 1 ) * $plugins_per_page; … … 253 255 254 256 if ( 'active' != $status ) { 255 $action = is_network_admin()? 'network-activate-selected' : 'activate-selected';257 $action = $this->_screen->is_network ? 'network-activate-selected' : 'activate-selected'; 256 258 $actions[ $action ] = __( 'Activate' ); 257 259 } … … 260 262 $actions['deactivate-selected'] = __( 'Deactivate' ); 261 263 262 if ( !is_multisite() || is_network_admin()) {264 if ( !is_multisite() || $this->_screen->is_network ) { 263 265 if ( current_user_can( 'update_plugins' ) ) 264 266 $actions['update-selected'] = __( 'Update' ); … … 312 314 313 315 if ( 'mustuse' == $context ) { 314 if ( is_multisite() && ! is_network_admin())316 if ( is_multisite() && !$this->_screen->is_network ) 315 317 continue; 316 318 $is_active = true; 317 319 } elseif ( 'dropins' == $context ) { 318 if ( is_multisite() && ! is_network_admin())320 if ( is_multisite() && !$this->_screen->is_network ) 319 321 continue; 320 322 $dropins = _get_dropins(); … … 336 338 } else { 337 339 $is_active_for_network = is_plugin_active_for_network($plugin_file); 338 if ( is_network_admin())340 if ( $this->_screen->is_network ) 339 341 $is_active = $is_active_for_network; 340 342 else 341 343 $is_active = is_plugin_active( $plugin_file ); 342 344 343 if ( $is_active_for_network && !is_super_admin() && ! is_network_admin())345 if ( $is_active_for_network && !is_super_admin() && !$this->_screen->is_network ) 344 346 continue; 345 347 346 if ( is_network_admin()) {348 if ( $this->_screen->is_network ) { 347 349 if ( $is_active_for_network ) { 348 350 if ( current_user_can( 'manage_network_plugins' ) ) … … 358 360 $actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '">' . __('Deactivate') . '</a>'; 359 361 } else { 360 if ( is_network_only_plugin( $plugin_file ) && ! is_network_admin())362 if ( is_network_only_plugin( $plugin_file ) && !$this->_screen->is_network ) 361 363 continue; 362 364 … … 366 368 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 367 369 } // end if $is_active 368 } // end if is_network_admin()370 } // end if $this->_screen->is_network 369 371 370 372 if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) -
trunk/wp-admin/includes/misc.php
r15746 r16194 344 344 switch ( $map_option ) { 345 345 case 'edit_per_page': 346 case 'sites_network_per_page':347 346 case 'users_per_page': 348 case 'users_network_per_page':349 347 case 'edit_comments_per_page': 350 348 case 'upload_per_page': 351 349 case 'edit_tags_per_page': 352 350 case 'plugins_per_page': 351 // Network admin 352 case 'sites_network_per_page': 353 case 'users_network_per_page': 354 case 'plugins_network_per_page': 355 case 'themes_network_per_page': 353 356 $value = (int) $value; 354 357 if ( $value < 1 || $value > 999 ) -
trunk/wp-admin/network/themes.php
r16193 r16194 61 61 add_thickbox(); 62 62 63 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' ) , 'default' => 999) );63 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) ); 64 64 65 65 add_contextual_help($current_screen, -
trunk/wp-admin/plugins.php
r16175 r16194 297 297 add_thickbox(); 298 298 299 add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' ) , 'default' => 999) );299 add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' )) ); 300 300 301 301 add_contextual_help($current_screen,
Note: See TracChangeset
for help on using the changeset viewer.