Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/admin/class-algolia-admin-page-native-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function display_errors() {

$maybe_get_page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );

$searchable_posts_index = $this->plugin->get_index( 'searchable_posts' );
$searchable_posts_index = $this->plugin->get_index( apply_filters( 'algolia_searchable_posts_index_id', 'searchable_posts' ) );
if ( false === $searchable_posts_index->is_enabled() && ( ! empty( $maybe_get_page ) ) && $maybe_get_page === $this->slug ) {
/* translators: placeholder contains the link to the indexing page. */
$message = sprintf( __( 'Searchable posts index needs to be checked on the <a href="%s">Algolia: Indexing page</a> for the search results to be powered by Algolia.', 'wp-search-with-algolia' ), esc_url( admin_url( 'admin.php?page=algolia-indexing' ) ) );
Expand Down
2 changes: 1 addition & 1 deletion includes/indices/class-algolia-posts-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ private function update_post_records( WP_Post $post, array $records ) {
* @return string
*/
public function get_id() {
return 'posts_' . $this->post_type;
return apply_filters( "algolia_posts_{$this->post_type}_index_id", 'posts_' . $this->post_type );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/indices/class-algolia-searchable-posts-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private function update_post_records( WP_Post $post, array $records ) {
* @return string
*/
public function get_id() {
return 'searchable_posts';
return apply_filters( 'algolia_searchable_posts_index_id', 'searchable_posts' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/indices/class-algolia-terms-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function get_synonyms() {
* @return string
*/
public function get_id() {
return 'terms_' . $this->taxonomy;
return apply_filters( "algolia_terms_{$this->taxonomy}_index_id", 'terms_' . $this->taxonomy );
}


Expand Down
2 changes: 1 addition & 1 deletion includes/indices/class-algolia-users-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected function get_synonyms() {
* @return string
*/
public function get_id() {
return 'users';
return apply_filters( "algolia_users_index_id", 'users' );
}


Expand Down