← All changes
|
jetpack_vendor/automattic/jetpack-search/src/class-options.php
+5
-2
12.2.3
→
16.3
View file →
| @@ -8,8 +8,12 @@ | ||
| 8 | 8 | namespace Automattic\Jetpack\Search; |
| 9 | 9 | |
| 10 | 10 | use Automattic\Jetpack\Constants; |
| 11 | 11 | |
| 12 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 13 | + exit( 0 ); | |
| 14 | +} | |
| 15 | + | |
| 12 | 16 | /** |
| 13 | 17 | * Helpers for parsing the various Search options |
| 14 | 18 | */ |
| 15 | 19 | class Options { |
| @@ -64,9 +68,9 @@ | ||
| 64 | 68 | * |
| 65 | 69 | * @return bool |
| 66 | 70 | */ |
| 67 | 71 | public static function is_instant_enabled() { |
| 68 | - return true === (bool) get_option( 'instant_search_enabled' ); | |
| 72 | + return (bool) get_option( 'instant_search_enabled' ); | |
| 69 | 73 | } |
| 70 | 74 | |
| 71 | 75 | /** |
| 72 | 76 | * Returns a boolean for whether the current site has a VIP index. |
| @@ -91,6 +95,5 @@ | ||
| 91 | 95 | * @param bool $has_vip_index Whether the current site has a VIP index. |
| 92 | 96 | */ |
| 93 | 97 | return apply_filters( 'jetpack_search_has_vip_index', $has_vip_index ); |
| 94 | 98 | } |
| 95 | - | |
| 96 | 99 | } |