HEX
Server: Apache/2.4.38 (Debian)
System: Linux host457 5.14.0-4-amd64 #1 SMP Debian 5.14.16-1 (2021-11-03) x86_64
User: www-data (33)
PHP: 7.4.21
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/vhosts/harpoeditore.it/httpdocs/wp-content/themes/dt-the7/inc/class-the7-less-functions.php
<?php
/**
 * The7 Less functions.
 *
 * @package The7
 */

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 The7\Vendor\Lessphp\Compiler|null $less Less compiler.
	 */
	public static function register_functions( The7\Vendor\Lessphp\Compiler $less = null ) {
		if ( $less === null ) {
			return;
		}

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