Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/pages/page.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
/**
4
+
* Page options.
5
+
*
6
+
* @copyright 2019-present Creative Themes
7
+
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
8
+
* @package Blocksy
9
+
*/
10
+
11
+
$page_title_options = blocksy_get_options('general/page-title', [
12
+
'prefix' => 'single_page',
13
+
'is_single' => true,
14
+
'is_page' => true
15
+
]);
16
+
17
+
$page_structure_options = [
18
+
blocksy_rand_md5() => [
19
+
'label' => __( 'Page Structure', 'blocksy' ),
20
+
'type' => 'ct-title',
21
+
],
22
+
23
+
blocksy_rand_md5() => [
24
+
'title' => __( 'General', 'blocksy' ),
25
+
'type' => 'tab',
26
+
'options' => [
27
+
blocksy_get_options('single-elements/structure', [
28
+
'default_structure' => 'type-4',
29
+
'prefix' => 'single_page',
30
+
]),
31
+
],
32
+
],
33
+
34
+
blocksy_rand_md5() => [
35
+
'title' => __( 'Design', 'blocksy' ),
36
+
'type' => 'tab',
37
+
'options' => [
38
+
blocksy_get_options('single-elements/structure-design', [
39
+
'prefix' => 'single_page',
40
+
])
41
+
],
42
+
]
43
+
];
44
+
45
+
$maybe_taxonomy = blocksy_maybe_get_matching_taxonomy('page', false);
46
+
47
+
$page_elements_options = [
48
+
[
49
+
[
50
+
blocksy_rand_md5() => [
51
+
'type' => 'ct-title',
52
+
'label' => __( 'Page Elements', 'blocksy' ),
53
+
],
54
+
],
55
+
56
+
blocksy_get_options('single-elements/featured-image', [
57
+
'prefix' => 'single_page',
58
+
]),
59
+
60
+
blocksy_get_options('single-elements/post-share-box', [
61
+
'prefix' => 'single_page'
62
+
]),
63
+
],
64
+
65
+
$maybe_taxonomy ? [
66
+
'single_page_has_post_tags' => [
67
+
'label' => blocksy_safe_sprintf(
68
+
__('Page %s', 'blocksy'),
69
+
get_taxonomy($maybe_taxonomy)->label
70
+
),
71
+
'type' => 'ct-switch',
72
+
'value' => 'no',
73
+
'sync' => blocksy_sync_single_post_container([
74
+
'prefix' => 'single_page'
75
+
]),
76
+
],
77
+
] : [],
78
+
79
+
[
80
+
blocksy_get_options('general/comments-single', [
81
+
'prefix' => 'single_page',
82
+
]),
83
+
84
+
apply_filters(
85
+
'blocksy_single_posts_end_customizer_options',
86
+
[],
87
+
'single_page'
88
+
),
89
+
]
90
+
];
91
+
92
+
93
+
$inner_options = [
94
+
[
95
+
blocksy_manager()->get_prefix_title_actions([
96
+
'prefix' => 'single_page',
97
+
'areas' => [
98
+
[
99
+
'title' => __('Page Title', 'blocksy'),
100
+
'options' => $page_title_options,
101
+
'sources' => array_merge(
102
+
blocksy_manager()
103
+
->screen
104
+
->get_archive_prefixes_with_human_labels([
105
+
'has_categories' => true,
106
+
'has_author' => true,
107
+
'has_search' => true,
108
+
'has_woocommerce' => true
109
+
]),
110
+
111
+
blocksy_manager()
112
+
->screen
113
+
->get_single_prefixes_with_human_labels([
114
+
'has_woocommerce' => true
115
+
])
116
+
)
117
+
],
118
+
119
+
[
120
+
'id' => 'page_structure',
121
+
'title' => __('Page Structure', 'blocksy'),
122
+
'options' => $page_structure_options,
123
+
'sources' => blocksy_manager()
124
+
->screen
125
+
->get_single_prefixes_with_human_labels()
126
+
],
127
+
128
+
[
129
+
'title' => __('Page Elements', 'blocksy'),
130
+
'options' => $page_elements_options,
131
+
'sources' => blocksy_manager()
132
+
->screen
133
+
->get_single_prefixes_with_human_labels()
134
+
]
135
+
]
136
+
]),
137
+
138
+
$page_title_options,
139
+
$page_structure_options,
140
+
$page_elements_options
141
+
]
142
+
];
143
+
144
+
if (
145
+
function_exists('blc_get_content_block_that_matches')
146
+
&&
147
+
blc_get_content_block_that_matches([
148
+
'template_type' => 'single',
149
+
'template_subtype' => 'canvas',
150
+
'match_conditions_strategy' => 'single_page'
151
+
])
152
+
) {
153
+
$inner_options = [
154
+
blocksy_rand_md5() => [
155
+
'type' => 'ct-notification',
156
+
'attr' => [ 'data-type' => 'background:white' ],
157
+
'text' => blocksy_safe_sprintf(
158
+
__('This single page is overrided by a custom template, to edit it please access %sthis page%s.', 'blocksy'),
159
+
'<a href="' . get_edit_post_link(blc_get_content_block_that_matches([
160
+
'template_type' => 'single',
161
+
'template_subtype' => 'canvas',
162
+
'match_conditions_strategy' => 'single_page'
163
+
])) . '" target="_blank">',
164
+
'</a>'
165
+
)
166
+
],
167
+
];
168
+
}
169
+
170
+
$options = [
171
+
'page_section_options' => [
172
+
'type' => 'ct-options',
173
+
'setting' => [ 'transport' => 'postMessage' ],
174
+
'inner-options' => $inner_options
175
+
],
176
+
];
177
+