From 3109dbcad46f93bdf6a711b283d695882eaabaaa Mon Sep 17 00:00:00 2001 From: Joshua P Panter Date: Fri, 7 Sep 2018 03:40:35 -0400 Subject: [PATCH] yourls_is_admin check for plugin link list filter --- authmgr/plugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/authmgr/plugin.php b/authmgr/plugin.php index 5ea6ae0..eeb8b23 100644 --- a/authmgr/plugin.php +++ b/authmgr/plugin.php @@ -3,7 +3,7 @@ Plugin Name: Authorization Manager Plugin URI: https://github.com/nicwaller/yourls-authmgr-plugin Description: Restrict classes of users to specific functions -Version: 0.11.0 +Version: 0.11.1 Author: nicwaller Author URI: https://github.com/nicwaller */ @@ -129,7 +129,9 @@ function authmgr_intercept_admin() { /* * Cosmetic filter: removes disallowed plugins from link list */ -yourls_add_filter( 'admin_sublinks', 'authmgr_admin_sublinks' ); +if( yourls_is_admin() ) { + yourls_add_filter( 'admin_sublinks', 'authmgr_admin_sublinks' ); +} function authmgr_admin_sublinks( $links ) { global $authmgr_allowed_plugin_pages;