[wp-trac] [WordPress Trac] #20061: Preprocess get_page_templates() and store in a global
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 17 17:42:09 UTC 2012
#20061: Preprocess get_page_templates() and store in a global
-------------------------+----------------------
Reporter: Master Jake | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version: 3.3.1
Severity: normal | Resolution: wontfix
Keywords: |
-------------------------+----------------------
Changes (by nacin):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
> I can't think of any objections to making get_page_templates() available
everywhere
I can. It's an expensive function. It calls get_themes(), which is
expensive, then loads the contents of each file into memory to look for
the Template Name header comment.
If you want it on the frontend, include ABSPATH . 'wp-
admin/includes/admin.php', and do so only when you need it (cache the hell
out of the results).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20061#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list