Ticket #55432: 55432.2.diff
File 55432.2.diff, 2.8 KB (added by , 3 years ago) |
---|
-
src/wp-admin/includes/plugin.php
1247 1247 update_option( 'uninstall_plugins', $uninstallable_plugins ); 1248 1248 unset( $uninstallable_plugins ); 1249 1249 1250 wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file ); 1251 include_once WP_PLUGIN_DIR . '/' . $file; 1250 wp_load_plugin_file( WP_PLUGIN_DIR . '/' . $file ); 1252 1251 1253 1252 add_action( "uninstall_{$file}", $callable ); 1254 1253 … … 2299 2298 define( 'WP_SANDBOX_SCRAPING', true ); 2300 2299 } 2301 2300 2302 wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); 2303 include_once WP_PLUGIN_DIR . '/' . $plugin; 2301 wp_load_plugin_file( WP_PLUGIN_DIR . '/' . $plugin ); 2304 2302 } 2305 2303 2306 2304 /** -
src/wp-admin/update.php
97 97 98 98 error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); 99 99 ini_set( 'display_errors', true ); // Ensure that fatal errors are displayed. 100 wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); 101 include WP_PLUGIN_DIR . '/' . $plugin;100 101 wp_load_plugin_file( WP_PLUGIN_DIR . '/' . $plugin ); 102 102 } 103 103 iframe_footer(); 104 104 } elseif ( 'install-plugin' === $action ) { -
src/wp-includes/plugin.php
772 772 } 773 773 774 774 /** 775 * Loads a plugin's file. 776 * 777 * @since 6.0.0 778 * 779 * @param string $file Path to the plugin file. 780 */ 781 function wp_load_plugin_file( $file ) { 782 wp_register_plugin_realpath( $file ); 783 include_once $file; 784 } 785 786 /** 775 787 * Get the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in. 776 788 * 777 789 * @since 2.8.0 -
src/wp-settings.php
362 362 // Load network activated plugins. 363 363 if ( is_multisite() ) { 364 364 foreach ( wp_get_active_network_plugins() as $network_plugin ) { 365 wp_register_plugin_realpath( $network_plugin ); 366 include_once $network_plugin; 365 wp_load_plugin_file( $network_plugin ); 367 366 368 367 /** 369 368 * Fires once a single network-activated plugin has loaded. … … 414 413 415 414 // Load active plugins. 416 415 foreach ( wp_get_active_and_valid_plugins() as $plugin ) { 417 wp_register_plugin_realpath( $plugin ); 418 include_once $plugin; 416 wp_load_plugin_file( $plugin ); 419 417 420 418 /** 421 419 * Fires once a single activated plugin has loaded.