Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#22972 closed enhancement (wontfix)

Improve parameter name for wp_get_theme()

Reported by: johnbillion's profile 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 12 years ago.

Download all attachments as: .zip

Change History (6)

#1 @johnbillion
12 years ago

  • Description modified (diff)

@johnbillion
12 years ago

#2 @johnbillion
12 years ago

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

#3 @SergeyBiryukov
12 years 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.

#4 @obenland
11 years ago

  • Keywords close added

#5 @SergeyBiryukov
11 years 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.