Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgriffin committed Oct 19, 2011
2 parents 3523f83 + 63616fb commit 86f5a58
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
=== TGM Plugin Activation === === TGM Plugin Activation ===
Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com) Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com)
Gary Jones (Github: @GaryJones / Twitter: GaryJ) Gary Jones (Github: @GaryJones / Twitter: GaryJ)
Version: 2.1.0 Version: 2.1.1
Requires at least: 3.0.0 Requires at least: 3.0.0
Tested up to: 3.3-beta1 Tested up to: 3.3-beta1


Expand Down Expand Up @@ -44,6 +44,10 @@ You can also follow project progress and updates on Twitter. Follow us here at h


== Changelog == == Changelog ==


= 2.1.1 =

* Fixed nag not re-appearing if user switched themes and then re-activated the previous theme (UX improvement)

= 2.1.0 = = 2.1.0 =


* Fixed duplicate nag message on admin options pages * Fixed duplicate nag message on admin options pages
Expand Down
19 changes: 17 additions & 2 deletions tgm-plugin-activation/class-tgm-plugin-activation.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin installation and activation for WordPress themes. * Plugin installation and activation for WordPress themes.
* *
* @package TGM-Plugin-Activation * @package TGM-Plugin-Activation
* @version 2.1.0 * @version 2.1.1
* @author Thomas Griffin <thomas@thomasgriffinmedia.com> * @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com> * @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2011, Thomas Griffin * @copyright Copyright (c) 2011, Thomas Griffin
Expand Down Expand Up @@ -182,6 +182,7 @@ public function init() {
add_action( 'admin_notices', array( &$this, 'notices' ) ); add_action( 'admin_notices', array( &$this, 'notices' ) );
add_action( 'admin_init', array( &$this, 'admin_init' ), 1 ); add_action( 'admin_init', array( &$this, 'admin_init' ), 1 );
add_action( 'admin_enqueue_scripts', array( &$this, 'thickbox' ) ); add_action( 'admin_enqueue_scripts', array( &$this, 'thickbox' ) );
add_action( 'switch_theme', array( &$this, 'update_dismiss' ) );
} }


} }
Expand Down Expand Up @@ -470,7 +471,7 @@ protected function do_plugin_install() {
* *
* @since 1.0.0 * @since 1.0.0
* *
* @global $current_screen * @global object $current_screen
* @return null Returns early if we're on the Install page * @return null Returns early if we're on the Install page
*/ */
public function notices() { public function notices() {
Expand Down Expand Up @@ -789,6 +790,20 @@ protected function is_tgmpa_page() {
return false; return false;


} }

/**
* Delete dismissable nag option when theme is switched.
*
* This ensures that the user is again reminded via nag of required
* and/or recommended plugins if they re-activate the theme.
*
* @since 2.1.1
*/
public function update_dismiss() {

delete_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice' );

}


} }


Expand Down
2 changes: 1 addition & 1 deletion tgm-plugin-activation/example.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* *
* @package TGM-Plugin-Activation * @package TGM-Plugin-Activation
* @subpackage Example * @subpackage Example
* @version 2.1.0 * @version 2.1.1
* @author Thomas Griffin <thomas@thomasgriffinmedia.com> * @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com> * @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2011, Thomas Griffin * @copyright Copyright (c) 2011, Thomas Griffin
Expand Down

0 comments on commit 86f5a58

Please sign in to comment.