Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#44889 closed enhancement (fixed)

Hide child theme creation message when we use child theme

Reported by: mukesh27's profile mukesh27 Owned by: pento's profile pento
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-screenshots dev-feedback needs-patch needs-refresh
Focuses: administration Cc:

Description

When we open http://wordpress.com/wp-admin/theme-editor.php page first time system show attached popup message in which it tell us "If you need to tweak more than your theme’s CSS, you might want to try making a child theme." but if we use child theme then also it show same message to create child theme and it create some confusion for any user so we have to hide that child theme creation message when we use child theme.

Attachments (5)

theme-editor.png (195.7 KB) - added by mukesh27 6 years ago.
44889.patch (2.2 KB) - added by mukesh27 6 years ago.
theme-editor-after-patch.png (182.7 KB) - added by mukesh27 6 years ago.
44889.2.patch (1.9 KB) - added by mukesh27 6 years ago.
Updated Patch
44889.3.diff (1.7 KB) - added by davidbaumwald 6 years ago.
Updated patch per @pento's guidance

Download all attachments as: .zip

Change History (21)

@mukesh27
6 years ago

@mukesh27
6 years ago

#1 @mukesh27
6 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#2 @SergeyBiryukov
6 years ago

  • Component changed from Editor to Themes
  • Keywords needs-patch added; has-patch dev-feedback removed

#3 @SergeyBiryukov
6 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#4 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 4.9.9

@mukesh27
6 years ago

Updated Patch

#5 @pento
6 years ago

  • Milestone changed from 4.9.9 to 5.0.1
  • Version trunk deleted

#6 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#7 @pento
6 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#8 @audrasjb
6 years ago

  • Keywords needs-patch needs-refresh added; has-patch removed
  • Milestone changed from 5.0.3 to 5.1

@mukesh27 I think 44889.2.patch is missing some words on the first part of the translatable string.

Moving this ticket to 5.1 since 5.0.3 is going to be released very soon.

#9 @mukesh27
6 years ago

@audrasjb You mean i needs to update text for child theme? As string translation is working fine for below statement.

_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.' );

#10 @audrasjb
6 years ago

Sorry, that wasn't clear enough.

Is there a reason to remove "your site"? The correct sentence should be:

_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.' );

For reference, the current text is:

You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;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&#8217;s CSS, you might want to try <a href="%s">making a child theme</a>.

#11 follow-up: @mukesh27
6 years ago

Hi @audrasjb

When we use any child theme then also system show below message that tell user to use child theme instead of do changes in parent theme.

You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;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&#8217;s CSS, you might want to try <a href="%s">making a child theme</a>. 

In 44889.2.patch patch i just remove child theme reference if you have any proper text for child theme then please suggest so i can update patch for this ticket or i can update patch with below description.

You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;t! Editing your theme directly could break your site. 

#12 in reply to: ↑ 11 @audrasjb
6 years ago

Replying to mukesh27:

In 44889.2.patch patch i just remove child theme reference if you have any proper text for child theme then please suggest so i can update patch for this ticket or i can update patch with below description.

You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;t! Editing your theme directly could break your site. 

Then, why did you also remove "Your site"?

Last edited 6 years ago by audrasjb (previous) (diff)

#13 @mukesh27
6 years ago

@audrasjb, by mistake i remove that text in patch.

#14 @pento
6 years ago

  • Milestone changed from 5.1 to 5.2

Instead of having two different but related strings, this string could be split up so that this prints for all themes:

You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don&#8217;t! Editing your theme directly could break your site and your changes may be lost in future updates.

Additionally, this prints for themes that aren't child themes:

If you need to tweak more than your theme&#8217;s CSS, you might want to try <a href="%s">making a child theme</a>.

#15 @desrosj
6 years ago

  • Milestone changed from 5.2 to 5.3

The latest feedback above still needs to be addressed. 5.2 beta 1 is in less than 2 days. Punting this to 5.3.

@davidbaumwald
6 years ago

Updated patch per @pento's guidance

#16 @pento
6 years ago

  • Owner set to pento
  • Resolution set to fixed
  • Status changed from new to closed

In 45608:

Theme Editor: Hide the recommendation to create a child theme when editing a child theme.

Props mukesh27, davidbaumwald.
Fixes #44889.

Note: See TracTickets for help on using tickets.