WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12998 closed enhancement (fixed)

Introduce is_child_theme()

Reported by: 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 5 years ago.
is_child_theme.2.diff (559 bytes) - added by ptahdunbar 5 years ago.

Download all attachments as: .zip

Change History (5)

@ptahdunbar5 years ago

comment:1 @mikeschinkel5 years ago

  • Cc mikeschinkel@… added

comment:2 @aaroncampbell5 years ago

  • Cc aaron@… added

Couldn't this just be:

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

comment:3 @westi5 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.