Add option to hide chapter lists on large cards

This commit is contained in:
Tetrakern 2024-04-09 11:11:32 +02:00
parent 45ff2643b1
commit 9868e7962a
3 changed files with 17 additions and 1 deletions

View File

@ -691,6 +691,13 @@ define( 'FICTIONEER_OPTIONS', array(
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'label' => __( 'Show excerpt on password-protected posts', 'fictioneer' ),
'default' => 0
),
'fictioneer_hide_large_card_chapter_list' => array(
'name' => 'fictioneer_hide_large_card_chapter_list',
'group' => 'fictioneer-settings-general-group',
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'label' => __( 'Hide latest chapter list on large story cards', 'fictioneer' ),
'default' => 0
)
),
'integers' => array(

View File

@ -239,6 +239,15 @@
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(
'fictioneer_hide_large_card_chapter_list',
__( 'Less informative but also less cluttered.', 'fictioneer' )
);
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(

View File

@ -129,7 +129,7 @@ $thumbnail_args = array(
);
?>
<?php if ( $chapter_count > 0 ): ?>
<?php if ( $chapter_count > 0 && ! get_option( 'fictioneer_hide_large_card_chapter_list' ) ) : ?>
<ol class="card__link-list cell-list">
<?php
// Prepare