Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgriffin committed Jan 8, 2012
2 parents 09067fd + f9aaf2d commit 20beaab
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand Down
12 changes: 9 additions & 3 deletions tgm-plugin-activation/class-tgm-plugin-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>';

}

Expand Down Expand Up @@ -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>';
}

}

Expand Down
2 changes: 1 addition & 1 deletion tgm-plugin-activation/example.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20beaab

Please sign in to comment.