'#ffffff', 'default-image' => '', ) ) ); // WooCommerce if ( blockst_is_woocommerce_activated() ) { add_theme_support( 'woocommerce', array( 'thumbnail_image_width' => 270, 'gallery_thumbnail_image_width' => 68, 'single_image_width' => 554, 'product_grid' => array( 'default_columns' => 4, 'default_rows' => 2, ), ) ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } // Gutenberg add_theme_support( 'align-wide' ); add_theme_support( 'responsive-embeds' ); add_theme_support( 'editor-styles' ); add_editor_style(); add_theme_support( 'custom-spacing' ); add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Primary', 'blockst' ), 'slug' => 'primary', 'color' => get_theme_mod( 'blockst_settings_primary_color', '#6364a5' ), ), array( 'name' => esc_html__( 'Secondary', 'blockst' ), 'slug' => 'secondary', 'color' => get_theme_mod( 'blockst_settings_headings_color', '#3c3c46' ), ), array( 'name' => esc_html__( 'Tertiary', 'blockst' ), 'slug' => 'tertiary', 'color' => get_theme_mod( 'blockst_settings_text_color', '#54545f' ), ), array( 'name' => esc_html__( 'Quaternary', 'blockst' ), 'slug' => 'quaternary', 'color' => get_theme_mod( 'blockst_settings_background_light_color', '#f6f7fc' ), ), array( 'name' => esc_html__( 'White', 'blockst' ), 'slug' => 'white', 'color' => '#ffffff', ), array( 'name' => esc_html__( 'Black', 'blockst' ), 'slug' => 'black', 'color' => '#000000', ) ) ); // Thumbnails add_image_size( 'blockst_thumbnail', 68, 68, true ); add_image_size( 'blockst_featured_medium', 400, 0, false ); add_image_size( 'blockst_featured_large', 752, 0, false ); // Nav menus register_nav_menus( array( 'primary-menu' => esc_html__( 'Primary Menu', 'blockst' ), 'footer-bottom-menu' => esc_html__( 'Footer Bottom Menu', 'blockst' ), ) ); // Disable WooCommerce wizard redirect add_filter( 'woocommerce_enable_setup_wizard', '__return_false' ); add_filter( 'woocommerce_show_admin_notice', '__return_false' ); add_filter( 'woocommerce_prevent_automatic_wizard_redirect', '__return_false' ); // Disable Kirki telemetry add_filter( 'kirki_telemetry', '__return_false' ); // Allow shorcodes in text widgets add_filter( 'widget_text', 'do_shortcode' ); } } // theme_setup add_action( 'after_setup_theme', 'blockst_setup' ); // Disable Woo Variation Swatches activation redirect if ( class_exists( 'Woo_Variation_Swatches' ) ) { remove_action( 'admin_init', array( Woo_Variation_Swatches(), 'after_plugin_active' ) ); } /** * Register widget areas. */ function blockst_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Blog Sidebar', 'blockst' ), 'id' => 'blockst-blog-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Page Sidebar', 'blockst' ), 'id' => 'blockst-page-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer Column 1', 'blockst' ), 'id' => 'blockst-footer-col-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); if ( get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-50-25-25' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-5' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-4' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-3' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-2' ) { register_sidebar( array( 'name' => esc_html__( 'Footer Column 2', 'blockst' ), 'id' => 'blockst-footer-col-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } if ( get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-50-25-25' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-5' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-4' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-3' ) { register_sidebar( array( 'name' => esc_html__( 'Footer Column 3', 'blockst' ), 'id' => 'blockst-footer-col-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } if ( get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-5' || get_theme_mod( 'blockst_settings_footer_columns', 'footer-col-50-25-25' ) == 'footer-col-4' ) { register_sidebar( array( 'name' => esc_html__( 'Footer Column 4', 'blockst' ), 'id' => 'blockst-footer-col-4', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'blockst_widgets_init' );