Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#21075 closed defect (bug) (fixed)

Allow switch_theme() to take a single 'stylesheet' argument

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.4
Component: Themes Keywords:
Focuses: Cc:

Description

After the work in #20103, we can very safely begin to pass around 'stylesheet' everywhere as a unique identity for a theme.

In [21010/trunk/wp-admin/includes/theme.php], we updated delete_theme() to take $stylesheet rather than $template. This was for clarity only; it works the same. But we should allow switch_theme() to take a single argument as well.

switch_theme() would then end up with two function definitions:

function switch_theme( $stylesheet )
function switch_theme( $template, $stylesheet )

Attachments (9)

21075.diff (333 bytes) - added by nacin 12 years ago.
21075.2.diff (333 bytes) - added by nacin 12 years ago.
21075.diff.diff (333 bytes) - added by nacin 12 years ago.
21075.diff.2.diff (333 bytes) - added by nacin 12 years ago.
21075.diff.3.diff (333 bytes) - added by nacin 12 years ago.
21075.diff.4.diff (333 bytes) - added by nacin 12 years ago.
21075.3.diff (333 bytes) - added by nacin 12 years ago.
21075.6.diff (333 bytes) - added by nacin 12 years ago.
21075.4.diff (333 bytes) - added by nacin 12 years ago.

Download all attachments as: .zip

Change History (12)

#2 @nacin
12 years ago

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

In [21131]:

Allow switch_theme() to take a single $stylesheet argument.

It now effectively has two function definitions:
function switch_theme( $stylesheet )
function switch_theme( $template, $stylesheet )

fixes #21075.

#3 @nacin
12 years ago

In [21139]:

Use WP_Theme when switching themes. see #21075 for 3.4.

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

@nacin
12 years ago

Note: See TracTickets for help on using tickets.