diff --git a/includes/classes/IndexHelper.php b/includes/classes/IndexHelper.php index 5fa3649777..3421c97366 100644 --- a/includes/classes/IndexHelper.php +++ b/includes/classes/IndexHelper.php @@ -949,7 +949,7 @@ protected function output_index_errors( $failed_objects ) { * @return boolean */ public function is_full_reindexing( $indexable_slug, $blog_id = null ) { - if ( empty( $this->index_meta ) ) { + if ( empty( $this->index_meta ) || empty( $this->index_meta['put_mapping'] ) ) { /** * Filter if a fully reindex is being done to an indexable * @@ -976,10 +976,6 @@ public function is_full_reindexing( $indexable_slug, $blog_id = null ) { continue; } - if ( empty( $sync_item['put_mapping'] ) ) { - break; - } - if ( ( empty( $sync_item['blog_id'] ) && ! $blog_id ) || (int) $sync_item['blog_id'] === $blog_id @@ -989,7 +985,7 @@ public function is_full_reindexing( $indexable_slug, $blog_id = null ) { } /* this filter is documented above */ - apply_filters( "ep_is_full_reindexing_{$indexable_slug}", $is_full_reindexing ); + return apply_filters( "ep_is_full_reindexing_{$indexable_slug}", $is_full_reindexing ); } /**