Tribe__Process__Queue::delete_queue( string $key )
Deletes a queue batch(es) and meta information.
Contents
Parameters
- $key
-
(string) (Required)
Source
File: src/Tribe/Process/Queue.php
public static function delete_queue( $key ) {
global $wpdb;
$meta_key = $key . '_meta';
$table = $wpdb->options;
$column = 'option_name';
if ( is_multisite() ) {
$table = $wpdb->sitemeta;
$column = 'meta_key';
}
$key = $wpdb->esc_like( $key ) . '%';
$wpdb->query( $wpdb->prepare( "
DELETE
FROM {$table}
WHERE {$column} LIKE %s
", $key ) );
delete_transient( $meta_key );
}
Changelog
| Version | Description |
|---|---|
| 4.7.18 | Introduced. |