From 7ae297b910b98c5ece7fdd288be35e457692dfd7 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 30 Apr 2012 02:02:11 +0000 Subject: [PATCH] Undeprecate require_if_theme_supports() for themes using it for legitimate reasons. see [20610]. props scribu, jkudish. fixes #20556. git-svn-id: http://svn.automattic.com/wordpress/trunk@20642 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/deprecated.php | 16 ---------------- wp-includes/theme.php | 12 ++++++++++++ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index d28e24e44..13b6bff39 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -3152,19 +3152,3 @@ function clean_page_cache( $id ) { clean_post_cache( $id ); } - -/** - * Checks a theme's support for a given feature before loading the functions which implement it. - * - * @since 2.9.0 - * @deprecated 3.4.0 - * @deprecated Use require() - * - * @param string $feature the feature being checked - * @param string $include the file containing the functions that implement the feature - */ -function require_if_theme_supports( $feature, $include ) { - _deprecated_function( __FUNCTION__, '3.4', 'require()' ); - if ( current_theme_supports( $feature ) ) - require ( $include ); -} diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 0cdc74e15..d9ac780f9 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1511,6 +1511,18 @@ function current_theme_supports( $feature ) { return apply_filters('current_theme_supports-' . $feature, true, $args, $_wp_theme_features[$feature]); } +/** + * Checks a theme's support for a given feature before loading the functions which implement it. + * + * @since 2.9.0 + * @param string $feature the feature being checked + * @param string $include the file containing the functions that implement the feature + */ +function require_if_theme_supports( $feature, $include) { + if ( current_theme_supports( $feature ) ) + require ( $include ); +} + /** * Checks an attachment being deleted to see if it's a header or background image. *