Make WordPress Core

Ticket #31779: 31779.2.diff

File 31779.2.diff, 2.2 KB (added by helen, 7 years ago)
  • src/wp-admin/css/common.css

     
    31473147        line-height: 180%;
    31483148}
    31493149
     3150#file-editor-warning .file-editor-warning-content {
     3151        margin: 25px;
     3152}
     3153
    31503154/* @todo: can we use a common class for these? */
    31513155.nav-menus-php .item-edit:before,
    31523156.widget-top .widget-action .toggle-indicator:before,
  • src/wp-admin/plugin-editor.php

     
    280280<br class="clear" />
    281281</div>
    282282<?php
     283$hide_notice = get_user_meta( get_current_user_id(), 'hide_plugin_editor_notice', true );
     284if ( empty( $hide_notice ) ) :
     285?>
     286<div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning">
     287        <div class="notification-dialog-background"></div>
     288        <div class="notification-dialog" role="dialog" aria-labelledby="file-editor-warning-title" tabindex="0">
     289                <div class="file-editor-warning-content">
     290                        <h1 id="file-editor-warning-title"><?php _e( 'Caution!' ); ?></h1>
     291                        <p><?php _e( 'You appear to be making direct edits to your plugin in the WordPress dashboard. It is <strong>strongly</strong> recommended that you don&#8217;t! Editing plugins directly may introduce incompatibilities that break your site or even leave you staring at the dreaded &#8220;White Screen of Death&#8221;. Your changes may also be overwritten by future updates.' ); ?></p>
     292                        <p><?php _e( 'If you absolutely must edit a plugin this way, WordPress will attempt to prevent you from being locked out from the dashboard entirely, but cannot guarantee results. Once dismissed, this notice will not appear again.' ); ?></p>
     293                </div>
     294<?php // TODO: Make that notice=0 thing do something ?>
     295                <a class="file-editor-warning-close notice-dismiss" href="<?php echo esc_url( self_admin_url( 'plugin-editor.php?notice=0' ) ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the file editor warning' ); ?>"><?php _e( 'Dismiss' ); ?></a>
     296        </div>
     297</div>
     298<?php
     299endif; // editor warning notice
    283300
    284301include(ABSPATH . "wp-admin/admin-footer.php");