403Webshell
Server IP : 185.11.201.71  /  Your IP : 192.168.7.18
Web Server : Apache/2.4.29 (Ubuntu)
System : Linux tech-virtual-machine 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : tech ( 1000)
PHP Version : 7.4.28
Disable Function : 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,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wordpress/wp-content/plugins/easy-google-fonts/src/scripts/customizer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wordpress/wp-content/plugins/easy-google-fonts/src/scripts/customizer/settings.js
/**
 * Register Settings
 *
 * Registers the static settings we have defined
 * solely in the customizer and the setting is
 * dynamically saved upon submission.
 *
 * wp.customize.Setting() represents the Model in
 * the customizer.
 */
const { customize } = wp;
const { settings } = egfCustomize;

export const registerSettings = () => {
  customize.bind('ready', () => {
    registerBaseSettings();
    registerSubsettings();
  });
};

const registerBaseSettings = () => {
  const { config, setting_key, saved } = settings;
  for (const id in config) {
    const { default: default_value, transport } = config[id];
    wp.customize.add(
      new customize.Setting(`${setting_key}[${id}]`, saved[id], {
        transport,
        default: default_value,
        type: 'option'
      })
    );
  }
};

const registerSubsettings = () => {
  const { config, setting_key, saved } = settings;

  for (const id in config) {
    if (config[id].type === 'font') {
      const props = [
        'subset',
        'font_id',
        'font_name',
        'font_color',
        'font_weight',
        'font_style',
        'font_weight_style',
        'background_color',
        'stylesheet_url',
        'text_decoration',
        'text_transform',
        'line_height',
        'display',
        'font_size',
        'letter_spacing',
        'margin_top',
        'margin_right',
        'margin_bottom',
        'margin_left',
        'padding_top',
        'padding_right',
        'padding_bottom',
        'padding_left',
        'border_radius_top_left',
        'border_radius_top_right',
        'border_radius_bottom_left',
        'border_radius_bottom_right',
        'border_top_color',
        'border_top_style',
        'border_top_width',
        'border_bottom_color',
        'border_bottom_style',
        'border_bottom_width',
        'border_left_color',
        'border_left_style',
        'border_left_width',
        'border_right_color',
        'border_right_style',
        'border_right_width'
      ];

      const { default: default_value, transport } = config[id];

      props.forEach(prop => {
        customize.add(
          new customize.Setting(`${setting_key}[${id}][${prop}]`, saved[id][prop], {
            transport,
            default: default_value[prop],
            type: 'option'
          })
        );
      });
    }
  }
};

Youez - 2016 - github.com/yon3zu
LinuXploit