![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/anfangola.com/wp-content/themes/covernews/inc/ |
<?php /** * Custom template images for this theme * * Eventually, some of the functionality here could be replaced by core features. * * @package CoverNews */ if ( ! function_exists( 'covernews_post_thumbnail' ) ) : /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. */ function covernews_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } global $post; if ( is_singular() ) : $theme_class = covernews_get_option('global_image_alignment'); $post_image_alignment = get_post_meta($post->ID, 'covernews-meta-image-options', true); $post_class = !empty($post_image_alignment) ? $post_image_alignment : $theme_class; if ( $post_class != 'no-image' ): ?> <div class="post-thumbnail <?php echo esc_attr($post_class); ?>"> <?php the_post_thumbnail('covernews-featured'); ?> </div> <?php endif; ?> <?php else : $archive_layout = covernews_get_option('archive_layout'); $archive_layout = $archive_layout; $archive_class = ''; if ($archive_layout == 'archive-layout-list') { $archive_image_alignment = covernews_get_option('archive_image_alignment'); $archive_class = $archive_image_alignment; $archive_image = 'medium'; } elseif ($archive_layout == 'archive-layout-full') { $archive_image = 'covernews-medium'; } else { $archive_image = 'post-thumbnail'; } ?> <div class="post-thumbnail <?php echo esc_attr($archive_class); ?>"> <a href="<?php the_permalink(); ?>" aria-hidden="true"> <?php the_post_thumbnail( $archive_image, array( 'alt' => the_title_attribute( array( 'echo' => false, ) ), ) ); ?> </a> </div> <?php endif; // End is_singular(). } endif;