'; $form .= do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '"]' ); $form .= ''; return $form; } // Overwrite search in Slide Search and Search Box mode if ( ! function_exists( 'astra_get_search_form' ) ) { function astra_get_search_form( $echo = true ) { $form = dgwt_wcas_astra_search_form(); if ( $echo ) { echo $form; } else { return $form; } } } add_filter( 'astra_get_search_form', function ( $form ) { return dgwt_wcas_astra_search_form(); } ); // Template for Header Cover add_filter( 'astra_addon_get_template', function ( $located, $template_name, $args, $template_path, $default_path ) { if ( $template_name === 'advanced-search/template/header-cover.php' ) { $located = __DIR__ . '/template/header-cover.php'; } return $located; }, 100, 5 ); add_filter( 'dgwt/wcas/form/html', function ( $html ) { // We're removing the 'woocommerce' class on these pages because it makes it impossible to update the cart contents. if ( is_checkout() || is_cart() ) { return preg_replace( '/class="([0-9a-zA-Z-\s]+)woocommerce([0-9a-zA-Z-\s]+)"/m', "class=\"$1$2\"", $html ); } return $html; } ); add_action( 'wp_footer', function () { $header_break_point = dgwt_wcas_astra_header_break_point(); $search_box_type = dgwt_wcas_astra_search_box_type(); // Full Screen Search if ( $search_box_type === 'full-screen' ) { echo '
' . do_shortcode( '[fibosearch layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ) . '
'; } ?>