<commit_before><?php
/**
 * The template part that displays a single gallery post in archives.
 *
 * @package Gumbo
 * @since Gumbo 1.0
 */
?>

<?php tha_entry_before(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php tha_entry_top(); ?>
	
	<header class="entry-header">
		<a href="<?php the_permalink(); ?>"
			title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'gumbo' ), the_title_attribute( 'echo=0' ) ) ); ?>"
			rel="bookmark">
			<?php
			if ( has_post_thumbnail() ) :
				the_post_thumbnail( 'thsp-archives-featured', array( 'class' => 'entry-featured' ) );
			endif; // has_post_thumbnail()
			?>		
			
			<?php $count = count( get_post_gallery_images( $post ) ); ?>
			<h1 class="entry-title"><?php the_title(); ?> <span>(<?php echo $count; ?> <?php _e( 'images', 'gumbo' ); ?>)</span>
			</h1>
		</a>
	</header>

	<?php gumbo_post_meta_bottom_compact(); ?>
		
<?php tha_entry_bottom(); ?>
</article>
<!-- #post-<?php the_ID(); ?> -->
<?php tha_entry_after(); ?><commit_msg>Updated Halfje-Bruin Gumbo theme to add support for FooGallery<commit_after><?php
/**
 * The template part that displays a single gallery post in archives.
 *
 * @package Gumbo
 * @since Gumbo 1.0
 */
?>

<?php tha_entry_before(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php tha_entry_top(); ?>
	
	<header class="entry-header">
		<a href="<?php the_permalink(); ?>"
			title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'gumbo' ), the_title_attribute( 'echo=0' ) ) ); ?>"
			rel="bookmark">
			<?php
			$shortcodes = foogallery_extract_gallery_shortcodes(get_the_content());
			$count = 0;

			if (empty($shortcodes))
			{
				if ( has_post_thumbnail() ) the_post_thumbnail( 'thsp-archives-featured', array( 'class' => 'entry-featured' ) );
				$count = count( get_post_gallery_images( $post ) );
			}
			else
			{
				$id = array_keys($shortcodes)[0];
				$fg = FooGallery::get_by_id($id);
				$feat_id = $fg->find_featured_attachment_id();
				if ( $feat_id && $image = @wp_get_attachment_image( $feat_id, 'thsp-archives-featured', false, array( 'class' => 'entry-featured' ) ) )
				{
					echo $image;
				}
				$count = count( $fg->attachments() );
			}
			?>
			
			<h1 class="entry-title"><?php the_title(); ?> <span>(<?php echo $count; ?> <?php _e( 'images', 'gumbo' ); ?>)</span>
			</h1>
		</a>
	</header>

	<?php gumbo_post_meta_bottom_compact(); ?>
		
<?php tha_entry_bottom(); ?>
</article>
<!-- #post-<?php the_ID(); ?> -->
<?php tha_entry_after(); ?>
{'fraction_non_alphanumeric': 0.2133492252681764, 'fraction_numerical': 0.004767580452920143, 'mean_word_length': 4.056224899598393, 'pattern_counts': {'":': 0, '<': 56, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3741609', 'n_tokens_mistral': 1048, 'n_tokens_neox': 934, 'n_words': 193}