Make WordPress Core

Ticket #59229: 59229.1.diff

File 59229.1.diff, 2.1 KB (added by huzaifaalmesbah, 22 months ago)

update coding standards

  • src/wp-admin/edit-form-blocks.php

    diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php
    index 66a6bbfc25..a6003be023 100644
    a b require_once ABSPATH . 'wp-admin/admin-header.php'; 
    322322                <div class="notice notice-error">
    323323                        <p>
    324324                                <?php
    325                                         $message = sprintf(
    326                                                 /* translators: %s: A link to install the Classic Editor plugin. */
    327                                                 __( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the <a href="%s">Classic Editor plugin</a>.' ),
    328                                                 esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ), 'save_wporg_username_' . get_current_user_id() ) )
    329                                         );
    330 
     325                                          if ( file_exists( WP_PLUGIN_DIR . '/classic-editor/classic-editor.php' )) {
     326                                                  // If Classic Editor is already installed, provide a link to activate the plugin.
     327                                                  $plugin_activate_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=classic-editor/classic-editor.php', 'activate-plugin_classic-editor/classic-editor.php' );
     328         
     329                                                  $message = sprintf(
     330                                                          /* translators: %s: A link to activate the Classic Editor plugin. */
     331                                                          __( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or <a href="%s">Activate Classic Editor</a> Plugin.' ),
     332                                                          esc_url( $plugin_activate_url )
     333                                                  );
     334                                          } else {
     335                                                  // If Classic Editor is not installed, provide a link to install it.
     336                                                  $plugin_install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=classic-editor' ), 'install-plugin_classic-editor' );
     337                                                  $message = sprintf(
     338                                                          /* translators: %s: A link to install the Classic Editor plugin. */
     339                                                          __( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or <a href="%s"> Install Classic Editor</a> Plugin.' ),
     340                                                          esc_url( $plugin_install_url )
     341                                                  );
     342                                          }
     343                                         
    331344                                        /**
    332345                                         * Filters the message displayed in the block editor interface when JavaScript is
    333346                                         * not enabled in the browser.