WordPress at a glance
function is not described

require_if_theme_supports() WP 2.9.0

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

No Hooks.

Return

true|false. True if the current theme supports the supplied feature, false otherwise.

Usage

require_if_theme_supports( $feature, $include );
$feature(string) (required)
The feature being checked. See add_theme_support() for the list of possible values.
$include(string) (required)
Path to the file.

Changelog

Since 2.9.0 Introduced.

Code of require_if_theme_supports() WP 5.7.2

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