'#ffffff', 'default-image' => get_stylesheet_directory_uri() . '/images/header.jpg', 'width' => 1280, 'height' => 300, 'flex-width' => true, 'flex-height' => true, ) ) ); } // get_parent theme settings and override with child theme settings $ecommerce_storefront_settings = new new_york_business_settings(); $ecommerce_storefront_option = wp_parse_args( get_option( 'new_york_business_option', array() ) , $ecommerce_storefront_settings->default_data()); /* allowed html tags */ $ecommerce_storefront_allowed_html = array( 'a' => array( 'href' => true, 'title' => true, 'class' => true, ), 'option' => array( 'selected' => true, 'value' => true, 'class' => true, ), 'p' => array( 'class' => true, ), 'abbr' => array( 'title' => true, ), 'acronym' => array( 'title' => true, ), 'b' => array(), 'blockquote' => array( 'cite' => true, ), 'cite' => array(), 'code' => array(), 'del' => array( 'datetime' => true, ), 'em' => array(), 'i' => array(), 'q' => array( 'cite' => true, ), 's' => array(), 'strike' => array(), 'strong' => array(), ); /* wp body open */ function ecommerce_storefront_body_open(){ if ( function_exists( 'wp_body_open' ) ) { wp_body_open(); } else { do_action( 'wp_body_open' ); } } add_action('ecommerce_storefront_wp_body_open', 'ecommerce_storefront_body_open'); /** * override parent theme customize control */ if ( class_exists( 'WP_Customize_Control' )) { class new_york_business_pro_Control extends WP_Customize_Control { public function render_content() { ?>
urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url( $fonts_url ); } add_action('after_setup_theme', 'new_york_business_fonts_url'); //call custom fonts add_action('after_setup_theme', 'new_york_business_custom_fonts_css'); //header_background add_action( 'customize_register', 'ecommerce_storefront_customizer_settings' ); function ecommerce_storefront_customizer_settings( $wp_customize ) { //banner section $wp_customize->add_section( 'top_banner' , array( 'title' => __( 'Hero Section', 'ecommerce-storefront' ), 'priority' => 1, 'panel' => 'theme_options', ) ); //hero section $wp_customize->add_setting('new_york_business_option[hero_page]' , array( 'default' => 0, 'sanitize_callback' => 'absint', 'type'=>'option', )); $wp_customize->add_control('new_york_business_option[hero_page]' , array( 'label' => __('Select Hero (Page)', 'ecommerce-storefront' ), 'section' => 'top_banner', 'type'=> 'dropdown-pages', ) ); //product_menu $wp_customize->add_setting('new_york_business_option[product_menu]' , array( 'default' => 1, 'sanitize_callback' => 'new_york_business_sanitize_checkbox', 'type'=>'option', )); $wp_customize->add_control('new_york_business_option[product_menu]' , array( 'label' => __('Add Product Category Menu', 'ecommerce-storefront' ), 'section' => 'header_section', 'type'=> 'checkbox', ) ); // breadcrumb image height $wp_customize->add_setting( 'new_york_business_option[header_image_height]' , array( 'default' => 140, 'sanitize_callback' => 'absint', 'type'=>'option' )); $wp_customize->add_control('new_york_business_option[header_image_height]' , array( 'label' => __('Image Height (Minimum)','ecommerce-storefront' ), 'section' => 'header_image', 'type'=>'number', ) ); } /** * @since 1.0.0 * add product categories links. */ function ecommerce_storefront_nav_wrap() { $wrap = '