tag. */ do_action('wp_body_open'); } } add_action('after_setup_theme', 'spice_software_dark_setup'); function spice_software_dark_setup() { load_theme_textdomain('spice-software-dark', SPICE_SOFTWARE_DARK_CHILD_TEMPLATE_DIR . '/languages'); /* * Let WordPress manage the document title. */ add_theme_support('title-tag'); // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); //About Theme if(!function_exists( 'spice_software_plus_activate' )) : $theme = wp_get_theme(); // gets the current theme if ( 'Spice Software Dark' == $theme->name) { if ( is_admin() ) { require SPICE_SOFTWARE_DARK_CHILD_TEMPLATE_DIR . '/admin/admin-init.php'; } } endif; } add_action('wp_enqueue_scripts', 'spice_software_dark_enqueue_styles',11); function spice_software_dark_enqueue_styles() { wp_enqueue_style('spice-software-dark-parent-style', SPICE_SOFTWARE_DARK_PARENT_TEMPLATE_DIR_URI . '/style.css', array('bootstrap')); wp_style_add_data('spice-software-dark-parent-style', 'rtl', 'replace' ); wp_style_add_data('spice-software-dark-style', 'rtl', 'replace' ); wp_dequeue_style( 'spice-software-default'); if (get_theme_mod('custom_color_enable') == true) { spice_software_dark_custom_light(); } else { wp_enqueue_style('spice-software-dark-default-style', SPICE_SOFTWARE_DARK_TEMPLATE_DIR_URI . '/assets/css/default.css'); } wp_enqueue_style('spice-software-dark-css', SPICE_SOFTWARE_DARK_TEMPLATE_DIR_URI . '/assets/css/dark.css'); } function spice_software_dark_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } if ( ! function_exists( 'spice_software_plus_activate' ) ): function spic_software_dark_sidebar_enable_customizer($wp_customize) { $wp_customize->add_setting( 'apply_dark_content_enable',array( 'capability' => 'edit_theme_options', 'default' => false, 'sanitize_callback' => 'spice_software_dark_sanitize_checkbox', )); $wp_customize->add_control( 'apply_dark_content_enable', array( 'type' => 'checkbox', 'label' => esc_html__('Click here to apply these settings', 'spice-software-dark'), 'section' => 'content_color_settings', 'priority' => '1', ) ); // link color settings $wp_customize->add_setting('link_color', array( 'capability' => 'edit_theme_options', 'default' => '#D3A656', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'link_color', array( 'label' => esc_html__( 'Skin Color', 'spice-software-dark' ), 'section' => 'theme_style', 'settings' => 'link_color', ) ) ); } add_action('customize_register', 'spic_software_dark_sidebar_enable_customizer',11); endif; function spice_software_dark_custom_style(){?>