From 82935b0343a495faccf10501db0b24fae454f290 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 8 Jul 2019 03:15:56 +0000 Subject: [PATCH] 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 --- wp-admin/theme-editor.php | 17 ++++++++++++----- wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 186d54fbbe..fa06f574f3 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -344,13 +344,20 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :

making a child theme.' ), - 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.' ); ?>

+ parent() ) { + echo '

'; + 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 making a child theme.' ), + esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) ) + ); + echo '

'; + } + ?>

diff --git a/wp-includes/version.php b/wp-includes/version.php index 4c37308d44..7d9136b770 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.