Changeset 56570 for trunk/src/wp-admin/plugin-editor.php
- Timestamp:
- 09/14/2023 12:52:45 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugin-editor.php
r56014 r56570 183 183 <h1><?php echo esc_html( $title ); ?></h1> 184 184 185 <?php if ( isset( $_GET['a'] ) ) : ?> 186 <div id="message" class="updated notice is-dismissible"> 187 <p><?php _e( 'File edited successfully.' ); ?></p> 188 </div> 189 <?php elseif ( is_wp_error( $edit_error ) ) : ?> 190 <div id="message" class="notice notice-error"> 191 <p><?php _e( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ); ?></p> 192 <pre><?php echo esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); ?></pre> 193 </div> 194 <?php endif; ?> 185 <?php 186 if ( isset( $_GET['a'] ) ) : 187 wp_admin_notice( 188 __( 'File edited successfully.' ), 189 array( 190 'additional_classes' => array( 'updated', 'is-dismissible' ), 191 'id' => 'message', 192 ) 193 ); 194 elseif ( is_wp_error( $edit_error ) ) : 195 $error = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); 196 $message = '<p>' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '</p> 197 <pre>' . $error . '</pre>'; 198 wp_admin_notice( 199 $message, 200 array( 201 'type' => 'error', 202 'id' => 'message', 203 'paragraph_wrap' => false, 204 ) 205 ); 206 endif; 207 ?> 195 208 196 209 <div class="fileedit-sub"> … … 281 294 <?php if ( is_writable( $real_file ) ) : ?> 282 295 <div class="editor-notices"> 283 <?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { ?> 284 <div class="notice notice-warning inline active-plugin-edit-warning"> 285 <p><?php _e( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ); ?></p> 286 </div> 287 <?php } ?> 296 <?php 297 if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { 298 wp_admin_notice( 299 __( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ), 300 array( 301 'type' => 'warning', 302 'additional_classes' => array( 'inline', 'active-plugin-edit-warning' ), 303 ) 304 ); 305 } 306 ?> 288 307 </div> 289 308 <p class="submit">
Note: See TracChangeset
for help on using the changeset viewer.