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