BP_Background_Process::is_queue_empty()
Is queue empty.
Description
Return
(bool)
Source
File: bp-core/classes/class-bp-background-process.php
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | protected function is_queue_empty() { global $wpdb ; $table = $wpdb ->options; $column = 'option_name' ; if ( is_multisite() ) { $table = $wpdb ->sitemeta; $column = 'meta_key' ; } $key = $wpdb ->esc_like( $this ->identifier . '_batch_' ) . '%' ; $count = $wpdb ->get_var( $wpdb ->prepare( "SELECT COUNT(*) FROM {$table} WHERE {$column} LIKE %s" , $key ) ); // @codingStandardsIgnoreLine. return ! ( $count > 0 ); } |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.