Editor: Replace external Classic Editor plugin URL with a link to Add Plugins screen with Classic Editor pre-selected.
This applies to messages displayed when JavaScript is disabled in Block Editor, or an incompatible meta box is used. Props garrett-eclipse, derweili, afercia. Fixes #47487. Built from https://develop.svn.wordpress.org/trunk@45657 git-svn-id: http://core.svn.wordpress.org/trunk@45468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4b460d0f80
commit
7149d65934
|
@ -415,9 +415,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
/* translators: %s: Classic Editor plugin URL */
|
/* translators: %s: A link to install the Classic Editor plugin. */
|
||||||
__( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the <a href="%s">Classic Editor plugin</a>.' ),
|
__( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the <a href="%s">Classic Editor plugin</a>.' ),
|
||||||
__( 'https://wordpress.org/plugins/classic-editor/' )
|
esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ), 'save_wporg_username_' . get_current_user_id() ) )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1109,8 +1109,11 @@ function do_block_editor_incompatible_meta_box( $object, $box ) {
|
||||||
if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) {
|
if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) {
|
||||||
if ( current_user_can( 'install_plugins' ) ) {
|
if ( current_user_can( 'install_plugins' ) ) {
|
||||||
echo '<p>';
|
echo '<p>';
|
||||||
|
printf(
|
||||||
/* translators: %s: A link to install the Classic Editor plugin. */
|
/* translators: %s: A link to install the Classic Editor plugin. */
|
||||||
printf( __( 'Please install the <a href="%s">Classic Editor plugin</a> to use this meta box.' ), esc_url( self_admin_url( 'plugin-install.php?tab=featured' ) ) );
|
__( 'Please install the <a href="%s">Classic Editor plugin</a> to use this meta box.' ),
|
||||||
|
esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ), 'save_wporg_username_' . get_current_user_id() ) )
|
||||||
|
);
|
||||||
echo '</p>';
|
echo '</p>';
|
||||||
}
|
}
|
||||||
} elseif ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) {
|
} elseif ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45656';
|
$wp_version = '5.3-alpha-45657';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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