$names Constant names, preferred first. * @return bool */ public static function defined_false( array $names ) { foreach ( $names as $name ) { if ( defined( $name ) && false === constant( $name ) ) { return true; } } return false; } /** * True when any of the named constants is defined and truthy. * * @param array $names Constant names, preferred first. * @return bool */ public static function defined_true( array $names ) { foreach ( $names as $name ) { if ( defined( $name ) && constant( $name ) ) { return true; } } return false; } /** * @param string $suffix Suffix after REACTWOO_ATOMIC_. * @param mixed $default Value when the constant does not exist. * @return mixed */ private static function read( $suffix, $default ) { $current = 'REACTWOO_ATOMIC_' . $suffix; if ( defined( $current ) ) { return constant( $current ); } return $default; } }