Move plugin_sandbox_scrape()
from wp-admin/plugins.php
to wp-admin/includes/plugin.php
.
See #33813. git-svn-id: https://develop.svn.wordpress.org/trunk@34018 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8af9ff0e56
commit
706cdbc671
@ -1948,3 +1948,11 @@ function wp_clean_plugins_cache( $clear_update_cache = true ) {
|
||||
delete_site_transient( 'update_plugins' );
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $plugin
|
||||
*/
|
||||
function plugin_sandbox_scrape( $plugin ) {
|
||||
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
include( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
}
|
@ -148,13 +148,6 @@ if ( $action ) {
|
||||
|
||||
@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
|
||||
// Go back to "sandbox" scope so we get the same errors as before
|
||||
/**
|
||||
* @param string $plugin
|
||||
*/
|
||||
function plugin_sandbox_scrape( $plugin ) {
|
||||
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
include( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
}
|
||||
plugin_sandbox_scrape( $plugin );
|
||||
/** This action is documented in wp-admin/includes/plugin.php */
|
||||
do_action( "activate_{$plugin}" );
|
||||
|
Loading…
Reference in New Issue
Block a user