403Webshell
Server IP : 104.21.74.147  /  Your IP : 216.73.217.154
Web Server : nginx/1.24.0
System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/dynamiccontent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/dynamiccontent/fonts.php
<?php

namespace Cornerstone\DynamicContent\Fonts;

// For reference in option fields
const DC_TYPE = 'globalfont';


// Register Theme option DC UI
add_action('cs_dynamic_content_setup', function() {
  // Global Color
  cornerstone_dynamic_content_register_field([
    'name'  => 'font',
    'group' => 'global',
    'type' => 'mixed',
    'label' => __( 'Font', CS_LOCALIZE ),
    'controls' => [

      // Type
      [
        'key' => 'id',
        'type' => 'select',
        'label' => __('Font', CS_LOCALIZE),
        'options' => [
          'choices' => 'dynamic:' . DC_TYPE,
          'placeholder' => __('Enter Font ID', CS_LOCALIZE),
        ],
      ]

    ],
    'deep' => true,
  ]);

  // Dynamic Option for Global Color
  cs_dynamic_content_register_dynamic_option(DC_TYPE, [
    'key' => DC_TYPE,
    'type' => 'select',
    'label' => __('Global Font', CS_LOCALIZE),
    'options' => [
      'choices' => 'dynamic:' . DC_TYPE,
      'placeholder' => __('Enter Font ID', CS_LOCALIZE),
    ],
  ]);

}, 200);

/**
 * Dynamic Option for all colors
 */
add_filter('cs_dynamic_content_register', function($output = []) {

  cs_dynamic_content_register_dynamic_option('globalfont', [
    'filter' => function($results, $args) {
      $fonts = cs_fonts_get_all();

      foreach ($fonts as $font) {
        $out[] = [
          'value' => $font['_id'],
          'label' => $font['title'],
        ];
      }

      return $out;
    },
  ]);
});

// Filter to use ID arg to either family processing
// or return the raw ID for TSS
add_filter( 'cs_dynamic_content_global_font', function($result, $args = []) {
  if (empty($args['id'])) {
    return 'inherit';
  }

  // If running from TSS, return ID because it will be passed to the TSS function
  // global-ff which just needs the ID
  if (apply_filters('cs_dynamic_content_parameters_as_css', false)) {
    return $args['id'];
  }

  $family = cs_fonts_process($args['id']);

  return $family;
}, 0, 2 );

Youez - 2016 - github.com/yon3zu
LinuXploit