Redirect home from bookshelf if not logged in

This commit is contained in:
Tetrakern 2024-07-19 20:52:52 +02:00
parent e46f6521c4
commit b667a45d3d
4 changed files with 12 additions and 6 deletions

View File

@ -16,7 +16,7 @@
// Return home if bookmarks are disabled
if ( ! get_option( 'fictioneer_enable_bookmarks' ) ) {
wp_redirect( home_url() );
exit();
exit;
}
// Header

View File

@ -12,6 +12,12 @@
*/
// Only for logged-in users...
if ( ! is_user_logged_in() && ! get_option( 'fictioneer_enable_public_cache_compatibility' ) ) {
wp_safe_redirect( home_url() );
exit;
}
// Setup
$current_tab = sanitize_key( $_GET['tab'] ?? '' );
$order = fictioneer_sanitize_query_var( $_GET['order'] ?? 0, ['desc', 'asc'], 'desc' );

View File

@ -12,10 +12,10 @@
*/
// Only for logged-in users...
// Only for logged-in users and not compatible with public caching...
if ( ! is_user_logged_in() || get_option( 'fictioneer_enable_public_cache_compatibility' ) ) {
wp_safe_redirect( home_url() );
exit();
exit;
}
// Setup

View File

@ -15,7 +15,7 @@
// Only for logged-in users...
if ( ! is_user_logged_in() && ! get_option( 'fictioneer_enable_public_cache_compatibility' ) ) {
wp_safe_redirect( home_url() );
exit();
exit;
}
// If public caching is active, redirect to dashboard profile
@ -24,13 +24,13 @@ if (
get_option( 'fictioneer_enable_public_cache_compatibility' )
) {
wp_safe_redirect( get_edit_profile_url( 0 ) );
exit();
exit;
}
// Redundant safeguard
if ( ! is_user_logged_in() ) {
wp_safe_redirect( home_url() );
exit();
exit;
}
// Setup