[wp-trac] [WordPress Trac] #22336: WP_Theme::get_allowed_on_site() function doesn't work for other blogs

WordPress Trac noreply at wordpress.org
Sun Feb 2 08:28:11 UTC 2014


#22336: WP_Theme::get_allowed_on_site() function doesn't work for other blogs
--------------------------+----------------------
 Reporter:  npetetin      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Themes        |     Version:  3.4.2
 Severity:  major         |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 ::get_allowed_on_site() is complicated, because it has to handle both old
 and new storage mechanisms. It's pretty painful as it may have to do a
 switch_to_blog() and back again, and potentially update some options. I
 honestly don't remember (I wrote this) but I profiled the living heck out
 of this code, and probably realized I could squeeze out some extra speed
 here. If I had to guess, it gets called often enough for this kind of
 caching to make sense.

 You are correct that if a plugin adds a filter late, then it wouldn't
 work. I don't think that's enough to go on here to change this, though.

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


More information about the wp-trac mailing list