HEX
Server: LiteSpeed
System: Linux vps338 6.12.0-211.34.1.el10_2.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 15 07:56:02 EDT 2026 x86_64
User: ondernemer (1054)
PHP: 8.3.32
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/ondernemer/public_html/wp-content/themes/dt-the7/inc/class-the7-less-functions.php
<?php
/**
 * The7 Less functions.
 *
 * @package The7
 */

use The7\Vendor\Lessphp\Compiler;

defined( 'ABSPATH' ) || exit;

/**
 * Class The7_Less_Functions
 */
class The7_Less_Functions {

	/**
	 * Escape function.
	 *
	 * @param array $arg
	 *
	 * @return array
	 */
	public static function escape( $arg ) {
		$v = &$arg[2][1][1];
		$v = rawurlencode( $v );

		return $arg;
	}

	/**
	 * Min function.
	 *
	 * @param array $arg
	 *
	 * @return array
	 */
	public static function min( $arg ) {
		list( $type, $sp, $values ) = $arg;

		$unit = '';
		$_values = array();
		foreach ( $values as $value ) {
			$unit = $value[2];
			$_values[] = intval( $value[1] );
		}

		$min = call_user_func_array( 'min', $_values );
		return array( 'number', $min, $unit );
	}

	/**
	 * Register the7_lessc functions.
	 *
	 * @param Compiler|null $less Less compiler.
	 */
	public static function register_functions( ?Compiler $less ) {
		if ( $less === null ) {
			return;
		}

		$less->registerFunction( 'escape', array( __CLASS__, 'escape' ) );
		$less->registerFunction( 'min', array( __CLASS__, 'min' ) );
	}
}