Add option to show excerpt on protected posts
This commit is contained in:
parent
b6a7b12922
commit
a7b2459be5
@ -684,6 +684,13 @@ define( 'FICTIONEER_OPTIONS', array(
|
||||
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
|
||||
'label' => __( 'Count characters instead of words', 'fictioneer' ),
|
||||
'default' => 0
|
||||
),
|
||||
'fictioneer_show_protected_excerpt' => array(
|
||||
'name' => 'fictioneer_show_protected_excerpt',
|
||||
'group' => 'fictioneer-settings-general-group',
|
||||
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
|
||||
'label' => __( 'Show excerpt on password-protected posts', 'fictioneer' ),
|
||||
'default' => 0
|
||||
)
|
||||
),
|
||||
'integers' => array(
|
||||
|
@ -159,6 +159,15 @@
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="fictioneer-card__row">
|
||||
<?php
|
||||
fictioneer_settings_label_checkbox(
|
||||
'fictioneer_show_protected_excerpt',
|
||||
__( 'This may be beneficial for search engines.', 'fictioneer' )
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="fictioneer-card__row">
|
||||
<?php
|
||||
fictioneer_settings_label_checkbox(
|
||||
|
@ -166,8 +166,15 @@ get_header( null, $header_args );
|
||||
?>
|
||||
|
||||
<section id="chapter-content" class="chapter__content content-section">
|
||||
<?php if ( post_password_required() && $password_note ) : ?>
|
||||
<div class="chapter__password-note infobox"><?php echo $password_note; ?></div>
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
<?php if ( $password_note ) : ?>
|
||||
<div class="chapter__password-note infobox"><?php echo $password_note; ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( get_option( 'fictioneer_show_protected_excerpt' ) ) : ?>
|
||||
<div class="resize-font chapter-formatting chapter-font-color chapter-font-family">
|
||||
<?php echo fictioneer_get_forced_excerpt( $post->ID, 512 ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<div class="resize-font chapter-formatting chapter-font-color chapter-font-family">
|
||||
<?php the_content(); ?>
|
||||
|
@ -65,8 +65,13 @@ get_header( null, $header_args );
|
||||
?>
|
||||
|
||||
<section class="story__summary padding-left padding-right">
|
||||
<?php if ( post_password_required() && $password_note ) : ?>
|
||||
<div class="story__password-note infobox"><?php echo $password_note; ?></div>
|
||||
<?php if ( post_password_required() ) : ?>
|
||||
<?php if ( $password_note ) : ?>
|
||||
<div class="story__password-note infobox"><?php echo $password_note; ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( get_option( 'fictioneer_show_protected_excerpt' ) ) : ?>
|
||||
<?php echo fictioneer_get_forced_excerpt( $post->ID, 512 ); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php the_content(); ?>
|
||||
</section>
|
||||
|
Loading…
x
Reference in New Issue
Block a user