[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
Sun Nov 1 19:07:06 UTC 2020
#51691: Call get_template_directory() once instead of multiple times for loading
theme's files (performance boost)
----------------------------+------------------------------
Reporter: hellofromTonya | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: performance
----------------------------+------------------------------
Comment (by audrasjb):
Hello @hellofromTonya and thank you for opening this ticket,
While I understand the performance benefits of this change, I personally
don't think it's a good idea for bundled themes.
Bundled themes are supposed to be a place where developers can learn how
themes should ideally work. Replacing basic functions like
`get_template_directory()` with custom stuff would be good for
performances, but bad in terms of training/learning. Also, the five hooks
you mentioned are here for a reason. I think removing them on existing
bundled theme is not a good option as it may introduce backward
compatibility issues with plugins and custom developments that use those
functions/hooks to override the defaults settings.
But that's my personal opinion about this change. Let's discuss it :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51691#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list