[wp-trac] [WordPress Trac] #13239: Filter locate_template template_names variable

WordPress Trac noreply at wordpress.org
Tue Feb 18 00:16:11 UTC 2014


#13239: Filter locate_template template_names variable
--------------------------+-----------------------
 Reporter:  chrisbliss18  |       Owner:
     Type:  enhancement   |      Status:  reopened
 Priority:  normal        |   Milestone:  3.9
Component:  Themes        |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by obenland):

 * keywords:  has-patch 3.3-early commit => has-patch


Comment:

 How about casting `$template_names` to an array within the filter on line
 475?

 We could omit the `false === $template_names` check and remove the
 typecasting from the foreach loop, while not changing the outcome for the
 function. Added benefit would be a reduced type ambiguity, plugins could
 always expect an array.

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


More information about the wp-trac mailing list