![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/marketiza-angola.com/wp-content/themes/the-conference/inc/ |
<?php /** * The Conference Woocommerce hooks and functions. * * @link https://docs.woothemes.com/document/third-party-custom-theme-compatibility/ * * @package The Conference */ /** * Woocommerce related hooks */ remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); /** * Declare Woocommerce Support */ function the_conference_woocommerce_support() { global $woocommerce; add_theme_support( 'woocommerce' ); if( version_compare( $woocommerce->version, '3.0', ">=" ) ) { add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } } add_action( 'after_setup_theme', 'the_conference_woocommerce_support'); /** * Woocommerce Sidebar */ function the_conference_wc_widgets_init(){ register_sidebar( array( 'name' => esc_html__( 'Shop Sidebar', 'the-conference' ), 'id' => 'shop-sidebar', 'description' => esc_html__( 'Sidebar displaying only in woocommerce pages.', 'the-conference' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'the_conference_wc_widgets_init' ); /** * Before Content * Wraps all WooCommerce content in wrappers which match the theme markup */ function the_conference_wc_wrapper(){ ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php } add_action( 'woocommerce_before_main_content', 'the_conference_wc_wrapper' ); /** * After Content * Closes the wrapping divs */ function the_conference_wc_wrapper_end(){ ?> </main> </div> <?php do_action( 'the_conference_wo_sidebar' ); } add_action( 'woocommerce_after_main_content', 'the_conference_wc_wrapper_end' ); /** * Callback function for Shop sidebar */ function the_conference_wc_sidebar_cb(){ if( is_active_sidebar( 'shop-sidebar' ) ){ echo '<aside id="secondary" class="widget-area" role="complementary" itemscope itemtype="https://schema.org/WPSideBar">'; dynamic_sidebar( 'shop-sidebar' ); echo '</aside>'; } } add_action( 'the_conference_wo_sidebar', 'the_conference_wc_sidebar_cb' );