<?php if( ! defined( 'ABSPATH' ) ) exit;
	
function live_news_ark_mode_customize_register( $wp_customize ) {
		
		$wp_customize->add_section( 'live_news_ark_mode_options' , array(
			'title'       => __( 'Theme Mode', 'live-news' ),
			'priority'   => 1,
		) );
		
		$wp_customize->add_setting( 'live_news_dark_mode', array (
		    'default' => false,
			'sanitize_callback' => 'live_news_sanitize_checkbox',
		) );
		
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'live_news_dark_mode', array(
			'label'    => __( 'Activate Dark Mode', 'live-news' ),
			'section'  => 'live_news_ark_mode_options',
			'settings' => 'live_news_dark_mode',
			'type' => 'checkbox',
		) ) );
	
}
add_action( 'customize_register', 'live_news_ark_mode_customize_register' );



function live_news_dark_scripts() {	
	if ( get_theme_mod('live_news_dark_mode') ) {
		wp_enqueue_style( 'live_news-dark-css', get_template_directory_uri() . '/css/dark.css' );
	}
}
add_action( 'wp_enqueue_scripts', 'live_news_dark_scripts' );

