mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 23:11:53 +01:00
Warn users of Gutenberg plugin of its deactivation upon 5.0 upgrade.
Fixes #45073. Built from https://develop.svn.wordpress.org/branches/5.0@43921 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ba1c444bf3
commit
0d5fd392e8
@ -24,9 +24,25 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||||
|
|
||||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s introduces a robust new content creation experience.' ), $display_version ); ?></p>
|
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s introduces a robust new content creation experience.' ), $display_version ); ?></p>
|
||||||
|
|
||||||
|
<?php if (
|
||||||
|
// Was the Gutenberg plugin installed before upgrading to 5.0.x?
|
||||||
|
get_option( 'upgrade_500_was_gutenberg_active' ) == '1' &&
|
||||||
|
current_user_can( 'activate_plugins' ) &&
|
||||||
|
// Has it not been reactivated since?
|
||||||
|
is_plugin_inactive( 'gutenberg/gutenberg.php' ) &&
|
||||||
|
// Is it still installed?
|
||||||
|
file_exists( WP_PLUGIN_DIR . '/gutenberg/gutenberg.php' )
|
||||||
|
) : ?>
|
||||||
|
<div class="about-text" style="font-style:italic;">
|
||||||
|
<?php printf( __( 'The Gutenberg plugin has been deactivated, as the features are now included in WordPress %1$s by default. If you’d like to continue to test the upcoming changes in the WordPress editing experience, please %2$sreactivate the Gutenberg plugin%3$s.' ), $display_version, '<a href="' . esc_url( self_admin_url( 'plugins.php?s=gutenberg&plugin_status=all' ) ) . '">', '</a>' ); ?>
|
||||||
|
</div>
|
||||||
|
<?php else : ?>
|
||||||
<p class="about-text">
|
<p class="about-text">
|
||||||
<a href="#classic-editor"><?php _e( 'Learn how to keep using the old editor.' ); ?></a>
|
<a href="#classic-editor"><?php _e( 'Learn how to keep using the old editor.' ); ?></a>
|
||||||
</p>
|
</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||||
|
|
||||||
<h2 class="nav-tab-wrapper wp-clearfix">
|
<h2 class="nav-tab-wrapper wp-clearfix">
|
||||||
|
@ -1824,6 +1824,13 @@ function upgrade_500() {
|
|||||||
if ( defined( 'GUTENBERG_USE_PLUGIN' ) && GUTENBERG_USE_PLUGIN ) {
|
if ( defined( 'GUTENBERG_USE_PLUGIN' ) && GUTENBERG_USE_PLUGIN ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$was_active = is_plugin_active( 'gutenberg/gutenberg.php' );
|
||||||
|
if ( $was_active ) {
|
||||||
|
// FIXME: Leave until 501 or 510 to clean up.
|
||||||
|
update_site_option( 'upgrade_500_was_gutenberg_active', '1' );
|
||||||
|
}
|
||||||
|
|
||||||
deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
|
deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-beta5-43920';
|
$wp_version = '5.0-beta5-43921';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user