Opened 12 years ago
Closed 11 years ago
#22972 closed enhancement (wontfix)
Improve parameter name for wp_get_theme()
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.4 |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
The name of the first parameter for wp_get_theme()
is misleading. It's called $stylesheet
when in fact you're passing in the name of the theme's template directory, not the stylesheet.
The function is a wrapper for the WP_Theme
class which gets its parameter names correct.
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
I guess
stylesheet
is the common notation for theme's directory name throughout the theme-related functions.That's how it's described in
WP_Theme
:http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/class-wp-theme.php#L86
It's also used as a parameter in
get_theme_root()
,get_theme_root_uri()
,get_raw_theme_root()
,switch_theme()
, andwp_customize_url()
, so 22972.patch would make that less consistent.