/**
* @access private
* @ignore
* @since 5.8.0
* @since 5.9.0 The minimum compatible version of Gutenberg is 11.9.
* @since 6.1.1 The minimum compatible version of Gutenberg is 14.1.
*/ function_upgrade_core_deactivate_incompatible_plugins(){
/**
* Execute changes made in WordPress 4.0.0.
*
* @ignore
* @since 4.0.0
*
* @global int $wp_current_db_version The old (current) database version.
*/
if( ! current_user_can( 'deactivate_plugin', $plugin)){ wp_die(__( 'Sorry, you are not allowed to deactivate this plugin.' )); }
if(is_plugin_active($plugin)){ // Deactivate the plugin silently, Prevent deactivation hooks from running.
deactivate_plugins($plugin, true ); }
return$response; }
/**
* Turns on maintenance mode before attempting to background update an active plugin.
*
* Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade().
*
* @since 5.4.0
*
* @param bool|WP_Error $response The installation response before the installation has started.
* @param array $plugin Plugin package arguments.
* @return bool|WP_Error The original `$response` parameter or WP_Error.
*/
/**
* Validates the plugin path.
*
* Checks that the main plugin file exists and is a valid plugin. See validate_file().
*
* @since 2.5.0
*
* @param string $plugin Path to the plugin file relative to the plugins directory.
* @return int|WP_Error 0 on success, WP_Error on failure.
*/