Un motore di ricerca WordPress per sviluppatori e autori di temi



require_if_theme_supports ›

Da2.9.0
Deprecaton/a
require_if_theme_supports ( $feature, $include )
Parametri: (2)
  • (string) $feature The feature being checked.
    Richiesto:
  • (string) $include Path to the file.
    Richiesto:
Ritorna:
  • (bool) True if the current theme supports the supplied feature, false otherwise.
Definito a:
Codex:

Checks a theme's support for a given feature before loading the functions which implement it.



Sorgenti

function require_if_theme_supports( $feature, $include ) {
	if ( current_theme_supports( $feature ) ) {
		require( $include );
		return true;
	}
	return false;
}