Permalink
Browse files

Register uninstall hook on activation

  • Loading branch information...
1 parent ed2a1f4 commit f53084b9d6bddef66121dd7f6dafaee841ef1115 @bjork bjork committed 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 f53084b

Please sign in to comment.