Opened 22 months ago

Last modified 20 months ago

#18258 new enhancement

Users should not edit upstream themes

Reported by: Tomer Owned by:
Priority: normal Milestone: Awaiting Review
Component: Themes Version:
Severity: normal Keywords:
Cc: maor@…, hatul

Description

Currently, when users are entering the theme editor from the administration UI, they get the ability to edit the theme with very basic knowledge required. The downside with that that their tweaks will lost as soon as they update the theme or if this is WordPress default theme if they update the WordPress core.

I purpose the following change – Users will be prompted with a message if they try to edit a message with an upstream link and presumably won't be able to edit the theme styles. Instead, they will get the opportunity to automatically create a child theme of the upstream theme with a default template which might contain theme metadata, and @include rule to add the stylesheet of the other theme.

Making this will help promote the usage of child themes and will make it easier to novice bloggers to hack their themes. It is also better from the current implementation by extensions as it doesn't require runtime database queries to fetch the additional author stylesheet.

Change History (5)

If implemented, two files should be automatically generated – style.css and rtl.css; both files should @include the same files in the upstream theme.

  • Component changed from General to Themes
  • Type changed from defect (bug) to enhancement

This sounds like a decent first step in making the theme editor more fool-proof.

There should also be a way for themes to say "Hey, it's ok if you edit me directly". Most straighforward way would be to define a new header field which can go into style.css. Example:

DirectlyEditable: yes
  • Cc maor@… added

+1 for this

  • Cc hatul added
Note: See TracTickets for help on using tickets.