Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#26586 closed enhancement (maybelater)

Multisite enhancement: Tool to update the parent theme across multiple sites

Reported by: yurivictor's profile yurivictor Owned by:
Milestone: Priority: low
Severity: minor Version: 3.8
Component: Themes Keywords:
Focuses: multisite Cc:

Description

In multisite, say I want to update a bunch of sites to use twentyfourteen as a parent theme since twentythirteen is so last year, but I have a child theme for all my awesome share tools and adsplosions and super big nav.

If I change Template in my child theme's style.css to twentyfourteen, like so

/**
 * Theme name: Child theme
 * Template: twentyfourteen 
 */

It doesn't update to twentyfourteen. It would be nice if it did.

Instead you have to go to Network Admin and change the template settings to twentyfourteen on each site individually. Or write a MySQL script or whatever.

Maybe this is intentional for security or something, but it would still be nice to have a tool to update the parent theme across multiple sites.

Change History (6)

#1 @nacin
10 years ago

  • Priority changed from normal to low
  • Severity changed from normal to minor

It's not security, but rather, how this data is stored. And it's not an easy fix. 'stylesheet' and 'template' (parent) are both stored in the options table. If a theme changes states, the options table gets out of sync. We don't actually query style.css each pageload (doing so would be too much work), but we do on themes.php. I agree it would be nice if we detected and fixed this, but one of the issues is multisite doesn't actually know where a theme is active. It needs to look through every site.

Ultimately, themes usually start with a parent or they don't, and they usually don't change parents, so this is pretty low of a priority to ever hit, I think. We could possibly make themes.php a bit smarter about ensuring template is updated if it detects that style.css has changed. (It'd also need to deal with stylesheet_root and template_root, for multiple theme roots.)

#2 @knutsp
10 years ago

I may misunderstand this ticket, but:

You can't change a child theme's parent with a great risk of either having fatal errors in functions.php, and the risk that the stylesheet selectors doesn't apply any more. Only very carefully crafted child themes may change parent. Those only contain standard WordPress actions and filters. Such actions should be put in a (network wide) plugin.

WordPress should not encourage such possibly fatal actions, especially not network wide.

#3 @jeremyfelt
10 years ago

  • Component changed from Multisite to Themes
  • Focuses multisite added

#4 @SergeyBiryukov
10 years ago

  • Version changed from trunk to 3.8

#5 @knutsp
9 years ago

  • Keywords close added

Suggest wontfix.

#6 @DrewAPicture
9 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Closing as maybelater. Let's call this plugin material for the time being.

Note: See TracTickets for help on using tickets.