403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.216.146
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : www ( 1000)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.6/wp-content/themes/woodmart/inc/integrations/visual-composer/fields/new/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.6/wp-content/themes/woodmart/inc/integrations/visual-composer/fields/new/fonts.php
<?php
/**
 * This file has function for rendering dropdown field.
 *
 * @package woodmart.
 */

use XTS\Admin\Modules\Options\Google_Fonts\Google_Fonts;

if ( ! defined( 'WOODMART_THEME_DIR' ) ) {
	exit( 'No direct script access allowed' );
}

if ( ! function_exists( 'woodmart_get_fonts_param' ) ) {
	/**
	 * This function rendering dropdown field.
	 *
	 * @param array  $settings Settings.
	 * @param string $value    Value.
	 *
	 * @return false|string
	 */
	function woodmart_get_fonts_param( $settings, $value ) {
		$settings['style']         = 'select';
		$settings['devices']       = array(
			'desktop' => array(
				'value' => '',
			),
		);
		$settings['value']         = array(
			esc_html__( 'Default', 'woodmart' ) => '',
		);
		$settings['options_group'] = array();

		// From theme settings.
		$secondary_font = woodmart_get_opt( 'secondary-font' );
		$primary_font   = woodmart_get_opt( 'primary-font' );

		if ( isset( $secondary_font[0] ) && ! empty( $secondary_font[0]['font-family'] ) ) {
			$secondary_font_title = isset( $secondary_font[0]['font-family'] ) ? esc_html__( 'Secondary font', 'woodmart' ) . ' (' . $secondary_font[0]['font-family'] . ')' : esc_html__( 'Secondary font', 'woodmart' );

			$settings['options_group'][ esc_html__( 'Theme fonts', 'woodmart' ) ][ $secondary_font_title ] = $secondary_font[0]['font-family'];
		}

		if ( isset( $primary_font[0] ) && ! empty( $primary_font[0]['font-family'] ) ) {
			$primary_font_title = isset( $primary_font[0]['font-family'] ) ? esc_html__( 'Title font', 'woodmart' ) . ' (' . $primary_font[0]['font-family'] . ')' : esc_html__( 'Title', 'woodmart' );

			$settings['options_group'][ esc_html__( 'Theme fonts', 'woodmart' ) ][ $primary_font_title ] = $primary_font[0]['font-family'];
		}

		// Custom fonts.
		$custom_fonts_data = woodmart_get_opt( 'multi_custom_fonts' );

		if ( isset( $custom_fonts_data['{{index}}'] ) ) {
			unset( $custom_fonts_data['{{index}}'] );
		}

		if ( is_array( $custom_fonts_data ) ) {
			foreach ( $custom_fonts_data as $font ) {
				if ( ! $font['font-name'] ) {
					continue;
				}

				$settings['options_group'][ esc_html__( 'Custom fonts', 'woodmart' ) ][ $font['font-name'] ] = $font['font-name'];
			}
		}

		// System fonts.
		$system_fonts = woodmart_get_config( 'standard-fonts' );

		foreach ( $system_fonts as $font => $title ) {
			$settings['options_group'][ esc_html__( 'System fonts', 'woodmart' ) ][ $title ] = $font;
		}

		// Typekit fonts.
		$typekit_fonts = woodmart_get_opt( 'typekit_fonts' );

		if ( $typekit_fonts ) {
			$typekit = explode( ',', $typekit_fonts );
			foreach ( $typekit as $font ) {
				$settings['options_group'][ esc_html__( 'Adobe fonts', 'woodmart' ) ][ ucfirst( trim( $font ) ) ] = trim( $font );
			}
		}

		// Google fonts.
		$google_fonts = Google_Fonts::$all_google_fonts;

		if ( $google_fonts ) {
			foreach ( $google_fonts as $font => $data ) {
				$settings['options_group'][ esc_html__( 'Google fonts', 'woodmart' ) ][ ucfirst( trim( $font ) ) ] = trim( $font );
			}
		}

		return woodmart_get_select_param( $settings, $value );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit