delete( $cherrylift_directory, true ); } } // Import jobs in progress, their locks, and the job index. $cherrylift_jobs = get_option( 'cherrylift_jobs', array() ); foreach ( is_array( $cherrylift_jobs ) ? array_keys( $cherrylift_jobs ) : array() as $cherrylift_token ) { delete_option( 'cherrylift_job_' . $cherrylift_token ); delete_option( 'cherrylift_job_lock_' . $cherrylift_token ); } delete_option( 'cherrylift_jobs' ); // Ownership records of uploaded packages. With a persistent object cache they live in the cache // instead, and expire on their own within the package lifetime (a day by default). global $wpdb; $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- One-off cleanup on uninstall; transients have no API to delete by prefix. $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_cherrylift_pkg_' ) . '%', $wpdb->esc_like( '_transient_timeout_cherrylift_pkg_' ) . '%' ) );