| 1 |
<?php |
| 2 |
/** |
| 3 |
* The Display options Meta-box configurations. |
| 4 |
* |
| 5 |
* @package Smart_Post_Show |
| 6 |
* @subpackage Smart_Post_Show/admin |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
die; |
| 11 |
} // Cannot access pages directly. |
| 12 |
|
| 13 |
/** |
| 14 |
* The Layout building class. |
| 15 |
*/ |
| 16 |
class SPS_Display { |
| 17 |
|
| 18 |
/** |
| 19 |
* Display options section metabox. |
| 20 |
* |
| 21 |
* @param string $prefix The metabox key. |
| 22 |
* @return void |
| 23 |
*/ |
| 24 |
public static function section( $prefix ) { |
| 25 |
SP_PC::createSection( |
| 26 |
$prefix, |
| 27 |
array( |
| 28 |
'title' => __( 'DISPLAY OPTIONS', 'post-carousel' ), |
| 29 |
'icon' => 'fa fa-th-large', |
| 30 |
'fields' => array( |
| 31 |
array( |
| 32 |
'id' => 'section_title', |
| 33 |
'type' => 'switcher', |
| 34 |
'title' => __( 'Section Title ', 'post-carousel' ), |
| 35 |
'subtitle' => __( 'Show/Hide item showcase section title.', 'post-carousel' ), |
| 36 |
'default' => false, |
| 37 |
'text_on' => __( 'Show', 'post-carousel' ), |
| 38 |
'text_off' => __( 'Hide', 'post-carousel' ), |
| 39 |
'text_width' => 75, |
| 40 |
), |
| 41 |
array( |
| 42 |
'id' => 'section_title_margin', |
| 43 |
'type' => 'spacing', |
| 44 |
'title' => __( 'Section Title Margin', 'post-carousel' ), |
| 45 |
'subtitle' => __( 'Set margin for the section title.', 'post-carousel' ), |
| 46 |
'all_icon' => '<i class="fa fa-long-arrow-down"></i>', |
| 47 |
'units' => array( |
| 48 |
'px', |
| 49 |
), |
| 50 |
'all_placeholder' => 'margin', |
| 51 |
'default' => array( |
| 52 |
'top' => '0', |
| 53 |
'right' => '0', |
| 54 |
'bottom' => '30', |
| 55 |
'left' => '0', |
| 56 |
), |
| 57 |
'dependency' => array( |
| 58 |
'section_title', |
| 59 |
'==', |
| 60 |
'true', |
| 61 |
true, |
| 62 |
), |
| 63 |
), |
| 64 |
array( |
| 65 |
'id' => 'pcp_number_of_columns', |
| 66 |
'type' => 'column', |
| 67 |
'title' => __( 'Column(s)', 'post-carousel' ), |
| 68 |
'subtitle' => __( 'Set number of column(s) in different devices for responsive view.', 'post-carousel' ), |
| 69 |
'default' => array( |
| 70 |
'lg_desktop' => '4', |
| 71 |
'desktop' => '4', |
| 72 |
'tablet' => '3', |
| 73 |
'mobile_landscape' => '2', |
| 74 |
'mobile' => '1', |
| 75 |
), |
| 76 |
'min' => '1', |
| 77 |
'help' => '<i class="fa fa-television"></i> Large Desktop - is larger than 1200px,<br><i class="fa fa-desktop"></i> Desktop - size is larger than 992px,<br> <i class="fa fa-tablet"></i> Tablet - Size is larger than 768,<br> <i class="fa fa-mobile"></i> Mobile Landscape- size is larger than 576px.,<br> <i class="fa fa-mobile"></i> Mobile - size is smaller than 576px.', |
| 78 |
), |
| 79 |
array( |
| 80 |
'id' => 'margin_between_post', |
| 81 |
'type' => 'spacing', |
| 82 |
'title' => __( 'Margin Between Columns', 'post-carousel' ), |
| 83 |
'subtitle' => __( 'Set margin between columns (items).', 'post-carousel' ), |
| 84 |
'all' => true, |
| 85 |
'all_icon' => '<i class="fa fa-arrows-h"></i>', |
| 86 |
'units' => array( |
| 87 |
'px', |
| 88 |
), |
| 89 |
'all_placeholder' => 'margin', |
| 90 |
'default' => array( |
| 91 |
'all' => '20', |
| 92 |
), |
| 93 |
), |
| 94 |
array( |
| 95 |
'id' => 'post_content_orientation', |
| 96 |
'type' => 'layout_preset', |
| 97 |
'title' => __( 'Content Orientation ', 'post-carousel' ), |
| 98 |
'subtitle' => __( 'Set a position for the item content.', 'post-carousel' ), |
| 99 |
'desc' => __( 'To unlock more amazing Content Orientation and Layout based Settings, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a>', 'post-carousel' ), |
| 100 |
'class' => 'pcp-content-orientation', |
| 101 |
'options' => array( |
| 102 |
'default' => array( |
| 103 |
'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/default.svg', |
| 104 |
'text' => __( 'Default', 'post-carousel' ), |
| 105 |
), |
| 106 |
'left-thumb' => array( |
| 107 |
'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/left-image.svg', |
| 108 |
'text' => __( 'Left Image', 'post-carousel' ), |
| 109 |
'pro_only' => true, |
| 110 |
), |
| 111 |
'right-thumb' => array( |
| 112 |
'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/right-image.svg', |
| 113 |
'text' => __( 'Right Image', 'post-carousel' ), |
| 114 |
'pro_only' => true, |
| 115 |
), |
| 116 |
'overlay' => array( |
| 117 |
'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/overlay.svg', |
| 118 |
'text' => __( 'Overlay', 'post-carousel' ), |
| 119 |
'pro_only' => true, |
| 120 |
), |
| 121 |
'card' => array( |
| 122 |
'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/card.svg', |
| 123 |
'text' => __( 'Card', 'post-carousel' ), |
| 124 |
'pro_only' => true, |
| 125 |
), |
| 126 |
'overlay-box' => array( |
| 127 |
'image' => SP_PC_URL . 'admin/views/sp-framework/assets/img/overlay-box.svg', |
| 128 |
'text' => __( 'Overlay Box', 'post-carousel' ), |
| 129 |
'pro_only' => true, |
| 130 |
), |
| 131 |
), |
| 132 |
'default' => 'default', |
| 133 |
), |
| 134 |
array( |
| 135 |
'id' => 'post_border', |
| 136 |
'type' => 'border', |
| 137 |
'title' => __( 'Border', 'post-carousel' ), |
| 138 |
'subtitle' => __( 'Set border for the item.', 'post-carousel' ), |
| 139 |
'all' => true, |
| 140 |
'default' => array( |
| 141 |
'all' => '0', |
| 142 |
'style' => 'solid', |
| 143 |
'color' => '#e2e2e2', |
| 144 |
), |
| 145 |
), |
| 146 |
array( |
| 147 |
'id' => 'post_border_radius_property', |
| 148 |
'type' => 'spacing', |
| 149 |
'title' => __( 'Border Radius', 'post-carousel' ), |
| 150 |
'subtitle' => __( 'Set border radius for item.', 'post-carousel' ), |
| 151 |
'all' => true, |
| 152 |
'units' => array( 'px', '%' ), |
| 153 |
'default' => array( |
| 154 |
'all' => '0', |
| 155 |
), |
| 156 |
), |
| 157 |
array( |
| 158 |
'id' => 'post_background_property', |
| 159 |
'type' => 'color', |
| 160 |
'title' => __( 'Background', 'post-carousel' ), |
| 161 |
'subtitle' => __( 'Set background color for the item.', 'post-carousel' ), |
| 162 |
'default' => 'transparent', |
| 163 |
), |
| 164 |
array( |
| 165 |
'id' => 'post_inner_padding_property', |
| 166 |
'type' => 'spacing', |
| 167 |
'title' => __( 'Inner Padding', 'post-carousel' ), |
| 168 |
'subtitle' => __( 'Set inner padding for item.', 'post-carousel' ), |
| 169 |
'default' => array( |
| 170 |
'top' => '0', |
| 171 |
'right' => '0', |
| 172 |
'bottom' => '0', |
| 173 |
'left' => '0', |
| 174 |
'unit' => 'px', |
| 175 |
), |
| 176 |
'help' => "<img src='" . SP_PC_URL . "/admin/assets/img/inner_padding.jpg'>", |
| 177 |
), |
| 178 |
array( |
| 179 |
'id' => 'post_content_sorter', |
| 180 |
'type' => 'sortable', |
| 181 |
'title' => __( 'Content Fields', 'post-carousel' ), |
| 182 |
'subtitle' => __( 'Item content fields which are draggable to change display order and it\'s settings.', 'post-carousel' ), |
| 183 |
'desc' => __( 'To show Social Share and Custom Fields, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a>', 'post-carousel' ), |
| 184 |
'class' => 'post_content_sorter', |
| 185 |
'fields' => array( |
| 186 |
array( |
| 187 |
'id' => 'pcp_post_thumb', |
| 188 |
'type' => 'accordion', |
| 189 |
'accordions' => array( |
| 190 |
array( |
| 191 |
'title' => __( 'Thumbnail', 'post-carousel' ), |
| 192 |
'fields' => array( |
| 193 |
array( |
| 194 |
'id' => 'post_thumb_show', |
| 195 |
'type' => 'switcher', |
| 196 |
'title' => __( 'Thumbnail', 'post-carousel' ), |
| 197 |
'text_on' => __( 'Show', 'post-carousel' ), |
| 198 |
'text_off' => __( 'Hide', 'post-carousel' ), |
| 199 |
'default' => true, |
| 200 |
'text_width' => 80, |
| 201 |
), |
| 202 |
array( |
| 203 |
'id' => 'pcp_thumb_sizes', |
| 204 |
'type' => 'image_sizes', |
| 205 |
'title' => __( 'Size', 'post-carousel' ), |
| 206 |
'default' => 'full', |
| 207 |
'dependency' => array( 'post_thumb_show', '==', 'true', true ), |
| 208 |
), |
| 209 |
array( |
| 210 |
'id' => 'pcp_image_crop_size', |
| 211 |
'type' => 'dimensions_advanced', |
| 212 |
'title' => __( 'Custom Size (Pro)', 'post-carousel' ), |
| 213 |
'chosen' => true, |
| 214 |
'bottom' => false, |
| 215 |
'left' => false, |
| 216 |
'color' => false, |
| 217 |
'top_icon' => '<i class="fa fa-arrows-h"></i>', |
| 218 |
'right_icon' => '<i class="fa fa-arrows-v"></i>', |
| 219 |
'top_placeholder' => 'width', |
| 220 |
'right_placeholder' => 'height', |
| 221 |
'styles' => array( |
| 222 |
'Soft-crop', |
| 223 |
'Hard-crop', |
| 224 |
), |
| 225 |
'default' => array( |
| 226 |
'top' => '600', |
| 227 |
'right' => '400', |
| 228 |
'style' => 'Soft-crop', |
| 229 |
'unit' => 'px', |
| 230 |
), |
| 231 |
'attributes' => array( |
| 232 |
'min' => 0, |
| 233 |
), |
| 234 |
'dependency' => array( 'post_thumb_show|pcp_thumb_sizes', '==|==', 'true|custom' ), |
| 235 |
), |
| 236 |
array( |
| 237 |
'id' => 'load_2x_image', |
| 238 |
'type' => 'switcher', |
| 239 |
'title' => __( 'Load 2x Resolution Image in Retina Display (Pro)', 'post-carousel' ), |
| 240 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 241 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 242 |
'text_width' => 94, |
| 243 |
'default' => false, |
| 244 |
'dependency' => array( 'post_thumb_show|pcp_thumb_sizes', '==|==', 'true|custom' ), |
| 245 |
), |
| 246 |
), |
| 247 |
), |
| 248 |
), |
| 249 |
), |
| 250 |
array( |
| 251 |
'id' => 'pcp_post_title', |
| 252 |
'type' => 'accordion', |
| 253 |
'accordions' => array( |
| 254 |
array( |
| 255 |
'title' => 'Title', |
| 256 |
'fields' => array( |
| 257 |
array( |
| 258 |
'id' => 'show_post_title', |
| 259 |
'type' => 'switcher', |
| 260 |
'title' => __( 'Title', 'post-carousel' ), |
| 261 |
'text_on' => __( 'Show', 'post-carousel' ), |
| 262 |
'text_off' => __( 'Hide', 'post-carousel' ), |
| 263 |
'default' => true, |
| 264 |
'text_width' => 80, |
| 265 |
), |
| 266 |
array( |
| 267 |
'id' => 'post_title_tag', |
| 268 |
'type' => 'select', |
| 269 |
'title' => __( 'Title HTML Tag', 'post-carousel' ), |
| 270 |
'options' => array( |
| 271 |
'h1' => __( 'h1', 'post-carousel' ), |
| 272 |
'h2' => __( 'h2', 'post-carousel' ), |
| 273 |
'h3' => __( 'h3', 'post-carousel' ), |
| 274 |
'h4' => __( 'h4', 'post-carousel' ), |
| 275 |
'h5' => __( 'h5', 'post-carousel' ), |
| 276 |
'h6' => __( 'h6', 'post-carousel' ), |
| 277 |
'p' => __( 'p', 'post-carousel' ), |
| 278 |
'div' => __( 'div', 'post-carousel' ), |
| 279 |
), |
| 280 |
'default' => 'h2', |
| 281 |
'class' => 'chosen', |
| 282 |
'dependency' => array( 'show_post_title', '==', 'true', true ), |
| 283 |
), |
| 284 |
), |
| 285 |
), |
| 286 |
), |
| 287 |
), |
| 288 |
array( |
| 289 |
'id' => 'pcp_post_meta', |
| 290 |
'type' => 'accordion', |
| 291 |
'accordions' => array( |
| 292 |
array( |
| 293 |
'title' => __( 'Meta Fields', 'post-carousel' ), |
| 294 |
'fields' => array( |
| 295 |
array( |
| 296 |
'id' => 'show_post_meta', |
| 297 |
'type' => 'switcher', |
| 298 |
'title' => __( 'Meta Fields', 'post-carousel' ), |
| 299 |
'text_on' => __( 'Show', 'post-carousel' ), |
| 300 |
'text_off' => __( 'Hide', 'post-carousel' ), |
| 301 |
'default' => true, |
| 302 |
'text_width' => 80, |
| 303 |
), |
| 304 |
array( |
| 305 |
'id' => 'pcp_post_meta_group', |
| 306 |
'class' => 'pcp_custom_group_design', |
| 307 |
'type' => 'group', |
| 308 |
'button_title' => __( 'Add New Meta', 'post-carousel' ), |
| 309 |
'dependency' => array( 'show_post_meta', '==', 'true' ), |
| 310 |
'fields' => array( |
| 311 |
array( |
| 312 |
'id' => 'select_post_meta', |
| 313 |
'type' => 'select', |
| 314 |
'title' => __( 'Select Meta', 'post-carousel' ), |
| 315 |
'placeholder' => __( 'Select a meta', 'post-carousel' ), |
| 316 |
'class' => 'pcp-meta-select', |
| 317 |
'options' => array( |
| 318 |
'author' => __( 'Author', 'post-carousel' ), |
| 319 |
'date' => __( 'Date', 'post-carousel' ), |
| 320 |
'comment_count' => __( 'Comment Count', 'post-carousel' ), |
| 321 |
'taxonomy' => __( 'Taxonomy (Pro)', 'post-carousel' ), |
| 322 |
'view_count' => __( 'View Count (Pro)', 'post-carousel' ), |
| 323 |
'like' => __( 'Like (Pro)', 'post-carousel' ), |
| 324 |
'reading_time' => __( 'Reading Time (Pro)', 'post-carousel' ), |
| 325 |
), |
| 326 |
), |
| 327 |
array( |
| 328 |
'id' => 'post_meta_author_avatar', |
| 329 |
'type' => 'select', |
| 330 |
'title' => __( 'Avatar', 'post-carousel' ), |
| 331 |
'class' => 'post_meta_author_avatar', |
| 332 |
'options' => array( |
| 333 |
'show_name' => __( 'Show name', 'post-carousel' ), |
| 334 |
'show_gravatar' => __( 'Show gravatar', 'post-carousel' ), |
| 335 |
'name_with_gravatar' => __( 'Author name & gravatar', 'post-carousel' ), |
| 336 |
'name_with_icon' => __( 'Author name with an icon', 'post-carousel' ), |
| 337 |
|
| 338 |
), |
| 339 |
'desc' => __( 'To show gravatar, you must <a href="https://wordpress.org/support/article/how-to-use-gravatars/" target="_blank" rel="noopener noreferrer nofollow"><em>enable it</em></a>.', 'post-carousel' ), |
| 340 |
'default' => 'name_with_icon', |
| 341 |
'dependency' => array( 'select_post_meta', '==', 'author' ), |
| 342 |
), |
| 343 |
array( |
| 344 |
'id' => 'post_meta_date_format', |
| 345 |
'type' => 'select', |
| 346 |
'title' => __( 'Date Format', 'post-carousel' ), |
| 347 |
'class' => 'post_meta_date_format', |
| 348 |
'options' => array( |
| 349 |
'default' => __( 'Default', 'post-carousel' ), |
| 350 |
'time_ago' => __( 'Time ago(human time)', 'post-carousel' ), |
| 351 |
'custom' => __( 'Custom', 'post-carousel' ), |
| 352 |
), |
| 353 |
'default' => 'default', |
| 354 |
'dependency' => array( 'select_post_meta', '==', 'date' ), |
| 355 |
), |
| 356 |
array( |
| 357 |
'id' => 'pcp_custom_meta_date_format', |
| 358 |
'type' => 'text', |
| 359 |
'title' => ' ', |
| 360 |
'class' => 'pcp_custom_meta_date_format', |
| 361 |
'placeholder' => __( 'F j, Y', 'post-carousel' ), |
| 362 |
'default' => __( 'F j, Y', 'post-carousel' ), |
| 363 |
'desc' => __( 'To define format, check <a href="https://wordpress.org/support/article/formatting-date-and-time/" target="_blank" rel="noopener noreferrer nofollow"><em>this doc</em></a>.', 'post-carousel' ), |
| 364 |
'dependency' => array( 'select_post_meta|post_meta_date_format', '==|==', 'date|custom' ), |
| 365 |
), |
| 366 |
array( |
| 367 |
'id' => 'post_meta_taxonomy', |
| 368 |
'type' => 'select', |
| 369 |
'title' => __( 'Select Taxonomy', 'post-carousel' ), |
| 370 |
'class' => 'post_meta_taxonomy', |
| 371 |
'options' => 'taxonomy', |
| 372 |
'query_args' => array( |
| 373 |
'type' => 'any', |
| 374 |
), |
| 375 |
'attributes' => array( |
| 376 |
'style' => 'width: 200px;', |
| 377 |
), |
| 378 |
'empty_message' => __( 'No taxonomies found.', 'post-carousel' ), |
| 379 |
'dependency' => array( 'select_post_meta', '==', 'taxonomy' ), |
| 380 |
), |
| 381 |
array( |
| 382 |
'id' => 'pcp_meta_position', |
| 383 |
'class' => 'pcp_meta_position', |
| 384 |
'type' => 'button_set', |
| 385 |
'title' => __( 'Position', 'post-carousel' ), |
| 386 |
'options' => array( |
| 387 |
'beside_meta' => __( 'Beside Other Meta', 'post-carousel' ), |
| 388 |
'above_title' => __( 'Above Title', 'post-carousel' ), |
| 389 |
'over_thumb' => __( 'Over Thumbnail', 'post-carousel' ), |
| 390 |
|
| 391 |
), |
| 392 |
'default' => 'beside_meta', |
| 393 |
'dependency' => array( 'select_post_meta', '==', 'taxonomy' ), |
| 394 |
), |
| 395 |
array( |
| 396 |
'id' => 'pcp_meta_over_thump_position', |
| 397 |
'type' => 'select', |
| 398 |
'title' => __( 'Over Thumbnail Position', 'post-carousel' ), |
| 399 |
'options' => array( |
| 400 |
'top_left' => __( 'Top Left', 'post-carousel' ), |
| 401 |
'top_right' => __( 'Top Right', 'post-carousel' ), |
| 402 |
'bottom_left' => __( 'Bottom Left', 'post-carousel' ), |
| 403 |
'bottom_right' => __( 'Bottom Right', 'post-carousel' ), |
| 404 |
), |
| 405 |
'default' => 'top_left', |
| 406 |
'dependency' => array( 'select_post_meta|pcp_meta_position', '==|==', 'taxonomy|over_thumb' ), |
| 407 |
), |
| 408 |
array( |
| 409 |
'id' => 'pcp_meta_pill_color', |
| 410 |
'type' => 'color_group', |
| 411 |
'title' => __( 'Meta Color', 'post-carousel' ), |
| 412 |
'options' => array( |
| 413 |
'text' => __( 'Text', 'post-carousel' ), |
| 414 |
'bg' => __( 'Background', 'post-carousel' ), |
| 415 |
), |
| 416 |
'default' => array( |
| 417 |
'text' => '#fff', |
| 418 |
'bg' => '#e53935', |
| 419 |
), |
| 420 |
'dependency' => array( 'select_post_meta|pcp_meta_position', '==|!=', 'taxonomy|beside_meta' ), |
| 421 |
), |
| 422 |
array( |
| 423 |
'id' => 'pcp_word_per_minute', |
| 424 |
'type' => 'number', |
| 425 |
'title' => __( 'Per Minute', 'post-carousel' ), |
| 426 |
'class' => 'pcp_reading_time_meta', |
| 427 |
'title_help' => __( 'Default 300 words, the average reading speed for adults.', 'post-carousel' ), |
| 428 |
'sanitize' => 'pcp_sanitize_number_field', |
| 429 |
'unit' => __( 'words', 'post-carousel' ), |
| 430 |
'default' => '300', |
| 431 |
'dependency' => array( 'select_post_meta', '==', 'reading_time' ), |
| 432 |
'default' => 300, |
| 433 |
), |
| 434 |
array( |
| 435 |
'id' => 'select_meta_icon', |
| 436 |
'class' => 'select_meta_icon', |
| 437 |
'type' => 'icon', |
| 438 |
'title' => __( 'Meta Icon', 'post-carousel' ), |
| 439 |
'default' => 'fa fa-folder-o', |
| 440 |
'dependency' => array( 'pcp_meta_position|select_post_meta', '==|!=', 'beside_meta|like' ), |
| 441 |
), |
| 442 |
array( |
| 443 |
'id' => 'reading_time_postfix', |
| 444 |
'type' => 'text', |
| 445 |
'title' => __( 'Reading Time Postfix', 'post-carousel' ), |
| 446 |
'class' => 'pcp_reading_time_postfix', |
| 447 |
'title_help' => __( 'Text after time. Leave empty for nothing.', 'post-carousel' ), |
| 448 |
'default' => ' Min Read', |
| 449 |
'dependency' => array( 'select_post_meta', '==', 'reading_time' ), |
| 450 |
), |
| 451 |
), |
| 452 |
'default' => array( |
| 453 |
array( |
| 454 |
'select_post_meta' => 'author', |
| 455 |
'post_meta_author_avatar' => 'name_with_icon', |
| 456 |
'select_meta_icon' => 'fa fa-user', |
| 457 |
'pcp_meta_position' => 'beside_meta', |
| 458 |
), |
| 459 |
array( |
| 460 |
'select_post_meta' => 'date', |
| 461 |
'select_meta_icon' => 'fa fa-calendar', |
| 462 |
'pcp_meta_position' => 'beside_meta', |
| 463 |
), |
| 464 |
array( |
| 465 |
'select_post_meta' => 'comment_count', |
| 466 |
'select_meta_icon' => 'fa fa-comments-o', |
| 467 |
'pcp_meta_position' => 'beside_meta', |
| 468 |
), |
| 469 |
), |
| 470 |
), |
| 471 |
), |
| 472 |
), |
| 473 |
), |
| 474 |
), |
| 475 |
array( |
| 476 |
'id' => 'pcp_post_content', |
| 477 |
'type' => 'accordion', |
| 478 |
'accordions' => array( |
| 479 |
array( |
| 480 |
'title' => 'Content', |
| 481 |
'fields' => array( |
| 482 |
array( |
| 483 |
'id' => 'show_post_content', |
| 484 |
'type' => 'switcher', |
| 485 |
'title' => __( 'Content', 'post-carousel' ), |
| 486 |
'text_on' => __( 'Show', 'post-carousel' ), |
| 487 |
'text_off' => __( 'Hide', 'post-carousel' ), |
| 488 |
'default' => true, |
| 489 |
'text_width' => 80, |
| 490 |
), |
| 491 |
array( |
| 492 |
'id' => 'post_content_type', |
| 493 |
'type' => 'select', |
| 494 |
'class' => 'pcp-post-content-type', |
| 495 |
'title' => __( 'Content Display Type', 'post-carousel' ), |
| 496 |
'options' => array( |
| 497 |
'excerpt' => __( 'Excerpt', 'post-carousel' ), |
| 498 |
'full_content' => __( 'Full Content', 'post-carousel' ), |
| 499 |
'limit_content' => __( 'Content with Limit (Pro)', 'post-carousel' ), |
| 500 |
), |
| 501 |
'default' => 'excerpt', |
| 502 |
'dependency' => array( 'show_post_content', '==', 'true', true ), |
| 503 |
), |
| 504 |
|
| 505 |
// ReadMore settings. |
| 506 |
array( |
| 507 |
'id' => 'show_read_more', |
| 508 |
'type' => 'switcher', |
| 509 |
'title' => __( 'Read More', 'post-carousel' ), |
| 510 |
'text_on' => __( 'Show', 'post-carousel' ), |
| 511 |
'text_off' => __( 'Hide', 'post-carousel' ), |
| 512 |
'default' => true, |
| 513 |
'text_width' => 80, |
| 514 |
'dependency' => array( 'post_content_type', '!=', 'full_content', true ), |
| 515 |
), |
| 516 |
array( |
| 517 |
'id' => 'pcp_read_label', |
| 518 |
'type' => 'text', |
| 519 |
'title' => __( 'Read More Label', 'post-carousel' ), |
| 520 |
'default' => 'Read More', |
| 521 |
'dependency' => array( 'post_content_type|show_read_more', '!=|==', 'full_content|true', true ), |
| 522 |
), |
| 523 |
array( |
| 524 |
'id' => 'readmore_color_button', |
| 525 |
'type' => 'color_group', |
| 526 |
'title' => __( 'Read More Color', 'post-carousel' ), |
| 527 |
'options' => array( |
| 528 |
'standard' => __( 'Text Color', 'post-carousel' ), |
| 529 |
'hover' => __( 'Text Hover Color', 'post-carousel' ), |
| 530 |
'bg' => __( 'Background', 'post-carousel' ), |
| 531 |
'hover_bg' => __( 'Hover Background', 'post-carousel' ), |
| 532 |
'border' => __( 'Border', 'post-carousel' ), |
| 533 |
'hover_border' => __( 'Hover Border', 'post-carousel' ), |
| 534 |
), |
| 535 |
'default' => array( |
| 536 |
'standard' => '#111', |
| 537 |
'hover' => '#fff', |
| 538 |
'bg' => 'transparent', |
| 539 |
'hover_bg' => '#e1624b', |
| 540 |
'border' => '#888', |
| 541 |
'hover_border' => '#e1624b', |
| 542 |
), |
| 543 |
'dependency' => array( 'post_content_type|show_read_more', '!=|==', 'full_content|true', true ), |
| 544 |
), |
| 545 |
|
| 546 |
), |
| 547 |
), |
| 548 |
), |
| 549 |
), |
| 550 |
array( |
| 551 |
'id' => 'pcp_social_share', |
| 552 |
'type' => 'accordion', |
| 553 |
'class' => 'pcp-pro-only', |
| 554 |
'accordions' => array( |
| 555 |
array( |
| 556 |
'title' => __( 'Social Share (Pro)', 'post-carousel' ), |
| 557 |
'fields' => array( |
| 558 |
array( |
| 559 |
'id' => 'social_position', |
| 560 |
'type' => 'button_set', |
| 561 |
'title' => __( 'Alignment', 'post-carousel' ), |
| 562 |
'options' => array( |
| 563 |
'left' => '<i class="fa fa-align-left" title="Left"></i>', |
| 564 |
'center' => '<i class="fa fa-align-center" title="Center"></i>', |
| 565 |
'right' => '<i class="fa fa-align-right" title="Right"></i>', |
| 566 |
), |
| 567 |
'default' => 'left', |
| 568 |
'dependency' => array( 'social_sharing_media', '!=', '' ), |
| 569 |
), |
| 570 |
), |
| 571 |
), |
| 572 |
), |
| 573 |
), // PCP Post Social. |
| 574 |
array( |
| 575 |
'id' => 'pcp_custom_fields', |
| 576 |
'type' => 'accordion', |
| 577 |
'class' => 'pcp-pro-only', |
| 578 |
'accordions' => array( |
| 579 |
array( |
| 580 |
'title' => __( 'Custom Fields (Pro)', 'post-carousel' ), |
| 581 |
'fields' => array( |
| 582 |
// The Group Fields. |
| 583 |
array( |
| 584 |
'id' => 'pcp_custom_meta_icon', |
| 585 |
'type' => 'icon', |
| 586 |
'title' => 'Icon Before Name', |
| 587 |
'default' => 'fa fa-calendar-o', |
| 588 |
), |
| 589 |
|
| 590 |
), // End Fields array. |
| 591 |
), |
| 592 |
), // Accordion. |
| 593 |
), // Custom fields end. |
| 594 |
), |
| 595 |
), |
| 596 |
array( |
| 597 |
'id' => 'show_post_pagination', |
| 598 |
'type' => 'switcher', |
| 599 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 600 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 601 |
'text_width' => 100, |
| 602 |
'title' => __( 'Pagination', 'post-carousel' ), |
| 603 |
'subtitle' => __( 'Enabled/Disabled item pagination.', 'post-carousel' ), |
| 604 |
'default' => true, |
| 605 |
'dependency' => array( 'pcp_layout_preset', 'not-any', 'carousel_layout', 'true' ), |
| 606 |
), |
| 607 |
array( |
| 608 |
'id' => 'post_pagination_type', |
| 609 |
'type' => 'radio', |
| 610 |
'title' => __( 'Pagination Type', 'post-carousel' ), |
| 611 |
'subtitle' => __( 'Choose a pagination type.', 'post-carousel' ), |
| 612 |
'desc' => __( 'More amazing Ajax Pagination Settings are available in <a href="https://smartpostshow.com/" target="_blank"><strong>Pro</strong></a>!', 'post-carousel' ), |
| 613 |
'class' => 'pcp-pagination-type', |
| 614 |
'options' => array( |
| 615 |
'no_ajax' => __( 'Normal Pagination', 'post-carousel' ), |
| 616 |
'ajax_load_more' => __( 'Ajax Load More Button (Pro)', 'post-carousel' ), |
| 617 |
'ajax_pagination' => __( 'Ajax Number Pagination (Pro)', 'post-carousel' ), |
| 618 |
'infinite_scroll' => __( 'Ajax Infinite Scroll (Pro)', 'post-carousel' ), |
| 619 |
), |
| 620 |
'default' => 'no_ajax', |
| 621 |
'dependency' => array( 'pcp_layout_preset|show_post_pagination', 'not-any|==', 'carousel_layout|true', true ), |
| 622 |
// 'dependency' => array( 'pcp_layout_preset', 'not-any', 'grid_layout', 'true' ), |
| 623 |
), |
| 624 |
array( |
| 625 |
'id' => 'pcp_pagination_btn_color', |
| 626 |
'type' => 'color_group', |
| 627 |
'title' => __( 'Pagination Color', 'post-carousel' ), |
| 628 |
'subtitle' => __( 'Set Pagination color', 'post-carousel' ), |
| 629 |
'options' => array( |
| 630 |
'text_color' => __( 'Text Color', 'post-carousel' ), |
| 631 |
'text_acolor' => __( 'Text Active Color', 'post-carousel' ), |
| 632 |
'border_color' => __( 'Border Color', 'post-carousel' ), |
| 633 |
'border_acolor' => __( 'Border Active Color', 'post-carousel' ), |
| 634 |
'background' => __( 'Background', 'post-carousel' ), |
| 635 |
'active_background' => __( 'Active BG', 'post-carousel' ), |
| 636 |
), |
| 637 |
'default' => array( |
| 638 |
'text_color' => '#5e5e5e', |
| 639 |
'text_acolor' => '#ffffff', |
| 640 |
'border_color' => '#bbbbbb', |
| 641 |
'border_acolor' => '#e1624b', |
| 642 |
'background' => '#ffffff', |
| 643 |
'active_background' => '#e1624b', |
| 644 |
), |
| 645 |
'dependency' => array( 'pcp_layout_preset|show_post_pagination|post_pagination_type', '!=|==|any', 'carousel_layout|true|ajax_pagination,no_ajax', true ), |
| 646 |
), |
| 647 |
array( |
| 648 |
'id' => 'post_per_page', |
| 649 |
'type' => 'spinner', |
| 650 |
'title' => __( 'Items Per Page', 'post-carousel' ), |
| 651 |
'subtitle' => __( 'Set number of items to show per page.', 'post-carousel' ), |
| 652 |
'help' => __( 'This value should be lesser than that <strong> Limit </strong> from <strong>Filter Content </strong> tab.', 'post-carousel' ), |
| 653 |
'default' => 12, |
| 654 |
'dependency' => array( 'pcp_layout_preset|show_post_pagination', '==|==', 'grid_layout|true' ), |
| 655 |
), |
| 656 |
|
| 657 |
array( |
| 658 |
'id' => 'show_preloader', |
| 659 |
'type' => 'switcher', |
| 660 |
'title' => __( 'Preloader', 'post-carousel' ), |
| 661 |
'subtitle' => __( 'Items will be hidden until page load completed.', 'post-carousel' ), |
| 662 |
'text_on' => __( 'Enabled', 'post-carousel' ), |
| 663 |
'text_off' => __( 'Disabled', 'post-carousel' ), |
| 664 |
'text_width' => 94, |
| 665 |
'default' => false, |
| 666 |
), |
| 667 |
), // End of fields array. |
| 668 |
) |
| 669 |
); // Display settings section end. |
| 670 |
} |
| 671 |
} |
| 672 |
|