HEX
Server: Apache
System: Linux pdx1-shared-a1-31 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: dh_5jabqq (6436002)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/dh_5jabqq/bermudashipwreckarchive.com/wp-content/themes/loquet/includes/search-popup.php
<?php
/*======
*
* Search Popup
*
======*/
if( !function_exists( 'loquet_search_popup' ) ) {

	function loquet_search_popup() {

		/*====== Customizer Settings ======*/
		$skin = get_theme_mod( 'loquet_search_popup_skin', 'light' );
		$search_form_description = get_theme_mod( 'loquet_search_popup_search_form_description', '1' );
		$search_form_description_text = get_theme_mod( 'loquet_search_popup_search_form_description_text', esc_html__( 'Please type here to search text and press enter.', 'loquet' ) );

		/*====== HTML Output ======*/
		$output = "";

		$output .= '<div class="gt-search-box gt-style-1 gt-' . esc_attr( $skin ) . '">';
			$output .= '<div class="gt-search-box-overlay"></div>';
			$output .= '<div class="gt-search-box-container">';
				$output .= '<div class="gt-container">';
					$output .= '<div class="gt-content">';
						$output .= '<form role="search" method="get" action="' . esc_url( home_url( '/' ) ) . '">';
							$output .= '<div class="gt-form-wrapper">';
								$output .= '<input type="text" value="' . esc_attr( get_search_query() ) . '" placeholder="' . esc_html__( 'Type here to search...', 'loquet' ) . '" autocomplete="off" name="s" />';

								$output .= '<button' . ( !empty( $button_class ) ? ' class="' . esc_attr( $button_class ) . '"' : '' ) . '>';
									$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>';
								$output .= '</button>';
							$output .= '</div>';

							$post_type_chooser = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser', '1' );
							$post_type_chooser_all = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_all', '1' );
							$post_type_chooser_posts = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_posts', '1' );
							$post_type_chooser_museums = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_museums', '1' );
							$post_type_chooser_exhibitions = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_exhibitions', '1' );
							$post_type_chooser_collections = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_collections', '1' );
							$post_type_chooser_magazines = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_magazines', '1' );
							$post_type_chooser_products = get_theme_mod( 'loquet_search_popup_search_form_post_type_chooser_products', '1' );

							if( $post_type_chooser == "1" ) {

								if( $post_type_chooser_all == "1" or $post_type_chooser_posts == "1" or $post_type_chooser_museums == "1" or $post_type_chooser_exhibitions == "1" or $post_type_chooser_collections == "1" or $post_type_chooser_magazines == "1" or $post_type_chooser_products == "1" ) {

									$query_var = "";

									if( is_search() ) {

										$query_var = esc_attr( get_query_var( 'post_type', '' ) );

									}

									$output .= '<div class="gt-post-type-select gt-one-select">';

										if( $post_type_chooser_all == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-all" ' . ( empty( $query_var ) ? ' checked' : '' ) . ' name="post_type" value="" />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-all">' . esc_html__( 'All', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

										if( $post_type_chooser_posts == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-post" name="post_type" value="post"' . ( $query_var == 'post' ? ' checked' : '' ) . ' />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-post">' . esc_html__( 'Posts', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

										if( $post_type_chooser_museums == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-museum" name="post_type" value="museum"' . ( $query_var == 'museum' ? ' checked' : '' ) . ' />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-museum">' . esc_html__( 'Museums', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

										if( $post_type_chooser_exhibitions == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-exhibition" name="post_type" value="exhibition"' . ( $query_var == 'exhibition' ? ' checked' : '' ) . ' />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-exhibition">' . esc_html__( 'Exhibitions', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

										if( $post_type_chooser_collections == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-collection" name="post_type" value="collection"' . ( $query_var == 'collection' ? ' checked' : '' ) . ' />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-collection">' . esc_html__( 'Collections', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

										if( $post_type_chooser_magazines == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-magazine" name="post_type" value="magazine"' . ( $query_var == 'magazine' ? ' checked' : '' ) . ' />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-magazine">' . esc_html__( 'Magazines', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

										if( $post_type_chooser_products == "1" ) {

											$output .= '<div class="gt-checkbox">';
												$output .= '<input type="checkbox" id="spt-product" name="post_type" value="product"' . ( $query_var == 'product' ? ' checked' : '' ) . ' />';
												$output .= '<svg viewBox="0 0 21 21"> <path d="M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"></path> </svg>';
												$output .= '<span>';
													$output .= '<label for="spt-product">' . esc_html__( 'Products', 'loquet' ) . '</label>';
												$output .= '</span>';
											$output .= '</div>';

										}

									$output .= '</div>';

								}

							}

						$output .= '</form>';


						if( $search_form_description == "1" ) {

							$output .= wpautop( esc_attr( $search_form_description_text ) );

						}

					$output .= '</div>';
				$output .= '</div>';
			$output .= '</div>';
		$output .= '</div>';

		return $output;

	}

}