WP_Speculation_Rules::is_valid_eagerness( mixed $eagerness ): bool

In this article

Checks whether the given speculation rules eagerness is valid.

Parameters

$eagernessmixedrequired
Speculation rules eagerness.

Return

bool True if valid, false otherwise.

Source

public static function is_valid_eagerness( $eagerness ): bool {
	return is_string( $eagerness ) && isset( self::$eagerness_allowlist[ $eagerness ] );
}

Changelog

VersionDescription
7.1.0The $eagerness param now allows mixed and not just string.
6.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.