Skip to content

Commit

Permalink
Merge pull request #2618 from 10up/feature/reorder-features
Browse files Browse the repository at this point in the history
Reorder features
  • Loading branch information
mckdemps authored Mar 1, 2022
2 parents 5af6932 + 40572ec commit 15c671a
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions elasticpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,31 @@ function register_indexable_posts() {
);

Features::factory()->register_feature(
new Feature\ProtectedContent\ProtectedContent()
new Feature\InstantResults\InstantResults()
);

Features::factory()->register_feature(
new Feature\Autosuggest\Autosuggest()
);

Features::factory()->register_feature(
new Feature\WooCommerce\WooCommerce()
);

Features::factory()->register_feature(
new Feature\Facets\Facets()
);

Features::factory()->register_feature(
new Feature\RelatedPosts\RelatedPosts()
);

Features::factory()->register_feature(
new Feature\WooCommerce\WooCommerce()
new Feature\SearchOrdering\SearchOrdering()
);

Features::factory()->register_feature(
new Feature\Facets\Facets()
new Feature\ProtectedContent\ProtectedContent()
);

Features::factory()->register_feature(
Expand All @@ -138,25 +146,17 @@ function register_indexable_posts() {
);
}

if ( version_compare( $wp_version, '5.3', '>=' ) || 0 === stripos( $wp_version, '5.3-' ) ) {
if ( version_compare( $wp_version, '5.1', '>=' ) || 0 === stripos( $wp_version, '5.1-' ) ) {
Features::factory()->register_feature(
new Feature\Terms\Terms()
new Feature\Users\Users()
);
}

if ( version_compare( $wp_version, '5.1', '>=' ) || 0 === stripos( $wp_version, '5.1-' ) ) {
if ( version_compare( $wp_version, '5.3', '>=' ) || 0 === stripos( $wp_version, '5.3-' ) ) {
Features::factory()->register_feature(
new Feature\Users\Users()
new Feature\Terms\Terms()
);
}

Features::factory()->register_feature(
new Feature\SearchOrdering\SearchOrdering()
);

Features::factory()->register_feature(
new Feature\InstantResults\InstantResults()
);
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\register_indexable_posts' );

Expand Down

0 comments on commit 15c671a

Please sign in to comment.