HEX
Server: Apache
System: Linux webm020.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: bohousj (181416)
PHP: 8.4.22
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/bohousj/www/wp-content/plugins/ajax-search-for-woocommerce/partials/themes/astra.php
<?php
// Exit if accessed directly
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
	exit;
}

// Astra cut our search using wp_kses(), so we need overwrite whole function, but for 4.0.0.
if ( defined( 'ASTRA_EXT_VER' ) && version_compare( ASTRA_EXT_VER, '4.1.0' ) < 0 ) {
	if ( ! function_exists( 'astra_addon_get_search_form' ) ) {
		function astra_addon_get_search_form( $echo = true ) {
			$result = apply_filters( 'astra_get_search_form', '' );
			if ( $echo ) {
				echo $result;
			} else {
				return $result;
			}
		}
	}
}

// From version 4.1.0 Astra has a filters that can be used to indicate allowed tags and attributes in the search form.
if ( defined( 'ASTRA_EXT_VER' ) && version_compare( ASTRA_EXT_VER, '4.1.0' ) >= 0 ) {
	add_filter( 'astra_addon_form_post_kses_protocols', function ( $args ) {
		$args['input']['id']    = array();
		$args['input']['style'] = array();
		$args['label']          = array(
			'class'  => array(),
			'id'     => array(),
			'style'  => array(),
			'data-*' => true,
			'align'  => array(),
			'for'    => array(),
		);
		$args['button']         = array(
			'class'      => array(),
			'aria-label' => array(),
			'type'       => array(),
		);

		return $args;
	} );

	add_filter( 'safe_style_css', function ( $styles ) {
		$styles[] = 'display';

		return $styles;
	} );
}

$astra_settings           = get_option( 'astra-settings' );
$is_header_footer_builder = isset( $astra_settings['is-header-footer-builder'] ) ? (bool) $astra_settings['is-header-footer-builder'] : true;

if ( $is_header_footer_builder ) {
	require_once 'astra/builder.php';
} else {
	require_once 'astra/legacy.php';
}