Make WordPress Core


Ignore:
Timestamp:
05/25/2021 08:13:02 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template.php

    r50795 r51011  
    11491149    if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) {
    11501150        if ( current_user_can( 'install_plugins' ) ) {
     1151            $install_url = wp_nonce_url(
     1152                self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ),
     1153                'save_wporg_username_' . get_current_user_id()
     1154            );
     1155
    11511156            echo '<p>';
    1152             printf(
    1153                 /* translators: %s: A link to install the Classic Editor plugin. */
    1154                 __( 'Please install the <a href="%s">Classic Editor plugin</a> to use this meta box.' ),
    1155                 esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ), 'save_wporg_username_' . get_current_user_id() ) )
    1156             );
     1157            /* translators: %s: A link to install the Classic Editor plugin. */
     1158            printf( __( 'Please install the <a href="%s">Classic Editor plugin</a> to use this meta box.' ), esc_url( $install_url ) );
    11571159            echo '</p>';
    11581160        }
    11591161    } elseif ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) {
    11601162        if ( current_user_can( 'activate_plugins' ) ) {
    1161             $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' );
     1163            $activate_url = wp_nonce_url(
     1164                self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php' ),
     1165                'activate-plugin_classic-editor/classic-editor.php'
     1166            );
     1167
    11621168            echo '<p>';
    11631169            /* translators: %s: A link to activate the Classic Editor plugin. */
Note: See TracChangeset for help on using the changeset viewer.