Content Card
**Site relevance:** 2IA.org
**Memory type:** theme source memory
**Source path:** 2IA.org/wp-content/themes/twoia-intelligence/template-parts/content-card.php
**Size:** 2.1 KB
Summary
$confidence = function exists( 'twoia get editorial meta display value' ) ? twoia get editorial meta display value( get the ID(), 'twoia confidence label' ) : '';
Source Preview
This source file is short enough to preview directly on its source-memory page.
<?php
/**
* Card content template.
*
* @package TwoIA
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'card briefing-card' ); ?>>
<a class="briefing-card__image-link" href="<?php echo esc_url( get_permalink() ); ?>" aria-label="<?php echo esc_attr( get_the_title() ); ?>">
<?php twoia_post_thumbnail_or_default( 'briefing-card' ); ?>
</a>
<div class="briefing-card__body">
<?php if ( twoia_post_type_label() ) : ?>
<span class="metadata-label"><?php echo esc_html( twoia_post_type_label() ); ?></span>
<?php endif; ?>
<?php twoia_post_categories(); ?>
<h2 class="briefing-card__title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo esc_html( get_the_title() ); ?></a></h2>
<div class="briefing-card__meta">
<time datetime="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time>
<span aria-hidden="true">/</span>
<span><?php echo esc_html( get_the_modified_date() ); ?></span>
<span aria-hidden="true">/</span>
<span><?php echo esc_html( get_the_author() ); ?></span>
<span aria-hidden="true">/</span>
<span><?php echo esc_html( twoia_reading_time() ); ?></span>
</div>
<?php
$confidence = function_exists( 'twoia_get_editorial_meta_display_value' ) ? twoia_get_editorial_meta_display_value( get_the_ID(), 'twoia_confidence_label' ) : '';
$reply = function_exists( 'twoia_get_editorial_meta_display_value' ) ? twoia_get_editorial_meta_display_value( get_the_ID(), 'twoia_reply_status' ) : '';
?>
<?php if ( $confidence || $reply ) : ?>
<div class="briefing-card__status">
<?php if ( $confidence && __( 'Not labeled', 'two-identities-anonymous' ) !== $confidence ) : ?>
<span><?php echo esc_html( $confidence ); ?></span>
<?php endif; ?>
<?php if ( $reply ) : ?>
<span><?php echo esc_html( wp_trim_words( $reply, 6, '...' ) ); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<p><?php echo esc_html( twoia_get_the_excerpt( 28 ) ); ?></p>
<a class="read-more" href="<?php echo esc_url( get_permalink() ); ?>"><?php esc_html_e( 'Open file', 'two-identities-anonymous' ); ?></a>
</div>
</article>