[wp-trac] [WordPress Trac] #21622: Validate or sandbox theme file edits before saving them (as is done for plugins) (was: Validate or sandbox file edits before saving them)

WordPress Trac noreply at wordpress.org
Thu Sep 21 18:25:47 UTC 2017


#21622: Validate or sandbox theme file edits before saving them (as is done for
plugins)
-------------------------+------------------------------
 Reporter:  eschwartz93  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:  2.7.1
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  administration
-------------------------+------------------------------

Comment (by westonruter):

 As noted, the plugin editor already has sandboxed edits (though it is
 broken, see #39766). As such, this ticket should be about sandboxing
 editors to //themes// specifically.

 For the theme editor, it's not so easy to use the sandboxing approach for
 plugins because we can't temporarily deactivate a theme while checking if
 the theme still runs, because if the theme doesn't run then what theme is
 then left to be activated?

 One idea that has been raised is to actually create a copy of a given
 theme or plugin and temporarily activate it to see if there are errors. If
 there are, then the sandbox copy should be deactivated and the old
 theme/plugin should be re-activated. If there are not errors, then the
 changes can be copied from the sandbox to the main plugin and the sandbox
 can be removed. There is a good discussion about this here:
 https://wordpress.slack.com/archives/C0381N237/p1499707763283370

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21622#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list