require_if_theme_supports( string $feature, string $include )
Checks a theme’s support for a given feature before loading the functions which implement it.
Description Description
Parameters Parameters
- $feature
-
(string) (Required) The feature being checked.
- $include
-
(string) (Required) Path to the file.
Return Return
(bool) True if the current theme supports the supplied feature, false otherwise.
Source Source
File: wp-includes/theme.php
function require_if_theme_supports( $feature, $include ) { if ( current_theme_supports( $feature ) ) { require( $include ); return true; } return false; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |