WP_Background_Process::is_queue_empty PHP Method

is_queue_empty() protected method

Is queue empty
protected is_queue_empty ( ) : boolean
return boolean
        protected function is_queue_empty()
        {
            global $wpdb;
            $table = $wpdb->options;
            $column = 'option_name';
            if (is_multisite()) {
                $table = $wpdb->sitemeta;
                $column = 'meta_key';
            }
            $key = $this->identifier . '_batch_%';
            $count = $wpdb->get_var($wpdb->prepare("\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM {$table}\n\t\t\tWHERE {$column} LIKE %s\n\t\t", $key));
            return $count > 0 ? false : true;
        }