WordPress.org

Make WordPress Core

Changeset 43947


Ignore:
Timestamp:
11/29/2018 08:29:18 AM (9 months ago)
Author:
azaozz
Message:

Help/About: Do not show the "Keep it Classic" section and the link to it at the top when the Classic Editor plugin is already installed.

See #45178.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/about.php

    r43946 r43947  
    4646                ?>
    4747            </div>
    48         <?php else : ?>
     48        <?php elseif ( ! file_exists( WP_PLUGIN_DIR . '/classic-editor/classic-editor.php' ) ) : ?>
    4949            <p class="about-text">
    5050                <a href="#classic-editor"><?php _e( 'Learn how to keep using the old editor.' ); ?></a>
     
    318318        <hr />
    319319
    320         <div class="feature-section one-col" id="classic-editor">
    321             <div class="col">
    322                 <h2><?php _e( 'Keep it Classic' ); ?></h2>
    323             </div>
    324         </div>
    325 
    326         <div class="full-width">
    327             <img src="https://wordpress.org/gutenberg/files/2018/11/Classic-2.png" alt="">
    328         </div>
    329 
    330         <div class="feature-section one-col">
    331             <div class="col">
    332                 <p><?php _e( 'Prefer to stick with the familiar Classic Editor? No problem! Support for the Classic Editor plugin will remain in WordPress until 2021.' ); ?></p>
    333                 <p><?php _e( 'The Classic Editor plugin restores the previous WordPress editor and the Edit Post screen. It lets you keep using plugins that extend it, add old-style meta boxes, or otherwise depend on the previous editor. To install, visit your plugins page and click the “Install Now” button next to “Classic Editor.” After the plugin finishes installing, click “Activate.” That’s it! ' ); ?></p>
    334                 <p><?php _e( 'Note to users of assistive technology: if you experience usability issues with the block editor, we recommend you continue to use the Classic Editor.' ); ?></p>
    335                 <?php if ( current_user_can( 'install_plugins' ) ) { ?>
    336                     <div class="col cta">
    337                         <a class="button button-primary button-hero" href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg' ), 'save_wporg_username_' . get_current_user_id() ) ); ?>"><?php _e( 'Install the Classic Editor' ); ?></a>
    338                     </div>
    339                 <?php } ?>
    340             </div>
    341         </div>
    342 
    343         <hr />
     320        <?php if ( ! file_exists( WP_PLUGIN_DIR . '/classic-editor/classic-editor.php' ) ) : ?>
     321            <div class="feature-section one-col" id="classic-editor">
     322                <div class="col">
     323                    <h2><?php _e( 'Keep it Classic' ); ?></h2>
     324                </div>
     325            </div>
     326
     327            <div class="full-width">
     328                <img src="https://wordpress.org/gutenberg/files/2018/11/Classic-2.png" alt="">
     329            </div>
     330
     331            <div class="feature-section one-col">
     332                <div class="col">
     333                    <p><?php _e( 'Prefer to stick with the familiar Classic Editor? No problem! Support for the Classic Editor plugin will remain in WordPress until 2021.' ); ?></p>
     334                    <p><?php _e( 'The Classic Editor plugin restores the previous WordPress editor and the Edit Post screen. It lets you keep using plugins that extend it, add old-style meta boxes, or otherwise depend on the previous editor. To install, visit your plugins page and click the &#8220;Install Now&#8221; button next to &#8220;Classic Editor&#8221;. After the plugin finishes installing, click &#8220;Activate&#8221;. That’s it!' ); ?></p>
     335                    <p><?php _e( 'Note to users of assistive technology: if you experience usability issues with the block editor, we recommend you continue to use the Classic Editor.' ); ?></p>
     336                    <?php if ( current_user_can( 'install_plugins' ) ) { ?>
     337                        <div class="col cta">
     338                            <a class="button button-primary button-hero" href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg' ), 'save_wporg_username_' . get_current_user_id() ) ); ?>"><?php _e( 'Install the Classic Editor' ); ?></a>
     339                        </div>
     340                    <?php } ?>
     341                </div>
     342            </div>
     343
     344            <hr />
     345        <?php endif; ?>
    344346
    345347        <div class="return-to-dashboard">
Note: See TracChangeset for help on using the changeset viewer.