Theme Editor: Hide the recommendation to create a child theme when editing a child theme.
Props mukesh27, davidbaumwald. Fixes #44889. Built from https://develop.svn.wordpress.org/trunk@45608 git-svn-id: http://core.svn.wordpress.org/trunk@45419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec07a7e565
commit
82935b0343
|
@ -344,13 +344,20 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
|
|||
<h1><?php _e( 'Heads up!' ); ?></h1>
|
||||
<p>
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %s: link to documentation on child themes */
|
||||
__( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme’s CSS, you might want to try <a href="%s">making a child theme</a>.' ),
|
||||
esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) )
|
||||
);
|
||||
_e( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates.' );
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if ( ! $theme->parent() ) {
|
||||
echo '<p>';
|
||||
echo sprintf(
|
||||
/* translators: %s: link to documentation on child themes */
|
||||
__( 'If you need to tweak more than your theme’s CSS, you might want to try <a href="%s">making a child theme</a>.' ),
|
||||
esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) )
|
||||
);
|
||||
echo '</p>';
|
||||
}
|
||||
?>
|
||||
<p><?php _e( 'If you decide to go ahead with direct edits anyway, use a file manager to create a copy with a new name and hang on to the original. That way, you can re-enable a functional version if something goes wrong.' ); ?></p>
|
||||
</div>
|
||||
<p>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45607';
|
||||
$wp_version = '5.3-alpha-45608';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue