Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/pages/search-page.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
/**
3
+
* Search page
4
+
*
5
+
* @copyright 2019-present Creative Themes
6
+
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
7
+
* @package Blocksy
8
+
*/
9
+
10
+
$page_title_options = blocksy_get_options('general/page-title', [
11
+
'prefix' => 'search',
12
+
'is_search' => true,
13
+
'location_name' => __('Search', 'blocksy')
14
+
]);
15
+
16
+
$posts_listing_options = blocksy_get_options('general/posts-listing', [
17
+
'prefix' => 'search',
18
+
'title' => __('Search Results', 'blocksy')
19
+
]);
20
+
21
+
$pagination_options = blocksy_get_options('general/pagination', [
22
+
'prefix' => 'search',
23
+
]);
24
+
25
+
$inner_options = [
26
+
blocksy_manager()->get_prefix_title_actions([
27
+
'prefix' => 'search',
28
+
'areas' => [
29
+
[
30
+
'title' => __('Page Title', 'blocksy'),
31
+
'options' => $page_title_options,
32
+
'sources' => array_merge(
33
+
blocksy_manager()
34
+
->screen
35
+
->get_archive_prefixes_with_human_labels([
36
+
'has_categories' => true,
37
+
'has_author' => true,
38
+
'has_search' => true,
39
+
'has_woocommerce' => true
40
+
]),
41
+
42
+
blocksy_manager()
43
+
->screen
44
+
->get_single_prefixes_with_human_labels([
45
+
'has_woocommerce' => true
46
+
])
47
+
)
48
+
],
49
+
50
+
[
51
+
'id' => 'posts_listing',
52
+
'title' => __('Posts Listing', 'blocksy'),
53
+
'options' => $posts_listing_options,
54
+
'sources' => blocksy_manager()
55
+
->screen
56
+
->get_archive_prefixes_with_human_labels([
57
+
'has_categories' => true,
58
+
'has_author' => true,
59
+
'has_search' => true
60
+
]),
61
+
],
62
+
63
+
[
64
+
'title' => __('Pagination', 'blocksy'),
65
+
'options' => $pagination_options,
66
+
'sources' => blocksy_manager()
67
+
->screen
68
+
->get_archive_prefixes_with_human_labels([
69
+
'has_categories' => true,
70
+
'has_author' => true,
71
+
'has_search' => true
72
+
]),
73
+
]
74
+
]
75
+
]),
76
+
77
+
$page_title_options,
78
+
$posts_listing_options,
79
+
80
+
[
81
+
blocksy_rand_md5() => [
82
+
'type' => 'ct-title',
83
+
'label' => __( 'Page Elements', 'blocksy' ),
84
+
],
85
+
],
86
+
87
+
blocksy_get_options('general/sidebar-particular', [
88
+
'prefix' => 'search'
89
+
]),
90
+
91
+
$pagination_options,
92
+
93
+
[
94
+
blocksy_rand_md5() => [
95
+
'type' => 'ct-title',
96
+
'label' => __( 'Functionality Options', 'blocksy' ),
97
+
],
98
+
99
+
'search_enable_live_results' => [
100
+
'label' => __( 'Live results', 'blocksy' ),
101
+
'type' => 'ct-switch',
102
+
'value' => 'yes',
103
+
],
104
+
105
+
blocksy_rand_md5() => [
106
+
'type' => 'ct-condition',
107
+
'condition' => [ 'search_enable_live_results' => 'yes' ],
108
+
'options' => function_exists('is_shop') ? [
109
+
110
+
'searchProductPrice' => [
111
+
'label' => __( 'Live Results Product Price', 'blocksy' ),
112
+
'type' => 'ct-switch',
113
+
'value' => 'no',
114
+
'divider' => 'top',
115
+
],
116
+
117
+
'searchProductStatus' => [
118
+
'label' => __( 'Live Results Product Status', 'blocksy' ),
119
+
'type' => 'ct-switch',
120
+
'value' => 'no',
121
+
'divider' => 'top',
122
+
],
123
+
124
+
] : []
125
+
],
126
+
],
127
+
128
+
blocksy_get_options('general/cards-reveal-effect', [
129
+
'prefix' => 'search'
130
+
])
131
+
];
132
+
133
+
if (
134
+
function_exists('blc_get_content_block_that_matches')
135
+
&&
136
+
blc_get_content_block_that_matches([
137
+
'template_type' => 'archive',
138
+
'template_subtype' => 'canvas',
139
+
'match_conditions_strategy' => 'search'
140
+
])
141
+
) {
142
+
$inner_options = [
143
+
blocksy_rand_md5() => [
144
+
'type' => 'ct-notification',
145
+
'attr' => [ 'data-type' => 'background:white' ],
146
+
'text' => blocksy_safe_sprintf(
147
+
__('This archive page is overrided by a custom template, to edit it please access %sthis page%s.', 'blocksy'),
148
+
'<a href="' . get_edit_post_link(blc_get_content_block_that_matches([
149
+
'template_type' => 'archive',
150
+
'template_subtype' => 'canvas',
151
+
'match_conditions_strategy' => 'search'
152
+
])) . '" target="_blank">',
153
+
'</a>'
154
+
)
155
+
],
156
+
];
157
+
}
158
+
159
+
$options = [
160
+
'search_section_options' => [
161
+
'type' => 'ct-options',
162
+
'inner-options' => $inner_options
163
+
]
164
+
];
165
+