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(), ); //add new settings require get_stylesheet_directory().'/inc/settings.php'; add_action( 'wp_enqueue_scripts', 'storefront_business_styles' ); define('storefront_business_theme_uri', 'https://www.ceylonthemes.com/product/wordpress-storefront-theme/'); function storefront_business_styles() { //enqueue parent styles wp_enqueue_style( 'new-york-business-style', get_template_directory_uri().'/style.css' ); wp_enqueue_style( 'storefront-business-styles', get_stylesheet_directory_uri(). '/style.css', array('new-york-business-style')); } add_action( 'after_setup_theme', 'storefront_business_default_header' ); /** * Add Default Custom Header Image To Twenty Fourteen Theme * * @return void */ function storefront_business_default_header() { add_theme_support( 'custom-header', apply_filters( 'storefront_business_custom_header_args', array( 'default-text-color' => '#ffffff', 'default-image' => get_stylesheet_directory_uri() . '/images/header.jpg', 'width' => 1280, 'height' => 300, 'flex-width' => true, 'flex-height' => true, ) ) ); } /* unique id for product slider */ $storefront_business_uniqueue_id = 99; require get_stylesheet_directory().'/inc/custom-fonts.php'; require get_stylesheet_directory().'/inc/product-functions.php'; /** * override parent admin notice **/ function new_york_business_general_admin_notice(){ } function storefront_business_general_admin_notice(){ $msg = sprintf('

%2$s %4$s %6$s %7$s %8$s

', esc_url(storefront_business_theme_uri), esc_html__('See Pro Features', 'storefront-business'), esc_url(storefront_business_THEME_REVIEW_URL), esc_html__('Rate','storefront-business'), esc_url(storefront_business_THEME_DOC), esc_html__('Theme Tutorial','storefront-business'), esc_html__('Dismiss', 'storefront-business'), esc_html__('1. Use Customize -> Theme Option to customize Slider, Navigation, Header Contacts, Banner sections, Header Widgets 2. Install WooCommerce, Drag and drop Theme:Product Categories widget (Use a page builder). ', 'storefront-business')); echo wp_kses_post($msg); } if ( isset( $_GET['storefront_business_notice_dismissed'] ) ){ update_option('storefront_business_notice', 'hide'); } $storefront_business_notice = (get_option('storefront_business_notice', 1)); if($storefront_business_notice != 'hide'){ add_action('admin_notices', 'storefront_business_general_admin_notice'); } /** * 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', 'storefront_business_customizer_settings' ); function storefront_business_customizer_settings( $wp_customize ) { $wp_customize->add_setting( 'header_background', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background', array( 'label' => __('Header Background Color', 'storefront-business'), 'section' => 'colors', 'settings' => 'header_background', ) ) ); //banner section $wp_customize->add_section( 'top_banner' , array( 'title' => __( 'Top Banner', 'storefront-business' ), 'priority' => 1, 'panel' => 'theme_options', ) ); //top banner $wp_customize->add_setting('top_banner_page' , array( 'default' => 0, 'sanitize_callback' => 'absint', )); $wp_customize->add_control('top_banner_page' , array( 'label' => __('Select Top banner (Page)', 'storefront-business' ), 'section' => 'top_banner', 'type'=> 'dropdown-pages', ) ); //widgets section $wp_customize->add_section( 'home_widgets' , array( 'title' => __( 'Home Header Widgets', 'storefront-business' ), 'priority' => 1, 'panel' => 'theme_options', ) ); //top banner $wp_customize->add_setting('top_widgets' , array( 'default' => 'col-sm-3', 'sanitize_callback' => 'new_york_business_sanitize_select', )); $wp_customize->add_control('top_widgets' , array( 'label' => __('Select Number of Widgets', 'storefront-business' ), 'section' => 'home_widgets', 'type'=>'select', 'choices'=>array( 'col-sm-4'=> __('3 Widgets', 'storefront-business' ), 'col-sm-3'=> __('4 Widgets', 'storefront-business' ), 'col-sm-2'=> __('6 Widgets', 'storefront-business' ), ), ) ); } //override parent theme functions function new_york_business_footer_foreground_css(){ $color = esc_attr(get_theme_mod( 'footer_foreground_color', '#191919')) ; /** * * @since storefront-business 1.0 * */ $css = ' .footer-foreground {} .footer-foreground .widget-title, .footer-foreground a, .footer-foreground p, .footer-foreground td, .footer-foreground th, .footer-foreground caption, .footer-foreground li, .footer-foreground h1, .footer-foreground h2, .footer-foreground h3, .footer-foreground h4, .footer-foreground h5, .footer-foreground h6, .footer-foreground .site-info a { color:'.$color.'; } .footer-foreground #today { font-weight: 600; background-color: #3ba0f4; padding: 5px; } .footer-foreground a:hover, .footer-foreground a:active { color:#ccc ; } '; return $css; } //add child theme widget area function storefront_business_widgets_init(){ /* header sidebar */ register_sidebar( array( 'name' => __( 'Home Page Header Widgets', 'storefront-business' ), 'id' => 'header-banner', 'description' => __( 'Add widgets to appear in Header.', 'storefront-business' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'storefront_business_widgets_init' ); /*Display YITH Wishlist Buttons at shop page*/ if (!function_exists('storefront_business_display_yith_wishlist_loop')) { /** * Display YITH Wishlist Buttons at product archive page * */ function storefront_business_display_yith_wishlist_loop() { if(!function_exists('YITH_WCWL')){ return; } echo '
'; echo do_shortcode("[yith_wcwl_add_to_wishlist]"); echo '
'; } } add_action('storefront_business_woocommerce_add_to_wishlist_button', 'storefront_business_display_yith_wishlist_loop', 16); /*Display YITH Quickview Buttons at shop page*/ if (!function_exists('storefront_business_display_yith_quickview_loop')) { /** * Display YITH Wishlist Buttons at product archive page * */ function storefront_business_display_yith_quickview_loop() { if(!function_exists('yith_wcqv_install')){ return; } echo '
'; global $product, $post; $product_id = $post->ID; if (!$product_id) { $product instanceof WC_Product && $product_id = yit_get_prop($product, 'id', true); } $button = ''; if ($product_id) { // get label $button = '
'; } echo wp_kses_post($button); echo '
'; } } add_action('storefront_business_woocommerce_yith_quick_view_button', 'storefront_business_display_yith_quickview_loop', 16); /*Display YITH Compare Buttons at shop page*/ if (!function_exists('storefront_business_display_yith_compare_loop')) { /** * Display YITH Wishlist Buttons at product archive page * */ function storefront_business_display_yith_compare_loop() { if(!class_exists('YITH_Woocompare')){ return; } echo '
'; global $product, $post; $product_id = $post->ID; if (!$product_id) { $product instanceof WC_Product && $product_id = yit_get_prop($product, 'id', true); } $button = ''; if ($product_id) { $button = do_shortcode('[yith_compare_button type="link" button_text=""]'); } echo wp_kses_post($button); echo '
'; } } //$enable_wishlists_on_listings = storefront_business_get_option('enable_wishlists_on_listings', true); //if( $enable_wishlists_on_listings ){ add_action('storefront_business_woocommerce_yith_compare_button', 'storefront_business_display_yith_compare_loop', 16); /* customize settings*/ add_action( 'customize_register', 'storefront_business_customize_register'); //second argument is arbitrary, but cannot have hyphens because php does not allow them in function names. function storefront_business_customize_register( $wp_customize ) { require get_stylesheet_directory().'/inc/slider-options.php'; } define('storefront_business_TEMPLATE_DIR_URI', get_stylesheet_directory_uri());