Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/options/pages/author-page.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
/**
3
+
* Author page
4
+
*
5
+
* @copyright 2020-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' => 'author',
12
+
'is_author' => true,
13
+
'location_name' => __('Author', 'blocksy'),
14
+
]);
15
+
16
+
$posts_listing_options = blocksy_get_options('general/posts-listing', [
17
+
'prefix' => 'author',
18
+
'title' => __('Author Page', 'blocksy')
19
+
]);
20
+
21
+
$inner_options = [
22
+
blocksy_manager()->get_prefix_title_actions([
23
+
'prefix' => 'author',
24
+
'areas' => [
25
+
[
26
+
'title' => __('Page Title', 'blocksy'),
27
+
'options' => $page_title_options,
28
+
'sources' => array_merge(
29
+
blocksy_manager()
30
+
->screen
31
+
->get_archive_prefixes_with_human_labels([
32
+
'has_categories' => true,
33
+
'has_author' => true,
34
+
'has_search' => true,
35
+
'has_woocommerce' => true
36
+
]),
37
+
38
+
blocksy_manager()
39
+
->screen
40
+
->get_single_prefixes_with_human_labels([
41
+
'has_woocommerce' => true
42
+
])
43
+
)
44
+
],
45
+
46
+
[
47
+
'id' => 'posts_listing',
48
+
'title' => __('Posts Listing', 'blocksy'),
49
+
'options' => $posts_listing_options,
50
+
'sources' => blocksy_manager()
51
+
->screen
52
+
->get_archive_prefixes_with_human_labels([
53
+
'has_categories' => true,
54
+
'has_author' => true,
55
+
'has_search' => true
56
+
]),
57
+
],
58
+
59
+
[
60
+
'title' => __('Pagination', 'blocksy'),
61
+
'options' => [],
62
+
'sources' => blocksy_manager()
63
+
->screen
64
+
->get_archive_prefixes_with_human_labels([
65
+
'has_categories' => true,
66
+
'has_author' => true,
67
+
'has_search' => true
68
+
]),
69
+
]
70
+
]
71
+
]),
72
+
73
+
$page_title_options,
74
+
$posts_listing_options,
75
+
76
+
[
77
+
blocksy_rand_md5() => [
78
+
'type' => 'ct-title',
79
+
'label' => __( 'Page Elements', 'blocksy' ),
80
+
],
81
+
],
82
+
83
+
blocksy_get_options('general/sidebar-particular', [
84
+
'prefix' => 'author',
85
+
])
86
+
];
87
+
88
+
if (
89
+
function_exists('blc_get_content_block_that_matches')
90
+
&&
91
+
blc_get_content_block_that_matches([
92
+
'template_type' => 'archive',
93
+
'template_subtype' => 'canvas',
94
+
'match_conditions_strategy' => 'author'
95
+
])
96
+
) {
97
+
$inner_options = [
98
+
blocksy_rand_md5() => [
99
+
'type' => 'ct-notification',
100
+
'attr' => [ 'data-type' => 'background:white' ],
101
+
'text' => blocksy_safe_sprintf(
102
+
__('This archive page is overrided by a custom template, to edit it please access %sthis page%s.', 'blocksy'),
103
+
'<a href="' . get_edit_post_link(blc_get_content_block_that_matches([
104
+
'template_type' => 'archive',
105
+
'template_subtype' => 'canvas',
106
+
'match_conditions_strategy' => 'author'
107
+
])) . '" target="_blank">',
108
+
'</a>'
109
+
)
110
+
],
111
+
];
112
+
}
113
+
114
+
$options = [
115
+
'author_section_options' => [
116
+
'type' => 'ct-options',
117
+
'setting' => [ 'transport' => 'postMessage' ],
118
+
'inner-options' => $inner_options
119
+
],
120
+
];
121
+