From c7e4d07d28307ab06c839a6329f3d787aa152b5c Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Mon, 3 May 2010 20:56:57 +0000 Subject: [PATCH] Add is_child_theme(). Fixes #12998 props ptahdunbar. git-svn-id: https://develop.svn.wordpress.org/trunk@14409 602fd350-edb4-49c9-b593-d223f7449a82 --- 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. *