Check for ABSPATH in template parts

Probably overkill but oh well...
This commit is contained in:
Tetrakern 2023-08-20 20:21:48 +02:00
parent 92e85fdd0c
commit 110b024e63
51 changed files with 221 additions and 0 deletions

View File

@ -18,6 +18,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$page = get_query_var( 'paged', 1 ) ?: 1; // Main query
$order = array_intersect( [strtolower( $_GET['order'] ?? 0 )], ['desc', 'asc'] );

View File

@ -15,6 +15,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$show_empty = isset( $args['show_empty'] ) && $args['show_empty'];
$count = isset( $args['count'] ) ? intval( $args['count'] ) : -1;

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( get_the_ID() );
$story_id = fictioneer_get_field( 'fictioneer_chapter_story' );

View File

@ -15,6 +15,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$list_title = trim( fictioneer_get_field( 'fictioneer_collection_list_title' ) );
$title = empty( $list_title ) ? fictioneer_get_safe_title( get_the_ID() ) : $list_title;

View File

@ -14,6 +14,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<li class="card _hidden-result">
<div class="card__body polygon">
<div class="card__main _hidden-result">

View File

@ -13,6 +13,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( get_the_ID() );
$show_type = $args['show_type'] ?? false;

View File

@ -13,6 +13,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( get_the_ID() );
$tags = get_the_tags();

View File

@ -15,6 +15,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( get_the_ID() );
$urls = array_merge(

View File

@ -17,6 +17,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$story = fictioneer_get_story_data( $post->ID );
$latest = $args['show_latest'] ?? false;

View File

@ -20,6 +20,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
$story_visible = $args['story_post'] &&
! empty( $args['story_data']['title'] ) &&
get_post_status( $args['story_post']->ID ) === 'publish';

View File

@ -22,6 +22,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$fandoms = get_the_terms( $args['collection_id'], 'fcn_fandom' );
$characters = get_the_terms( $args['collection_id'], 'fcn_character' );

View File

@ -23,6 +23,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$story_count = 0;
$word_count = 0;

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="consent-banner" class="consent-banner hidden" role="banner">
<div class="consent-banner__wrapper">
<?php

View File

@ -10,6 +10,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div class="cookies spacing-top spacing-bottom ">
<button type="button" data-click="reset-consent" class="button"><?php _e( 'Reset Consent', 'fictioneer' ); ?></button>
<button type="button" data-click="clear-cookies" data-message="<?php _e( 'Cookies and local storage have been cleared. To keep it that way, you should leave the site.', 'fictioneer' ); ?>" class="button"><?php _e( 'Clear Cookies', 'fictioneer' ); ?></button>

View File

@ -15,6 +15,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$bookmarks_link = fictioneer_get_assigned_page_link( 'fictioneer_bookmarks_page' );
$discord_invite_link = get_option( 'fictioneer_discord_invite_link' );

View File

@ -25,6 +25,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$card_counter = 0;

View File

@ -26,6 +26,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$card_counter = 0;

View File

@ -21,6 +21,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Prepare query
$query_args = array(
'post_type' => 'post',

View File

@ -22,6 +22,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$show_taxonomies = ! get_option( 'fictioneer_hide_taxonomies_on_recommendation_cards' );

View File

@ -23,6 +23,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$show_taxonomies = ! get_option( 'fictioneer_hide_taxonomies_on_recommendation_cards' );

View File

@ -23,6 +23,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$show_taxonomies = ! get_option( 'fictioneer_hide_taxonomies_on_story_cards' );

View File

@ -23,6 +23,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Prepare query
$query_args = array(
'post_type' => 'fcn_story',

View File

@ -26,6 +26,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$card_counter = 0;

View File

@ -28,6 +28,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$card_counter = 0;

View File

@ -12,6 +12,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<?php if ( have_posts() ) : ?>
<section class="blog-posts">
<?php

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="bbcodes-modal" class="bbcodes modal">
<label for="modal-bbcodes-toggle" class="background-close"></label>
<div class="modal__wrapper">

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="formatting-modal" class="reader-settings modal">
<label for="modal-formatting-toggle" class="background-close"></label>
<div class="modal__wrapper narrow-inputs">

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="login-modal" class="login modal">
<label for="modal-login-toggle" class="background-close"></label>
<div class="modal__wrapper">

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="sharing-modal" class="sharing modal">
<label for="modal-sharing-toggle" class="background-close"></label>
<div class="modal__wrapper">

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="site-settings-modal" class="site-settings modal">
<label for="modal-site-settings-toggle" class="background-close"></label>
<div class="modal__wrapper narrow-inputs">

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="suggestions-modal" class="suggestions modal">
<label for="suggestions-modal-toggle" class="background-close"></label>

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="tts-settings-modal" class="tts-settings modal">
<label for="modal-tts-settings-toggle" class="background-close"></label>
<div class="modal__wrapper narrow-inputs">

View File

@ -15,6 +15,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<nav id="full-navigation" class="main-navigation" aria-label="Main Navigation">
<div id="nav-observer-sticky" class="observer nav-observer"></div>
<div class="main-navigation__background"></div>

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$title = fictioneer_get_safe_title( get_the_ID() );
$label = esc_attr( sprintf( _x( 'Continue reading %s', 'Read more link aria label', 'fictioneer' ), $title ) );

View File

@ -18,6 +18,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$fandoms = get_the_terms( $args['recommendation_id'], 'fcn_fandom' );
$characters = get_the_terms( $args['recommendation_id'], 'fcn_character' );

View File

@ -14,6 +14,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$feed = fictioneer_get_rss_link();

View File

@ -27,6 +27,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Prepare query
$query_args = array (
'post_type' => $args['type'],

View File

@ -15,6 +15,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<header class="header hide-on-fullscreen">
<?php do_action( 'fictioneer_header', $args ); ?>

View File

@ -18,6 +18,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$story_id = $args['story_id'];
$story = $args['story_data'];

View File

@ -17,6 +17,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$story_id = $args['story_id'];
$story = $args['story_data'];

View File

@ -18,6 +18,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Only render to bottom padding if behind a password
if ( post_password_required() ) {
// Start HTML ---> ?>

View File

@ -17,6 +17,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$story = $args['story_data'];
$story_id = $args['story_id'];

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<template class="bookmark-small-card-template">
<li class="card _small bookmark-card" data-color>
<div class="card__body polygon">

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<template class="comment-edit-actions-template">
<div class="fictioneer-comment__edit-actions">
<button

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<template id="mobile-bookmark-template" hidden>
<li class="mobile-menu__bookmark">
<button class="mobile-menu-bookmark-delete-button" data-bookmark-id><i class="fa-solid fa-trash-alt"></i></button>

View File

@ -8,6 +8,13 @@
*/
?>
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
?>
<div id="tts-interface" class="tts-interface hidden" data-show-settings="false" data-regex="<?php echo esc_attr( FICTIONEER_TTS_REGEX ); ?>">
<div class="tts-interface__wrapper">
<div class="tts-interface__controls">

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$current_user = $args['user'];

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$current_user = $args['user'];
$bookmarks_link = fictioneer_get_assigned_page_link( 'fictioneer_bookmarks_page' );

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$current_user = $args['user'];
$avatar = get_avatar( $current_user->ID, 32 );

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Abort if OAuth is disabled
if ( ! get_option( 'fictioneer_enable_oauth' ) ) return;

View File

@ -16,6 +16,9 @@
<?php
// No direct access!
defined( 'ABSPATH' ) OR exit;
// Setup
$current_user = $args['user'];
$fingerprint = fictioneer_get_user_fingerprint( $current_user->ID );