| 283 | $hide_notice = get_user_meta( get_current_user_id(), 'hide_plugin_editor_notice', true ); |
| 284 | if ( 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’t! Editing plugins directly may introduce incompatibilities that break your site or even leave you staring at the dreaded “White Screen of Death”. 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 |
| 299 | endif; // editor warning notice |