HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux bareserver 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: root (0)
PHP: 7.2.24-0ubuntu0.18.04.17
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/site/newsite/wp-content/themes/ooze/inc/customizer/theme-options/night-mode.php
<?php
$wp_customize->add_section(
	'dark_mode_options',
	array(
		'title' => __( 'Dark Mode Options', 'ooze' ),
        'panel' => 'ooze_option_panel',
	)
);

/*Enable Dark Mode*/
$wp_customize->add_setting(
	'ooze_options[enable_dark_mode]',
	array(
		'default'           => $default_options['enable_dark_mode'],
		'sanitize_callback' => 'ooze_sanitize_checkbox',
	)
);
$wp_customize->add_control(
	'ooze_options[enable_dark_mode]',
	array(
		'label'   => __( 'Enable Dark Mode', 'ooze' ),
		'section' => 'dark_mode_options',
		'type'    => 'checkbox',
	)
);

/*Enable Dark Mode Switcher*/
$wp_customize->add_setting(
	'ooze_options[enable_dark_mode_switcher]',
	array(
		'default'           => $default_options['enable_dark_mode_switcher'],
		'sanitize_callback' => 'ooze_sanitize_checkbox',
	)
);
$wp_customize->add_control(
	'ooze_options[enable_dark_mode_switcher]',
	array(
		'label'           => __( 'Enable Light/Dark Mode Toggle button', 'ooze' ),
		'section'         => 'dark_mode_options',
		'type'            => 'checkbox',
		'active_callback' => 'ooze_is_dark_mode_enabled',
	)
);

/*Dark Mode Background Color*/
$wp_customize->add_setting(
	'ooze_options[dark_mode_bg_color]',
	array(
		'default'           => $default_options['dark_mode_bg_color'],
		'sanitize_callback' => 'sanitize_hex_color',
	)
);
$wp_customize->add_control(
	new WP_Customize_Color_Control(
		$wp_customize,
		'ooze_options[dark_mode_bg_color]',
		array(
			'label'           => __( 'Dark Mode Background Color', 'ooze' ),
			'description'     => __( 'Only choose color that have enough contrast to go with accent color.', 'ooze' ),
			'section'         => 'dark_mode_options',
			'type'            => 'color',
			'active_callback' => 'ooze_is_dark_mode_enabled',
		)
	)
);


/*Dark Mode Text Color*/
$wp_customize->add_setting(
	'ooze_options[dark_mode_text_color]',
	array(
		'default'           => $default_options['dark_mode_text_color'],
		'sanitize_callback' => 'sanitize_hex_color',
	)
);
$wp_customize->add_control(
	new WP_Customize_Color_Control(
		$wp_customize,
		'ooze_options[dark_mode_text_color]',
		array(
			'label'           => __( 'Dark Mode Text Color', 'ooze' ),
			'description'     => __( 'Only choose color that have enough contrast to go with Background color.', 'ooze' ),
			'section'         => 'dark_mode_options',
			'type'            => 'color',
			'active_callback' => 'ooze_is_dark_mode_enabled',
		)
	)
);


/*Dark Mode Accent Color*/
$wp_customize->add_setting(
	'ooze_options[dark_mode_accent_color]',
	array(
		'default'           => $default_options['dark_mode_accent_color'],
		'sanitize_callback' => 'sanitize_hex_color',
	)
);
$wp_customize->add_control(
	new WP_Customize_Color_Control(
		$wp_customize,
		'ooze_options[dark_mode_accent_color]',
		array(
			'label'           => __( 'Dark Mode Accent Color', 'ooze' ),
			'description'     => __( 'Only choose color that have enough contrast to go with the dark background.', 'ooze' ),
			'section'         => 'dark_mode_options',
			'type'            => 'color',
			'active_callback' => 'ooze_is_dark_mode_enabled',
		)
	)
);