Ticket #2377: 2377.3.diff
| File 2377.3.diff, 4.7 KB (added by , 20 years ago) |
|---|
-
wp-includes/functions.php
2287 2287 return $wpdb->num_queries; 2288 2288 } 2289 2289 2290 function deactivate_plugins() { 2291 update_option('deactivated_plugins', get_settings('active_plugins')); 2292 update_option('active_plugins', array()); 2293 } 2294 2290 2295 ?> -
wp-settings.php
168 168 require(ABSPATH . '/my-hacks.php'); 169 169 } 170 170 171 if ( get_settings('active_plugins') ) {171 if ( get_settings('active_plugins') && !defined('WP_INSTALLING') ) { 172 172 $current_plugins = get_settings('active_plugins'); 173 173 if ( is_array($current_plugins) ) { 174 174 foreach ($current_plugins as $plugin) { -
wp-admin/wp-admin.css
712 712 .alternate.active .name { 713 713 background: #8B8; 714 714 } 715 .deactivated td { 716 background-color: #ccc; 717 color: #999 !important; 718 } 719 .deactivated td a.edit:hover { 720 background-color: #999; 721 } 715 722 716 723 /* A handy div class for hiding controls. 717 724 Some browsers will disable them when you -
wp-admin/plugins.php
4 4 if ( isset($_GET['action']) ) { 5 5 check_admin_referer(); 6 6 7 if ('activate' == $_GET['action'] ) {7 if ('activate' == $_GET['action'] || 'reactivate' == $_GET['action']) { 8 8 $current = get_settings('active_plugins'); 9 $deactivated = get_settings('deactivated_plugins'); 10 if (in_array($_GET['plugin'], $deactivated) && 'reactivate' == $_GET['action']) { 11 array_splice($deactivated, array_search( $_GET['plugin'], $deactivated), 1 ); // Array-fu! 12 update_option('deactivated_plugins', $deactivated); 13 //plugin will be activated in next if() 14 } 9 15 if (!in_array($_GET['plugin'], $current)) { 10 16 $current[] = trim( $_GET['plugin'] ); 11 17 sort($current); … … 69 75 70 76 if ( get_settings('active_plugins') ) 71 77 $current_plugins = get_settings('active_plugins'); 78 $deactivated_plugins = get_settings('deactivated_plugins'); 72 79 73 80 $plugins = get_plugins(); 74 81 … … 104 111 } else { 105 112 $action = "<a href='plugins.php?action=activate&plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 106 113 } 114 if (!empty($deactivated_plugins) && in_array($plugin_file, $deactivated_plugins)) { 115 $style .= ' deactivated'; 116 $action = "<a href='plugins.php?action=reactivate&plugin=$plugin_file' title='".__('Reactivate this plugin')."' class='edit'>".__('Reactivate')."</a>"; 117 $plugin_data['Title'] .= ' <em>' . __('deactivated in upgrade') . '</em>'; 118 } 107 119 $plugin_data['Description'] = wp_kses($plugin_data['Description'], array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()) ); ; 108 120 if ($style != '') $style = 'class="' . $style . '"'; 109 121 echo " -
wp-admin/upgrade.php
75 75 break; 76 76 77 77 case 1: 78 deactivate_plugins(); 78 79 wp_cache_flush(); 79 80 make_db_current_silent(); 80 81 upgrade_all(); … … 87 88 ?> 88 89 <h2><?php _e('Step 1'); ?></h2> 89 90 <p><?php printf(__("There's actually only one step. So if you see this, you're done. <a href='%s'>Have fun</a>!"), $backto); ?></p> 91 92 <?php $deactivated = get_option('deactivated_plugins'); 93 if (is_array($deactivated) && count($deactivated)) { 94 ?> 95 <h3><?php _e('Deactivated plugins'); ?></h3> 96 <p><?php _e('When upgrading, plugins designed for the old version can sometimes break with the new version, causing your upgraded WordPress to have errors or sometime not be accessible at all. To be on the safe side, we've disabled all your plugins. On the plugins page the plugins you can reactivate the plugins you previously had activated one by one to make sure nothing breaks.'); ?></p> 97 98 <p><?php _e('Here's a list of the plugins you had activated before. Plugins that were previously activated are marked on the Plugins page.'); ?></p> 99 100 <ul> 101 <?php foreach ($deactivated as $plugin) { 102 $plugin_data = get_plugin_data(ABSPATH."wp-content/plugins/".$plugin); ?> 103 <li><?php echo $plugin_data['Title']; ?></li> 104 <?php } ?> 105 </ul> 106 <?php } ?> 90 107 91 108 <!-- 92 109 <pre>