WordPress.org

Make WordPress Core

#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 johnbillion)

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)

22972.patch (1.6 KB) - added by johnbillion 19 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 johnbillion19 months ago

  • Description modified (diff)

johnbillion19 months ago

comment:2 johnbillion19 months ago

  • Keywords has-patch added
  • Severity changed from normal to minor

comment:3 SergeyBiryukov19 months ago

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(), and wp_customize_url(), so 22972.patch would make that less consistent.

comment:4 obenland11 months ago

  • Keywords close added

comment:5 SergeyBiryukov11 months ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.