Code Editors: Add a persistent notification on CSS files, encouraging people to use the CSS panel in the Customizer instead of editing their CSS files directly.

Props helen, westonruter, nic.bertino, michelleweber.
Fixes #42100.

Built from https://develop.svn.wordpress.org/trunk@42013


git-svn-id: http://core.svn.wordpress.org/trunk@41847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mel Choyce 2017-10-24 23:35:46 +00:00
parent d96b7af890
commit 7495a110cc
2 changed files with 15 additions and 1 deletions

View File

@ -185,6 +185,20 @@ if ( $file_description != $file_show ) {
<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 ) ) : ?>
<div id="message" class="notice-info notice">
<p><strong><?php _e( 'Did you know?' ); ?></strong></p>
<p>
<?php
echo sprintf(
/* translators: %s is a link to Custom CSS section in the Customizer. */
__( 'There&#8217;s no need to change your CSS here &mdash; 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>
<?php endif; ?>
<div class="fileedit-sub">
<div class="alignleft">

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta3-42012';
$wp_version = '4.9-beta3-42013';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.