From 9e634f32297fa40ae2dfbf83a0a25bae9aedea65 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 9 Aug 2021 15:08:14 -0700 Subject: [PATCH] Prevent adding paired browsing scripts when in dev mode but user is not logged-in --- src/Admin/PairedBrowsing.php | 2 +- src/MobileRedirection.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Admin/PairedBrowsing.php b/src/Admin/PairedBrowsing.php index 156ab603a4a..782c3664f6c 100644 --- a/src/Admin/PairedBrowsing.php +++ b/src/Admin/PairedBrowsing.php @@ -136,7 +136,7 @@ public function filter_validated_url_status_actions( $actions, WP_Post $post ) { * Initialize frontend. */ public function init_frontend() { - if ( ! amp_is_available() || ! amp_is_dev_mode() ) { + if ( ! amp_is_available() || ! amp_is_dev_mode() || ! is_user_logged_in() ) { return; } diff --git a/src/MobileRedirection.php b/src/MobileRedirection.php index 60b43a9d539..1566762d0f3 100644 --- a/src/MobileRedirection.php +++ b/src/MobileRedirection.php @@ -591,7 +591,7 @@ public function add_mobile_version_switcher_link() { - +