wordpress/wp-content/themes/basic/themify/themify-icon-picker/includes/class-icon-fontello.php
/**
	 * Gets the path to the Fontello assets
	 * Extracts the uploaded package file automatically if necessary
	 *
	 * @return array|bool
	 */
Gets the path to the Fontello assets
Extracts the uploaded package file automatically if necessary

@return array|bool
Gets the path to the Fontello assets Extracts the uploaded package file automatically if necessary @return array|bool
private static function run() {
		$fontello = self::get_php_dir(true);
		if(is_file($fontello)){
			return true;
		}
		$dest = self::get_upload_dir();
		if ( is_file( self::get_config_file() ) ) {
			$result = true;
		}
		else {
			$path = themify_get( self::$setting_key,false,true );
			$upload_dir = themify_upload_dir();
			$path = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $path );
			$result=false;
			if(is_file( $path )){
			    require_once( ABSPATH . 'wp-admin/includes/file.php' );
			    WP_Filesystem();
			    $result = unzip_file( $path, dirname($dest) ); 
			}
		}
		if( $result===true) {
			$svg=$dest.'font/fontello.svg';
			if(is_file($svg)){
				$data = self::parse_svg($svg);
				if(!empty($data) && self::write_file($data)){
					return true;
				}
			}
		}
		return false;
	}
private static function run ( ) { $ fontello = self :: get_php_dir ( true ) ; if ( is_file ( $ fontello ) ) { return true ; } $ dest = self :: get_upload_dir ( ) ; if ( is_file ( self :: get_config_file ( ) ) ) { $ result = true ; } else { $ path = themify_get ( self :: $ setting_key , false , true ) ; $ upload_dir = themify_upload_dir ( ) ; $ path = str_replace ( $ upload_dir [ 'baseurl' ] , $ upload_dir [ 'basedir' ] , $ path ) ; $ result = false ; if ( is_file ( $ path ) ) { require_once ( ABSPATH . 'wp-admin/includes/file.php' ) ; WP_Filesystem ( ) ; $ result = unzip_file ( $ path , dirname ( $ dest ) ) ; } } if ( $ result === true ) { $ svg = $ dest . 'font/fontello.svg' ; if ( is_file ( $ svg ) ) { $ data = self :: parse_svg ( $ svg ) ; if ( ! empty ( $ data ) && self :: write_file ( $ data ) ) { return true ; } } } return false ; }
Gets the path to the Fontello assets
 Extracts the uploaded package file automatically if necessary
Gets the path to the Fontello assets Extracts the uploaded package file automatically if necessary
// get the system path from URL // attempt to extract the file