?
| Current Path : /home/webyoo/www/zohar/site/wp-content/themes/accu/kirki/options/ |
| Current File : /home/webyoo/www/zohar/site/wp-content/themes/accu/kirki/options/custom-js.php |
<?php
$config = accu_kirki_config();
ACCU_Kirki::add_section( 'dt_custom_js_section', array(
'title' => esc_html__( 'Additional JS', 'accu' ),
'priority' => 210
) );
# custom-js
ACCU_Kirki::add_field( $config, array(
'type' => 'switch',
'settings' => 'enable-custom-js',
'section' => 'dt_custom_js_section',
'label' => esc_html__( 'Enable Custom JS?', 'accu' ),
'default' => accu_defaults('enable-custom-js'),
'choices' => array(
'on' => esc_attr__( 'Yes', 'accu' ),
'off' => esc_attr__( 'No', 'accu' )
)
));
# custom-js
ACCU_Kirki::add_field( $config, array(
'type' => 'code',
'settings' => 'custom-js',
'section' => 'dt_custom_js_section',
'transport' => 'postMessage',
'label' => esc_html__( 'Add Custom JS', 'accu' ),
'choices' => array(
'language' => 'javascript',
'theme' => 'dark',
),
'active_callback' => array(
array( 'setting' => 'enable-custom-js' , 'operator' => '==', 'value' =>'1')
)
));