PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.4.20
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.4.20
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / admin / views / class-sps-replacelayout.php

class-sps-replacelayout.php in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 2.4.20, at admin/views/class-sps-replacelayout.php

237 lines 7.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The main class for Settings configurations.
4 *
5 * @package Smart_Post_Show
6 * @subpackage Smart_Post_Show/admin/views
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 die; } // Cannot access pages directly.
11
12 /**
13 * Settings.
14 */
15 class SPS_ReplaceLayout {
16 /**
17 * Create a Replace_Layout page.
18 *
19 * @param string $prefix The settings.
20 * @return void
21 */
22 public static function Replace_Layout( $prefix ) {
23 SP_PC::createOptions(
24 $prefix,
25 array(
26 'menu_title' => __( 'Replace Layout', 'post-carousel' ),
27 'menu_parent' => 'edit.php?post_type=sp_post_carousel',
28 'menu_type' => 'submenu', // menu, submenu, options, theme, etc.
29 'menu_slug' => 'pcp_replace_layout',
30 'theme' => 'light',
31 'show_all_options' => false,
32 'show_search' => false,
33 'show_footer' => false,
34 'show_bar_menu' => false,
35 'show_reset_all' => false,
36 'class' => 'sp-pc-settings pcp_replace_layout',
37 'framework_title' => __( 'Replace Layout', 'post-carousel' ),
38 )
39 );
40
41 SP_PC::createSection(
42 $prefix,
43 array(
44 'title' => __( 'Standard Archives', 'post-carousel' ),
45 'fields' => array(
46 array(
47 'id' => 'home',
48 'type' => 'switcher',
49 'title' => __( 'Posts Page (Default Blog)', 'post-carousel' ),
50 'text_on' => __( 'Enabled', 'post-carousel' ),
51 'text_off' => __( 'Disabled', 'post-carousel' ),
52 'text_width' => 100,
53 'default' => true,
54 ),
55 array(
56 'id' => 'sps_home',
57 'type' => 'fieldset',
58 'class' => 'spsp_no_border',
59 'dependency' => array( 'home', '==', 'true', true ),
60 'fields' => array(
61 array(
62 'id' => 'pcp_which_show',
63 'class' => 'pcp_post_ids',
64 'type' => 'select',
65 'title' => __( 'The Layout To Show Posts', 'post-carousel' ),
66 'options' => array(
67 'sp_post_carousel' => __( 'Choose show(s)', 'post-carousel' ),
68 ),
69 'chosen' => true,
70 'sortable' => false,
71 'multiple' => false,
72 'placeholder' => __( 'Choose show(s)', 'post-carousel' ),
73 ),
74 array(
75 'id' => 'replace_way',
76 'class' => 'pcp_post_ids',
77 'type' => 'radio',
78 'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ),
79 'default' => 'no_change',
80 'options' => array(
81 'no_change' => 'No change',
82 'change_sort' => 'Change order only (use "Sort by" setting of the show)',
83 'change_full' => 'Change completely (use all "Filter Content" of the show)',
84 ),
85 ),
86 ),
87 ),
88 array(
89 'id' => 'search',
90 'title' => __( 'Search', 'post-carousel' ),
91 'text_on' => __( 'Enabled', 'post-carousel' ),
92 'text_off' => __( 'Disabled', 'post-carousel' ),
93 'type' => 'switcher',
94 'text_width' => 100,
95 'default' => false,
96 ),
97 array(
98 'id' => 'sps_search',
99 'type' => 'fieldset',
100 'class' => 'spsp_no_border',
101 'dependency' => array( 'search', '==', 'true', true ),
102 'fields' => array(
103 array(
104 'id' => 'pcp_which_show',
105 'class' => 'pcp_post_ids',
106 'type' => 'select',
107 'title' => __( 'The Layout To Show Posts', 'post-carousel' ),
108 'options' => 'sp_post_carousel',
109 'chosen' => true,
110 'sortable' => false,
111 'multiple' => false,
112 'placeholder' => __( 'Choose show(s)', 'post-carousel' ),
113 'query_args' => array(
114 'posts_per_page' => -1,
115 ),
116 ),
117 array(
118 'id' => 'replace_way',
119 'class' => 'pcp_post_ids',
120 'type' => 'radio',
121 'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ),
122 'default' => 'no_change',
123 'options' => array(
124 'no_change' => 'No change',
125 'change_sort' => 'Change order only (use "Sort by" setting of the show)',
126 'change_full' => 'Change completely (use all "Filter Content" of the show)',
127 ),
128 ),
129 ),
130 ),
131 array(
132 'id' => 'author',
133 'title' => __( 'Author Page', 'post-carousel' ),
134 'text_on' => __( 'Enabled', 'post-carousel' ),
135 'text_off' => __( 'Disabled', 'post-carousel' ),
136 'type' => 'switcher',
137 'text_width' => 100,
138 'default' => false,
139 ),
140 array(
141 'id' => 'sps_author',
142 'type' => 'fieldset',
143 'class' => 'spsp_no_border',
144 'dependency' => array( 'author', '==', 'true', true ),
145 'fields' => array(
146 array(
147 'id' => 'pcp_which_show',
148 'class' => 'pcp_post_ids',
149 'type' => 'select',
150 'title' => __( 'The Layout To Show Posts', 'post-carousel' ),
151 'options' => 'sp_post_carousel',
152 'chosen' => true,
153 'sortable' => false,
154 'multiple' => false,
155 'placeholder' => __( 'Choose show(s)', 'post-carousel' ),
156 'query_args' => array(
157 'posts_per_page' => -1,
158 ),
159 ),
160 array(
161 'id' => 'replace_way',
162 'class' => 'pcp_post_ids',
163 'type' => 'radio',
164 'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ),
165 'default' => 'no_change',
166 'options' => array(
167 'no_change' => 'No change',
168 'change_sort' => 'Change order only (use "Sort by" setting of the show)',
169 'change_full' => 'Change completely (use all "Filter Content" of the show)',
170 ),
171 ),
172 ),
173 ),
174 array(
175 'id' => 'time',
176 'text_on' => __( 'Enabled', 'post-carousel' ),
177 'text_off' => __( 'Disabled', 'post-carousel' ),
178 'type' => 'switcher',
179 'text_width' => 100,
180 'default' => false,
181 'title' => __( 'Date, Month, Year', 'post-carousel' ),
182 ),
183 array(
184 'id' => 'sps_time',
185 'type' => 'fieldset',
186 'class' => 'spsp_no_border',
187 'dependency' => array( 'time', '==', 'true', true ),
188 'fields' => array(
189 array(
190 'id' => 'pcp_which_show',
191 'class' => 'pcp_post_ids',
192 'type' => 'select',
193 'title' => __( 'The Layout To Show Posts', 'post-carousel' ),
194 'options' => 'sp_post_carousel',
195 'chosen' => true,
196 'sortable' => false,
197 'multiple' => false,
198 'placeholder' => __( 'Choose show(s)', 'post-carousel' ),
199 'query_args' => array(
200 'posts_per_page' => -1,
201 ),
202 ),
203 array(
204 'id' => 'replace_way',
205 'class' => 'pcp_post_ids',
206 'type' => 'radio',
207 'title' => __( 'The Way To Retrieve Posts', 'post-carousel' ),
208 'default' => 'no_change',
209 'options' => array(
210 'no_change' => 'No change',
211 'change_sort' => 'Change order only (use "Sort by" setting of the show)',
212 'change_full' => 'Change completely (use all "Filter Content" of the show)',
213 ),
214 ),
215 ),
216 ),
217 ),
218 )
219 );
220
221 SP_PC::createSection(
222 $prefix,
223 array(
224 'title' => __( 'Taxonomy Archives', 'post-carousel' ),
225 'fields' => array(),
226 )
227 );
228 SP_PC::createSection(
229 $prefix,
230 array(
231 'title' => __( 'Post Type Archives', 'post-carousel' ),
232 'fields' => array(),
233 )
234 );
235 }
236 }
237