[wp-trac] [WordPress Trac] #29564: wp_get_themes() returns empty array to Network-Activated Plugin code

WordPress Trac noreply at wordpress.org
Sat Sep 6 21:40:27 UTC 2014


#29564: wp_get_themes() returns empty array to Network-Activated Plugin code
--------------------------+-----------------------------
 Reporter:  adiant        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Themes        |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Function wp_get_themes() returns an array of Themes when called within a
 plugin, except in one situation:  when the plugin is Network Activated and
 the function is called in "open code", not in an add_action or add_filter
 function.

 In this situation, an empty array is returned.

 There are no issues when a plugin is Site Activated in a Network or
 Activated on a non-Network.

 Although I just found this problem now, while using Version 4.0, I have
 also installed 3.9.2 and found it there, as well.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29564>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list