mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 06:07:23 +01:00
Add boolean return values to require_if_theme_supports().
props jeffsebring, DrewAPicture. fixes #26716. Built from https://develop.svn.wordpress.org/trunk@27217 git-svn-id: http://core.svn.wordpress.org/trunk@27074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a730c3744a
commit
bb9114f554
@ -1724,12 +1724,17 @@ function current_theme_supports( $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
|
||||
*
|
||||
* @param string $feature The feature being checked.
|
||||
* @param string $include Path to the file.
|
||||
* @return bool True if the current theme supports the supplied feature, false otherwise.
|
||||
*/
|
||||
function require_if_theme_supports( $feature, $include) {
|
||||
if ( current_theme_supports( $feature ) )
|
||||
function require_if_theme_supports( $feature, $include ) {
|
||||
if ( current_theme_supports( $feature ) ) {
|
||||
require ( $include );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user