[wp-trac] [WordPress Trac] #51691: Call get_template_directory() once instead of multiple times for loading theme's files (performance boost)

WordPress Trac noreply at wordpress.org
Mon Nov 2 02:19:14 UTC 2020


#51691: Call get_template_directory() once instead of multiple times for loading
theme's files (performance boost)
----------------------------+------------------------------
 Reporter:  hellofromTonya  |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Bundled Theme   |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  performance
----------------------------+------------------------------

Comment (by apedog):

 I'm saying WordPress core allows a user to manipulate the output of
 {{{get_template_directory()}}}. And that the theme cannot assume
 {{{get_template_directory()}}} will/should return the same output on every
 call.

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


More information about the wp-trac mailing list