Add option to disable default indent in chapters

This commit is contained in:
Tetrakern 2024-06-26 13:27:17 +02:00
parent 30ee52c8ac
commit 0b88ab33bb
3 changed files with 19 additions and 2 deletions

View File

@ -480,7 +480,7 @@ function fictioneer_root_attributes() {
// 'letter-spacing' => 0,
// 'line-height' => 1.7,
// 'paragraph-spacing' => 1.5,
// 'indent' => true,
'indent' => get_option( 'fictioneer_disable_default_formatting_indent', 0 ) ? false : true,
// 'show-sensitive-content' => true,
// 'show-chapter-notes' => true,
// 'justify' => false,

View File

@ -641,6 +641,12 @@ define( 'FICTIONEER_OPTIONS', array(
'group' => 'fictioneer-settings-general-group',
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'default' => 0
),
'fictioneer_disable_default_formatting_indent' => array(
'name' => 'fictioneer_disable_default_formatting_indent',
'group' => 'fictioneer-settings-general-group',
'sanitize_callback' => 'fictioneer_sanitize_checkbox',
'default' => 0
)
),
'integers' => array(
@ -1098,7 +1104,8 @@ function fictioneer_get_option_label( $option ) {
'fictioneer_randomize_oauth_usernames' => __( 'Randomize OAuth 2.0 usernames', 'fictioneer' ),
'fictioneer_rewrite_chapter_permalinks' => __( 'Rewrite chapter permalinks to include story ', 'fictioneer' ),
'fictioneer_enable_xmlrpc' => __( 'Enable XML-RPC', 'fictioneer' ),
'fictioneer_disable_emojis' => __( 'Disable WordPress emojis', 'fictioneer' )
'fictioneer_disable_emojis' => __( 'Disable WordPress emojis', 'fictioneer' ),
'fictioneer_disable_default_formatting_indent' => __( 'Disable default indentation of chapter paragraphs', 'fictioneer' )
);
}

View File

@ -237,6 +237,16 @@
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(
'fictioneer_disable_default_formatting_indent',
__( 'Disable default indentation of chapter paragraphs', 'fictioneer' ),
__( 'This can still be overwritten by the user.', 'fictioneer' )
);
?>
</div>
<div class="fictioneer-card__row">
<?php
fictioneer_settings_label_checkbox(