Redirect home from bookshelf if not logged in
This commit is contained in:
parent
e46f6521c4
commit
b667a45d3d
@ -16,7 +16,7 @@
|
||||
// Return home if bookmarks are disabled
|
||||
if ( ! get_option( 'fictioneer_enable_bookmarks' ) ) {
|
||||
wp_redirect( home_url() );
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
// Header
|
||||
|
@ -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' );
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user