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/taxonomy-modules.php
<?php
/*======
*
* Taxonomy Listing Styles
*
======*/
	/*====== Style 1 ======*/
	if( !function_exists( 'loquet_taxonomy_style_1' ) ) {

		function loquet_taxonomy_style_1( $term_id = "", $image = "", $title = "", $description = "", $museum_count = "", $label_text = "", $image_size = "loquet-thumbnail-3", $taxonomy = "museum-category" ) {

			$output = "";

			if( !empty( $term_id ) ) {

				$term = get_term( esc_attr( $term_id ), esc_attr( $taxonomy ) );

				if( !empty( $term ) ) {

					$output .= '<div class="gt-item">';
						$output .= '<a href="' . esc_url( get_term_link( $term->term_id, esc_attr( $taxonomy ) ) ) . '" class="gt-link"></a>';

						$output .= '<div class="gt-image">';

							if( $image == "1" ) {

								if( function_exists( 'rwmb_meta' ) ) {

									$image_id = get_term_meta( esc_attr( $term_id ), 'loquet-featured-image', false );

									if( !empty( $image_id ) ) {

										$output .= wp_get_attachment_image( esc_attr( $image_id[0] ), esc_attr( $image_size ) );

									}

								}

							}

						$output .= '</div>';

						$output .= '<div class="gt-content">';

							$output .= '<div class="gt-top">';

								if( $label_text == "1" or $museum_count == "1" ) {

									if( !empty( $label_text_meta ) or !empty( $term->count ) ) {

										if( $label_text == "1" ) {

											$label_text_meta = get_term_meta( esc_attr( $term_id ), 'loquet-label-text', false );

											if( !empty( $label_text_meta ) ) {

												if( !empty( $label_text_meta[0] ) ) {

														$output .= '<ul class="gt-taxonomies gt-style-1">';
															$output .= '<li>';
																$output .= esc_attr( $label_text_meta[0] );
															$output .= '</li>';
														$output .= '</ul>';

												}

											}

										}

										if( $museum_count == "1" ) {

											if( !empty( $term->count ) ) {

													$output .= '<ul class="gt-taxonomies gt-style-2">';
														$output .= '<li>';
															$output .= '<div class="gt-icon">';
																$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-map-pin"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>';
															$output .= '</div>';
															$output .= '<span>';
																$output .= sprintf( esc_html__( '%s Museum', 'loquet' ), esc_attr( $term->count ) );
															$output .= '</span>';
														$output .= '</li>';
													$output .= '</ul>';

											}

										}

									}

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

							if( $title == "1" or $description == "1" ) {

								if( !empty( $term->name ) or !empty( $term->description ) ) {

									$output .= '<div class="gt-bottom">';
										$output .= '<div class="gt-bottom-inner">';

											if( $title == "1" ) {

												if( !empty( $term->name ) ) {

													$output .= '<div class="gt-title">' . esc_attr( $term->name ) . '</div>';

												}

											}

											if( $description == "1" ) {

												if( !empty( $term->description ) ) {

													$output .= '<div class="gt-desc">';
														$output .= wpautop( $term->description );
													$output .= '</div>';

												}

											}

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

								}

							}

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

				}

			}

			return $output;

		}

	}

	/*====== Style 2 ======*/
	if( !function_exists( 'loquet_taxonomy_style_2' ) ) {

		function loquet_taxonomy_style_2( $term_id = "", $image = "", $title = "", $description = "", $museum_count = "", $label_text = "", $image_size = "loquet-thumbnail-3", $taxonomy = "museum-category" ) {

			$output = "";

			if( !empty( $term_id ) ) {

				$term = get_term( esc_attr( $term_id ) );

				$output .= '<div class="gt-item">';

					if( $image == "1" ) {

						if( function_exists( 'rwmb_meta' ) ) {

							$image_id = get_term_meta( esc_attr( $term_id ), 'loquet-featured-image', false );

							if( !empty( $image_id ) ) {

								$output .= '<div class="gt-image">';
									$output .= '<a href="' . esc_url( get_term_link( $term->term_id, esc_attr( $taxonomy ) ) ) . '">';
										$output .= wp_get_attachment_image( esc_attr( $image_id[0] ), esc_attr( $image_size ) );
									$output .= '</a>';
								$output .= '</div>';

							}

						}

					}

					$output .= '<div class="gt-content">';

						if( $title == "1" or $description == "1" ) {

							if( !empty( $term->name ) or !empty( $term->description ) ) {

								$output .= '<div class="gt-header">';

									if( $title == "1" ) {

										if( !empty( $term->name ) ) {

											$output .= '<div class="gt-title">';
												$output .= '<a href="' . esc_url( get_term_link( $term->term_id, esc_attr( $taxonomy ) ) ) . '">' . esc_attr( $term->name ) . '</a>';
											$output .= '</div>';

										}

									}

									if( $description == "1" ) {

										if( !empty( $term->description ) ) {

											$output .= '<div class="gt-text">';
												$output .= wpautop( $term->description );
											$output .= '</div>';

										}

									}

								$output .= '</div>';

							}

						}

						if( $label_text == "1" or $museum_count == "1" ) {

							if( !empty( $label_text_meta ) or !empty( $term->count ) ) {

								$output .= '<div class="gt-bottom">';
									$output .= '<ul>';

										if( $label_text == "1" ) {

											$label_text_meta = get_term_meta( esc_attr( $term_id ), 'loquet-label-text', false );

											if( !empty( $label_text_meta ) ) {

												if( !empty( $label_text_meta[0] ) ) {

													$output .= '<li>';
														$output .= esc_attr( $label_text_meta[0] );
													$output .= '</li>';

												}

											}

										}

										if( $museum_count == "1" ) {

											if( !empty( $term->count ) ) {

												$output .= '<li>';
													$output .= sprintf( esc_html__( '%s Museum', 'loquet' ), esc_attr( $term->count ) );
												$output .= '</li>';

											}

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

							}

						}

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

			}

			return $output;

		}

	}