Merge branch 'develop' of https://github.com/tainacan/tainacan into develop

This commit is contained in:
vnmedeiros 2019-05-16 11:09:40 -03:00
commit 89b2e599f8
3 changed files with 5 additions and 5 deletions

View File

@ -198,7 +198,7 @@ class Admin {
'exposer_type_param' => \Tainacan\Exposers_Handler::TYPE_PARAM,
'repository_name' => get_bloginfo('name'),
'api_max_items_per_page' => $TAINACAN_API_MAX_ITEMS_PER_PAGE,
'wp_elasticpress' => \Tainacan\Elastic_Press::get_instance()->plugin_has_active(),
'wp_elasticpress' => \Tainacan\Elastic_Press::get_instance()->is_active(),
];
$maps = [

View File

@ -28,12 +28,12 @@ class Elastic_Press {
add_action('init', [$this, 'init']);
}
function plugin_has_active() {
function is_active() {
return class_exists('ElasticPress\Elasticsearch');
}
function init() {
if (!$this->plugin_has_active()) {
if (!$this->is_active()) {
return; // ElasticPress not active
}
$this->last_aggregations = [];

View File

@ -58,8 +58,8 @@
this.type = ( this.filter_type ) ? this.filter_type : this.filter.metadatum.metadata_type;
this.loadOptions();
this.$eventBusSearch.$on('removeFromFilterTag', this.cleanSearchFromTag);
if (this.isUsingElasticSearch)
this.$eventBusSearch.$on('isLoadingItems', this.updatesIsLoading);
@ -328,7 +328,7 @@
}
},
updatesIsLoading(isLoading) {
this.isLoadingOptions = isLoading;
this.isLoading = isLoading;
}
},
beforeDestroy() {