tag. */ do_action( 'wp_body_open' ); } } add_action('wp_enqueue_scripts', 'spicepress_dark_theme_css', 999); function spicepress_dark_theme_css() { wp_enqueue_style('spicepress-dark-parent-style', SPICEPRESS_DARK_PARENT_TEMPLATE_DIR_URI . '/style.css'); if (get_theme_mod('custom_color_enable') == true) { spicepress_dark_custom_light(); } else { wp_enqueue_style('spicepress-dark-default-style', SPICEPRESS_DARK_TEMPLATE_DIR_URI . '/css/default.css'); } wp_enqueue_style('spicepress-dark-style', SPICEPRESS_DARK_TEMPLATE_DIR_URI . '/css/dark.css'); wp_enqueue_style('spicepress-dark-media-responsive-css', SPICEPRESS_DARK_TEMPLATE_DIR_URI."/css/media-responsive.css" ); } if ( ! function_exists( 'spicepress_dark_theme_setup' ) ) : function spicepress_dark_theme_setup() { //Load text domain for translation-ready load_theme_textdomain('spicepress-dark', SPICEPRESS_DARK_TEMPLATE_DIR . '/languages'); if ( is_admin() ) { require SPICEPRESS_DARK_TEMPLATE_DIR . '/admin/admin-init.php'; } // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* Let WordPress manage the document title. */ add_theme_support( 'title-tag' ); } endif; add_action( 'after_setup_theme', 'spicepress_dark_theme_setup' ); /** * Import options from SpicePress * */ function spicepress_dark_get_lite_options() { $spicepress_dark_mods = get_option( 'theme_mods_spicepress' ); if ( ! empty( $spicepress_dark_mods ) ) { foreach ( $spicepress_dark_mods as $spicepress_dark_mod_k => $spicepress_dark_mod_v ) { set_theme_mod( $spicepress_dark_mod_k, $spicepress_dark_mod_v ); } } } add_action( 'after_switch_theme', 'spicepress_dark_get_lite_options' ); function spicepress_dark_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } function spicepress_dark_sidebar_enable_customizer($wp_customize) { $wp_customize->add_setting( 'apply_dark_sidebar_enable',array( 'capability' => 'edit_theme_options', 'default' => false, 'sanitize_callback' => 'spicepress_dark_sanitize_checkbox', )); $wp_customize->add_control( 'apply_dark_sidebar_enable', array( 'type' => 'checkbox', 'label' => esc_html__('Click here to apply these settings', 'spicepress-dark'), 'section' => 'sidebar_widget_color_settings', ) ); } add_action('customize_register', 'spicepress_dark_sidebar_enable_customizer'); function spicepress_dark_custom_style(){?>