HEX
Server: Apache
System: Linux cds-alphanode.dnscapweb.net 4.18.0-553.63.1.el8_10.x86_64 #1 SMP Mon Jul 21 10:37:28 EDT 2025 x86_64
User: marvidson (1030)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/marvidson/public_html/wp-content/plugins/meta-box/inc/helpers/value.php
<?php
/**
 * Helper functions for checking values.
 *
 * @package Meta Box
 */

/**
 * Helper class for checking values.
 *
 * @package Meta Box
 */
class RWMB_Helpers_Value {
	/**
	 * Check if a value is valid for field (not empty "WordPress way"), e.g. equals to empty string or array.
	 *
	 * @param mixed $value Input value.
	 * @return bool
	 */
	public static function is_valid_for_field( $value ) {
		return '' !== $value && [] !== $value;
	}

	/**
	 * Check if a value is valid for attribute.
	 *
	 * @param mixed $value Input value.
	 * @return bool
	 */
	public static function is_valid_for_attribute( $value ) {
		return '' !== $value && false !== $value;
	}
}