1 | <?php |
||
2 | /** |
||
3 | * LSX Search functions. |
||
4 | * |
||
5 | * @package lsx-search |
||
6 | */ |
||
7 | |||
8 | namespace lsx\search\includes; |
||
9 | |||
10 | /** |
||
11 | * Gets the lsx search options. |
||
12 | * |
||
13 | * @return array |
||
14 | */ |
||
15 | function get_options() { |
||
16 | $options = array(); |
||
17 | if ( function_exists( 'tour_operator' ) ) { |
||
18 | $options = get_option( '_lsx-to_settings', false ); |
||
19 | } else { |
||
20 | $options = get_option( '_lsx_settings', false ); |
||
21 | |||
22 | if ( false === $options ) { |
||
23 | $options = get_option( '_lsx_lsx-settings', false ); |
||
24 | } |
||
25 | } |
||
26 | return $options; |
||
27 | } |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
28 | |||
29 | /** |
||
30 | * Returns the Post types that are specifically not supported. |
||
31 | * |
||
32 | * @return array |
||
33 | */ |
||
34 | function get_restricted_post_types() { |
||
35 | $post_types = array( |
||
36 | 'page', |
||
37 | 'attachment', |
||
38 | 'lesson', |
||
39 | 'certificate', |
||
40 | 'envira', |
||
41 | 'tribe_organizer', |
||
42 | 'tribe_venue', |
||
43 | 'envira', |
||
44 | 'reply', |
||
45 | 'topic', |
||
46 | 'popup', |
||
47 | 'question', |
||
48 | 'certificate_template', |
||
49 | 'sensei_message', |
||
50 | 'tribe_events', |
||
51 | 'tip', |
||
52 | 'quiz', |
||
53 | 'forum', |
||
54 | ); |
||
55 | $post_types = apply_filters( 'lsx_search_restricted_post_types', $post_types ); |
||
56 | return $post_types; |
||
57 | } |
||
58 |