Permalink
Browse files

Merge branch 'dev'

  • Loading branch information...
thomasgriffin committed Jan 8, 2012
2 parents 09067fd + f9aaf2d commit 20beaab3669a145225f0a28a970656d4f716419f
Showing with 15 additions and 5 deletions.
  1. +5 −1 README
  2. +9 −3 tgm-plugin-activation/class-tgm-plugin-activation.php
  3. +1 −1 tgm-plugin-activation/example.php
View
6 README
@@ -1,7 +1,7 @@
=== TGM Plugin Activation ===
Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com)
Gary Jones (Github: @GaryJones / Twitter: GaryJ)
-Version: 2.2.0
+Version: 2.2.2
Requires at least: 3.0.0
Tested up to: 3.3.1
@@ -35,6 +35,10 @@ You can also follow project progress and updates on Twitter. Follow us here at h
== Changelog ==
+= 2.2.2 =
+
+* Fixed bug that allowed users to click on the Install Plugins page when all the plugin installations and activations were already complete
+
= 2.2.1 =
* Fixed bug that caused WordPress core upgrades to fail (WordPress doesn't check for including WP_Upgrader on core upgrades)
@@ -3,7 +3,7 @@
* Plugin installation and activation for WordPress themes.
*
* @package TGM-Plugin-Activation
- * @version 2.2.0
+ * @version 2.2.2
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2011, Thomas Griffin
@@ -1256,11 +1256,15 @@ public function column_cb( $item ) {
* Sets default message within the plugins table if no plugins
* are left for interaction.
*
+ * Hides the menu item to prevent the user from clicking and
+ * getting a permissions error.
+ *
* @since 2.2.0
*/
public function no_items() {
printf( __( 'No plugins to install or activate. <a href="%1$s" title="Return to the Dashboard">Return to the Dashboard</a>', TGM_Plugin_Activation::$instance->domain ), admin_url() );
+ echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
}
@@ -2034,9 +2038,11 @@ public function bulk_footer() {
/** Filter out any empty entries */
$complete = array_filter( $complete );
- /** All plugins are active, so we display the complete string */
- if ( empty( $complete ) )
+ /** All plugins are active, so we display the complete string and hide the menu to protect users */
+ if ( empty( $complete ) ) {
echo '<p>' . sprintf( TGM_Plugin_Activation::$instance->strings['complete'], '<a href="' . admin_url() . '" title="' . __( 'Return to the Dashboard', TGM_Plugin_Activation::$instance->domain ) . '">' . __( 'Return to the Dashboard', TGM_Plugin_Activation::$instance->domain ) . '</a>' ) . '</p>';
+ echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
+ }
}
@@ -8,7 +8,7 @@
*
* @package TGM-Plugin-Activation
* @subpackage Example
- * @version 2.2.0
+ * @version 2.2.2
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2011, Thomas Griffin

0 comments on commit 20beaab

Please sign in to comment.