<?php
/**
 * Enqueue child styles.
 */
function child_enqueue_styles() {
	wp_enqueue_style( 'child-theme', get_stylesheet_directory_uri() . '/style.css', array(), 100 );
	}
	add_action( 'wp_enqueue_scripts', 'child_enqueue_styles' );

add_action( 'wp', 'remove_wc_zoom_lightbox_gallery_support', 99 );
   
function remove_wc_zoom_lightbox_gallery_support() { 
   remove_theme_support( 'wc-product-gallery-zoom' );
   remove_theme_support( 'wc-product-gallery-lightbox' );
}

function bw_register_custom_sidebar() {
    register_sidebar( array(
        'name'          => __( 'Industry', 'kadence-child' ),
        'id'            => 'bw_industry-sidebar',
        'description'   => __( 'Custom sidebar for Industry', 'kadence-child' ),
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
        'after_widget'  => '</div>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2>',
    ) );
}
add_action( 'widgets_init', 'bw_register_custom_sidebar' );

/* Enable auto-updates of plugins/themes on Flywheel */
add_action(
    'wp_update_plugins',
    function() {
        if (wp_doing_cron() && ! doing_action('wp_maybe_auto_update')) {
            do_action('wp_maybe_auto_update');
        }
    },
    20
);