astra_get_search( string $option = '', string $device = '' )

Adding Wrapper for Search Form.


Description


Parameters

$option

(string) (Optional) Search Option name.

Default value: ''

$device

(string) (Optional) Device name.

Default value: ''


Return

(mixed) Search HTML structure created.


Source

File: inc/markup-extras.php

	function astra_get_search( $option = '', $device = '' ) {
		ob_start();
		?>
		<div class="ast-search-menu-icon slide-search" <?php echo apply_filters( 'astra_search_slide_toggle_data_attrs', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>id="ast-search-form" tabindex="-1">
			<div class="ast-search-icon">
				<a class="slide-search astra-search-icon" aria-label="<?php esc_attr_e( 'Search icon link', 'astra' ); ?>" href="#">
					<span class="screen-reader-text"><?php esc_html_e( 'Search', 'astra' ); ?></span>
					<?php Astra_Icons::get_icons( 'search', true ); ?>
				</a>
			</div>
			<?php astra_get_search_form(); ?>
		</div>
		<?php
		$search_html = ob_get_clean();

		return apply_filters( 'astra_get_search', $search_html, $option, $device );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.