Make WordPress Core

Ticket #20556: 20556.diff

File 20556.diff, 1.4 KB (added by jkudish, 13 years ago)

un-deprecate require_if_theme_supports function

  • theme.php

     
    14611461}
    14621462
    14631463/**
     1464 * Checks a theme's support for a given feature before loading the functions which implement it.
     1465 *
     1466 * @since 2.9.0
     1467 * @param string $feature the feature being checked
     1468 * @param string $include the file containing the functions that implement the feature
     1469 */
     1470function require_if_theme_supports( $feature, $include) {
     1471        if ( current_theme_supports( $feature ) )
     1472                require ( $include );
     1473}
     1474
     1475/**
    14641476 * Checks a theme's support for a given feature
    14651477 *
    14661478 * @since 2.9.0
  • deprecated.php

     
    31513151        _deprecated_function( __FUNCTION__, 3.4, 'clean_post_cache()' );
    31523152
    31533153        clean_post_cache( $id );
    3154 }
    3155 
    3156 /**
    3157  * Checks a theme's support for a given feature before loading the functions which implement it.
    3158  *
    3159  * @since 2.9.0
    3160  * @deprecated 3.4.0
    3161  * @deprecated Use require()
    3162  *
    3163  * @param string $feature the feature being checked
    3164  * @param string $include the file containing the functions that implement the feature
    3165  */
    3166 function require_if_theme_supports( $feature, $include ) {
    3167         _deprecated_function( __FUNCTION__, '3.4', 'require()' );
    3168         if ( current_theme_supports( $feature ) )
    3169                 require ( $include );
    3170 }
     3154}
     3155 No newline at end of file