public_html/wp-content/themes/LocalTwo/inc/customizer/section__custom-code.php
/**
 * ============================================================================
 * Create controls for section: custom css settings
 * ============================================================================
 */
Create controls for section: custom css settings
Create controls for section : custom css settings
function register_controls_for_custom_code_section( $controls ) {
	$section  = 'custom_code_section';
	$priority = 1;
	$controls[] = array(
		'type'      => 'group_title',
		'setting'   => 'site_group_title_custom_css',
		'label'     => __( 'Custom CSS', 'divertheme' ),
		'section'   => $section,
		'separator' => false,
		'priority'  => $priority ++
	);
	$controls[] = array(
		'type'      => 'checkbox',
		'mode'      => 'toggle',
		'setting'   => 'custom_css_enable',
		'subtitle'  => __( 'Enabling this option will apply custom css to your site', 'divertheme' ),
		'section'   => $section,
		'separator' => false,
		'default'   => custom_css_enable,
		'priority'  => $priority ++
	);
	$controls[] = array(
		'type'        => 'textarea',
		'setting'     => 'custom_css',
		'label'       => __( 'Custom CSS', 'divertheme' ),
		'section'     => $section,
		'placeholder' => __( 'Entry your custom css code here', 'divertheme' ),
		'priority'    => $priority ++
	);
	$controls[] = array(
		'type'      => 'group_title',
		'setting'   => 'site_group_title_custom_js',
		'label'     => __( 'Custom Javascript', 'divertheme' ),
		'section'   => $section,
		'separator' => false,
		'priority'  => $priority ++
	);
	$controls[] = array(
		'type'      => 'checkbox',
		'mode'      => 'toggle',
		'setting'   => 'custom_js_enable',
		'subtitle'  => __( 'Enabling this option will apply custom Javascript to your site', 'divertheme' ),
		'section'   => $section,
		'separator' => false,
		'default'   => custom_js_enable,
		'priority'  => $priority ++
	);
	$controls[] = array(
		'type'        => 'textarea',
		'setting'     => 'custom_js',
		'label'       => __( 'Custom JavaScript', 'divertheme' ),
		'section'     => $section,
		'placeholder' => __( 'Entry your custom js code here', 'divertheme' ),
		'priority'    => $priority ++
	);
	return $controls;
}
function register_controls_for_custom_code_section ( $ controls ) { $ section = 'custom_code_section' ; $ priority = 1 ; $ controls [ ] = array ( 'type' => 'group_title' , 'setting' => 'site_group_title_custom_css' , 'label' => __ ( 'Custom CSS' , 'divertheme' ) , 'section' => $ section , 'separator' => false , 'priority' => $ priority ++ ) ; $ controls [ ] = array ( 'type' => 'checkbox' , 'mode' => 'toggle' , 'setting' => 'custom_css_enable' , 'subtitle' => __ ( 'Enabling this option will apply custom css to your site' , 'divertheme' ) , 'section' => $ section , 'separator' => false , 'default' => custom_css_enable , 'priority' => $ priority ++ ) ; $ controls [ ] = array ( 'type' => 'textarea' , 'setting' => 'custom_css' , 'label' => __ ( 'Custom CSS' , 'divertheme' ) , 'section' => $ section , 'placeholder' => __ ( 'Entry your custom css code here' , 'divertheme' ) , 'priority' => $ priority ++ ) ; $ controls [ ] = array ( 'type' => 'group_title' , 'setting' => 'site_group_title_custom_js' , 'label' => __ ( 'Custom Javascript' , 'divertheme' ) , 'section' => $ section , 'separator' => false , 'priority' => $ priority ++ ) ; $ controls [ ] = array ( 'type' => 'checkbox' , 'mode' => 'toggle' , 'setting' => 'custom_js_enable' , 'subtitle' => __ ( 'Enabling this option will apply custom Javascript to your site' , 'divertheme' ) , 'section' => $ section , 'separator' => false , 'default' => custom_js_enable , 'priority' => $ priority ++ ) ; $ controls [ ] = array ( 'type' => 'textarea' , 'setting' => 'custom_js' , 'label' => __ ( 'Custom JavaScript' , 'divertheme' ) , 'section' => $ section , 'placeholder' => __ ( 'Entry your custom js code here' , 'divertheme' ) , 'priority' => $ priority ++ ) ; return $ controls ; }
Create controls for section: custom css settings
Create controls for section : custom css settings
//Custom CSS Settings Group Title //Enable Custom CSS //Custom CSS //Custom Javascript Settings Group Title //Enable Custom Javascript //Custom JavaScript