<?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 ( preg_match( '/\.css$/',
$file ) && !
wp_is_block_theme() &&
current_user_can( 'customize'
) ) : ?>
<div id="message" class="notice-info notice">
<p><strong><?php
_e( 'Did you know?'
); ?></strong></p>
<p>
<?php
printf( /* translators: %s: Link to Custom CSS section in the Customizer. */
__( 'There is no need to change your CSS here — you can edit and live preview CSS changes in the <a href="%s">built-in CSS editor</a>.'
),
esc_url( add_query_arg( 'autofocus[section]', 'custom_css',
admin_url( 'customize.php'
) ) ) );
?>
</p>
</div>