Add additional CSS modifier classes to meta elements
Rating and status.
This commit is contained in:
parent
2d50b46165
commit
78693bd4b2
@ -272,7 +272,7 @@ $thumbnail_args = array(
|
|||||||
?></div>
|
?></div>
|
||||||
|
|
||||||
<?php if ( ! empty( $chapter_rating ) ) : ?>
|
<?php if ( ! empty( $chapter_rating ) ) : ?>
|
||||||
<div class="card__footer-box _right rating-letter-label _large tooltipped" data-tooltip="<?php echo fcntr( $chapter_rating, true ); ?>">
|
<div class="card__footer-box _right rating-letter-label _large tooltipped _<?php echo strtolower( $chapter_rating ); ?>" data-tooltip="<?php echo fcntr( $chapter_rating, true ); ?>">
|
||||||
<span class="cq-hide-below-460"><?php echo fcntr( $chapter_rating ); ?></span>
|
<span class="cq-hide-below-460"><?php echo fcntr( $chapter_rating ); ?></span>
|
||||||
<span class="cq-show-below-460"><?php echo fcntr( $chapter_rating[0] ); ?></span>
|
<span class="cq-show-below-460"><?php echo fcntr( $chapter_rating[0] ); ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -267,7 +267,7 @@ if ( $card_cache_active ) {
|
|||||||
|
|
||||||
$footer_items['comments'] = '<span class="card__footer-comments"><i class="card-footer-icon fa-solid fa-message cq-hide-below-460" title="' . esc_attr__( 'Comments', 'fictioneer' ) . '"></i> <span class="cq-hide-below-460" title="' . esc_attr__( 'Comments', 'fictioneer' ) . '">' . $story['comment_count'] . '</span></span>';
|
$footer_items['comments'] = '<span class="card__footer-comments"><i class="card-footer-icon fa-solid fa-message cq-hide-below-460" title="' . esc_attr__( 'Comments', 'fictioneer' ) . '"></i> <span class="cq-hide-below-460" title="' . esc_attr__( 'Comments', 'fictioneer' ) . '">' . $story['comment_count'] . '</span></span>';
|
||||||
|
|
||||||
$footer_items['status'] = '<span class="card__footer-status"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
$footer_items['status'] = '<span class="card__footer-status _' . strtolower( $story['status'] ) . '"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
||||||
|
|
||||||
// Filter footer items
|
// Filter footer items
|
||||||
$footer_items = apply_filters( 'fictioneer_filter_story_card_footer', $footer_items, $post, $story, $args );
|
$footer_items = apply_filters( 'fictioneer_filter_story_card_footer', $footer_items, $post, $story, $args );
|
||||||
@ -276,7 +276,7 @@ if ( $card_cache_active ) {
|
|||||||
echo implode( ' ', $footer_items );
|
echo implode( ' ', $footer_items );
|
||||||
?></div>
|
?></div>
|
||||||
|
|
||||||
<div class="card__footer-box _right rating-letter-label _large tooltipped" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
<div class="card__footer-box _right rating-letter-label _large tooltipped _<?php echo strtolower( $story['rating'] ); ?>" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
||||||
<span class="cq-hide-below-460"><?php echo fcntr( $story['rating'] ); ?></span>
|
<span class="cq-hide-below-460"><?php echo fcntr( $story['rating'] ); ?></span>
|
||||||
<span class="cq-show-below-460"><?php echo fcntr( $story['rating_letter'] ); ?></span>
|
<span class="cq-show-below-460"><?php echo fcntr( $story['rating_letter'] ); ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -269,11 +269,11 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $args['footer_status'] ) {
|
if ( $args['footer_status'] ) {
|
||||||
$meta['status'] = '<span class="post-item-item__meta-status">' . fcntr( $story['status'] ) . '</span>';
|
$meta['status'] = '<span class="post-item-item__meta-status _' . strtolower( $story['status'] ) . '">' . fcntr( $story['status'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $chapter_rating && $args['footer_rating'] ) {
|
if ( $chapter_rating && $args['footer_rating'] ) {
|
||||||
$meta['rating'] = '<span class="post-list-item__meta-rating">' . fcntr( $chapter_rating ) . '</span>';
|
$meta['rating'] = '<span class="post-list-item__meta-rating _' . strtolower( $chapter_rating ) . '">' . fcntr( $chapter_rating ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_option( 'fictioneer_show_authors' ) && $args['footer_author'] ) {
|
if ( get_option( 'fictioneer_show_authors' ) && $args['footer_author'] ) {
|
||||||
|
@ -356,7 +356,7 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $story && $args['footer_status'] ) {
|
if ( $story && $args['footer_status'] ) {
|
||||||
$footer_items['status'] = '<span class="card__footer-status"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
$footer_items['status'] = '<span class="card__footer-status _' . strtolower( $story['status'] ) . '"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter footer items
|
// Filter footer items
|
||||||
@ -374,7 +374,7 @@ if ( $splide ) {
|
|||||||
?></div>
|
?></div>
|
||||||
|
|
||||||
<?php if ( ! empty( $chapter_rating ) && $args['footer_rating'] ) : ?>
|
<?php if ( ! empty( $chapter_rating ) && $args['footer_rating'] ) : ?>
|
||||||
<div class="card__footer-box _right rating-letter-label tooltipped" data-tooltip="<?php echo fcntr( $chapter_rating, true ); ?>">
|
<div class="card__footer-box _right rating-letter-label tooltipped _<?php echo strtolower( $chapter_rating ); ?>" data-tooltip="<?php echo fcntr( $chapter_rating, true ); ?>">
|
||||||
<?php echo fcntr( $chapter_rating[0] ); ?>
|
<?php echo fcntr( $chapter_rating[0] ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -357,7 +357,7 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $args['footer_status'] ) {
|
if ( $args['footer_status'] ) {
|
||||||
$footer_items['status'] = '<span class="card__footer-status"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
$footer_items['status'] = '<span class="card__footer-status _' . strtolower( $story['status'] ) . '"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter footer items
|
// Filter footer items
|
||||||
@ -375,7 +375,7 @@ if ( $splide ) {
|
|||||||
?></div>
|
?></div>
|
||||||
|
|
||||||
<?php if ( $args['footer_rating'] ) : ?>
|
<?php if ( $args['footer_rating'] ) : ?>
|
||||||
<div class="card__footer-box _right rating-letter-label tooltipped" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
<div class="card__footer-box _right rating-letter-label tooltipped _<?php echo strtolower( $story['rating'] ); ?>" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
||||||
<?php echo fcntr( $story['rating_letter'] ); ?>
|
<?php echo fcntr( $story['rating_letter'] ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -248,11 +248,11 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $args['footer_status'] ) {
|
if ( $args['footer_status'] ) {
|
||||||
$meta['status'] = '<span class="post-item-item__meta-status">' . fcntr( $story['status'] ) . '</span>';
|
$meta['status'] = '<span class="post-item-item__meta-status _' . strtolower( $story['status'] ) . '">' . fcntr( $story['status'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $story['rating'] && $args['footer_rating'] ) {
|
if ( $story['rating'] && $args['footer_rating'] ) {
|
||||||
$meta['rating'] = '<span class="post-item-item__meta-rating">' . fcntr( $story['rating'] ) . '</span>';
|
$meta['rating'] = '<span class="post-item-item__meta-rating _' . strtolower( $story['rating'] ) . '">' . fcntr( $story['rating'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_option( 'fictioneer_show_authors' ) && $args['footer_author'] && $args['source'] ) {
|
if ( get_option( 'fictioneer_show_authors' ) && $args['footer_author'] && $args['source'] ) {
|
||||||
|
@ -344,7 +344,7 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $args['footer_status'] ) {
|
if ( $args['footer_status'] ) {
|
||||||
$footer_items['status'] = '<span class="card__footer-status"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
$footer_items['status'] = '<span class="card__footer-status _' . strtolower( $story['status'] ) . '"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter footer items
|
// Filter footer items
|
||||||
@ -362,7 +362,7 @@ if ( $splide ) {
|
|||||||
?></div>
|
?></div>
|
||||||
|
|
||||||
<?php if ( $args['footer_rating'] ) : ?>
|
<?php if ( $args['footer_rating'] ) : ?>
|
||||||
<div class="card__footer-box _right rating-letter-label tooltipped" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
<div class="card__footer-box _right rating-letter-label tooltipped _<?php echo strtolower( $story['rating'] ); ?>" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
||||||
<?php echo fcntr( $story['rating_letter'] ); ?>
|
<?php echo fcntr( $story['rating_letter'] ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -290,7 +290,7 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $story['rating'] && $args['footer_rating'] ) {
|
if ( $story['rating'] && $args['footer_rating'] ) {
|
||||||
$meta['rating'] = '<span class="post-item-item__meta-rating">' . fcntr( $story['rating'] ) . '</span>';
|
$meta['rating'] = '<span class="post-item-item__meta-rating _' . strtolower( $story['rating'] ) . '">' . fcntr( $story['rating'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( get_option( 'fictioneer_show_authors' ) && $args['footer_author'] ) {
|
if ( get_option( 'fictioneer_show_authors' ) && $args['footer_author'] ) {
|
||||||
|
@ -460,7 +460,7 @@ if ( $splide ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $args['footer_status'] ) {
|
if ( $args['footer_status'] ) {
|
||||||
$footer_items['status'] = '<span class="card__footer-status"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
$footer_items['status'] = '<span class="card__footer-status _' . strtolower( $story['status'] ) . '"><i class="card-footer-icon ' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter footer items
|
// Filter footer items
|
||||||
@ -478,7 +478,7 @@ if ( $splide ) {
|
|||||||
?></div>
|
?></div>
|
||||||
|
|
||||||
<?php if ( $args['footer_rating'] ) : ?>
|
<?php if ( $args['footer_rating'] ) : ?>
|
||||||
<div class="card__footer-box _right rating-letter-label tooltipped" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
<div class="card__footer-box _right rating-letter-label tooltipped _<?php echo strtolower( $story['rating'] ); ?>" data-tooltip="<?php echo fcntr( $story['rating'], true ); ?>">
|
||||||
<?php echo fcntr( $story['rating_letter'] ); ?>
|
<?php echo fcntr( $story['rating_letter'] ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -33,7 +33,7 @@ $show_log = $story['chapter_count'] > 0 && FICTIONEER_ENABLE_STORY_CHANGELOG &&
|
|||||||
$meta_output = [];
|
$meta_output = [];
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
$meta_output['status'] = '<span class="story__meta-item story__status"><i class="' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
$meta_output['status'] = '<span class="story__meta-item story__status _' . strtolower( $story['status'] ) . '"><i class="' . $story['icon'] . '"></i> ' . fcntr( $story['status'] ) . '</span>';
|
||||||
|
|
||||||
if ( get_option( 'fictioneer_show_story_modified_date' ) ) {
|
if ( get_option( 'fictioneer_show_story_modified_date' ) ) {
|
||||||
// Modified
|
// Modified
|
||||||
|
@ -142,9 +142,9 @@ reset( $sorted_stories );
|
|||||||
</div>
|
</div>
|
||||||
<div class="glossary__entry-body">
|
<div class="glossary__entry-body">
|
||||||
<div class="glossary__entry-description">
|
<div class="glossary__entry-description">
|
||||||
<span class="glossary__entry-meta-item"><?php echo $story['status']; ?></span>
|
<span class="glossary__entry-meta-item _<?php echo strtolower( $story['status'] ); ?>"><?php echo $story['status']; ?></span>
|
||||||
<span class="glossary__entry-meta-item"><?php printf( _x( '%s Words', 'Index item.', 'fictioneer' ), number_format_i18n( $story['total_words'] ) ); ?></span>
|
<span class="glossary__entry-meta-item"><?php printf( _x( '%s Words', 'Index item.', 'fictioneer' ), number_format_i18n( $story['total_words'] ) ); ?></span>
|
||||||
<span class="glossary__entry-meta-item"><?php echo $story['rating']; ?></span>
|
<span class="glossary__entry-meta-item _<?php echo strtolower( $story['rating'] ); ?>"><?php echo $story['rating']; ?></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user