Ticket #15269: 15269.5.patch
File 15269.5.patch, 9.0 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/class-wp-ms-themes-list-table.php
95 95 uasort( $this->items, array( &$this, '_order_callback' ) ); 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; 101 101 -
wp-admin/includes/misc.php
343 343 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 ) 355 358 return; -
wp-admin/includes/class-wp-plugins-list-table.php
20 20 if ( $status != $default_status && 'search' != $status ) 21 21 update_user_meta( get_current_user_id(), 'plugins_last_view', $status ); 22 22 23 $page = $this->get_pagenum(); 24 23 25 parent::WP_List_Table( array( 24 26 'plural' => 'plugins', 25 27 ) ); … … 55 57 'dropins' => 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(); 61 63 if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) … … 83 85 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; 98 100 } … … 126 128 uasort( $this->items, array( &$this, '_order_callback' ) ); 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; 132 134 … … 252 254 $actions = array(); 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 } 258 260 259 261 if ( 'inactive' != $status && 'recent' != $status ) 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' ); 265 267 if ( current_user_can( 'delete_plugins' ) && ( 'active' != $status ) ) … … 311 313 ); 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(); 321 323 $plugin_name = $plugin_file; … … 335 337 $description .= '<p>' . $plugin_data['Description'] . '</p>'; 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' ) ) 349 351 $actions['network_deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&networkwide=1&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '">' . __('Network Deactivate') . '</a>'; … … 357 359 if ( $is_active ) { 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 363 365 $actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; … … 365 367 if ( ! is_multisite() && current_user_can('delete_plugins') ) 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) ) 371 373 $actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>'; -
wp-admin/network/themes.php
60 60 $wp_list_table->prepare_items(); 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, 66 66 '<p>' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '</p>' . -
wp-admin/plugins.php
296 296 wp_enqueue_script('plugin-install'); 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, 302 302 '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .