_upgrade_590_force_deactivate_incompatible_plugins() –

You appear to be a bot. Output may be restricted

Description

Usage

_upgrade_590_force_deactivate_incompatible_plugins();

Parameters

Returns

void

Source

File name: wordpress/wp-admin/includes/update-core.php
Lines:

1 to 19 of 19
function _upgrade_590_force_deactivate_incompatible_plugins() {
  if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '11.9', '<' ) ) {
    $deactivated_gutenberg['gutenberg'] = array(
      'plugin_name'         => 'Gutenberg',
      'version_deactivated' => GUTENBERG_VERSION,
      'version_compatible'  => '11.9',
    );
    if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) {
      $deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() );
      $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg );
      update_site_option( 'wp_force_deactivated_plugins', $deactivated_plugins );
    } else {
      $deactivated_plugins = get_option( 'wp_force_deactivated_plugins', array() );
      $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg );
      update_option( 'wp_force_deactivated_plugins', $deactivated_plugins );
    }
    deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
  }
}
 

 View on GitHub View on Trac