Changeset 52199
- Timestamp:
- 11/17/2021 05:43:41 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update-core.php
r52165 r52199 1399 1399 _upgrade_440_force_deactivate_incompatible_plugins(); 1400 1400 1401 // Deactivate the Gutenberg plugin if its version is 10.7 or lower.1402 _upgrade_580_force_deactivate_incompatible_plugins();1403 1404 1401 // Deactivate the Gutenberg plugin if its version is 11.8 or lower. 1405 1402 _upgrade_590_force_deactivate_incompatible_plugins(); … … 1691 1688 * @access private 1692 1689 * @ignore 1693 * @since 5.8.01694 */1695 function _upgrade_580_force_deactivate_incompatible_plugins() {1696 if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '10.7', '<=' ) ) {1697 _deactivate_gutenberg_when_incompatible_with_wp( '10.8' );1698 }1699 }1700 1701 /**1702 * @access private1703 * @ignore1704 1690 * @since 5.9.0 1705 1691 */ 1706 1692 function _upgrade_590_force_deactivate_incompatible_plugins() { 1707 if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '11.8', '<=' ) ) { 1708 _deactivate_gutenberg_when_incompatible_with_wp( '11.9' ); 1693 if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '11.9', '<' ) ) { 1694 $deactivated_gutenberg['gutenberg'] = array( 1695 'plugin_name' => 'Gutenberg', 1696 'version_deactivated' => GUTENBERG_VERSION, 1697 'version_compatible' => '11.9', 1698 ); 1699 if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) { 1700 $deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() ); 1701 $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg ); 1702 update_site_option( 'wp_force_deactivated_plugins', $deactivated_plugins ); 1703 } else { 1704 $deactivated_plugins = get_option( 'wp_force_deactivated_plugins', array() ); 1705 $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg ); 1706 update_option( 'wp_force_deactivated_plugins', $deactivated_plugins ); 1707 } 1708 deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true ); 1709 1709 } 1710 1710 } 1711 1712 /**1713 * Deactivates the Gutenberg plugin when its version is incompatible.1714 *1715 * @access private1716 * @ignore1717 * @since 5.9.01718 *1719 * @param string $compatible_version The version of Gutenberg plugin that is compatible.1720 */1721 function _deactivate_gutenberg_when_incompatible_with_wp( $compatible_version ) {1722 $deactivated_gutenberg['gutenberg'] = array(1723 'plugin_name' => 'Gutenberg',1724 'version_deactivated' => GUTENBERG_VERSION,1725 'version_compatible' => $compatible_version,1726 );1727 if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) {1728 $deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() );1729 $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg );1730 update_site_option( 'wp_force_deactivated_plugins', $deactivated_plugins );1731 } else {1732 $deactivated_plugins = get_option( 'wp_force_deactivated_plugins', array() );1733 $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg );1734 update_option( 'wp_force_deactivated_plugins', $deactivated_plugins );1735 }1736 deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );1737 }
Note: See TracChangeset
for help on using the changeset viewer.