HEX
Server: Apache/2
System: Linux saturn 4.18.0-477.15.1.lve.2.el8.x86_64 #1 SMP Wed Aug 2 10:43:45 UTC 2023 x86_64
User: centuryt (1072)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/centuryt/public_html/wp-content/themes/woostify/inc/customizer/sections/sidebar/sidebar.php
<?php
/**
 * Sidebar customizer
 *
 * @package woostify
 */

// Default values.
$defaults = woostify_options();

// Default sidebar.
$wp_customize->add_setting(
	'woostify_setting[sidebar_default]',
	array(
		'default'           => $defaults['sidebar_default'],
		'sanitize_callback' => 'woostify_sanitize_choices',
		'type'              => 'option',
	)
);
$wp_customize->add_control(
	new WP_Customize_Control(
		$wp_customize,
		'woostify_setting[sidebar_default]',
		array(
			'label'    => __( 'Default', 'woostify' ),
			'section'  => 'woostify_sidebar',
			'settings' => 'woostify_setting[sidebar_default]',
			'type'     => 'select',
			'choices'  => apply_filters(
				'woostify_setting_sidebar_default_choices',
				array(
					'full'  => __( 'No sidebar', 'woostify' ),
					'left'  => __( 'Left sidebar', 'woostify' ),
					'right' => __( 'Right sidebar', 'woostify' ),
				)
			),
		)
	)
);

// Page sidebar.
$wp_customize->add_setting(
	'woostify_setting[sidebar_page]',
	array(
		'default'           => $defaults['sidebar_page'],
		'sanitize_callback' => 'woostify_sanitize_choices',
		'type'              => 'option',
	)
);
$wp_customize->add_control(
	new WP_Customize_Control(
		$wp_customize,
		'woostify_setting[sidebar_page]',
		array(
			'label'    => __( 'Page', 'woostify' ),
			'section'  => 'woostify_sidebar',
			'settings' => 'woostify_setting[sidebar_page]',
			'type'     => 'select',
			'choices'  => apply_filters(
				'woostify_setting_sidebar_page_choices',
				array(
					'default' => __( 'Default', 'woostify' ),
					'full'    => __( 'No sidebar', 'woostify' ),
					'left'    => __( 'Left sidebar', 'woostify' ),
					'right'   => __( 'Right sidebar', 'woostify' ),
				)
			),
		)
	)
);

// Blog sidebar divider.
$wp_customize->add_setting(
	'blog_sidebar_divider',
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);
$wp_customize->add_control(
	new Woostify_Divider_Control(
		$wp_customize,
		'blog_sidebar_divider',
		array(
			'section'  => 'woostify_sidebar',
			'settings' => 'blog_sidebar_divider',
			'type'     => 'divider',
		)
	)
);

// Blog archive sidebar.
$wp_customize->add_setting(
	'woostify_setting[sidebar_blog]',
	array(
		'default'           => $defaults['sidebar_blog'],
		'sanitize_callback' => 'woostify_sanitize_choices',
		'type'              => 'option',
	)
);
$wp_customize->add_control(
	new WP_Customize_Control(
		$wp_customize,
		'woostify_setting[sidebar_blog]',
		array(
			'label'    => __( 'Blog List', 'woostify' ),
			'section'  => 'woostify_sidebar',
			'settings' => 'woostify_setting[sidebar_blog]',
			'type'     => 'select',
			'choices'  => apply_filters(
				'woostify_setting_sidebar_blog_choices',
				array(
					'default' => __( 'Default', 'woostify' ),
					'full'    => __( 'No sidebar', 'woostify' ),
					'left'    => __( 'Left sidebar', 'woostify' ),
					'right'   => __( 'Right sidebar', 'woostify' ),
				)
			),
		)
	)
);

// Blog single sidebar.
$wp_customize->add_setting(
	'woostify_setting[sidebar_blog_single]',
	array(
		'default'           => $defaults['sidebar_blog_single'],
		'sanitize_callback' => 'woostify_sanitize_choices',
		'type'              => 'option',
	)
);
$wp_customize->add_control(
	new WP_Customize_Control(
		$wp_customize,
		'woostify_setting[sidebar_blog_single]',
		array(
			'label'    => __( 'Blog Single', 'woostify' ),
			'section'  => 'woostify_sidebar',
			'settings' => 'woostify_setting[sidebar_blog_single]',
			'type'     => 'select',
			'choices'  => apply_filters(
				'woostify_setting_sidebar_blog_single_choices',
				array(
					'default' => __( 'Default', 'woostify' ),
					'full'    => __( 'No sidebar', 'woostify' ),
					'left'    => __( 'Left sidebar', 'woostify' ),
					'right'   => __( 'Right sidebar', 'woostify' ),
				)
			),
		)
	)
);

