diff --git src/wp-admin/plugin-editor.php src/wp-admin/plugin-editor.php
index 6ffadf6..0326bb3 100644
|
|
default: |
162 | 162 | } |
163 | 163 | |
164 | 164 | $content = esc_textarea( $content ); |
165 | | ?> |
166 | | <?php if (isset($_GET['a'])) : ?> |
| 165 | |
| 166 | $first_time_editing = get_user_meta( get_current_user_id(), 'already_used_wp_plugin_editor', true ); |
| 167 | if ( empty( $first_time_editing ) ) : ?> |
| 168 | <div id="message" class="error notice is-dismissible"><p><?php _e( "You are editing the actual plugin files. Make sure you know what you're doing!<br />If you want to know more about Wordpress plugin development, checkout <a href='https://codex.wordpress.org/Writing_a_Plugin' target='_blank'>Plugin Development on Wordpress</a>." ) ?></p></div> |
| 169 | <?php |
| 170 | update_user_meta( get_current_user_id(), 'already_used_wp_plugin_editor', true ); |
| 171 | endif; |
| 172 | |
| 173 | if (isset($_GET['a'])) : ?> |
167 | 174 | <div id="message" class="updated notice is-dismissible"><p><?php _e('File edited successfully.') ?></p></div> |
168 | 175 | <?php elseif (isset($_GET['phperror'])) : ?> |
169 | 176 | <div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p> |
diff --git src/wp-admin/theme-editor.php src/wp-admin/theme-editor.php
index c858c0b..a51effb 100644
|
|
default: |
125 | 125 | <div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div> |
126 | 126 | <?php endif; |
127 | 127 | |
| 128 | $first_time_editing = get_user_meta( get_current_user_id(), 'already_used_wp_theme_editor', true ); |
| 129 | if ( empty( $first_time_editing ) ) : ?> |
| 130 | <div id="message" class="error notice is-dismissible"><p><?php _e( "You are editing the actual theme files. Make sure you know what you're doing!<br />If you want to know more about Wordpress theme development, checkout <a href='https://codex.wordpress.org/Theme_Development' target='_blank'>Theme Development on Wordpress</a>." ) ?></p></div> |
| 131 | <?php |
| 132 | update_user_meta( get_current_user_id(), 'already_used_wp_theme_editor', true ); |
| 133 | endif; |
| 134 | |
128 | 135 | $description = get_file_description( $file ); |
129 | 136 | $file_show = array_search( $file, array_filter( $allowed_files ) ); |
130 | 137 | if ( $description != $file_show ) |