Ticket #26716: require_if_theme_supports+boolean.diff
File require_if_theme_supports+boolean.diff, 958 bytes (added by , 11 years ago) |
---|
-
wp-includes/theme.php
1723 1723 * Checks a theme's support for a given feature before loading the functions which implement it. 1724 1724 * 1725 1725 * @since 2.9.0 1726 * @param string $feature the feature being checked 1727 * @param string $include the file containing the functions that implement the feature 1726 * @param string $feature The feature being checked. 1727 * @param string $include The file containing the functions that implement the feature. 1728 * @return boolean True if the current theme supports $feature. 1728 1729 */ 1729 function require_if_theme_supports( $feature, $include ) {1730 if ( current_theme_supports( $feature ) ) 1730 function require_if_theme_supports( $feature, $include ) { 1731 if ( current_theme_supports( $feature ) ) { 1731 1732 require ( $include ); 1733 return true; 1734 } 1735 return false; 1732 1736 } 1733 1737 1734 1738 /**