Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'dev'

  • Loading branch information...
commit 86f5a5829e8c01836d53a51292b98079e15fc7f1 2 parents 3523f83 + 63616fb
@thomasgriffin thomasgriffin authored
View
6 README
@@ -1,7 +1,7 @@
=== TGM Plugin Activation ===
Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com)
Gary Jones (Github: @GaryJones / Twitter: GaryJ)
-Version: 2.1.0
+Version: 2.1.1
Requires at least: 3.0.0
Tested up to: 3.3-beta1
@@ -44,6 +44,10 @@ You can also follow project progress and updates on Twitter. Follow us here at h
== 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 =
* Fixed duplicate nag message on admin options pages
View
19 tgm-plugin-activation/class-tgm-plugin-activation.php
@@ -3,7 +3,7 @@
* Plugin installation and activation for WordPress themes.
*
* @package TGM-Plugin-Activation
- * @version 2.1.0
+ * @version 2.1.1
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2011, Thomas Griffin
@@ -182,6 +182,7 @@ public function init() {
add_action( 'admin_notices', array( &$this, 'notices' ) );
add_action( 'admin_init', array( &$this, 'admin_init' ), 1 );
add_action( 'admin_enqueue_scripts', array( &$this, 'thickbox' ) );
+ add_action( 'switch_theme', array( &$this, 'update_dismiss' ) );
}
}
@@ -470,7 +471,7 @@ protected function do_plugin_install() {
*
* @since 1.0.0
*
- * @global $current_screen
+ * @global object $current_screen
* @return null Returns early if we're on the Install page
*/
public function notices() {
@@ -789,6 +790,20 @@ protected function is_tgmpa_page() {
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' );
+
+ }
}
View
2  tgm-plugin-activation/example.php
@@ -8,7 +8,7 @@
*
* @package TGM-Plugin-Activation
* @subpackage Example
- * @version 2.1.0
+ * @version 2.1.1
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
* @author Gary Jones <gamajo@gamajo.com>
* @copyright Copyright (c) 2011, Thomas Griffin
Please sign in to comment.
Something went wrong with that request. Please try again.