Skip to content

Commit

Permalink
Hotfix: delete WP_Background_Process transients on uninstall.
Browse files Browse the repository at this point in the history
  • Loading branch information
Screenfeed committed Jun 15, 2018
1 parent fdc127f commit 240d2b7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@

// Delete transients.
$transients = implode( '" OR option_name LIKE "', array(
'_transient_%imagify-async-in-progress-%',
'_transient_%imagify-ngg-async-in-progress-%',
'_site_transient_%imagify-file-async-in-progress-%',
'_transient_%imagify_rpc_%',
'\_transient\_%imagify-async-in-progress-%',
'\_transient\_%imagify-ngg-async-in-progress-%',
'\_site\_transient\_%imagify-file-async-in-progress-%',
'\_transient\_%imagify\_rpc\_%',
'\_site\_transient\_imagify\_%\_process\_lock%',
) );
$wpdb->query( 'DELETE from ' . $wpdb->options . ' WHERE option_name LIKE "' . $transients . '"' ); // WPCS: unprepared SQL ok.
$wpdb->query( "DELETE from $wpdb->options WHERE option_name LIKE \"$transients\"" ); // WPCS: unprepared SQL ok.

// Clear scheduled hooks.
wp_clear_scheduled_hook( 'imagify_rating_event' );
Expand Down

0 comments on commit 240d2b7

Please sign in to comment.