Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#12998 closed enhancement (fixed)

Introduce is_child_theme()

Reported by: ptahdunbar's profile ptahdunbar Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

Patch adds a new is_child_theme() function to wp-includes/theme.php

It returns true or false depending whether the active theme is a child theme or not.

Attachments (2)

is_child_theme.diff (594 bytes) - added by ptahdunbar 13 years ago.
is_child_theme.2.diff (559 bytes) - added by ptahdunbar 13 years ago.

Download all attachments as: .zip

Change History (5)

#1 @mikeschinkel
13 years ago

  • Cc mikeschinkel@… added

#2 @aaroncampbell
13 years ago

  • Cc aaron@… added

Couldn't this just be:

function is_child_theme() { 
	return ( TEMPLATEPATH !== STYLESHEETPATH );
} 

#3 @westi
13 years ago

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

(In [14409]) Add is_child_theme(). Fixes #12998 props ptahdunbar.

Note: See TracTickets for help on using tickets.