Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#12231 closed defect (bug) (fixed)

Better name for "themes_loaded"

Reported by: filosofo's profile filosofo Owned by:
Milestone: 3.0 Priority: lowest
Severity: trivial Version: 3.0
Component: Themes Keywords: has-patch themes_loaded themes_setup
Focuses: Cc:


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)

themes_loaded.diff (1009 bytes) - added by filosofo 14 years ago.

Download all attachments as: .zip

Change History (8)

#1 @sivel
14 years ago

I believe what we were going for was a matching action to the plugins_loaded action. Just to give some context.

#2 @filosofo
14 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 @dd32
14 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'?

#4 @filosofo
14 years ago

How about "themes_setup_complete"? "post" has its own confusions. :)

#5 @nacin
14 years ago


#6 @filosofo
14 years ago

That sounds good to me.

#7 @dd32
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13214]) Rename the new 'themes_loaded' hook to 'after_setup_theme' to prevent confusion as to what it actually does & where its fired from. Fixes #12231

Note: See TracTickets for help on using tickets.