if ( class_exists( 'woocommerce' ) ) {
	// woocommerce divider.
	$wp_customize->add_setting(
		'woocommerce_sidebar_divider',
		array(
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		new Woostify_Divider_Control(
			$wp_customize,
			'woocommerce_sidebar_divider',
			array(
				'section'  => 'woostify_sidebar',
				'settings' => 'woocommerce_sidebar_divider',
				'type'     => 'divider',
			)
		)
	);

	// Shop page sidebar.
	$wp_customize->add_setting(
		'woostify_setting[sidebar_shop]',
		array(
			'default'           => $defaults['sidebar_shop'],
			'sanitize_callback' => 'woostify_sanitize_choices',
			'type'              => 'option',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Control(
			$wp_customize,
			'woostify_setting[sidebar_shop]',
			array(
				'label'    => __( 'Shop/Product Archive', 'woostify' ),
				'section'  => 'woostify_sidebar',
				'settings' => 'woostify_setting[sidebar_shop]',
				'type'     => 'select',
				'choices'  => apply_filters(
					'woostify_setting_sidebar_shop_choices',
					array(
						'default'   => __( 'Default', 'woostify' ),
						'full'      => __( 'No sidebar', 'woostify' ),
						'left'      => __( 'Left sidebar', 'woostify' ),
						'right'     => __( 'Right sidebar', 'woostify' ),
						'offcanvas' => __( 'Offcanvas sidebar', 'woostify' ),
					)
				),
			)
		)
	);

	// Product page sidebar.
	$wp_customize->add_setting(
		'woostify_setting[sidebar_shop_single]',
		array(
			'default'           => $defaults['sidebar_shop_single'],
			'sanitize_callback' => 'woostify_sanitize_choices',
			'type'              => 'option',
		)
	);

	$wp_customize->add_control(
		new WP_Customize_Control(
			$wp_customize,
			'woostify_setting[sidebar_shop_single]',
			array(
				'label'    => __( 'Shop Single', 'woostify' ),
				'section'  => 'woostify_sidebar',
				'settings' => 'woostify_setting[sidebar_shop_single]',
				'type'     => 'select',
				'choices'  => apply_filters(
					'woostify_setting_sidebar_shop_single_choices',
					array(
						'default' => __( 'Default', 'woostify' ),
						'full'    => __( 'No sidebar', 'woostify' ),
						'left'    => __( 'Left sidebar', 'woostify' ),
						'right'   => __( 'Right sidebar', 'woostify' ),
					)
				),
			)
		)
	);
}

// Blog sidebar divider.
$wp_customize->add_setting(
	'width_sidebar_divider',
	array(
		'sanitize_callback' => 'sanitize_text_field',
	)
);
$wp_customize->add_control(
	new Woostify_Divider_Control(
		$wp_customize,
		'width_sidebar_divider',
		array(
			'section'  => 'woostify_sidebar',
			'settings' => 'width_sidebar_divider',
			'type'     => 'divider',
		)
	)
);

// Width.
$wp_customize->add_setting(
	'woostify_setting[sidebar_width]',
	array(
		'default'           => $defaults['sidebar_width'],
		'sanitize_callback' => 'absint',
		'type'              => 'option',
		'transport'         => 'postMessage',
	)
);
$wp_customize->add_control(
	new Woostify_Range_Slider_Control(
		$wp_customize,
		'woostify_setting[sidebar_width]',
		array(
			'label'    => __( 'Sidebar Width', 'woostify' ),
			'section'  => 'woostify_sidebar',
			'settings' => array(
				'desktop' => 'woostify_setting[sidebar_width]',
			),
			'choices'  => array(
				'desktop' => array(
					'min'  => apply_filters( 'woostify_sidebar_width_min_step', 0 ),
					'max'  => apply_filters( 'woostify_sidebar_width_max_step', 50 ),
					'step' => 1,
					'edit' => true,
					'unit' => '%',
				),
			),
		)
	)
);