Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | private function deleteTransients(): void |
||
38 | { |
||
39 | global $wpdb; |
||
40 | |||
41 | $query = |
||
42 | "DELETE FROM {$wpdb->options} " . |
||
43 | "WHERE `option_name` REGEXP '^_transient_helick_related_posts_[0-9]+_[^_]+$'"; |
||
44 | |||
45 | $count = $wpdb->query($query); |
||
46 | |||
47 | WP_CLI::success("{$count} related posts transients deleted."); |
||
48 | } |
||
68 |