elementor
7 months ago
class-autoptimize-compatibility.php
7 months ago
class-elasticpress-compatibility.php
7 months ago
class-elementor-compatibility.php
7 months ago
class-foobox-compatibility.php
7 months ago
class-foogallery-compatibility.php
7 months ago
class-foovideo-compatibility.php
7 months ago
class-jetpack-compatibility.php
7 months ago
class-polylang-compatibility.php
7 months ago
class-responsive-lightbox-dfactory-compatibility.php
7 months ago
class-wpoptimize-compatibility.php
7 months ago
class-wprocket-compatibility.php
7 months ago
view-foovideo-offer.php
7 months ago
class-elasticpress-compatibility.php
23 lines
| 1 | <?php |
| 2 | /** |
| 3 | * ElasticPress Compatibility Class |
| 4 | * Date: 14/10/2018 |
| 5 | */ |
| 6 | if ( ! class_exists( 'FooGallery_ElasticPress_Compatibility' ) ) { |
| 7 | |
| 8 | class FooGallery_ElasticPress_Compatibility { |
| 9 | function __construct() { |
| 10 | add_action( 'ep_indexable_post_types', array( $this, 'exclude_foogallery_from_index' ), 99 ); |
| 11 | } |
| 12 | |
| 13 | /* |
| 14 | * Do not include FooGallery posts in the ElasticPress index |
| 15 | */ |
| 16 | function exclude_foogallery_from_index( $post_types ) { |
| 17 | if ( array_key_exists( 'foogallery', $post_types ) ) { |
| 18 | unset( $post_types['foogallery'] ); |
| 19 | } |
| 20 | return $post_types; |
| 21 | } |
| 22 | } |
| 23 | } |