Opened 15 years ago
Closed 15 years ago
#12231 closed defect (bug) (fixed)
Better name for "themes_loaded"
Reported by: | filosofo | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | lowest |
Severity: | trivial | Version: | 3.0 |
Component: | Themes | Keywords: | has-patch themes_loaded themes_setup |
Focuses: | Cc: |
Description
Replying to automattor:
(In [13156]) Add 'themes_loaded' hook to run after parent/child themes have been included. See #9015
Could we please rename "themes_loaded" to something else, such as "themes_setup"?
- The "loaded" easily gives the impression that this is when the theme files themselves are loaded---in other words, when function load_template() does the job of including the theme files.
- This action hook is meant to conclude the actions started at the previous "setup_theme" event. So something indicating that "setup_theme" has completed, such as "themes_setup," fits better.
Attachments (1)
Change History (8)
#2
@
15 years ago
Yes, the original thought was reasonable, but the important difference is that the plugin files are included by 'plugins_loaded,' but by 'themes_loaded' the theme files are not.
I'm just saying it would be good to keep consistent the meaning of "load" as used in load_template() and elsewhere and to keep from confusing those who might expect all the templates to be defined by that point.
#3
@
15 years ago
I can see where the confusion could arrise.
'themes_loaded' was intended to be as plugins_loaded, The Themes file have been loaded, or rather, the Functions of the theme.. Which causes confusion.
I avoided setup, as 'setup_theme' is called before the theme inclusion is done, which makes it seem semi-awkward.
Perhaps, 'post_setup_theme'?
I believe what we were going for was a matching action to the plugins_loaded action. Just to give some context.