Automattic\WooCommerce\Internal\Admin\Settings
SettingsUISchema::is_settings_value
Whether a value is representable by the Settings UI state contract.
Method of the class: SettingsUISchema{}
No Hooks.
Returns
bool.
Usage
$result = SettingsUISchema::is_settings_value( $value ): bool;
- $value(mixed) (required)
- Candidate value.
SettingsUISchema::is_settings_value() SettingsUISchema::is settings value code WC 11.2.1
private static function is_settings_value( $value ): bool {
if ( null === $value || is_string( $value ) || is_bool( $value ) || is_int( $value ) ) {
return true;
}
if ( is_float( $value ) ) {
return is_finite( $value );
}
return is_array( $value ) && self::is_form_value( $value );
}