Changeset 8500
- Timestamp:
- 07/30/2008 06:48:03 AM (16 years ago)
- Location:
- branches/2.6
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/wp-admin/includes/plugin.php
r8266 r8500 240 240 } 241 241 242 //Invalid is any plugin that is deactivated due to error. 243 $invalid = array(); 244 242 245 // If a plugin file does not exist, remove it from the list of active 243 246 // plugins. … … 245 248 $result = validate_plugin($check_plugin); 246 249 if ( is_wp_error( $result ) ) { 250 $invalid[$check_plugin] = $result; 247 251 deactivate_plugins( $check_plugin, true); 248 252 } 249 253 } 254 return $invalid; 250 255 } 251 256 -
branches/2.6/wp-admin/plugins.php
r8218 r8500 166 166 require_once('admin-header.php'); 167 167 168 validate_active_plugins(); 169 168 $invalid = validate_active_plugins(); 169 if( !empty($invalid) ) 170 foreach($invalid as $plugin_file => $error) 171 echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to an error: %s'), wp_specialchars($plugin_file), $error->get_error_message()) . '</p></div>'; 170 172 ?> 171 173 -
branches/2.6/wp-settings.php
r8471 r8500 422 422 if ( is_array($current_plugins) ) { 423 423 foreach ($current_plugins as $plugin) { 424 if ( '' != $plugin && file_exists(WP_PLUGIN_DIR . '/' . $plugin))424 if ( '' != $plugin && 0 == validate_file($plugin) && file_exists(WP_PLUGIN_DIR . '/' . $plugin) ) 425 425 include_once(WP_PLUGIN_DIR . '/' . $plugin); 426 426 }
Note: See TracChangeset
for help on using the changeset viewer.