mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Administration: Improve the message about installing the Link Manager plugin to use legacy Links screen.
This provides direct links to install and activate the plugin, if the user has the capabilities to do so, instead of just linking to plugin search results. It also matches more closely the message about installing the Classic Editor plugin for meta boxes incompatible with the block editor. Follow-up to [22855], [44280], [45657]. Props tw2113, peterwilsoncc, SergeyBiryukov. Fixes #52669. git-svn-id: https://develop.svn.wordpress.org/trunk@51011 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1148,17 +1148,23 @@ function do_block_editor_incompatible_meta_box( $object, $box ) {
|
||||
|
||||
if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) {
|
||||
if ( current_user_can( 'install_plugins' ) ) {
|
||||
echo '<p>';
|
||||
printf(
|
||||
/* translators: %s: A link to install the Classic Editor plugin. */
|
||||
__( '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() ) )
|
||||
$install_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>';
|
||||
/* 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( $install_url ) );
|
||||
echo '</p>';
|
||||
}
|
||||
} elseif ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) {
|
||||
if ( current_user_can( 'activate_plugins' ) ) {
|
||||
$activate_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php' ), 'activate-plugin_classic-editor/classic-editor.php' );
|
||||
$activate_url = wp_nonce_url(
|
||||
self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php' ),
|
||||
'activate-plugin_classic-editor/classic-editor.php'
|
||||
);
|
||||
|
||||
echo '<p>';
|
||||
/* translators: %s: A link to activate the Classic Editor plugin. */
|
||||
printf( __( 'Please activate the <a href="%s">Classic Editor plugin</a> to use this meta box.' ), esc_url( $activate_url ) );
|
||||
|
||||
Reference in New Issue
Block a user