Changeset 8600 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 08/09/2008 05:36:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r8587 r8600 91 91 92 92 return array( 93 'Name' => $name, 'PluginURI' => $uri, 'Description' => $description, 94 'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version, 93 'Name' => $name, 'PluginURI' => $uri, 'Description' => $description, 94 'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version, 95 95 'TextDomain' => $text_domain, 'DomainPath' => $domain_path 96 96 ); … … 98 98 99 99 function get_plugins($plugin_folder = '') { 100 100 101 101 if ( ! $cache_plugins = wp_cache_get('plugins', 'plugins') ) 102 102 $cache_plugins = array(); 103 103 104 104 if ( isset($cache_plugins[ $plugin_folder ]) ) 105 105 return $cache_plugins[ $plugin_folder ]; 106 106 107 107 $wp_plugins = array (); 108 108 $plugin_root = WP_PLUGIN_DIR; … … 152 152 uasort( $wp_plugins, create_function( '$a, $b', 'return strnatcasecmp( $a["Name"], $b["Name"] );' )); 153 153 154 $cache_plugins[ $plugin_folder ] = $wp_plugins; 155 wp_cache_set('plugins', $cache_plugins, 'plugins'); 154 $cache_plugins[ $plugin_folder ] = $wp_plugins; 155 wp_cache_set('plugins', $cache_plugins, 'plugins'); 156 156 157 157 return $wp_plugins; … … 280 280 if ( empty($plugins_dir) ) 281 281 return new WP_Error('fs_no_plugins_dir', __('Unable to locate WordPress Plugin directory.')); 282 282 283 283 $plugins_dir = trailingslashit( $plugins_dir ); 284 284 … … 296 296 else 297 297 $deleted = $wp_filesystem->delete($plugins_dir . $plugin_file); 298 298 299 299 if ( ! $deleted ) 300 300 $errors[] = $plugin_file; 301 301 } 302 302 303 303 if( ! empty($errors) ) 304 304 return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); 305 305 306 306 return true; 307 307 } … … 318 318 319 319 //Invalid is any plugin that is deactivated due to error. 320 $invalid = array(); 320 $invalid = array(); 321 321 322 322 // If a plugin file does not exist, remove it from the list of active
Note: See TracChangeset
for help on using the changeset viewer.