From 1afa45d117c1aeb88671a1682c1d487dd4162ef4 Mon Sep 17 00:00:00 2001 From: westi Date: Mon, 3 May 2010 20:56:57 +0000 Subject: [PATCH] Add is_child_theme(). Fixes #12998 props ptahdunbar. git-svn-id: http://svn.automattic.com/wordpress/trunk@14409 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 877e7c7658..c58a9f51c9 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -6,6 +6,17 @@ * @subpackage Template */ +/** + * Whether a child theme is in use. + * + * @since 3.0.0 + * + * @return bool true if a child theme is in use, false otherwise. + **/ +function is_child_theme() { + return ( TEMPLATEPATH !== STYLESHEETPATH ); +} + /** * Retrieve name of the current stylesheet. *