Make WordPress Core

Changeset 20642


Ignore:
Timestamp:
04/30/2012 02:02:11 AM (13 years ago)
Author:
nacin
Message:

Undeprecate require_if_theme_supports() for themes using it for legitimate reasons. see [20610]. props scribu, jkudish. fixes #20556.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r20610 r20642  
    31533153    clean_post_cache( $id );
    31543154}
    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 }
  • trunk/wp-includes/theme.php

    r20610 r20642  
    15131513
    15141514/**
     1515 * Checks a theme's support for a given feature before loading the functions which implement it.
     1516 *
     1517 * @since 2.9.0
     1518 * @param string $feature the feature being checked
     1519 * @param string $include the file containing the functions that implement the feature
     1520 */
     1521function require_if_theme_supports( $feature, $include) {
     1522    if ( current_theme_supports( $feature ) )
     1523        require ( $include );
     1524}
     1525
     1526/**
    15151527 * Checks an attachment being deleted to see if it's a header or background image.
    15161528 *
Note: See TracChangeset for help on using the changeset viewer.