From ad55076a2d8e70f593cdd8bc9bdb9e75e71d6195 Mon Sep 17 00:00:00 2001 From: Steve Grunwell Date: Thu, 8 May 2014 08:46:23 -0400 Subject: [PATCH 1/3] Changed add_options_page capability Use the activate_plugins, not edit_plugins, capability for add_options_page() as the latter makes the plugin settings page inaccessible when DISALLOW_FILE_EDIT is enabled in wp-config.php --- displaytweets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/displaytweets.php b/displaytweets.php index 0ec1acc..f383cac 100644 --- a/displaytweets.php +++ b/displaytweets.php @@ -294,7 +294,7 @@ public function add_settings_page() { add_options_page( __( 'Twitter Feed Settings', 'displaytweets' ), __( 'Twitter Feed', 'displaytweets' ), - 'edit_plugins', + 'activate_plugins', 'displaytweets', array( $this, 'settings_view' ) ); From 005d86032f46f4d469cecdba14b0ab194a8ef18f Mon Sep 17 00:00:00 2001 From: Steve Grunwell Date: Thu, 8 May 2014 08:48:31 -0400 Subject: [PATCH 2/3] Fixed typo in comment --- displaytweets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/displaytweets.php b/displaytweets.php index f383cac..7512efe 100644 --- a/displaytweets.php +++ b/displaytweets.php @@ -53,7 +53,7 @@ class DisplayTweets { public static $version = '1.0.3'; /** - * How often the tweets are refreshed (in seconds). Defualt is five minutes. + * How often the tweets are refreshed (in seconds). Default is five minutes. * * @since 1.0 */ From 9fd2620ca3b6c517104d08ab1f55edee5f459f9a Mon Sep 17 00:00:00 2001 From: Steve Grunwell Date: Thu, 8 May 2014 08:56:41 -0400 Subject: [PATCH 3/3] Use manage_options to determine settings visibility Instead of activate_plugins, use the much more sensible manage_options capability. --- displaytweets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/displaytweets.php b/displaytweets.php index 7512efe..4be0438 100644 --- a/displaytweets.php +++ b/displaytweets.php @@ -294,7 +294,7 @@ public function add_settings_page() { add_options_page( __( 'Twitter Feed Settings', 'displaytweets' ), __( 'Twitter Feed', 'displaytweets' ), - 'activate_plugins', + 'manage_options', 'displaytweets', array( $this, 'settings_view' ) );