Permalink
Browse files

Merge pull request #74 from bjork/73-register-uninstall-hook-on-activate

Register uninstall hook on activation, thanks @bjork!
  • Loading branch information...
2 parents ed2a1f4 + f53084b commit 129fd99340168c67c75f876c9769f8cf4b31962e @futtta committed on GitHub Dec 26, 2016
Showing with 5 additions and 1 deletion.
  1. +5 −1 autoptimize.php
View
@@ -294,7 +294,11 @@ function autoptimize_end_buffering($content) {
add_action('admin_notices', 'autoptimize_cache_unavailable_notice');
}
-register_uninstall_hook(__FILE__, "autoptimize_uninstall");
+function autoptimize_activate() {
+ register_uninstall_hook( __FILE__, 'autoptimize_uninstall' );
+}
+register_activation_hook( __FILE__, 'autoptimize_activate' );
+
include_once('classlesses/autoptimizeCacheChecker.php');
// Do not pollute other plugins

0 comments on commit 129fd99

Please sign in to comment.