Skip to content

Commit

Permalink
Merge pull request #1382 from greenpeace/fix-post-indexing
Browse files Browse the repository at this point in the history
PLANET-6153: Revert "PLANET-6019: Verify Elasticpress existence before adding filt…
  • Loading branch information
Inwerpsel authored May 19, 2021
2 parents a13b922 + 7ddaee4 commit db38c2a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ protected function initialize() {
* Add filters that are needed by both the initial page load and subsequent ajax page loads.
*/
public static function add_general_filters(): void {
if ( ! is_plugin_active( 'elasticpress' ) ) {
return;
}

// Call apply filters to catch issue in WPML's ElasticPress integration, which uses the wrong filter name.
add_filter(
'ep_formatted_args',
Expand Down Expand Up @@ -390,7 +386,7 @@ protected function get_posts( $paged = 1 ) : array {
} else {
$template_post = $post;
$template_post->id = $post->ID;
$template_post->link = $post->permalink ?? get_permalink( $post->ID );
$template_post->link = $post->permalink;
$template_post->preview = $post->excerpt;
$thumbnail = get_the_post_thumbnail_url( $post->ID, 'thumbnail' );
$template_post->thumbnail_alt = get_the_post_thumbnail_caption( $post->ID );
Expand Down

0 comments on commit db38c2a

Please sign in to comment.