Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -29,7 +29,15 @@ if ( empty( $plugins ) ) {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php echo esc_html( $title ); ?></h1>
|
||||
<div id="message" class="error"><p><?php _e( 'No plugins are currently available.' ); ?></p></div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
__( 'No plugins are currently available.' ),
|
||||
array(
|
||||
'id' => 'message',
|
||||
'additional_classes' => array( 'error' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
require_once ABSPATH . 'wp-admin/admin-footer.php';
|
||||
@@ -182,16 +190,29 @@ $content = esc_textarea( $content );
|
||||
<div class="wrap">
|
||||
<h1><?php echo esc_html( $title ); ?></h1>
|
||||
|
||||
<?php if ( isset( $_GET['a'] ) ) : ?>
|
||||
<div id="message" class="updated notice is-dismissible">
|
||||
<p><?php _e( 'File edited successfully.' ); ?></p>
|
||||
</div>
|
||||
<?php elseif ( is_wp_error( $edit_error ) ) : ?>
|
||||
<div id="message" class="notice notice-error">
|
||||
<p><?php _e( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ); ?></p>
|
||||
<pre><?php echo esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); ?></pre>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( isset( $_GET['a'] ) ) :
|
||||
wp_admin_notice(
|
||||
__( 'File edited successfully.' ),
|
||||
array(
|
||||
'additional_classes' => array( 'updated', 'is-dismissible' ),
|
||||
'id' => 'message',
|
||||
)
|
||||
);
|
||||
elseif ( is_wp_error( $edit_error ) ) :
|
||||
$error = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() );
|
||||
$message = '<p>' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '</p>
|
||||
<pre>' . $error . '</pre>';
|
||||
wp_admin_notice(
|
||||
$message,
|
||||
array(
|
||||
'type' => 'error',
|
||||
'id' => 'message',
|
||||
'paragraph_wrap' => false,
|
||||
)
|
||||
);
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div class="fileedit-sub">
|
||||
<div class="alignleft">
|
||||
@@ -280,11 +301,17 @@ $content = esc_textarea( $content );
|
||||
|
||||
<?php if ( is_writable( $real_file ) ) : ?>
|
||||
<div class="editor-notices">
|
||||
<?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { ?>
|
||||
<div class="notice notice-warning inline active-plugin-edit-warning">
|
||||
<p><?php _e( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) {
|
||||
wp_admin_notice(
|
||||
__( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ),
|
||||
array(
|
||||
'type' => 'warning',
|
||||
'additional_classes' => array( 'inline', 'active-plugin-edit-warning' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p class="submit">
|
||||
<?php submit_button( __( 'Update File' ), 'primary', 'submit', false ); ?>
|
||||
|
||||
Reference in New Issue
Block a user