Merge branch 'main' into storygraph_api
This commit is contained in:
commit
f98ccc3dce
@ -712,19 +712,20 @@ define( 'CONSTANT_NAME', value );
|
||||
| FICTIONEER_OAUTH_ENDPOINT | string | URI slug to call the OAuth script. Default `'oauth2'`.
|
||||
| FICTIONEER_EPUB_ENDPOINT | string | URI slug to call the ePUB script. Default `'download-epub'`.
|
||||
| FICTIONEER_LOGOUT_ENDPOINT | string | URI slug to call the logout script. Default `'fictioneer-logout'`.
|
||||
| FICTIONEER_PRIMARY_FONT | string | CSS name of the primary font. Default `'Open Sans'`.
|
||||
| FICTIONEER_PRIMARY_FONT_CSS | string | CSS name of the primary font. Default `'Open Sans'`.
|
||||
| FICTIONEER_PRIMARY_FONT_NAME | string | Display name of the primary font. Default `'Open Sans'`.
|
||||
| FICTIONEER_COMMENTCODE_DURATION | int | How long guests can see their private/unapproved comments in _seconds_. Default `600`.
|
||||
| FICTIONEER_COMMENTCODE_TTL | int | How long guests can see their private/unapproved comments in _seconds_. Default `600`.
|
||||
| FICTIONEER_AJAX_TTL | int | How long to cache certain AJAX requests locally in _milliseconds_. Default `60000`.
|
||||
| FICTIONEER_AJAX_LOGIN_TTL | int | How long to cache AJAX authentications locally in _milliseconds_. Default `15000`.
|
||||
| FICTIONEER_AJAX_POST_DEBOUNCE_RATE | int | How long to debounce AJAX requests of the same type _milliseconds_. Default `700`.
|
||||
| FICTIONEER_AUTHOR_KEYWORD_SEARCH_LIMIT | int | Maximum number of authors in the advanced search suggestions. Default `100`.
|
||||
| FICTIONEER_UPDATE_CHECK_TIMEOUT | int | Timeout between checks for theme updates in _seconds_. Default `3600`.
|
||||
| FICTIONEER_THEME_CACHE_PURGING | boolean | Whether to call the cache purge assist function on post updates. Default `true`.
|
||||
| FICTIONEER_THEME_RELATIONSHIP_CACHE_PURGING | boolean | Whether to purge related post caches. Default `true`.
|
||||
| FICTIONEER_SEARCH_MENU_ITEMS | boolean | Whether to show search page links in menus. Default `true`.
|
||||
| FICTIONEER_CACHE_PURGE_ASSIST | boolean | Whether to call the cache purge assist function on post updates. Default `true`.
|
||||
| FICTIONEER_RELATIONSHIP_PURGE_ASSIST | boolean | Whether to purge related post caches. Default `true`.
|
||||
| FICTIONEER_CACHE_CHAPTER_LISTS | boolean | Whether to cache chapter lists on story pages as Transients. Default `true`.
|
||||
| FICTIONEER_SHOW_SEARCH_IN_MENUS | boolean | Whether to show search page links in menus. Default `true`.
|
||||
| FICTIONEER_THEME_SWITCH | boolean | Whether to the theme switch in child themes (back to base). Default `true`.
|
||||
| FICTIONEER_ATTACHMENT_PAGES | boolean | Whether to enable pages for attachments (no theme templates). Default `false`.
|
||||
| FICTIONEER_SHOW_OAUTH_HASHES | boolean | Whether to show OAuth ID hashes in user profiles (admin only). Default `false`.
|
||||
| FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS | boolean | Whether to show feedback for rejected comment content. Default `true`.
|
||||
| FICTIONEER_DISALLOWED_KEY_NOTICE | boolean | Whether to show feedback for rejected comment content. Default `true`.
|
||||
| FICTIONEER_FILTER_STORY_CHAPTERS | boolean | Whether to filter selectable chapters by assigned story. Default `true`.
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,9 +5,9 @@
|
||||
// =============================================================================
|
||||
|
||||
// Version
|
||||
define( 'FICTIONEER_VERSION', '5.0.16' );
|
||||
define( 'FICTIONEER_VERSION', '5.0.19' );
|
||||
define( 'FICTIONEER_MAJOR_VERSION', '5' );
|
||||
define( 'FICTIONEER_RELEASE_TAG', 'v5.0.16' );
|
||||
define( 'FICTIONEER_RELEASE_TAG', 'v5.0.19' );
|
||||
|
||||
if ( ! defined( 'CHILD_VERSION' ) ) {
|
||||
define( 'CHILD_VERSION', false );
|
||||
@ -41,8 +41,8 @@ if ( ! defined( 'FICTIONEER_LOGOUT_ENDPOINT' ) ) {
|
||||
*/
|
||||
|
||||
// String: CSS name of the primary font
|
||||
if ( ! defined( 'FICTIONEER_PRIMARY_FONT' ) ) {
|
||||
define( 'FICTIONEER_PRIMARY_FONT', 'Open Sans' );
|
||||
if ( ! defined( 'FICTIONEER_PRIMARY_FONT_CSS' ) ) {
|
||||
define( 'FICTIONEER_PRIMARY_FONT_CSS', 'Open Sans' );
|
||||
}
|
||||
|
||||
// String: Display name of the primary font
|
||||
@ -55,8 +55,8 @@ if ( ! defined( 'FICTIONEER_PRIMARY_FONT_NAME' ) ) {
|
||||
*/
|
||||
|
||||
// Integer: Commentcode expiration timer in seconds (-1 for infinite)
|
||||
if ( ! defined( 'FICTIONEER_COMMENTCODE_DURATION' ) ) {
|
||||
define( 'FICTIONEER_COMMENTCODE_DURATION', 600 );
|
||||
if ( ! defined( 'FICTIONEER_COMMENTCODE_TTL' ) ) {
|
||||
define( 'FICTIONEER_COMMENTCODE_TTL', 600 );
|
||||
}
|
||||
|
||||
// Integer: AJAX cache TTL in milliseconds
|
||||
@ -89,26 +89,26 @@ if ( ! defined( 'FICTIONEER_UPDATE_CHECK_TIMEOUT' ) ) {
|
||||
*/
|
||||
|
||||
// Boolean: Theme cache purging on post update
|
||||
if ( ! defined( 'FICTIONEER_THEME_CACHE_PURGING' ) ) {
|
||||
define( 'FICTIONEER_THEME_CACHE_PURGING', true );
|
||||
if ( ! defined( 'FICTIONEER_CACHE_PURGE_ASSIST' ) ) {
|
||||
define( 'FICTIONEER_CACHE_PURGE_ASSIST', true );
|
||||
}
|
||||
|
||||
// Boolean: Theme relationship cache purging on post update
|
||||
if ( ! defined( 'FICTIONEER_THEME_RELATIONSHIP_CACHE_PURGING' ) ) {
|
||||
define( 'FICTIONEER_THEME_RELATIONSHIP_CACHE_PURGING', true );
|
||||
if ( ! defined( 'FICTIONEER_RELATIONSHIP_PURGE_ASSIST' ) ) {
|
||||
define( 'FICTIONEER_RELATIONSHIP_PURGE_ASSIST', true );
|
||||
}
|
||||
|
||||
// Boolean: Cache chapter lists on story pages as Transients
|
||||
if ( ! defined( 'FICTIONEER_STORY_CHAPTER_LIST_CACHE' ) ) {
|
||||
define( 'FICTIONEER_STORY_CHAPTER_LIST_CACHE', true );
|
||||
if ( ! defined( 'FICTIONEER_CACHE_CHAPTER_LISTS' ) ) {
|
||||
define( 'FICTIONEER_CACHE_CHAPTER_LISTS', true );
|
||||
}
|
||||
|
||||
// Boolean: Search menu items
|
||||
if ( ! defined( 'FICTIONEER_SEARCH_MENU_ITEMS' ) ) {
|
||||
define( 'FICTIONEER_SEARCH_MENU_ITEMS', true );
|
||||
// Boolean: Menu items for search
|
||||
if ( ! defined( 'FICTIONEER_SHOW_SEARCH_IN_MENUS' ) ) {
|
||||
define( 'FICTIONEER_SHOW_SEARCH_IN_MENUS', true );
|
||||
}
|
||||
|
||||
// Boolean: Base theme switch
|
||||
// Boolean: Base theme switch in site settings
|
||||
if ( ! defined( 'FICTIONEER_THEME_SWITCH' ) ) {
|
||||
define( 'FICTIONEER_THEME_SWITCH', true );
|
||||
}
|
||||
@ -124,8 +124,8 @@ if ( ! defined( 'FICTIONEER_SHOW_OAUTH_HASHES' ) ) {
|
||||
}
|
||||
|
||||
// Boolean: Show AJAX comment submission disallowed content keys
|
||||
if ( ! defined( 'FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS' ) ) {
|
||||
define( 'FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS', true );
|
||||
if ( ! defined( 'FICTIONEER_DISALLOWED_KEY_NOTICE' ) ) {
|
||||
define( 'FICTIONEER_DISALLOWED_KEY_NOTICE', true );
|
||||
}
|
||||
|
||||
// Boolean: Only allow assigned chapters in stories
|
||||
|
@ -114,25 +114,38 @@ function fictioneer_update_post_relationships( $post_id ) {
|
||||
$registry = fictioneer_get_relationship_registry();
|
||||
$featured = fictioneer_get_field( 'fictioneer_post_featured', $post_id );
|
||||
|
||||
// Abort if...
|
||||
if ( empty( $featured ) ) return;
|
||||
|
||||
// Update relationships
|
||||
$registry[ $post_id ] = [];
|
||||
|
||||
foreach ( $featured as $featured_id ) {
|
||||
$registry[ $post_id ][ $featured_id ] = 'is_featured';
|
||||
if ( ! empty( $featured ) ) {
|
||||
foreach ( $featured as $featured_id ) {
|
||||
$registry[ $post_id ][ $featured_id ] = 'is_featured';
|
||||
|
||||
if ( ! isset( $registry[ $featured_id ] ) ) $registry[ $featured_id ] = [];
|
||||
if ( ! isset( $registry[ $featured_id ] ) ) $registry[ $featured_id ] = [];
|
||||
|
||||
$registry[ $featured_id ][ $post_id ] = 'featured_by';
|
||||
$registry[ $featured_id ][ $post_id ] = 'featured_by';
|
||||
}
|
||||
} else {
|
||||
$featured = [];
|
||||
}
|
||||
|
||||
// Check for and remove outdated direct references
|
||||
foreach ( $registry as $key => $entry ) {
|
||||
// Skip if...
|
||||
if ( absint( $key ) < 1 || ! is_array( $entry ) || in_array( $key, $featured ) ) continue;
|
||||
|
||||
// Unset if in array
|
||||
unset( $registry[ $key ][ $post_id ] );
|
||||
|
||||
// Remove node if empty
|
||||
if ( empty( $registry[ $key ] ) ) unset( $registry[ $key ] );
|
||||
}
|
||||
|
||||
// Update database
|
||||
fictioneer_save_relationship_registry( $registry );
|
||||
}
|
||||
|
||||
if ( FICTIONEER_THEME_RELATIONSHIP_CACHE_PURGING ) {
|
||||
if ( FICTIONEER_RELATIONSHIP_PURGE_ASSIST ) {
|
||||
add_action( 'acf/save_post', 'fictioneer_update_post_relationships', 100 );
|
||||
}
|
||||
|
||||
|
@ -331,7 +331,7 @@ if ( ! function_exists( 'fictioneer_refresh_post_caches' ) ) {
|
||||
}
|
||||
|
||||
// Purge relationships
|
||||
if ( FICTIONEER_THEME_RELATIONSHIP_CACHE_PURGING ) {
|
||||
if ( FICTIONEER_RELATIONSHIP_PURGE_ASSIST ) {
|
||||
$registry = fictioneer_get_relationship_registry();
|
||||
|
||||
// Always purge...
|
||||
@ -395,7 +395,7 @@ if ( ! function_exists( 'fictioneer_refresh_post_caches' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( FICTIONEER_THEME_CACHE_PURGING && fictioneer_caching_active() ) {
|
||||
if ( FICTIONEER_CACHE_PURGE_ASSIST && fictioneer_caching_active() ) {
|
||||
add_action( 'save_post', 'fictioneer_refresh_post_caches' );
|
||||
add_action( 'untrash_post', 'fictioneer_refresh_post_caches' );
|
||||
add_action( 'trashed_post', 'fictioneer_refresh_post_caches' );
|
||||
@ -479,7 +479,10 @@ function fictioneer_delete_relationship( $post_id ) {
|
||||
// Update database
|
||||
fictioneer_save_relationship_registry( $registry );
|
||||
}
|
||||
add_action( 'delete_post', 'fictioneer_delete_relationship', 100 );
|
||||
|
||||
if ( FICTIONEER_RELATIONSHIP_PURGE_ASSIST ) {
|
||||
add_action( 'delete_post', 'fictioneer_delete_relationship', 100 );
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// TRACK CHAPTER & STORY UPDATES
|
||||
|
@ -180,7 +180,7 @@ if ( ! function_exists( 'fictioneer_ajax_submit_contact_form' ) ) {
|
||||
|
||||
// Only show error for keys in content, trash anything else as usual later.
|
||||
// No need to tell someone his name or email address is blocked, etc.
|
||||
if ( FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS && $offenders[0] && $offenders[1] ) {
|
||||
if ( FICTIONEER_DISALLOWED_KEY_NOTICE && $offenders[0] && $offenders[1] ) {
|
||||
wp_send_json_error( ['error' => __( 'Disallowed key found: "' . implode( ', ', $offenders[1] ) . '".', 'fictioneer' )] );
|
||||
} elseif ( $offenders[0] ) {
|
||||
wp_send_json_error( ['error' => __( 'Disallowed keys found.', 'fictioneer' )] );
|
||||
|
@ -68,7 +68,10 @@ function fictioneer_update_shortcode_relationships( $post_id, $post ) {
|
||||
// Update database
|
||||
fictioneer_save_relationship_registry( $registry );
|
||||
}
|
||||
add_action( 'save_post', 'fictioneer_update_shortcode_relationships', 10, 2 );
|
||||
|
||||
if ( FICTIONEER_RELATIONSHIP_PURGE_ASSIST ) {
|
||||
add_action( 'save_post', 'fictioneer_update_shortcode_relationships', 10, 2 );
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// SHOWCASE SHORTCODE
|
||||
@ -609,7 +612,7 @@ function fictioneer_shortcode_chapter_list( $attr ) {
|
||||
// Start HTML ---> ?>
|
||||
<div class="chapter-group">
|
||||
<?php if ( ! empty( $attr['heading'] ) ) : ?>
|
||||
<h5 class="chapter-group__heading truncate truncate--1-1"><?php echo $attr['heading']; ?></h5>
|
||||
<h5 class="chapter-group__heading truncate _1-1"><?php echo $attr['heading']; ?></h5>
|
||||
<?php endif; ?>
|
||||
<ol class="chapter-group__list">
|
||||
<li class="chapter-group__list-item _empty">
|
||||
@ -720,14 +723,14 @@ function fictioneer_shortcode_chapter_list( $attr ) {
|
||||
<i class="<?php echo empty( $icon ) ? 'fa-solid fa-book' : $icon; ?> chapter-group__list-item-icon"></i>
|
||||
<?php endif; ?>
|
||||
|
||||
<a href="<?php the_permalink( $post_id ); ?>" class="chapter-group__list-item-link truncate truncate--1-1">
|
||||
<a href="<?php the_permalink( $post_id ); ?>" class="chapter-group__list-item-link truncate _1-1">
|
||||
<?php if ( ! empty( $prefix ) ): ?>
|
||||
<span class="chapter-group__list-item-prefix"><?php echo $prefix; ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="chapter-group__list-item-title"><?php echo $title; ?></span>
|
||||
</a>
|
||||
|
||||
<div class="chapter-group__list-item-subrow truncate truncate--1-1 dot-separator">
|
||||
<div class="chapter-group__list-item-subrow truncate _1-1 dot-separator">
|
||||
<?php if ( ! empty( $warning ) ) : ?>
|
||||
<span class="chapter-group__list-item-warning" style="<?php echo $warning_color; ?>"><?php
|
||||
printf( __( '<b>Warning:</b> <span>%s</span>', 'fictioneer' ), $warning );
|
||||
|
@ -193,7 +193,7 @@ function fictioneer_root_attributes() {
|
||||
$output['data-theme'] = 'default';
|
||||
$output['data-mode'] = '';
|
||||
$output['data-font-weight'] = 'default';
|
||||
$output['data-primary-font'] = FICTIONEER_PRIMARY_FONT;
|
||||
$output['data-primary-font'] = FICTIONEER_PRIMARY_FONT_CSS;
|
||||
if ( $ajax_submit ) $output['data-ajax-submit'] = 'true';
|
||||
if ( ! FICTIONEER_THEME_SWITCH ) $output['data-force-child-theme'] = '1';
|
||||
if ( get_option( 'fictioneer_enable_ajax_nonce', false ) ) $output['data-ajax-nonce'] = '1';
|
||||
|
@ -1416,4 +1416,82 @@ if ( ! function_exists( 'fictioneer_bbcodes' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// GET SUPPORT LINKS
|
||||
// =============================================================================
|
||||
|
||||
if ( ! function_exists( 'fictioneer_get_support_links' ) ) {
|
||||
/**
|
||||
* Returns support links for the post or author
|
||||
*
|
||||
* @since 5.0.19
|
||||
*
|
||||
* @param int|null $post_id The post ID. Defaults to global post.
|
||||
* @param int|null $parent_id The parent ID. Default null.
|
||||
* @param int|null $author_id The post ID. Defaults to post author ID.
|
||||
*
|
||||
* @return array Array of support links.
|
||||
*/
|
||||
|
||||
function fictioneer_get_support_links( $post_id = null, $parent_id = null, $author_id = null ) {
|
||||
global $post;
|
||||
|
||||
// Setup
|
||||
$post_id = $post_id ?? $post->ID;
|
||||
$author_id = $author_id ?? get_post_field( 'post_author', $post_id );
|
||||
$post_type = get_post_type( $post_id );
|
||||
$links = array(
|
||||
'topwebfiction' => null,
|
||||
'patreon' => null,
|
||||
'kofi' => null,
|
||||
'subscribestar' => null,
|
||||
'paypal' => null,
|
||||
'donation' => null
|
||||
);
|
||||
|
||||
// Get story ID if chapter and parent ID not given
|
||||
if ( empty( $parent_id ) && $post_type == 'fcn_chapter' ) {
|
||||
$parent_id = fictioneer_get_field( 'fictioneer_chapter_story', $post_id );
|
||||
}
|
||||
|
||||
// Post level (e.g. chapter)
|
||||
$topwebfiction_link = fictioneer_get_field( 'fictioneer_story_topwebfiction_link', $post_id );
|
||||
$patreon_link = fictioneer_get_field( 'fictioneer_patreon_link', $post_id );
|
||||
$kofi_link = fictioneer_get_field( 'fictioneer_kofi_link', $post_id );
|
||||
$subscribestar_link = fictioneer_get_field( 'fictioneer_subscribestar_link', $post_id );
|
||||
$paypal_link = fictioneer_get_field( 'fictioneer_paypal_link', $post_id );
|
||||
$donation_link = fictioneer_get_field( 'fictioneer_donation_link', $post_id );
|
||||
|
||||
// Parent level (e.g. story)
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
if ( empty( $topwebfiction_link ) ) $topwebfiction_link = fictioneer_get_field( 'fictioneer_story_topwebfiction_link', $parent_id );
|
||||
if ( empty( $patreon_link ) ) $patreon_link = fictioneer_get_field( 'fictioneer_patreon_link', $parent_id );
|
||||
if ( empty( $kofi_link ) ) $kofi_link = fictioneer_get_field( 'fictioneer_kofi_link', $parent_id );
|
||||
if ( empty( $subscribestar_link ) ) $subscribestar_link = fictioneer_get_field( 'fictioneer_subscribestar_link', $parent_id );
|
||||
if ( empty( $paypal_link ) ) $paypal_link = fictioneer_get_field( 'fictioneer_paypal_link', $parent_id );
|
||||
if ( empty( $donation_link ) ) $donation_link = fictioneer_get_field( 'fictioneer_donation_link', $parent_id );
|
||||
}
|
||||
|
||||
// Author level
|
||||
if ( $author_id ) {
|
||||
if ( empty( $patreon_link ) ) $patreon_link = get_the_author_meta( 'fictioneer_user_patreon_link', $author_id );
|
||||
if ( empty( $kofi_link ) ) $kofi_link = get_the_author_meta( 'fictioneer_user_kofi_link', $author_id );
|
||||
if ( empty( $subscribestar_link ) ) $subscribestar_link = get_the_author_meta( 'fictioneer_user_subscribestar_link', $author_id );
|
||||
if ( empty( $paypal_link ) ) $paypal_link = get_the_author_meta( 'fictioneer_user_paypal_link', $author_id );
|
||||
if ( empty( $donation_link ) ) $donation_link = get_the_author_meta( 'fictioneer_user_donation_link', $author_id );
|
||||
}
|
||||
|
||||
// Add links if found
|
||||
if ( ! empty( $topwebfiction_link ) ) $links['topwebfiction'] = $topwebfiction_link;
|
||||
if ( ! empty( $patreon_link ) ) $links['patreon'] = $patreon_link;
|
||||
if ( ! empty( $kofi_link ) ) $links['kofi'] = $kofi_link;
|
||||
if ( ! empty( $subscribestar_link ) ) $links['subscribestar'] = $subscribestar_link;
|
||||
if ( ! empty( $paypal_link ) ) $links['paypal'] = $paypal_link;
|
||||
if ( ! empty( $donation_link ) ) $links['donation'] = $donation_link;
|
||||
|
||||
// Return
|
||||
return $links;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -265,7 +265,7 @@ if ( ! function_exists( 'fictioneer_ajax_submit_comment' ) ) {
|
||||
}
|
||||
|
||||
// Preemptively check for disallowed keys (Settings > Discussion)
|
||||
if ( FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS ) {
|
||||
if ( FICTIONEER_DISALLOWED_KEY_NOTICE ) {
|
||||
$offenders = fictioneer_check_comment_disallowed_list(
|
||||
$comment_data['author'] ?? '',
|
||||
$comment_data['email'] ?? '',
|
||||
|
@ -499,8 +499,8 @@ if ( ! function_exists( 'fictioneer_theme_comment' ) ) {
|
||||
if ( $commentcode && is_array( $visibility_code ) ) {
|
||||
$commentcode = $visibility_code['code'] == $commentcode;
|
||||
|
||||
if ( FICTIONEER_COMMENTCODE_DURATION > 0 ) {
|
||||
$commentcode = $commentcode && $visibility_code['timestamp'] + FICTIONEER_COMMENTCODE_DURATION >= time();
|
||||
if ( FICTIONEER_COMMENTCODE_TTL > 0 ) {
|
||||
$commentcode = $commentcode && $visibility_code['timestamp'] + FICTIONEER_COMMENTCODE_TTL >= time();
|
||||
}
|
||||
}
|
||||
|
||||
@ -592,7 +592,7 @@ if ( ! function_exists( 'fictioneer_theme_comment' ) ) {
|
||||
<div class="fictioneer-comment__header">
|
||||
<?php echo ( $avatar = get_avatar( $comment->user_id , $args['avatar_size'] ) ) && $args['avatar_size'] != 0 ? $avatar : ''; ?>
|
||||
<div class="fictioneer-comment__meta">
|
||||
<div class="fictioneer-comment__author truncate truncate--1-1"><?php
|
||||
<div class="fictioneer-comment__author truncate _1-1"><?php
|
||||
if ( fictioneer_is_author( $comment->user_id ) ) {
|
||||
?><a href="<?php echo get_author_posts_url( $comment->user_id ) ?>"><?php echo $comment->comment_author; ?></a><?php
|
||||
} else {
|
||||
@ -601,7 +601,7 @@ if ( ! function_exists( 'fictioneer_theme_comment' ) ) {
|
||||
|
||||
echo $badge;
|
||||
?></div>
|
||||
<div class="fictioneer-comment__info truncate truncate--1-1">
|
||||
<div class="fictioneer-comment__info truncate _1-1">
|
||||
<?php if ( $parent_comment ) : ?>
|
||||
<span class="fictioneer-comment__reply-to"><?php
|
||||
printf(
|
||||
|
@ -36,8 +36,8 @@ if ( ! function_exists( 'fictioneer_build_story_comment' ) ) {
|
||||
<div class="fictioneer-comment__header">
|
||||
<?php echo get_avatar( $comment->user_id , 32 ) ?? ''; ?>
|
||||
<div class="fictioneer-comment__meta">
|
||||
<div class="fictioneer-comment__author truncate truncate--1-1"><span><?php echo $name; ?></span> <?php echo $badge; ?></div>
|
||||
<div class="fictioneer-comment__info truncate truncate--1-1">
|
||||
<div class="fictioneer-comment__author truncate _1-1"><span><?php echo $name; ?></span> <?php echo $badge; ?></div>
|
||||
<div class="fictioneer-comment__info truncate _1-1">
|
||||
<?php
|
||||
printf(
|
||||
_x( '%1$s <span>•</span> %2$s', 'Comment meta: [Date] in [Chapter]', 'fictioneer' ),
|
||||
|
@ -398,9 +398,9 @@ if ( ! function_exists( 'fictioneer_chapter_support_links' ) ) {
|
||||
*
|
||||
* @since Fictioneer 5.0
|
||||
*
|
||||
* @param WP_User $args['author'] Author of the post.
|
||||
* @param WP_User $args['author'] Author of the post.
|
||||
* @param WP_Post|null $args['story_post'] Optional. Post object of the story.
|
||||
* @param int $args['chapter_id'] The chapter ID.
|
||||
* @param int $args['chapter_id'] The chapter ID.
|
||||
*/
|
||||
|
||||
function fictioneer_chapter_support_links( $args ) {
|
||||
@ -409,84 +409,60 @@ if ( ! function_exists( 'fictioneer_chapter_support_links' ) ) {
|
||||
|
||||
// Setup
|
||||
$author_id = $args['author']->ID;
|
||||
$patreon_link = fictioneer_get_field( 'fictioneer_patreon_link', $args['chapter_id'] );
|
||||
$kofi_link = fictioneer_get_field( 'fictioneer_kofi_link', $args['chapter_id'] );
|
||||
$subscribestar_link = fictioneer_get_field( 'fictioneer_subscribestar_link', $args['chapter_id'] );
|
||||
$paypal_link = fictioneer_get_field( 'fictioneer_paypal_link', $args['chapter_id'] );
|
||||
$donation_link = fictioneer_get_field( 'fictioneer_donation_link', $args['chapter_id'] );
|
||||
$topwebfiction_link = null;
|
||||
$support_urls = fictioneer_get_support_links( $args['chapter_id'], $args['story_post']->ID, $author_id );
|
||||
$support_links = [];
|
||||
|
||||
// Story level support links
|
||||
if ( ! empty( $args['story_post'] ) ) {
|
||||
$story_id = $args['story_post']->ID;
|
||||
$topwebfiction_link = fictioneer_get_field( 'fictioneer_story_topwebfiction_link', $story_id );
|
||||
|
||||
if ( ! $patreon_link ) $patreon_link = fictioneer_get_field( 'fictioneer_patreon_link', $story_id );
|
||||
if ( ! $kofi_link ) $kofi_link = fictioneer_get_field( 'fictioneer_kofi_link', $story_id );
|
||||
if ( ! $subscribestar_link ) $subscribestar_link = fictioneer_get_field( 'fictioneer_subscribestar_link', $story_id );
|
||||
if ( ! $paypal_link ) $paypal_link = fictioneer_get_field( 'fictioneer_paypal_link', $story_id );
|
||||
if ( ! $donation_link ) $donation_link = fictioneer_get_field( 'fictioneer_donation_link', $story_id );
|
||||
}
|
||||
|
||||
// Author level support links
|
||||
if ( ! $patreon_link ) $patreon_link = get_the_author_meta( 'fictioneer_user_patreon_link', $author_id );
|
||||
if ( ! $kofi_link ) $kofi_link = get_the_author_meta( 'fictioneer_user_kofi_link', $author_id );
|
||||
if ( ! $subscribestar_link ) $subscribestar_link = get_the_author_meta( 'fictioneer_user_subscribestar_link', $author_id );
|
||||
if ( ! $paypal_link ) $paypal_link = get_the_author_meta( 'fictioneer_user_paypal_link', $author_id );
|
||||
if ( ! $donation_link ) $donation_link = get_the_author_meta( 'fictioneer_user_donation_link', $author_id );
|
||||
|
||||
// Topwebfiction?
|
||||
if ( $topwebfiction_link ) {
|
||||
if ( $support_urls['topwebfiction'] ) {
|
||||
$support_links['topwebfiction'] = array(
|
||||
'label' => __( 'Top Web Fiction', 'fictioneer' ),
|
||||
'icon' => '<i class="fa-solid fa-circle-up"></i>',
|
||||
'link' => $topwebfiction_link
|
||||
'link' => $support_urls['topwebfiction']
|
||||
);
|
||||
}
|
||||
|
||||
// Patreon?
|
||||
if ( $patreon_link ) {
|
||||
if ( $support_urls['patreon'] ) {
|
||||
$support_links['patreon'] = array(
|
||||
'label' => __( 'Patreon', 'fictioneer' ),
|
||||
'icon' => '<i class="fa-brands fa-patreon"></i>',
|
||||
'link' => $patreon_link
|
||||
'link' => $support_urls['patreon']
|
||||
);
|
||||
}
|
||||
|
||||
// Ko-Fi?
|
||||
if ( $kofi_link ) {
|
||||
if ( $support_urls['kofi'] ) {
|
||||
$support_links['kofi'] = array(
|
||||
'label' => __( 'Ko-Fi', 'fictioneer' ),
|
||||
'icon' => fictioneer_get_icon( 'kofi' ),
|
||||
'link' => $kofi_link
|
||||
'link' => $support_urls['kofi']
|
||||
);
|
||||
}
|
||||
|
||||
// SubscribeStar?
|
||||
if ( $subscribestar_link ) {
|
||||
if ( $support_urls['subscribestar'] ) {
|
||||
$support_links['subscribestar'] = array(
|
||||
'label' => __( 'SubscribeStar', 'fictioneer' ),
|
||||
'icon' => '<i class="fa-solid fa-s"></i>',
|
||||
'link' => $subscribestar_link
|
||||
'link' => $support_urls['subscribestar']
|
||||
);
|
||||
}
|
||||
|
||||
// PayPal?
|
||||
if ( $paypal_link ) {
|
||||
if ( $support_urls['paypal'] ) {
|
||||
$support_links['paypal'] = array(
|
||||
'label' => __( 'PayPal', 'fictioneer' ),
|
||||
'icon' => '<i class="fa-brands fa-paypal"></i>',
|
||||
'link' => $paypal_link
|
||||
'link' => $support_urls['paypal']
|
||||
);
|
||||
}
|
||||
|
||||
// Donation?
|
||||
if ( $paypal_link ) {
|
||||
if ( $support_urls['donation'] ) {
|
||||
$support_links['donation'] = array(
|
||||
'label' => __( 'Donation', 'fictioneer' ),
|
||||
'icon' => '<i class="fa-solid fa-hand-holding-heart"></i>',
|
||||
'link' => $donation_link
|
||||
'link' => $support_urls['donation']
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ if ( ! function_exists( 'fictioneer_mobile_user_menu' ) ) {
|
||||
$output['account'] = ob_get_clean();
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SEARCH_MENU_ITEMS ) {
|
||||
if ( FICTIONEER_SHOW_SEARCH_IN_MENUS ) {
|
||||
ob_start();
|
||||
// Start HTML ---> ?>
|
||||
<a href="<?php echo esc_url( home_url( '/?s=' ) ); ?>">
|
||||
|
@ -305,7 +305,7 @@ if ( ! function_exists( 'fictioneer_ajax_get_follows_notifications' ) ) {
|
||||
if ( ! $user ) wp_send_json_error(
|
||||
array(
|
||||
'error' => __( 'Not logged in.', 'fictioneer' ),
|
||||
'html' => '<div class="follow-item"><div class="follow-wrapper"><div class="follow-placeholder truncate truncate--1-1">' . __( 'Not logged in.', 'fictioneer' ) . '</div></div></div>'
|
||||
'html' => '<div class="follow-item"><div class="follow-wrapper"><div class="follow-placeholder truncate _1-1">' . __( 'Not logged in.', 'fictioneer' ) . '</div></div></div>'
|
||||
)
|
||||
);
|
||||
|
||||
@ -346,10 +346,10 @@ if ( ! function_exists( 'fictioneer_ajax_get_follows_notifications' ) ) {
|
||||
// Start HTML ---> ?>
|
||||
<div class="follow-item <?php echo $new; ?>" data-chapter-id="<?php echo $chapter->ID; ?>" data-story-id="<?php echo $story_id; ?>" data-timestamp="<?php echo $chapter_timestamp; ?>">
|
||||
<div class="follow-wrapper">
|
||||
<div class="follow-title truncate truncate--1-1">
|
||||
<div class="follow-title truncate _1-1">
|
||||
<a href="<?php echo get_the_permalink( $chapter->ID ); ?>"><?php echo fictioneer_get_safe_title( $chapter->ID ); ?></a>
|
||||
</div>
|
||||
<div class="follow-meta truncate truncate--1-1"><?php echo $date ; ?> in <?php echo fictioneer_get_safe_title( $story_id ); ?></div>
|
||||
<div class="follow-meta truncate _1-1"><?php echo $date ; ?> in <?php echo fictioneer_get_safe_title( $story_id ); ?></div>
|
||||
<div class="follow-marker">•</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -359,7 +359,7 @@ if ( ! function_exists( 'fictioneer_ajax_get_follows_notifications' ) ) {
|
||||
// Start HTML ---> ?>
|
||||
<div class="follow-item">
|
||||
<div class="follow-wrapper">
|
||||
<div class="follow-placeholder truncate truncate--1-1"><?php _e( 'You are not following any stories.', 'fictioneer' ); ?></div>
|
||||
<div class="follow-placeholder truncate _1-1"><?php _e( 'You are not following any stories.', 'fictioneer' ); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php // <--- End HTML
|
||||
|
@ -27,14 +27,14 @@ $count = isset( $args['count'] ) ? intval( $args['count'] ) : -1;
|
||||
<div class="bookmark-card__progress"></div>
|
||||
<div class="card__main _grid _small _relative-z1">
|
||||
<a href="" class="card__image cell-img bookmark-card__image" <?php echo fictioneer_get_lightbox_attribute(); ?>><img src="" class="no-auto-lightbox"></a>
|
||||
<h3 class="card__title _with-delete _small cell-title bookmark-card__title"><a href="" class="truncate truncate--1-1"></a></h3>
|
||||
<h3 class="card__title _with-delete _small cell-title bookmark-card__title"><a href="" class="truncate _1-1"></a></h3>
|
||||
<div class="card__content bookmark-card__meta _small cell-meta">
|
||||
<i class="fa-solid fa-bookmark"></i>
|
||||
<span class="bookmark-card__percentage"></span>
|
||||
<i class="fa-solid fa-calendar-days"></i>
|
||||
<time></time>
|
||||
</div>
|
||||
<div class="card__content _small cell-desc bookmark-card__excerpt truncate truncate--3-3"></div>
|
||||
<div class="card__content _small cell-desc bookmark-card__excerpt truncate _3-3"></div>
|
||||
</div>
|
||||
<button class="card__delete button-delete-bookmark" data-bookmark-id><i class="fa-solid fa-trash-can"></i></button>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title">
|
||||
<a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php
|
||||
<a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php
|
||||
// Make sure there are no whitespaces in-between!
|
||||
if ( fictioneer_get_field( 'fictioneer_chapter_list_title' ) ) {
|
||||
echo '<span class="show-below-480">' . wp_strip_all_tags( fictioneer_get_field( 'fictioneer_chapter_list_title' ) ) . '</span>';
|
||||
@ -102,7 +102,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="card__content cell-desc truncate truncate--4-4">
|
||||
<div class="card__content cell-desc truncate _4-4">
|
||||
<?php if ( get_option( 'fictioneer_show_authors' ) && ! $hide_author ) : ?>
|
||||
<span class="show-below-desktop"><?php
|
||||
printf(
|
||||
|
@ -98,7 +98,7 @@ $comment_count = get_comments( $comment_args );
|
||||
<?php if ( $show_type ) : ?>
|
||||
<div class="card__label"><?php _ex( 'Collection', 'Collection card label.', 'fictioneer' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $title; ?></a></h3>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $title; ?></a></h3>
|
||||
</div>
|
||||
|
||||
<div class="card__main _grid _large">
|
||||
@ -107,7 +107,7 @@ $comment_count = get_comments( $comment_args );
|
||||
<a href="<?php the_post_thumbnail_url( 'full' ); ?>" title="<?php printf( __( '%s Thumbnail', 'fictioneer' ), $title ) ?>" class="card__image cell-img" <?php echo fictioneer_get_lightbox_attribute(); ?>><?php the_post_thumbnail( 'cover' ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card__content cell-desc truncate <?php echo count( $items ) > 2 ? 'truncate--3-4' : 'truncate--4-4'; ?>"><span><?php echo $description; ?></span></div>
|
||||
<div class="card__content cell-desc truncate <?php echo count( $items ) > 2 ? '_3-4' : '_4-4'; ?>"><span><?php echo $description; ?></span></div>
|
||||
|
||||
<?php if ( ! empty( $items ) ): ?>
|
||||
<ol class="card__link-list cell-list">
|
||||
|
@ -27,7 +27,7 @@ $comments_number = get_comments_number();
|
||||
<?php if ( $show_type ) : ?>
|
||||
<div class="card__label"><?php _ex( 'Page', 'Blog card label.', 'fictioneer' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $title; ?></a></h3>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $title; ?></a></h3>
|
||||
</div>
|
||||
|
||||
<div class="card__main _grid _large">
|
||||
@ -41,7 +41,7 @@ $comments_number = get_comments_number();
|
||||
><?php the_post_thumbnail( 'cover' ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card__content cell-desc truncate truncate--4-4"><span><?php echo get_the_excerpt(); ?></span></div>
|
||||
<div class="card__content cell-desc truncate _4-4"><span><?php echo get_the_excerpt(); ?></span></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -28,7 +28,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
<?php if ( $show_type ) : ?>
|
||||
<div class="card__label"><?php _ex( 'Blog', 'Blog card label.', 'fictioneer' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $title; ?></a></h3>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $title; ?></a></h3>
|
||||
</div>
|
||||
|
||||
<div class="card__main _grid _large">
|
||||
@ -42,7 +42,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
><?php the_post_thumbnail( 'cover' ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card__content cell-desc truncate truncate--4-4"><span><?php echo get_the_excerpt(); ?></span></div>
|
||||
<div class="card__content cell-desc truncate _4-4"><span><?php echo get_the_excerpt(); ?></span></div>
|
||||
|
||||
<?php if ( $categories || $tags ) : ?>
|
||||
<div class="card__tag-list dot-separator cell-tax">
|
||||
|
@ -42,7 +42,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
<?php if ( $show_type ) : ?>
|
||||
<div class="card__label"><?php _ex( 'Recommendation', 'Recommendation card label.', 'fictioneer' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $title; ?></a></h3>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $title; ?></a></h3>
|
||||
</div>
|
||||
|
||||
<div class="card__main _grid _large">
|
||||
@ -56,7 +56,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
><?php the_post_thumbnail( 'cover' ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card__content cell-desc truncate truncate--4-4">
|
||||
<div class="card__content cell-desc truncate _4-4">
|
||||
<?php
|
||||
printf(
|
||||
__( '<span class="author-by">by</span> <span class="author">%s</span> <span>—</span> ', 'fictioneer' ),
|
||||
|
@ -43,7 +43,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
<div class="card__label"><?php _ex( 'Story', 'Story card label.', 'fictioneer' ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $story['title']; ?></a></h3>
|
||||
<h3 class="card__title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $story['title']; ?></a></h3>
|
||||
|
||||
<?php if ( fictioneer_get_field( 'fictioneer_story_sticky' ) && ! is_search() && ! is_archive() ) : ?>
|
||||
<div class="card__sticky-icon" title="<?php echo esc_attr__( 'Sticky', 'fictioneer' ); ?>"><i class="fa-solid fa-thumbtack"></i></div>
|
||||
@ -64,7 +64,7 @@ $show_type = isset( $args['show_type'] ) && $args['show_type'];
|
||||
><?php the_post_thumbnail( 'cover' ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card__content cell-desc truncate <?php echo count( $chapter_ids ) > 2 ? 'truncate--3-4' : 'truncate--4-4'; ?>">
|
||||
<div class="card__content cell-desc truncate <?php echo count( $chapter_ids ) > 2 ? '_3-4' : '_4-4'; ?>">
|
||||
<?php if ( get_option( 'fictioneer_show_authors' ) && ! $hide_author ) : ?>
|
||||
<span class="show-below-desktop"><?php
|
||||
printf(
|
||||
|
@ -87,7 +87,7 @@ if ( $profile_page && $profile_page > 0 ) {
|
||||
<div id="follow-menu-scroll" class="follow-notifications__scroll">
|
||||
<div class="follow-item">
|
||||
<div class="follow-wrapper">
|
||||
<div class="follow-placeholder truncate truncate--1-1"><?php _e( 'Looking for updates...', 'fictioneer' ) ?></div>
|
||||
<div class="follow-placeholder truncate _1-1"><?php _e( 'Looking for updates...', 'fictioneer' ) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -96,7 +96,7 @@ if ( $profile_page && $profile_page > 0 ) {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( FICTIONEER_SEARCH_MENU_ITEMS ) : ?>
|
||||
<?php if ( FICTIONEER_SHOW_SEARCH_IN_MENUS ) : ?>
|
||||
<a
|
||||
href="<?php echo esc_url( home_url( '/?s=' ) ); ?>"
|
||||
title="<?php esc_attr_e( 'Search Page', 'fictioneer' ) ?>"
|
||||
|
@ -80,7 +80,7 @@ $entries = new WP_Query( $query_args );
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $title ) ?>" class="card__text-icon _small cell-img"><span class="text-icon"><?php echo $text_icon; ?></span></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php
|
||||
$list_title = fictioneer_get_field( 'fictioneer_chapter_list_title' );
|
||||
echo $list_title ? wp_strip_all_tags( $list_title ) : $title;
|
||||
?></a></h3>
|
||||
@ -118,7 +118,7 @@ $entries = new WP_Query( $query_args );
|
||||
</div>
|
||||
|
||||
<div class="card__overlay-infobox _excerpt escape-last-click">
|
||||
<div class="truncate truncate--3-3"><?php echo fictioneer_get_forced_excerpt( $post ); ?></div>
|
||||
<div class="truncate _3-3"><?php echo fictioneer_get_forced_excerpt( $post ); ?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -80,13 +80,13 @@ $entries = new WP_Query( $query_args );
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( $title ) ?>" class="card__text-icon _small cell-img"><span class="text-icon"><?php echo $text_icon; ?></span></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php
|
||||
$list_title = fictioneer_get_field( 'fictioneer_chapter_list_title' );
|
||||
echo $list_title ? wp_strip_all_tags( $list_title ) : $title;
|
||||
?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-desc">
|
||||
<div class="truncate truncate--3-3 <?php if ( ! $args['spoiler'] ) echo '_obfuscated'; ?>">
|
||||
<div class="truncate _3-3 <?php if ( ! $args['spoiler'] ) echo '_obfuscated'; ?>">
|
||||
<?php
|
||||
if ( get_option( 'fictioneer_show_authors' ) && $args['source'] ) {
|
||||
printf(
|
||||
@ -104,7 +104,7 @@ $entries = new WP_Query( $query_args );
|
||||
}
|
||||
|
||||
$excerpt = fictioneer_get_forced_excerpt( $post );
|
||||
$spoiler_note = str_repeat( _x( '· ', 'Chapter preview obfuscation characters. Repeated 0.65 times the excerpt length in characters.', 'fictioneer' ), intval( strlen( $excerpt ) * 0.65 ) );
|
||||
$spoiler_note = str_repeat( _x( '· ', 'Chapter preview obfuscation character.', 'fictioneer' ), intval( strlen( $excerpt ) ) );
|
||||
?>
|
||||
<?php if ( ! $args['spoiler'] ) : ?>
|
||||
<span onclick="this.parentElement.classList.toggle('_obfuscated');" tabindex="0">
|
||||
|
@ -71,9 +71,9 @@ $entries = new WP_Query( $query_args );
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $title; ?></a></h3>
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $title; ?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-desc truncate truncate--3-3">
|
||||
<div class="card__content _small cell-desc truncate _3-3">
|
||||
<?php
|
||||
printf(
|
||||
__( '<span class="author-by">by</span> <span class="author">%s</span> <span>—</span> ', 'fictioneer' ),
|
||||
@ -93,7 +93,7 @@ $entries = new WP_Query( $query_args );
|
||||
|
||||
<?php if ( $show_taxonomies ) : ?>
|
||||
<div class="card__overlay-infobox escape-last-click">
|
||||
<div class="card__tag-list _small truncate truncate--3-3 dot-separator">
|
||||
<div class="card__tag-list _small truncate _3-3 dot-separator">
|
||||
<?php
|
||||
if ( $fandoms || $characters || $genres || $tags ) {
|
||||
if ( $fandoms ) {
|
||||
|
@ -89,7 +89,7 @@ $entries = new WP_Query( $query_args );
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $title; ?></a></h3>
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $title; ?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-meta text-overflow-ellipsis">
|
||||
<?php
|
||||
@ -102,7 +102,7 @@ $entries = new WP_Query( $query_args );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="card__content _small cell-desc truncate truncate--3-3">
|
||||
<div class="card__content _small cell-desc truncate _3-3">
|
||||
<?php
|
||||
if ( ! empty( $one_sentence ) ) {
|
||||
echo wp_strip_all_tags( $one_sentence, true );
|
||||
|
@ -65,9 +65,9 @@ $entries = new WP_Query( $query_args );
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $story['title']; ?></a></h3>
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $story['title']; ?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-desc truncate truncate--3-3">
|
||||
<div class="card__content _small cell-desc truncate _3-3">
|
||||
<?php if ( get_option( 'fictioneer_show_authors' ) ) : ?>
|
||||
<span><?php
|
||||
printf(
|
||||
@ -87,7 +87,7 @@ $entries = new WP_Query( $query_args );
|
||||
<div class="card__overlay-infobox escape-last-click">
|
||||
|
||||
<?php if ( ! get_option( 'fictioneer_hide_taxonomies_on_story_cards' ) ) : ?>
|
||||
<div class="card__tag-list _small truncate truncate--2-2 dot-separator">
|
||||
<div class="card__tag-list _small truncate _2-2 dot-separator">
|
||||
<?php
|
||||
if ( $story['has_taxonomies'] || $tags ) {
|
||||
if ( $story['fandoms'] ) {
|
||||
|
@ -62,9 +62,9 @@ $entries = new WP_Query( $query_args );
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $story['title']; ?></a></h3>
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $story['title']; ?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-desc truncate truncate--3-3">
|
||||
<div class="card__content _small cell-desc truncate _3-3">
|
||||
<?php if ( get_option( 'fictioneer_show_authors' ) ) : ?>
|
||||
<span><?php
|
||||
printf(
|
||||
|
@ -89,9 +89,9 @@ $entries = new WP_Query( $query_args );
|
||||
<a href="<?php the_post_thumbnail_url( 'full' ); ?>" title="<?php echo esc_attr( sprintf( __( '%s Thumbnail', 'fictioneer' ), $story['title'] ) ); ?>" class="card__image cell-img" <?php echo fictioneer_get_lightbox_attribute(); ?>><?php echo get_the_post_thumbnail( $post, 'snippet', ['class' => 'no-auto-lightbox'] ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $story['title']; ?></a></h3>
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $story['title']; ?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-desc truncate truncate--1-1">
|
||||
<div class="card__content _small cell-desc truncate _1-1">
|
||||
<?php
|
||||
if ( get_option( 'fictioneer_show_authors' ) ) {
|
||||
printf(
|
||||
@ -143,7 +143,7 @@ $entries = new WP_Query( $query_args );
|
||||
</div>
|
||||
|
||||
<div class="card__overlay-infobox _excerpt escape-last-click">
|
||||
<div class="truncate truncate--3-3"><strong><?php echo $chapter_title; ?>:</strong> <?php echo $chapter_excerpt; ?></div>
|
||||
<div class="truncate _3-3"><strong><?php echo $chapter_title; ?>:</strong> <?php echo $chapter_excerpt; ?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -87,10 +87,10 @@ $entries = new WP_Query( $query_args );
|
||||
<a href="<?php the_post_thumbnail_url( 'full' ); ?>" title="<?php echo esc_attr( sprintf( __( '%s Thumbnail', 'fictioneer' ), $story['title'] ) ); ?>" class="card__image cell-img" <?php echo fictioneer_get_lightbox_attribute(); ?>><?php echo get_the_post_thumbnail( $post, 'snippet', ['class' => 'no-auto-lightbox'] ); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate truncate--1-1"><?php echo $story['title']; ?></a></h3>
|
||||
<h3 class="card__title _small cell-title"><a href="<?php the_permalink(); ?>" class="truncate _1-1"><?php echo $story['title']; ?></a></h3>
|
||||
|
||||
<div class="card__content _small cell-desc">
|
||||
<div class="truncate <?php echo count( $chapter_list ) > 1 ? 'truncate--1-1' : 'truncate--2-2'; ?>">
|
||||
<div class="truncate <?php echo count( $chapter_list ) > 1 ? '_1-1' : '_2-2'; ?>">
|
||||
<?php
|
||||
if ( get_option( 'fictioneer_show_authors' ) ) {
|
||||
printf(
|
||||
|
@ -69,7 +69,7 @@
|
||||
<div class="select-wrapper">
|
||||
<select id="reader-settings-font-select" name="fonts">
|
||||
<?php
|
||||
$fonts = [FICTIONEER_PRIMARY_FONT, 'System Font', 'Lato', 'Helvetica Neue', 'Georgia', 'Roboto Mono', 'Roboto Serif', 'Cormorant Garamond', 'Open Dyslexic'];
|
||||
$fonts = [FICTIONEER_PRIMARY_FONT_CSS, 'System Font', 'Lato', 'Helvetica Neue', 'Georgia', 'Roboto Mono', 'Roboto Serif', 'Cormorant Garamond', 'Open Dyslexic'];
|
||||
$font_names = [FICTIONEER_PRIMARY_FONT_NAME, __( 'System Font', 'fictioneer' ), __( 'Lato', 'fictioneer' ), __( 'Helvetica Neue', 'fictioneer' ), __( 'Georgia', 'fictioneer' ), __( 'Roboto Mono', 'fictioneer' ), __( 'Roboto Serif', 'fictioneer' ), __( 'Cormorant Garamond', 'fictioneer' ), __( 'Open Dyslexic', 'fictioneer' )];
|
||||
$length = count( $fonts );
|
||||
|
||||
|
@ -31,7 +31,7 @@ if ( $custom_pages ) {
|
||||
}
|
||||
|
||||
// Check for cached chapters output
|
||||
$chapters_html = FICTIONEER_STORY_CHAPTER_LIST_CACHE ? get_transient( 'fictioneer_story_chapter_list_' . $story_id ) : null;
|
||||
$chapters_html = FICTIONEER_CACHE_CHAPTER_LISTS ? get_transient( 'fictioneer_story_chapter_list_' . $story_id ) : null;
|
||||
|
||||
// Flags
|
||||
$hide_icons = fictioneer_get_field( 'fictioneer_story_hide_chapter_icons' ) || get_option( 'fictioneer_hide_chapter_icons' );
|
||||
@ -267,7 +267,7 @@ $blog_posts = new WP_Query(
|
||||
<i class="<?php echo empty( $chapter['icon'] ) ? 'fa-solid fa-book' : $chapter['icon']; ?> chapter-group__list-item-icon"></i>
|
||||
<?php endif; ?>
|
||||
|
||||
<a href="<?php echo $chapter['link']; ?>" class="chapter-group__list-item-link truncate truncate--1-1 <?php echo $chapter['password'] ? '_password' : ''; ?>">
|
||||
<a href="<?php echo $chapter['link']; ?>" class="chapter-group__list-item-link truncate _1-1 <?php echo $chapter['password'] ? '_password' : ''; ?>">
|
||||
<?php if ( ! empty( $chapter['prefix'] ) ): ?>
|
||||
<span class="chapter-group__list-item-prefix list-view"><?php echo $chapter['prefix']; ?></span>
|
||||
<?php endif; ?>
|
||||
@ -286,7 +286,7 @@ $blog_posts = new WP_Query(
|
||||
<i class="fa-solid fa-lock icon-password grid-view"></i>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="chapter-group__list-item-subrow truncate truncate--1-1 dot-separator">
|
||||
<div class="chapter-group__list-item-subrow truncate _1-1 dot-separator">
|
||||
<?php if ( ! empty( $chapter['warning'] ) ) : ?>
|
||||
<span class="chapter-group__list-item-warning list-view" style="<?php echo $chapter['warning_color']; ?>">
|
||||
<?php printf( __( '<b>Warning:</b> <span>%s</span>', 'fictioneer' ), $chapter['warning'] ); ?>
|
||||
@ -351,7 +351,7 @@ $blog_posts = new WP_Query(
|
||||
ob_end_flush();
|
||||
|
||||
// Cache for next time (24 hours)
|
||||
if ( FICTIONEER_STORY_CHAPTER_LIST_CACHE ) {
|
||||
if ( FICTIONEER_CACHE_CHAPTER_LISTS ) {
|
||||
set_transient( 'fictioneer_story_chapter_list_' . $story_id, $chapters_html, 86400 );
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ $story = $args['story_data'];
|
||||
?>
|
||||
|
||||
<footer class="story__footer padding-left padding-right">
|
||||
<div class="story__meta truncate truncate--1-1">
|
||||
<div class="story__meta truncate _1-1">
|
||||
<span class="story__status">
|
||||
<i class="<?php echo $story['icon']; ?>"></i>
|
||||
<span><?php echo $story['status']; ?></span>
|
||||
|
@ -145,7 +145,7 @@ $tabs[ $current_tab ]['classes'][] = '_current';
|
||||
<div class="card__header _large"><h3 class="card__title"></h3></div>
|
||||
<div class="card__main _grid _large">
|
||||
<div class="card__image cell-img"></div>
|
||||
<div class="card__content cell-desc truncate truncate--3-4"></div>
|
||||
<div class="card__content cell-desc truncate _3-4"></div>
|
||||
<div class="card__tag-list cell-tax"><span></span><span></span><span></span></div>
|
||||
</div>
|
||||
<div class="card__footer"><div class="card__left text-overflow-ellipsis"></div></div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
transform: translateZ(0); // Improve performance
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
@include bp(601px) {
|
||||
.admin-bar:not(.mobile-menu-open) {
|
||||
.main-navigation {
|
||||
top: 46px;
|
||||
@ -20,7 +20,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 783px) {
|
||||
@include bp(783px) {
|
||||
.admin-bar:not(.mobile-menu-open) {
|
||||
.main-navigation {
|
||||
top: 32px;
|
||||
|
@ -204,10 +204,10 @@
|
||||
&__badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--badge-generic-background);
|
||||
color: var(--badge-generic-text);
|
||||
font: var(--font-weight-badge) 10px/1 var(--font-system);
|
||||
font: var(--font-weight-badge) 10px/1 var(--font-base);
|
||||
letter-spacing: -0.03em;
|
||||
text-shadow: none;
|
||||
border-radius: 2px;
|
||||
padding: 0 4px;
|
||||
|
@ -466,10 +466,10 @@
|
||||
&__badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--badge-generic-background);
|
||||
color: var(--badge-generic-text);
|
||||
font: var(--font-weight-badge) 10px/1 var(--font-system);
|
||||
font: var(--font-weight-badge) 10px/1 var(--font-base);
|
||||
letter-spacing: -0.03em;
|
||||
text-shadow: none;
|
||||
border-radius: 2px;
|
||||
padding: 0 4px;
|
||||
|
@ -69,6 +69,8 @@ figure {
|
||||
// =============================================================================
|
||||
|
||||
:is(.wp-block-embed, .wp-block-audio, .wp-block-video, .wp-block-table, .wp-block-quote, .wp-block-pullquote, .wp-block-gallery, .wp-block-code, .wp-block-preformatted) {
|
||||
clear: both;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: unquote("max(2.5rem, var(--paragraph-spacing) + 1rem)");
|
||||
}
|
||||
@ -330,6 +332,12 @@ figure {
|
||||
.wp-block-embed {
|
||||
position: relative;
|
||||
|
||||
&:is(.alignright, .alignleft) {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
@ -155,7 +155,7 @@
|
||||
--font-weight-strong: 600;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-heading: 700;
|
||||
--font-weight-badge: 500;
|
||||
--font-weight-badge: 600;
|
||||
--font-weight-post-meta: 400;
|
||||
--font-weight-ribbon: 700;
|
||||
--font-weight-navigation: 400;
|
||||
|
@ -226,7 +226,7 @@
|
||||
// === SHADOWS ===============================================================
|
||||
--floating-shadow: 0 0 16px 4px rgb(0 0 0 / 30%), 1px 1px 0 0 rgb(255 255 255 / 1%) inset;
|
||||
--container-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
|
||||
--container-box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
|
||||
--container-box-shadow: 0 1px 3px 0 rgb(0 0 0 / 12%), 0 1px 2px -1px rgb(0 0 0 / 10%);
|
||||
--figure-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
|
||||
--card-image-drop-shadow: none;
|
||||
--caption-overlay-shadow: linear-gradient(0deg, rgb(0 0 0 / 70%), rgb(0 0 0 / 30%) 70%, transparent);
|
||||
@ -256,7 +256,7 @@
|
||||
--font-weight-semi-strong: 400;
|
||||
--font-weight-medium: 400;
|
||||
--font-weight-heading: 600;
|
||||
--font-weight-badge: 500;
|
||||
--font-weight-badge: 600;
|
||||
--font-weight-post-meta: 300;
|
||||
--font-weight-ribbon: 600;
|
||||
--font-weight-navigation: 400;
|
||||
@ -536,7 +536,7 @@
|
||||
--font-weight-strong: 600;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-heading: 600;
|
||||
--font-weight-badge: 500;
|
||||
--font-weight-badge: 600;
|
||||
--font-weight-post-meta: 400;
|
||||
--font-weight-ribbon: 700;
|
||||
--font-weight-navigation: 400;
|
||||
@ -547,7 +547,7 @@
|
||||
--font-weight-strong: 500;
|
||||
--font-weight-medium: 400;
|
||||
--font-weight-heading: 600;
|
||||
--font-weight-badge: 500;
|
||||
--font-weight-badge: 600;
|
||||
--font-weight-post-meta: 300;
|
||||
--font-weight-ribbon: 500;
|
||||
--font-weight-navigation: 400;
|
||||
|
@ -77,16 +77,16 @@ body:not(.is-editor):not(.is-admin) {
|
||||
overflow: hidden;
|
||||
|
||||
// Desktop-Mobile
|
||||
&--1-1 {
|
||||
&._1-1 {
|
||||
-webkit-line-clamp: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
&--2-2 {
|
||||
&._2-2 {
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
&--2-3 {
|
||||
&._2-3 {
|
||||
-webkit-line-clamp: 3;
|
||||
|
||||
@include bp(640px) {
|
||||
@ -94,11 +94,11 @@ body:not(.is-editor):not(.is-admin) {
|
||||
}
|
||||
}
|
||||
|
||||
&--3-3 {
|
||||
&._3-3 {
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
|
||||
&--3-4 {
|
||||
&._3-4 {
|
||||
-webkit-line-clamp: 4;
|
||||
|
||||
@include bp(640px) {
|
||||
@ -106,7 +106,7 @@ body:not(.is-editor):not(.is-admin) {
|
||||
}
|
||||
}
|
||||
|
||||
&--4-4 {
|
||||
&._4-4 {
|
||||
-webkit-line-clamp: 4;
|
||||
}
|
||||
}
|
||||
|
@ -133,6 +133,10 @@ body {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
:is(.wp-block-embed, .wp-block-audio, .wp-block-video, .wp-block-table, .wp-block-quote, .wp-block-pullquote, .wp-block-gallery, .wp-block-code, .wp-block-preformatted) {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// UTILITY
|
||||
// =============================================================================
|
||||
@ -470,7 +474,7 @@ body {
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// GALLERY
|
||||
// IMAGE BLOCK
|
||||
// =============================================================================
|
||||
|
||||
.wp-block-image {
|
||||
|
Loading…
x
Reference in New Issue
Block a user