403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.147.27.154
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/misswavenigeria.com/wp-content/plugins/siteorigin-panels/widgets/less/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/siteorigin-panels/widgets/less/functions.php
<?php

/**
 * Handler for the LESS function lumlighten and lum darken
 *
 * @param string $type
 *
 * @return array|bool
 */
function origin_widgets_less_lum_change( $args, $type = 'darken' ) {
	if ( !class_exists( 'SiteOrigin_Color_Object' ) ) {
		include plugin_dir_path( __FILE__ ) . '../lib/color.php';
	}

	if ( $args[0] != 'list' ) {
		return false;
	}
	@ list( $a1_type, $a1_value, $a1_unit ) = $args[2][0];
	@ list( $a2_type, $a2_value, $a2_unit ) = $args[2][1];

	if ( $a1_type != 'raw_color' ) {
		return false;
	}

	if ( $a2_type != 'number' ) {
		return false;
	}

	$color = new SiteOrigin_Color_Object( $a1_value );

	if ( $type == 'lighten' ) {
		$color->lum += $a2_value / 100;
	} else {
		$color->lum -= $a2_value / 100;
	}

	return array( 'raw_color', $color->hex );
}

function origin_widgets_less_lumlighten( $args ) {
	return origin_widgets_less_lum_change( $args, 'lighten' );
}

function origin_widgets_less_lumdarken( $args ) {
	return origin_widgets_less_lum_change( $args, 'darken' );
}

/**
 * Less handler function for texture function
 *
 * @return string
 */
function origin_widgets_less_texture( $texture ) {
	if ( $texture[0] != 'list' ) {
		return '';
	}

	$return = '';

	foreach ( $texture[2] as $arg ) {
		if ( $arg[0] == 'keyword' ) {
			$t = $arg[1];

			if ( $t == 'none' ) {
				continue;
			}

			foreach ( SiteOrigin_Panels_Widget::get_image_folders() as $folder => $folder_url ) {
				if ( file_exists( $folder . '/textures/' . $t . '.png' ) ) {
					$return .= 'url(' . esc_url( $folder_url . '/textures/' . $t . '.png' ) . ') repeat ';
					break;
				}
			}
		} elseif ( $arg[0] == 'raw_color' ) {
			$return .= $arg[1] . ' ';
		}
	}

	return trim( $return );
}

/**
 * Less handler function for widgetimage function
 *
 * @return string
 */
function origin_widgets_less_widgetimage( $url ) {
	$the_url = '';

	foreach ( $url[2] as $p ) {
		if ( is_string( $p ) ) {
			$the_url .= $p;
		} elseif ( is_array( $p ) ) {
			$the_url .= $p[1];
		}
	}

	// Search for the appropriate image
	$return_url = '';

	foreach ( SiteOrigin_Panels_Widget::get_image_folders() as $folder => $folder_url ) {
		if ( file_exists( $folder . '/' . $the_url ) ) {
			$return_url = $folder_url . '/' . $the_url;
		}
	}

	if ( is_ssl() ) {
		$return_url = str_replace( 'http://', 'https://', $return_url );
	}

	return $return_url;
}

Youez - 2016 - github.com/yon3zu
LinuXploit