Changeset 57658 for trunk/src/wp-admin/includes/plugin.php
- Timestamp:
- 02/20/2024 07:25:38 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin.php
r57644 r57658 334 334 } 335 335 336 $new_plugin_data = array();337 336 foreach ( $plugin_files as $plugin_file ) { 338 337 if ( ! is_readable( "$plugin_root/$plugin_file" ) ) { … … 347 346 } 348 347 349 $new_plugin_file = str_replace(350 trailingslashit( WP_PLUGIN_DIR ),351 '',352 "$plugin_root/$plugin_file"353 );354 355 $new_plugin_data[ $new_plugin_file ] = $plugin_data;356 348 $wp_plugins[ plugin_basename( $plugin_file ) ] = $plugin_data; 357 349 } … … 361 353 $cache_plugins[ $plugin_folder ] = $wp_plugins; 362 354 wp_cache_set( 'plugins', $cache_plugins, 'plugins' ); 363 364 if ( ! wp_installing() ) {365 update_option( 'plugin_data', $new_plugin_data );366 }367 355 368 356 return $wp_plugins; … … 976 964 977 965 $plugin_translations = wp_get_installed_translations( 'plugins' ); 978 $all_plugin_data = get_option( 'plugin_data', array() );979 966 980 967 $errors = array(); … … 1021 1008 continue; 1022 1009 } 1023 unset( $all_plugin_data[ $plugin_file ] );1024 1010 1025 1011 $plugin_slug = dirname( $plugin_file ); … … 1070 1056 return new WP_Error( 'could_not_remove_plugin', sprintf( $message, implode( ', ', $errors ) ) ); 1071 1057 } 1072 update_option( 'plugin_data', $all_plugin_data );1073 1058 1074 1059 return true; … … 1215 1200 } 1216 1201 1202 WP_Plugin_Dependencies::initialize(); 1203 1217 1204 if ( WP_Plugin_Dependencies::has_unmet_dependencies( $plugin ) ) { 1218 1205 $dependencies = WP_Plugin_Dependencies::get_dependencies( $plugin );
Note: See TracChangeset
for help on using the changeset viewer.