Permalink
Browse files

only call register_uninstall_hook() in the admin

  • Loading branch information...
1 parent 73552a1 commit f34fd4129e9f70f9d3e36198bedcb45cd4f06fe1 @scribu committed Mar 3, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 Util.php
View
3 Util.php
@@ -48,6 +48,9 @@ static function do_activation( $plugin ) {
// Allows more than one uninstall hooks.
// Also prevents an UPDATE query on each page load.
static function add_uninstall_hook( $plugin, $callback ) {
+ if ( !is_admin() )
+ return;
+
register_uninstall_hook( $plugin, '__return_false' ); // dummy
add_action( 'uninstall_' . plugin_basename( $plugin ), $callback );

0 comments on commit f34fd41

Please sign in to comment.