X-post: Merge Announcement: Plugins & Themes Auto-Updates

X-comment from +make.wordpress.org/core: Comment on Merge Announcement: Plugins & Themes Auto-Updates

Not sure how to codify this into a…

Not sure how to codify this into a rule or something, but putting it out there for thought and discussion.

Themes should not “do” anything merely from their files being loaded. I know there’s been ways to have themes do something on “activation”, but in general, this is bad.

This gets really, really bad with 3.4 and the theme customizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.. See, a theme has no idea if it’s actually live or just being displayed in the customizer. So if a theme does something like changing the blog settings or some such thing just because it’s loaded, then this could cause weird side effects when it’s not actually the active theme. Nobody wants to preview a theme and have their main blog page suddenly change.

This “don’t do anything by default” includes changing anything in the database whatsoever, writing files, making posts, etc. All actions taken by a theme must in some way actually be user-initiated.

Discuss.

I’ve made a few changes to the theme up…

I’ve made a few changes to the theme uploader tool. There shouldn’t be any visible changes, but email me if anything looks weird on the next few theme tickets. Thanks!

(It’s mostly just prep work for proper child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/. support, nothing of special interest.)

#wporg