From 175c104baac113c4cae0a61ad59f0fec704f3321 Mon Sep 17 00:00:00 2001 From: wpmuguru Date: Mon, 29 Mar 2010 16:26:54 +0000 Subject: [PATCH] add remove_theme_support(), props nathanrice, fixes #12739 git-svn-id: http://svn.automattic.com/wordpress/trunk@13877 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 6f7fca258..b9365ac14 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1545,6 +1545,20 @@ function add_theme_support( $feature ) { $_wp_theme_features[$feature] = array_slice( func_get_args(), 1 ); } +/** + * Allows a theme to de-register its support of a certain feature + * + * Must be called in the themes functions.php file to work. + * + * @since 3.0.0 + * @param string $feature the feature being added + */ +function remove_theme_support( $feature ) { + global $_wp_theme_features; + + unset($_wp_theme_features[$feature]); +} + /** * Checks a theme's support for a given feature *