balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

class.add_control.php (1416B)


      1 <?php
      2 namespace CVEC\classes\vc;
      3 
      4 class CVEC_Customize
      5 {
      6 
      7     public static function init()
      8     {
      9         add_action('customize_register', array(__CLASS__, 'register'));
     10     }
     11 
     12     public static function register($wp_customizer)
     13     {
     14         $wp_customizer->add_section('combine_cache_assets',
     15             array(
     16                 'title' => __('Combine VC Elementor CSS Options', 'combine-vc-ele-css'),
     17                 'priority' => 100,
     18                 'capability' => 'edit_theme_options',
     19                 'description' => __('Allows you to customize some settings for Combine VC Elementor CSS.', 'combine-vc-ele-css'),
     20             )
     21         );
     22 
     23         $wp_customizer->add_setting('combine_cache_assets_setting', array(
     24             'default' => 'Clear Cache',
     25             'type' => 'theme_mod',
     26         ));
     27 
     28         $wp_customizer->add_control('combine_cache_assets_button', array(
     29             'type' => 'button',
     30             'priority' => 10, // Within the section.
     31             'section' => 'combine_cache_assets', // Required, core or custom.
     32             'label' => __('Clear Cache'),
     33             'description' => __('Clear Cache.'),
     34             'settings' => 'combine_cache_assets_setting',
     35             'input_attrs' => array(
     36                 'value' => __('Edit Pages', 'textdomain'), // 👈
     37                 'class' => 'button button-primary combine_vc_ele_css', // 👈
     38             ),
     39         ));
     40 
     41     }
     42 
     43 }