Skip to content

Commit

Permalink
fixes #54 - the duplicate nag bug
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasgriffin committed Oct 18, 2011
1 parent 7d6ebfe commit 04f9681
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tgm-plugin-activation/class-tgm-plugin-activation.php
Expand Up @@ -478,6 +478,8 @@ protected function do_plugin_install() {
* @return null Returns early if we're on the Install page
*/
public function notices() {

global $current_screen;

// Remove nag on the install page
if ( $this->is_tgmpa_page() )
Expand Down Expand Up @@ -584,8 +586,10 @@ public function notices() {
}

}

settings_errors( 'tgmpa' );

/** Admin options pages already output settings_errors, so this is to avoid duplication */
if ( 'options-general' !== $current_screen->parent_base )
settings_errors( 'tgmpa' );

}

Expand Down

0 comments on commit 04f9681

Please sign in to comment.