CFF_Customize_Tab.php
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Customizer Tab |
| 5 | * |
| 6 | * @since 4.0 |
| 7 | */ |
| 8 | |
| 9 | namespace CustomFacebookFeed\Builder\Tabs; |
| 10 | |
| 11 | use CustomFacebookFeed\Builder\CFF_Feed_Builder; |
| 12 | |
| 13 | if (!defined('ABSPATH')) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | |
| 18 | class CFF_Customize_Tab |
| 19 | { |
| 20 | /** |
| 21 | * Get Customize Tab Sections |
| 22 | * |
| 23 | * @since 4.0 |
| 24 | * @access public |
| 25 | * |
| 26 | * @return array |
| 27 | */ |
| 28 | public static function get_sections() |
| 29 | { |
| 30 | return [ |
| 31 | 'settings_feedtemplate' => [ |
| 32 | 'heading' => __('Template', 'custom-facebook-feed'), |
| 33 | 'icon' => 'layout', |
| 34 | 'controls' => self::get_settings_feedtemplates_controls() |
| 35 | ], |
| 36 | 'settings_feedtype' => [ |
| 37 | 'heading' => __('Feed Type', 'custom-facebook-feed'), |
| 38 | 'icon' => 'article', |
| 39 | 'controls' => self::get_settings_feedtype_controls() |
| 40 | ], |
| 41 | 'customize_feedlayout' => [ |
| 42 | 'heading' => __('Feed Layout', 'custom-facebook-feed'), |
| 43 | 'icon' => 'feed_layout', |
| 44 | 'controls' => self::get_customize_feedlayout_controls() |
| 45 | ], |
| 46 | 'customize_colorscheme' => [ |
| 47 | 'heading' => __('Color Scheme', 'custom-facebook-feed'), |
| 48 | 'icon' => 'color_scheme', |
| 49 | 'controls' => self::get_customize_colorscheme_controls() |
| 50 | ], |
| 51 | 'customize_sections' => [ |
| 52 | 'heading' => __('Sections', 'custom-facebook-feed'), |
| 53 | 'isHeader' => true, |
| 54 | ], |
| 55 | 'customize_header' => [ |
| 56 | 'heading' => __('Header', 'custom-facebook-feed'), |
| 57 | 'icon' => 'header', |
| 58 | 'separator' => 'none', |
| 59 | 'controls' => self::get_customize_header_controls() |
| 60 | ], |
| 61 | 'customize_posts' => [ |
| 62 | 'heading' => __('Posts', 'custom-facebook-feed'), |
| 63 | 'icon' => 'article', |
| 64 | 'controls' => self::get_customize_posts_controls(), |
| 65 | 'nested_sections' => [ |
| 66 | 'post_style' => [ |
| 67 | 'heading' => __('Post Style', 'custom-facebook-feed'), |
| 68 | 'icon' => 'color_scheme', |
| 69 | 'isNested' => 'true', |
| 70 | 'controls' => self::get_nested_post_style_controls(), |
| 71 | ], |
| 72 | 'individual_elements' => [ |
| 73 | 'condition' => ['feedtype' => ['timeline','reviews','events']], |
| 74 | 'heading' => __('Edit Individual Elements', 'custom-facebook-feed'), |
| 75 | 'description' => __('Hide or Show individual elements of a post or edit their options', 'custom-facebook-feed'), |
| 76 | 'icon' => 'text', |
| 77 | 'separator' => 'none', |
| 78 | 'isNested' => 'true', |
| 79 | 'controls' => self::get_nested_individual_elements_controls(), |
| 80 | ] |
| 81 | ] |
| 82 | ], |
| 83 | 'customize_likebox' => [ |
| 84 | 'heading' => __('Like Box', 'custom-facebook-feed'), |
| 85 | 'icon' => 'like_box', |
| 86 | 'separator' => 'none', |
| 87 | 'controls' => self::get_customize_likebox_controls() |
| 88 | ], |
| 89 | 'customize_loadmorebutton' => [ |
| 90 | 'heading' => __('Load More Button', 'custom-facebook-feed'), |
| 91 | 'description' => __('Upgrade to Pro to Load posts asynchronously with Load more button.', 'custom-facebook-feed'), |
| 92 | 'proLabel' => true, |
| 93 | 'icon' => 'load_more', |
| 94 | 'separator' => 'none', |
| 95 | 'checkExtensionPopup' => 'loadMore', |
| 96 | 'controls' => self::get_customize_loadmorebutton_controls() |
| 97 | ], |
| 98 | 'customize_lightbox' => [ |
| 99 | 'heading' => __('Lightbox', 'custom-facebook-feed'), |
| 100 | 'description' => __('Upgrade to Pro to add a modal when user clicks on a post.', 'custom-facebook-feed'), |
| 101 | 'proLabel' => true, |
| 102 | 'icon' => 'lightbox', |
| 103 | 'separator' => 'none', |
| 104 | 'checkExtensionPopup' => 'lightbox', |
| 105 | 'controls' => self::get_customize_lightbox_controls() |
| 106 | ] |
| 107 | ]; |
| 108 | } |
| 109 | |
| 110 | |
| 111 | /** |
| 112 | * Get Settings Tab Feed Type Section |
| 113 | * |
| 114 | * @since 4.0 |
| 115 | * @return array |
| 116 | */ |
| 117 | public static function get_settings_feedtemplates_controls() |
| 118 | { |
| 119 | return [ |
| 120 | [ |
| 121 | 'type' => 'customview', |
| 122 | 'viewId' => 'feedtemplate' |
| 123 | ] |
| 124 | ]; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Get Settings Tab Feed Type Section |
| 129 | * |
| 130 | * @since 4.0 |
| 131 | * @return array |
| 132 | */ |
| 133 | public static function get_settings_feedtype_controls() |
| 134 | { |
| 135 | return [ |
| 136 | [ |
| 137 | 'type' => 'customview', |
| 138 | 'viewId' => 'feedtype' |
| 139 | ] |
| 140 | ]; |
| 141 | } |
| 142 | |
| 143 | |
| 144 | /** |
| 145 | * Get Customize Tab Feed Layout Section |
| 146 | * |
| 147 | * @since 4.0 |
| 148 | * @return array |
| 149 | */ |
| 150 | public static function get_customize_feedlayout_controls() |
| 151 | { |
| 152 | $svg_icons = CFF_Feed_Builder::builder_svg_icons(); |
| 153 | $svg_rocket_icon = $svg_icons['rocketPremiumBlue']; |
| 154 | return [ |
| 155 | [ |
| 156 | 'type' => 'toggleset', |
| 157 | 'id' => 'feedlayout', |
| 158 | 'heading' => __('Layout', 'custom-facebook-feed'), |
| 159 | 'separator' => 'bottom', |
| 160 | 'options' => [ |
| 161 | [ |
| 162 | 'value' => 'list', |
| 163 | 'icon' => 'list', |
| 164 | 'label' => __('List', 'custom-facebook-feed') |
| 165 | ], |
| 166 | [ |
| 167 | 'value' => 'grid', |
| 168 | 'icon' => 'grid', |
| 169 | 'condition' => ['feedtype' => ['photos','videos','albums','singlealbum']], |
| 170 | 'label' => __('Grid', 'custom-facebook-feed') |
| 171 | ], |
| 172 | [ |
| 173 | 'value' => 'masonry', |
| 174 | 'icon' => 'masonry', |
| 175 | 'label' => __('Masonry', 'custom-facebook-feed') |
| 176 | ], |
| 177 | [ |
| 178 | 'value' => 'carousel', |
| 179 | 'icon' => 'carousel', |
| 180 | 'checkExtension' => 'carousel', |
| 181 | 'label' => __('Carousel ', 'custom-facebook-feed') . $svg_rocket_icon |
| 182 | ] |
| 183 | ] |
| 184 | ], |
| 185 | [ |
| 186 | 'type' => 'number', |
| 187 | 'id' => 'height', |
| 188 | 'fieldSuffix' => 'px', |
| 189 | 'separator' => 'bottom', |
| 190 | 'heading' => __('Feed Height', 'custom-facebook-feed'), |
| 191 | 'style' => ['.cff-feed-height' => 'height:{{value}}px;overflow:auto;'], |
| 192 | ], |
| 193 | [ |
| 194 | 'type' => 'heading', |
| 195 | 'heading' => __('Number of Posts', 'custom-facebook-feed'), |
| 196 | ], |
| 197 | [ |
| 198 | 'type' => 'number', |
| 199 | 'id' => 'num', |
| 200 | 'icon' => 'desktop', |
| 201 | 'layout' => 'half', |
| 202 | 'ajaxAction' => 'feedFlyPreview', |
| 203 | 'strongHeading' => 'false', |
| 204 | 'stacked' => 'true', |
| 205 | 'heading' => __('Desktop', 'custom-facebook-feed'), |
| 206 | ], |
| 207 | [ |
| 208 | 'type' => 'number', |
| 209 | 'id' => 'nummobile', |
| 210 | 'icon' => 'mobile', |
| 211 | 'layout' => 'half', |
| 212 | 'strongHeading' => 'false', |
| 213 | 'stacked' => 'true', |
| 214 | 'heading' => __('Mobile', 'custom-facebook-feed'), |
| 215 | ], |
| 216 | [ |
| 217 | 'type' => 'separator', |
| 218 | 'top' => 10, |
| 219 | 'bottom' => 10, |
| 220 | ], |
| 221 | [ |
| 222 | 'type' => 'heading', |
| 223 | 'heading' => __('Columns', 'custom-facebook-feed'), |
| 224 | 'condition' => ['feedlayout' => ['grid','masonry']], |
| 225 | 'conditionHide' => true, |
| 226 | ], |
| 227 | [ |
| 228 | 'type' => 'select', |
| 229 | 'id' => 'cols', |
| 230 | 'condition' => ['feedlayout' => ['grid','masonry']], |
| 231 | 'conditionHide' => true, |
| 232 | 'icon' => 'desktop', |
| 233 | 'layout' => 'half', |
| 234 | 'strongHeading' => 'false', |
| 235 | 'heading' => __('Desktop', 'custom-facebook-feed'), |
| 236 | 'stacked' => 'true', |
| 237 | 'options' => [ |
| 238 | '1' => '1', |
| 239 | '2' => '2', |
| 240 | '3' => '3', |
| 241 | '4' => '4', |
| 242 | '5' => '5', |
| 243 | '6' => '6' |
| 244 | ] |
| 245 | ], |
| 246 | |
| 247 | [ |
| 248 | 'type' => 'select', |
| 249 | 'id' => 'colstablet', |
| 250 | 'condition' => ['feedlayout' => ['grid','masonry']], |
| 251 | 'conditionHide' => true, |
| 252 | 'icon' => 'tablet', |
| 253 | 'layout' => 'half', |
| 254 | 'strongHeading' => 'false', |
| 255 | 'heading' => __('Tablet', 'custom-facebook-feed'), |
| 256 | 'stacked' => 'true', |
| 257 | 'options' => [ |
| 258 | '1' => '1', |
| 259 | '2' => '2', |
| 260 | '3' => '3', |
| 261 | '4' => '4', |
| 262 | '5' => '5', |
| 263 | '6' => '6' |
| 264 | ] |
| 265 | ], |
| 266 | [ |
| 267 | 'type' => 'select', |
| 268 | 'id' => 'colsmobile', |
| 269 | 'condition' => ['feedlayout' => ['grid','masonry']], |
| 270 | 'conditionHide' => true, |
| 271 | 'icon' => 'mobile', |
| 272 | 'layout' => 'half', |
| 273 | 'strongHeading' => 'false', |
| 274 | 'heading' => __('Mobile', 'custom-facebook-feed'), |
| 275 | 'stacked' => 'true', |
| 276 | 'options' => [ |
| 277 | '1' => '1', |
| 278 | '2' => '2', |
| 279 | '3' => '3' |
| 280 | ] |
| 281 | ], |
| 282 | |
| 283 | // Carousel Settings |
| 284 | [ |
| 285 | 'type' => 'select', |
| 286 | 'id' => 'carouselheight', |
| 287 | 'condition' => ['feedlayout' => ['carousel']], |
| 288 | 'strongHeading' => 'false', |
| 289 | 'conditionHide' => true, |
| 290 | 'stacked' => 'true', |
| 291 | 'heading' => __('Height of Carousel', 'custom-facebook-feed'), |
| 292 | 'options' => [ |
| 293 | 'tallest' => __('Always set to tallest post', 'custom-facebook-feed'), |
| 294 | 'clickexpand' => __('Set to shortest post, button to expand', 'custom-facebook-feed'), |
| 295 | 'autoexpand' => __('Automatically adjust height (forces 1 column)', 'custom-facebook-feed'), |
| 296 | ] |
| 297 | ], |
| 298 | [ |
| 299 | 'type' => 'number', |
| 300 | 'id' => 'carouseldesktop_cols', |
| 301 | 'condition' => ['feedlayout' => ['carousel']], |
| 302 | 'conditionHide' => true, |
| 303 | 'stacked' => 'true', |
| 304 | 'heading' => __('Desktop Columns', 'custom-facebook-feed'), |
| 305 | ], |
| 306 | [ |
| 307 | 'type' => 'number', |
| 308 | 'id' => 'carouselmobile_cols', |
| 309 | 'condition' => ['feedlayout' => ['carousel']], |
| 310 | 'conditionHide' => true, |
| 311 | 'stacked' => 'true', |
| 312 | 'heading' => __('Mobile Columns', 'custom-facebook-feed'), |
| 313 | ], |
| 314 | [ |
| 315 | 'type' => 'select', |
| 316 | 'id' => 'carouselnavigation', |
| 317 | 'condition' => ['feedlayout' => ['carousel']], |
| 318 | 'strongHeading' => 'false', |
| 319 | 'heading' => __('Navigation Arrows Style', 'custom-facebook-feed'), |
| 320 | 'conditionHide' => true, |
| 321 | 'options' => [ |
| 322 | 'none' => __('Hide arrows', 'custom-facebook-feed'), |
| 323 | 'onhover' => __('Display on sides of feed on hover', 'custom-facebook-feed'), |
| 324 | 'below' => __('Below feed, on sides of pagination', 'custom-facebook-feed'), |
| 325 | ] |
| 326 | ], |
| 327 | [ |
| 328 | 'type' => 'switcher', |
| 329 | 'id' => 'carouselpagination', |
| 330 | 'heading' => __('Show Pagination', 'custom-facebook-feed'), |
| 331 | 'condition' => ['feedlayout' => ['carousel']], |
| 332 | 'stacked' => 'true', |
| 333 | 'conditionHide' => true, |
| 334 | 'options' => [ |
| 335 | 'enabled' => 'true', |
| 336 | 'disabled' => 'false' |
| 337 | ] |
| 338 | ], |
| 339 | [ |
| 340 | 'type' => 'switcher', |
| 341 | 'id' => 'carouselautoplay', |
| 342 | 'heading' => __('Enable Autoplay', 'custom-facebook-feed'), |
| 343 | 'stacked' => 'true', |
| 344 | 'condition' => ['feedlayout' => ['carousel']], |
| 345 | 'conditionHide' => true, |
| 346 | 'options' => [ |
| 347 | 'enabled' => 'true', |
| 348 | 'disabled' => 'false' |
| 349 | ] |
| 350 | ], |
| 351 | [ |
| 352 | 'type' => 'number', |
| 353 | 'id' => 'carouselinterval', |
| 354 | 'condition' => ['feedlayout' => ['carousel']], |
| 355 | 'conditionHide' => true, |
| 356 | 'stacked' => 'true', |
| 357 | 'step' => 200, |
| 358 | 'prefix' => __('Miliseconds', 'custom-facebook-feed'), |
| 359 | 'heading' => __('Interval Time', 'custom-facebook-feed'), |
| 360 | ], |
| 361 | |
| 362 | ]; |
| 363 | } |
| 364 | |
| 365 | /** |
| 366 | * Get Customize Tab Color Scheme Section |
| 367 | * |
| 368 | * @since 4.0 |
| 369 | * @return array |
| 370 | */ |
| 371 | public static function get_customize_colorscheme_controls() |
| 372 | { |
| 373 | $color_scheme_array = |
| 374 | [ |
| 375 | [ |
| 376 | 'type' => 'toggleset', |
| 377 | 'id' => 'colorpalette', |
| 378 | 'separator' => 'bottom', |
| 379 | 'options' => [ |
| 380 | [ |
| 381 | 'value' => 'inherit', |
| 382 | 'label' => __('Inherit from Theme', 'custom-facebook-feed') |
| 383 | ], |
| 384 | [ |
| 385 | 'value' => 'light', |
| 386 | 'icon' => 'sun', |
| 387 | 'label' => __('Light', 'custom-facebook-feed') |
| 388 | ], |
| 389 | [ |
| 390 | 'value' => 'dark', |
| 391 | 'icon' => 'moon', |
| 392 | 'label' => __('Dark', 'custom-facebook-feed') |
| 393 | ], |
| 394 | [ |
| 395 | 'value' => 'custom', |
| 396 | 'icon' => 'cog', |
| 397 | 'label' => __('Custom', 'custom-facebook-feed') |
| 398 | ] |
| 399 | ] |
| 400 | ], |
| 401 | [ |
| 402 | 'type' => 'heading', |
| 403 | 'condition' => ['colorpalette' => ['custom']], |
| 404 | 'conditionHide' => true, |
| 405 | 'heading' => __('Custom Palette', 'custom-facebook-feed'), |
| 406 | ], |
| 407 | [ |
| 408 | 'type' => 'colorpicker', |
| 409 | 'id' => 'custombgcolor1', |
| 410 | 'condition' => ['colorpalette' => ['custom']], |
| 411 | 'conditionHide' => true, |
| 412 | 'layout' => 'half', |
| 413 | 'strongHeading' => 'false', |
| 414 | 'heading' => __('Background', 'custom-facebook-feed'), |
| 415 | 'tooltip' => __('The background color of the posts', 'custom-facebook-feed'), |
| 416 | 'style' => ['.cff-post-item-ctn' => 'background:{{value}}!important;'], |
| 417 | 'stacked' => 'true' |
| 418 | ], |
| 419 | [ |
| 420 | 'type' => 'colorpicker', |
| 421 | 'id' => 'custombgcolor2', |
| 422 | 'condition' => ['colorpalette' => ['custom']], |
| 423 | 'conditionHide' => true, |
| 424 | 'layout' => 'half', |
| 425 | 'strongHeading' => 'false', |
| 426 | 'heading' => __('Background 2', 'custom-facebook-feed'), |
| 427 | 'tooltip' => __('The secondary background color which is used for other elements in the feed', 'custom-facebook-feed'), |
| 428 | 'style' => ['.cff-post-item-link-ctn[data-linkbox="off"],.cff-post-item-meta,.cff-post-item-comments-top,.cff-post-item-comments-list,.cff-preview-loadmore-btn' => 'background:{{value}}!important;'], |
| 429 | 'stacked' => 'true' |
| 430 | ], |
| 431 | [ |
| 432 | 'type' => 'colorpicker', |
| 433 | 'id' => 'textcolor1', |
| 434 | 'condition' => ['colorpalette' => ['custom']], |
| 435 | 'conditionHide' => true, |
| 436 | 'layout' => 'half', |
| 437 | 'strongHeading' => 'false', |
| 438 | 'heading' => __('Text', 'custom-facebook-feed'), |
| 439 | 'tooltip' => __('The primary text color', 'custom-facebook-feed'), |
| 440 | 'style' => ['.cff-post-item-content,.cff-post-comment-item,.cff-singlemedia-item-info p' => 'color:{{value}};'], |
| 441 | 'stacked' => 'true' |
| 442 | ], |
| 443 | [ |
| 444 | 'type' => 'colorpicker', |
| 445 | 'id' => 'textcolor2', |
| 446 | 'condition' => ['colorpalette' => ['custom']], |
| 447 | 'conditionHide' => true, |
| 448 | 'layout' => 'half', |
| 449 | 'strongHeading' => 'false', |
| 450 | 'heading' => __('Text 2', 'custom-facebook-feed'), |
| 451 | 'tooltip' => __('The secondary text color used for ancillary elements in the feed', 'custom-facebook-feed'), |
| 452 | 'style' => ['.cff-post-item-link-small,.cff-post-item-link-description,.cff-post-item-date' => 'color:{{value}};'], |
| 453 | 'stacked' => 'true' |
| 454 | ], |
| 455 | [ |
| 456 | 'type' => 'colorpicker', |
| 457 | 'id' => 'customlinkcolor', |
| 458 | 'condition' => ['colorpalette' => ['custom']], |
| 459 | 'conditionHide' => true, |
| 460 | 'layout' => 'half', |
| 461 | 'strongHeading' => 'false', |
| 462 | 'heading' => __('Link', 'custom-facebook-feed'), |
| 463 | 'style' => ['.cff-post-item-author-name,.cff-post-item-text a,.cff-post-item-text-expand,.cff-post-item-action-txt,.cff-post-meta-txt,.cff-post-meta-link,.cff-preview-loadmore-btn,.cff-singlemedia-item-info h4 a,.cff-post-event-title a,.cff-post-item-link-a' => 'color:{{value}};'], |
| 464 | 'stacked' => 'true' |
| 465 | ] |
| 466 | ]; |
| 467 | |
| 468 | $color_overrides = CFF_Feed_Builder::get_color_overrides(); |
| 469 | $color_overrides_array = $color_overrides_elements = []; |
| 470 | foreach ($color_overrides as $cl_override) { |
| 471 | array_push( |
| 472 | $color_overrides_array, |
| 473 | [ |
| 474 | 'type' => 'heading', |
| 475 | 'overrideColorCondition' => $cl_override['elements'], |
| 476 | 'heading' => $cl_override['heading'] . '<svg width="6" height="8" viewBox="0 0 6 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.66656 0L0.726562 0.94L3.7799 4L0.726562 7.06L1.66656 8L5.66656 4L1.66656 0Z" fill="#141B38"/></svg>', |
| 477 | 'enableViewAction' => isset($cl_override['enableViewAction']) ? $cl_override['enableViewAction'] : false |
| 478 | ] |
| 479 | ); |
| 480 | |
| 481 | foreach ($cl_override['controls'] as $cl_override_control) { |
| 482 | array_push($color_overrides_elements, $cl_override_control['id']); |
| 483 | array_push( |
| 484 | $color_overrides_array, |
| 485 | [ |
| 486 | 'type' => 'coloroverride', |
| 487 | 'id' => $cl_override_control['id'], |
| 488 | 'overrideColorCondition' => [$cl_override_control['id']], |
| 489 | 'layout' => 'half', |
| 490 | 'strongHeading' => 'false', |
| 491 | 'heading' => $cl_override_control['heading'], |
| 492 | 'pickerType' => 'reset', |
| 493 | 'stacked' => 'true' |
| 494 | ] |
| 495 | ); |
| 496 | } |
| 497 | } |
| 498 | array_push( |
| 499 | $color_scheme_array, |
| 500 | [ |
| 501 | 'type' => 'separator', |
| 502 | 'overrideColorCondition' => $color_overrides_elements, |
| 503 | 'conditionHide' => true, |
| 504 | 'top' => 20, |
| 505 | 'bottom' => 10, |
| 506 | ], |
| 507 | [ |
| 508 | 'type' => 'heading', |
| 509 | 'overrideColorCondition' => $color_overrides_elements, |
| 510 | 'heading' => __('Overrides', 'custom-facebook-feed'), |
| 511 | 'description' => __('These colors have been set from the individual element properties and are overriding the global color scheme', 'custom-facebook-feed'), |
| 512 | ] |
| 513 | ); |
| 514 | return array_merge($color_scheme_array, $color_overrides_array); |
| 515 | } |
| 516 | |
| 517 | /** |
| 518 | * Get Customize Tab Header Section |
| 519 | * |
| 520 | * @since 4.0 |
| 521 | * @return array |
| 522 | */ |
| 523 | public static function get_customize_header_controls() |
| 524 | { |
| 525 | return [ |
| 526 | [ |
| 527 | 'type' => 'switcher', |
| 528 | 'id' => 'showheader', |
| 529 | 'label' => __('Enable', 'custom-facebook-feed'), |
| 530 | 'reverse' => 'true', |
| 531 | 'stacked' => 'true', |
| 532 | 'options' => [ |
| 533 | 'enabled' => 'on', |
| 534 | 'disabled' => 'off' |
| 535 | ] |
| 536 | ], |
| 537 | [ |
| 538 | 'type' => 'separator', |
| 539 | 'condition' => ['showheader' => ['on']], |
| 540 | 'top' => 10, |
| 541 | 'bottom' => 10, |
| 542 | ], |
| 543 | [ |
| 544 | 'type' => 'toggleset', |
| 545 | 'id' => 'headertype', |
| 546 | 'condition' => ['showheader' => ['on']], |
| 547 | 'heading' => __('Header Type', 'custom-facebook-feed'), |
| 548 | 'options' => [ |
| 549 | [ |
| 550 | 'value' => 'visual', |
| 551 | 'icon' => 'visual', |
| 552 | 'label' => __('Visual', 'custom-facebook-feed') |
| 553 | ], |
| 554 | [ |
| 555 | 'value' => 'text', |
| 556 | 'icon' => 'text', |
| 557 | 'label' => __('Text', 'custom-facebook-feed') |
| 558 | ] |
| 559 | ] |
| 560 | ], |
| 561 | [ |
| 562 | 'type' => 'separator', |
| 563 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 564 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 565 | 'top' => 10, |
| 566 | 'bottom' => 10, |
| 567 | ], |
| 568 | // Visual Header Start |
| 569 | [ |
| 570 | 'type' => 'heading', |
| 571 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 572 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 573 | 'conditionHide' => true, |
| 574 | 'heading' => __('Title Text', 'custom-facebook-feed'), |
| 575 | ], |
| 576 | [ |
| 577 | 'type' => 'select', |
| 578 | 'id' => 'headertextsize', |
| 579 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 580 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 581 | 'conditionHide' => true, |
| 582 | 'layout' => 'half', |
| 583 | 'strongHeading' => 'false', |
| 584 | 'heading' => __('Size', 'custom-facebook-feed'), |
| 585 | 'stacked' => 'true', |
| 586 | 'style' => ['h3.cff-preview-header-name' => 'font-size:{{value}}px!important;'], |
| 587 | 'options' => CFF_Builder_Customizer_Tab::get_text_size_options() |
| 588 | ], |
| 589 | [ |
| 590 | 'type' => 'colorpicker', |
| 591 | 'id' => 'headertextcolor', |
| 592 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 593 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 594 | 'conditionHide' => true, |
| 595 | 'layout' => 'half', |
| 596 | 'strongHeading' => 'false', |
| 597 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 598 | 'style' => ['.cff-preview-header-name' => 'color:{{value}};'], |
| 599 | 'stacked' => 'true' |
| 600 | ], |
| 601 | [ |
| 602 | 'type' => 'separator', |
| 603 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 604 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 605 | 'conditionHide' => true, |
| 606 | 'top' => 20, |
| 607 | 'bottom' => 10, |
| 608 | ], |
| 609 | [ |
| 610 | 'type' => 'heading', |
| 611 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 612 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 613 | 'conditionHide' => true, |
| 614 | 'heading' => __('Bio Text', 'custom-facebook-feed'), |
| 615 | ], |
| 616 | [ |
| 617 | 'type' => 'select', |
| 618 | 'id' => 'headerbiosize', |
| 619 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 620 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 621 | 'conditionHide' => true, |
| 622 | 'layout' => 'half', |
| 623 | 'strongHeading' => 'false', |
| 624 | 'heading' => __('Size', 'custom-facebook-feed'), |
| 625 | 'stacked' => 'true', |
| 626 | 'style' => ['.cff-preview-header-bio' => 'font-size:{{value}}px!important;'], |
| 627 | 'options' => CFF_Builder_Customizer_Tab::get_text_size_options() |
| 628 | ], |
| 629 | [ |
| 630 | 'type' => 'colorpicker', |
| 631 | 'id' => 'headerbiocolor', |
| 632 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 633 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 634 | 'conditionHide' => true, |
| 635 | 'layout' => 'half', |
| 636 | 'strongHeading' => 'false', |
| 637 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 638 | 'style' => ['.cff-preview-header-bio' => 'color:{{value}};'], |
| 639 | 'stacked' => 'true' |
| 640 | ], |
| 641 | [ |
| 642 | 'type' => 'separator', |
| 643 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 644 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 645 | 'conditionHide' => true, |
| 646 | 'top' => 20, |
| 647 | 'bottom' => 15, |
| 648 | ], |
| 649 | [ |
| 650 | 'type' => 'switcher', |
| 651 | 'id' => 'headercover', |
| 652 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 653 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 654 | 'conditionHide' => true, |
| 655 | 'label' => __('Cover Photo', 'custom-facebook-feed'), |
| 656 | 'stacked' => 'true', |
| 657 | 'labelStrong' => 'true', |
| 658 | 'options' => [ |
| 659 | 'enabled' => 'on', |
| 660 | 'disabled' => 'off' |
| 661 | ] |
| 662 | ], |
| 663 | [ |
| 664 | 'type' => 'number', |
| 665 | 'id' => 'headercoverheight', |
| 666 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 667 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 668 | 'conditionHide' => true, |
| 669 | 'stacked' => 'true', |
| 670 | 'fieldSuffix' => 'px', |
| 671 | 'style' => ['.cff-preview-header-cover' => 'height:{{value}}px!important;'], |
| 672 | 'child' => 'true', |
| 673 | 'description' => __('Height', 'custom-facebook-feed'), |
| 674 | ], |
| 675 | [ |
| 676 | 'type' => 'separator', |
| 677 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 678 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 679 | 'conditionHide' => true, |
| 680 | 'top' => 15, |
| 681 | 'bottom' => 10, |
| 682 | ], |
| 683 | [ |
| 684 | 'type' => 'switcher', |
| 685 | 'id' => 'headername', |
| 686 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 687 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 688 | 'conditionHide' => true, |
| 689 | 'label' => __('Name and Avatar', 'custom-facebook-feed'), |
| 690 | 'stacked' => 'true', |
| 691 | 'labelStrong' => 'true', |
| 692 | 'options' => [ |
| 693 | 'enabled' => 'on', |
| 694 | 'disabled' => 'off' |
| 695 | ] |
| 696 | ], |
| 697 | [ |
| 698 | 'type' => 'separator', |
| 699 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 700 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 701 | 'conditionHide' => true, |
| 702 | 'top' => 10, |
| 703 | 'bottom' => 10, |
| 704 | ], |
| 705 | [ |
| 706 | 'type' => 'switcher', |
| 707 | 'id' => 'headerbio', |
| 708 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 709 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 710 | 'conditionHide' => true, |
| 711 | 'label' => __('About (Bio and Likes)', 'custom-facebook-feed'), |
| 712 | 'stacked' => 'true', |
| 713 | 'labelStrong' => 'true', |
| 714 | 'options' => [ |
| 715 | 'enabled' => 'on', |
| 716 | 'disabled' => 'off' |
| 717 | ] |
| 718 | ], |
| 719 | [ |
| 720 | 'type' => 'separator', |
| 721 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 722 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 723 | 'conditionHide' => true, |
| 724 | 'top' => 10, |
| 725 | 'bottom' => 10, |
| 726 | ], |
| 727 | [ |
| 728 | 'type' => 'switcher', |
| 729 | 'id' => 'headeroutside', |
| 730 | 'condition' => ['showheader' => ['on'],'headertype' => ['visual']], |
| 731 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['visual']], |
| 732 | 'conditionHide' => true, |
| 733 | 'label' => __('Display outside scrollable area', 'custom-facebook-feed'), |
| 734 | 'stacked' => 'true', |
| 735 | 'labelStrong' => 'true', |
| 736 | 'options' => [ |
| 737 | 'enabled' => 'on', |
| 738 | 'disabled' => 'off' |
| 739 | ] |
| 740 | ], |
| 741 | // Visual Header End |
| 742 | // Text Header Start |
| 743 | [ |
| 744 | 'type' => 'separator', |
| 745 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 746 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 747 | 'conditionHide' => true, |
| 748 | 'top' => 10, |
| 749 | 'bottom' => 15, |
| 750 | ], |
| 751 | [ |
| 752 | 'type' => 'switcher', |
| 753 | 'id' => 'headericonenabled', |
| 754 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 755 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 756 | 'label' => __('Icon', 'custom-facebook-feed'), |
| 757 | 'conditionHide' => true, |
| 758 | 'stacked' => 'true', |
| 759 | 'labelStrong' => 'true', |
| 760 | 'options' => [ |
| 761 | 'enabled' => 'on', |
| 762 | 'disabled' => 'off' |
| 763 | ] |
| 764 | ], |
| 765 | [ |
| 766 | 'type' => 'select', |
| 767 | 'id' => 'headericon', |
| 768 | 'layout' => 'half', |
| 769 | 'strongHeading' => 'false', |
| 770 | 'condition' => ['showheader' => ['on'],'headertype' => ['text'],'headericonenabled' => ['on']], |
| 771 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 772 | 'conditionHide' => true, |
| 773 | 'heading' => __('Icon Image', 'custom-facebook-feed'), |
| 774 | 'stacked' => 'true', |
| 775 | 'child' => 'true', |
| 776 | 'options' => CFF_Builder_Customizer_Tab::get_header_icons_options() |
| 777 | ], |
| 778 | [ |
| 779 | 'type' => 'select', |
| 780 | 'id' => 'headericonsize', |
| 781 | 'condition' => ['showheader' => ['on'],'headertype' => ['text'],'headericonenabled' => ['on']], |
| 782 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 783 | 'conditionHide' => true, |
| 784 | 'layout' => 'full', |
| 785 | 'strongHeading' => 'false', |
| 786 | 'heading' => __('Icon Size', 'custom-facebook-feed'), |
| 787 | 'stacked' => 'true', |
| 788 | 'child' => 'true', |
| 789 | 'style' => ['.cff-header-text-icon' => 'font-size:{{value}}px!important;'], |
| 790 | 'options' => CFF_Builder_Customizer_Tab::get_text_size_options() |
| 791 | ], |
| 792 | [ |
| 793 | 'type' => 'colorpicker', |
| 794 | 'id' => 'headericoncolor', |
| 795 | 'condition' => ['showheader' => ['on'],'headertype' => ['text'],'headericonenabled' => ['on']], |
| 796 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 797 | 'conditionHide' => true, |
| 798 | 'layout' => 'half', |
| 799 | 'strongHeading' => 'false', |
| 800 | 'child' => 'true', |
| 801 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 802 | 'style' => ['.cff-header-text-icon' => 'color:{{value}};'], |
| 803 | 'stacked' => 'true' |
| 804 | ], |
| 805 | [ |
| 806 | 'type' => 'separator', |
| 807 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 808 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 809 | 'conditionHide' => true, |
| 810 | 'top' => 15, |
| 811 | 'bottom' => 15, |
| 812 | ], |
| 813 | [ |
| 814 | 'type' => 'textarea', |
| 815 | 'id' => 'headertext', |
| 816 | 'heading' => __('Text', 'custom-facebook-feed'), |
| 817 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 818 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 819 | 'conditionHide' => true, |
| 820 | 'stacked' => 'true' |
| 821 | ], |
| 822 | [ |
| 823 | 'type' => 'select', |
| 824 | 'id' => 'headertextsize', |
| 825 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 826 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 827 | 'conditionHide' => true, |
| 828 | 'layout' => 'full', |
| 829 | 'strongHeading' => 'false', |
| 830 | 'heading' => __('Size', 'custom-facebook-feed'), |
| 831 | 'stacked' => 'true', |
| 832 | 'style' => ['.cff-header-text' => 'font-size:{{value}}px!important;'], |
| 833 | 'options' => CFF_Builder_Customizer_Tab::get_text_size_options() |
| 834 | ], |
| 835 | [ |
| 836 | 'type' => 'colorpicker', |
| 837 | 'id' => 'headertextcolor', |
| 838 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 839 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 840 | 'conditionHide' => true, |
| 841 | 'layout' => 'full', |
| 842 | 'strongHeading' => 'false', |
| 843 | 'style' => ['.cff-header-text' => 'color:{{value}};'], |
| 844 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 845 | 'stacked' => 'true' |
| 846 | ], |
| 847 | |
| 848 | [ |
| 849 | 'type' => 'separator', |
| 850 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 851 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 852 | 'conditionHide' => true, |
| 853 | 'top' => 15, |
| 854 | 'bottom' => 15, |
| 855 | ], |
| 856 | [ |
| 857 | 'type' => 'heading', |
| 858 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 859 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 860 | 'conditionHide' => true, |
| 861 | 'heading' => __('Background', 'custom-facebook-feed'), |
| 862 | ], |
| 863 | [ |
| 864 | 'type' => 'colorpicker', |
| 865 | 'id' => 'headerbg', |
| 866 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 867 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 868 | 'conditionHide' => true, |
| 869 | 'layout' => 'half', |
| 870 | 'strongHeading' => 'false', |
| 871 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 872 | 'style' => ['.cff-preview-header-text-h' => 'background:{{value}};'], |
| 873 | 'stacked' => 'true' |
| 874 | ], |
| 875 | [ |
| 876 | 'type' => 'number', |
| 877 | 'id' => 'headerpadding', |
| 878 | 'condition' => ['showheader' => ['on'],'headertype' => ['text']], |
| 879 | 'conditionDimmed' => ['showheader' => ['off'],'headertype' => ['text']], |
| 880 | 'conditionHide' => true, |
| 881 | 'layout' => 'half', |
| 882 | 'strongHeading' => 'false', |
| 883 | 'stacked' => 'true', |
| 884 | 'fieldSuffix' => 'px', |
| 885 | 'style' => ['.cff-preview-header-text-h' => 'padding:{{value}}px!important;'], |
| 886 | 'heading' => __('Padding / Spacing', 'custom-facebook-feed'), |
| 887 | ], |
| 888 | |
| 889 | ]; |
| 890 | } |
| 891 | |
| 892 | /** |
| 893 | * Get Customize Tab Posts Section |
| 894 | * |
| 895 | * @since 4.0 |
| 896 | * @return array |
| 897 | */ |
| 898 | public static function get_customize_posts_controls() |
| 899 | { |
| 900 | return [ |
| 901 | [ |
| 902 | 'type' => 'heading', |
| 903 | 'heading' => __('Layout', 'custom-facebook-feed'), |
| 904 | 'proLabel' => true, |
| 905 | 'checkExtensionPopupLeranMore' => 'postSettings', |
| 906 | 'description' => __('Get more layout options by upgrading to pro.', 'custom-facebook-feed'), |
| 907 | |
| 908 | ], |
| 909 | [ |
| 910 | 'type' => 'toggleset', |
| 911 | 'id' => 'layout', |
| 912 | 'checkExtensionDimmed' => 'postSettings', |
| 913 | 'checkExtensionPopup' => 'postSettings', |
| 914 | 'disabledInput' => true, |
| 915 | 'options' => [ |
| 916 | [ |
| 917 | 'value' => 'thumb', |
| 918 | 'icon' => 'thumbnail', |
| 919 | 'label' => __('Thumbnail', 'custom-facebook-feed') |
| 920 | ], |
| 921 | [ |
| 922 | 'value' => 'half', |
| 923 | 'icon' => 'halfwidth', |
| 924 | 'label' => __('Half width', 'custom-facebook-feed') |
| 925 | ], |
| 926 | [ |
| 927 | 'value' => 'full', |
| 928 | 'icon' => 'fullwidth', |
| 929 | 'label' => __('Full width', 'custom-facebook-feed') |
| 930 | ] |
| 931 | ] |
| 932 | ], |
| 933 | [ |
| 934 | 'type' => 'checkbox', |
| 935 | 'id' => 'enablenarrow', |
| 936 | 'label' => __('Use Full Width layout when post width is less than 500px', 'custom-facebook-feed'), |
| 937 | 'reverse' => 'true', |
| 938 | 'stacked' => 'true', |
| 939 | 'checkExtensionDimmed' => 'postSettings', |
| 940 | 'checkExtensionPopup' => 'postSettings', |
| 941 | 'disabledInput' => true, |
| 942 | 'options' => [ |
| 943 | 'enabled' => 'on', |
| 944 | 'disabled' => 'off' |
| 945 | ] |
| 946 | ], |
| 947 | [ |
| 948 | 'type' => 'separator', |
| 949 | 'top' => 10, |
| 950 | 'bottom' => -1, |
| 951 | ], |
| 952 | |
| 953 | ]; |
| 954 | } |
| 955 | |
| 956 | /** |
| 957 | * Get Customize Tab Likebox Section |
| 958 | * |
| 959 | * @since 4.0 |
| 960 | * @return array |
| 961 | */ |
| 962 | public static function get_customize_likebox_controls() |
| 963 | { |
| 964 | return [ |
| 965 | [ |
| 966 | 'type' => 'switcher', |
| 967 | 'id' => 'showlikebox', |
| 968 | 'label' => __('Enable', 'custom-facebook-feed'), |
| 969 | 'reverse' => 'true', |
| 970 | 'stacked' => 'true', |
| 971 | 'options' => [ |
| 972 | 'enabled' => 'on', |
| 973 | 'disabled' => 'off' |
| 974 | ] |
| 975 | ], |
| 976 | [ |
| 977 | 'type' => 'toggleset', |
| 978 | 'id' => 'likeboxsmallheader', |
| 979 | 'condition' => ['showlikebox' => ['on']], |
| 980 | 'heading' => __('Size', 'custom-facebook-feed'), |
| 981 | 'separator' => 'on', |
| 982 | 'options' => [ |
| 983 | [ |
| 984 | 'value' => 'on', |
| 985 | 'label' => __('Small', 'custom-facebook-feed') |
| 986 | ], |
| 987 | [ |
| 988 | 'value' => 'off', |
| 989 | 'label' => __('Large', 'custom-facebook-feed') |
| 990 | ] |
| 991 | ] |
| 992 | ], |
| 993 | [ |
| 994 | 'type' => 'select', |
| 995 | 'id' => 'likeboxpos', |
| 996 | 'condition' => ['showlikebox' => ['on']], |
| 997 | 'heading' => __('Position', 'custom-facebook-feed'), |
| 998 | 'options' => [ |
| 999 | 'top' => __('Top', 'custom-facebook-feed'), |
| 1000 | 'bottom' => __('Bottom', 'custom-facebook-feed') |
| 1001 | ] |
| 1002 | ], |
| 1003 | [ |
| 1004 | 'type' => 'separator', |
| 1005 | 'condition' => ['showlikebox' => ['on']], |
| 1006 | 'top' => 10, |
| 1007 | 'bottom' => 10, |
| 1008 | ], |
| 1009 | [ |
| 1010 | 'type' => 'switcher', |
| 1011 | 'id' => 'likeboxcover', |
| 1012 | 'condition' => ['showlikebox' => ['on']], |
| 1013 | 'labelStrong' => 'true', |
| 1014 | 'heading' => __('Cover Photo', 'custom-facebook-feed'), |
| 1015 | 'stacked' => 'true', |
| 1016 | 'layout' => 'half', |
| 1017 | 'reverse' => 'true', |
| 1018 | 'options' => [ |
| 1019 | 'enabled' => 'on', |
| 1020 | 'disabled' => 'off' |
| 1021 | ] |
| 1022 | ], |
| 1023 | [ |
| 1024 | 'type' => 'separator', |
| 1025 | 'condition' => ['showlikebox' => ['on']], |
| 1026 | 'top' => 10, |
| 1027 | 'bottom' => 10, |
| 1028 | ], |
| 1029 | [ |
| 1030 | 'type' => 'switcher', |
| 1031 | 'id' => 'likeboxcustomwidth', |
| 1032 | 'condition' => ['showlikebox' => ['on']], |
| 1033 | 'layout' => 'half', |
| 1034 | 'reverse' => 'true', |
| 1035 | 'heading' => __('Custom Width', 'custom-facebook-feed'), |
| 1036 | 'description' => __('By default this is set to auto', 'custom-facebook-feed'), |
| 1037 | 'stacked' => 'true', |
| 1038 | 'labelStrong' => 'true', |
| 1039 | 'options' => [ |
| 1040 | 'enabled' => 'on', |
| 1041 | 'disabled' => 'off' |
| 1042 | ] |
| 1043 | ], |
| 1044 | [ |
| 1045 | 'type' => 'number', |
| 1046 | 'id' => 'likeboxwidth', |
| 1047 | 'condition' => ['showlikebox' => ['on'],'likeboxcustomwidth' => ['on']], |
| 1048 | 'layout' => 'half', |
| 1049 | 'strongHeading' => 'false', |
| 1050 | 'stacked' => 'true', |
| 1051 | 'child' => 'true', |
| 1052 | 'fieldSuffix' => 'px', |
| 1053 | 'heading' => __('Width', 'custom-facebook-feed'), |
| 1054 | ], |
| 1055 | [ |
| 1056 | 'type' => 'separator', |
| 1057 | 'condition' => ['showlikebox' => ['on']], |
| 1058 | 'top' => 10, |
| 1059 | 'bottom' => 10, |
| 1060 | ], |
| 1061 | [ |
| 1062 | 'type' => 'switcher', |
| 1063 | 'id' => 'likeboxhidebtn', |
| 1064 | 'condition' => ['showlikebox' => ['on']], |
| 1065 | 'layout' => 'half', |
| 1066 | 'reverse' => 'true', |
| 1067 | 'heading' => __('Custom CTA', 'custom-facebook-feed'), |
| 1068 | 'description' => __('This toggles the custom CTA like "Shop now" and "Contact"', 'custom-facebook-feed'), |
| 1069 | 'stacked' => 'true', |
| 1070 | 'labelStrong' => 'true', |
| 1071 | 'options' => [ |
| 1072 | 'enabled' => 'on', |
| 1073 | 'disabled' => 'off' |
| 1074 | ] |
| 1075 | ], |
| 1076 | [ |
| 1077 | 'type' => 'separator', |
| 1078 | 'condition' => ['showlikebox' => ['on']], |
| 1079 | 'top' => 10, |
| 1080 | 'bottom' => 10, |
| 1081 | ], |
| 1082 | [ |
| 1083 | 'type' => 'switcher', |
| 1084 | 'id' => 'likeboxfaces', |
| 1085 | 'condition' => ['showlikebox' => ['on']], |
| 1086 | 'layout' => 'half', |
| 1087 | 'reverse' => 'true', |
| 1088 | 'heading' => __('Show Fans', 'custom-facebook-feed'), |
| 1089 | 'description' => __('Shows visitors which of their friends follow this Facebook page', 'custom-facebook-feed'), |
| 1090 | 'stacked' => 'true', |
| 1091 | 'labelStrong' => 'true', |
| 1092 | 'options' => [ |
| 1093 | 'enabled' => 'on', |
| 1094 | 'disabled' => 'off' |
| 1095 | ] |
| 1096 | ], |
| 1097 | [ |
| 1098 | 'type' => 'separator', |
| 1099 | 'condition' => ['showlikebox' => ['on']], |
| 1100 | 'top' => 10, |
| 1101 | 'bottom' => 10, |
| 1102 | ], |
| 1103 | [ |
| 1104 | 'type' => 'switcher', |
| 1105 | 'id' => 'likeboxoutside', |
| 1106 | 'condition' => ['showlikebox' => ['on']], |
| 1107 | 'layout' => 'half', |
| 1108 | 'reverse' => 'true', |
| 1109 | 'heading' => __('Display outside scrollable area', 'custom-facebook-feed'), |
| 1110 | 'description' => __('Make the Like Box fixed by moving it outside the scrollable area', 'custom-facebook-feed'), |
| 1111 | 'stacked' => 'true', |
| 1112 | 'labelStrong' => 'true', |
| 1113 | 'options' => [ |
| 1114 | 'enabled' => 'on', |
| 1115 | 'disabled' => 'off' |
| 1116 | ] |
| 1117 | ], |
| 1118 | |
| 1119 | ]; |
| 1120 | } |
| 1121 | |
| 1122 | /** |
| 1123 | * Get Customize Tab Load More Button Section |
| 1124 | * |
| 1125 | * @since 4.0 |
| 1126 | * @return array |
| 1127 | */ |
| 1128 | public static function get_customize_loadmorebutton_controls() |
| 1129 | { |
| 1130 | return [ |
| 1131 | [ |
| 1132 | 'type' => 'switcher', |
| 1133 | 'id' => 'loadmore', |
| 1134 | 'label' => __('Enable', 'custom-facebook-feed'), |
| 1135 | 'reverse' => 'true', |
| 1136 | 'stacked' => 'true', |
| 1137 | 'checkExtensionDimmed' => 'loadMore', |
| 1138 | 'checkExtensionPopup' => 'loadMore', |
| 1139 | 'disabledInput' => true, |
| 1140 | 'options' => [ |
| 1141 | 'enabled' => 'off', |
| 1142 | 'disabled' => 'off' |
| 1143 | ] |
| 1144 | ], |
| 1145 | [ |
| 1146 | 'type' => 'separator', |
| 1147 | 'condition' => ['loadmore' => ['on']], |
| 1148 | 'top' => 10, |
| 1149 | 'bottom' => 10, |
| 1150 | ], |
| 1151 | [ |
| 1152 | 'type' => 'text', |
| 1153 | 'id' => 'buttontext', |
| 1154 | 'heading' => __('Text', 'custom-facebook-feed'), |
| 1155 | 'condition' => ['loadmore' => ['on']], |
| 1156 | 'checkExtensionDimmed' => 'loadMore', |
| 1157 | 'checkExtensionPopup' => 'loadMore', |
| 1158 | 'disabledInput' => true, |
| 1159 | 'stacked' => 'true' |
| 1160 | ], |
| 1161 | [ |
| 1162 | 'type' => 'separator', |
| 1163 | 'condition' => ['loadmore' => ['on']], |
| 1164 | 'top' => 10, |
| 1165 | 'bottom' => 10, |
| 1166 | ], |
| 1167 | [ |
| 1168 | 'type' => 'heading', |
| 1169 | 'condition' => ['loadmore' => ['on']], |
| 1170 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 1171 | ], |
| 1172 | [ |
| 1173 | 'type' => 'colorpicker', |
| 1174 | 'id' => 'buttoncolor', |
| 1175 | 'condition' => ['loadmore' => ['on']], |
| 1176 | 'layout' => 'half', |
| 1177 | 'icon' => 'background', |
| 1178 | 'strongHeading' => 'false', |
| 1179 | 'checkExtensionDimmed' => 'loadMore', |
| 1180 | 'checkExtensionPopup' => 'loadMore', |
| 1181 | 'disabledInput' => true, |
| 1182 | 'heading' => __('Background', 'custom-facebook-feed'), |
| 1183 | 'style' => ['.cff-preview-loadmore-btn' => 'background:{{value}};'], |
| 1184 | 'stacked' => 'true' |
| 1185 | ], |
| 1186 | [ |
| 1187 | 'type' => 'colorpicker', |
| 1188 | 'id' => 'buttonhovercolor', |
| 1189 | 'condition' => ['loadmore' => ['on']], |
| 1190 | 'layout' => 'half', |
| 1191 | 'icon' => 'cursor', |
| 1192 | 'strongHeading' => 'false', |
| 1193 | 'checkExtensionDimmed' => 'loadMore', |
| 1194 | 'checkExtensionPopup' => 'loadMore', |
| 1195 | 'disabledInput' => true, |
| 1196 | 'heading' => __('Hover State', 'custom-facebook-feed'), |
| 1197 | 'style' => ['.cff-preview-loadmore-btn:hover' => 'background:{{value}};'], |
| 1198 | 'stacked' => 'true' |
| 1199 | ], |
| 1200 | [ |
| 1201 | 'type' => 'colorpicker', |
| 1202 | 'id' => 'buttontextcolor', |
| 1203 | 'condition' => ['loadmore' => ['on']], |
| 1204 | 'checkExtensionDimmed' => 'loadMore', |
| 1205 | 'checkExtensionPopup' => 'loadMore', |
| 1206 | 'disabledInput' => true, |
| 1207 | 'layout' => 'half', |
| 1208 | 'icon' => 'text', |
| 1209 | 'strongHeading' => 'false', |
| 1210 | 'heading' => __('Text', 'custom-facebook-feed'), |
| 1211 | 'style' => ['.cff-preview-loadmore-btn' => 'color:{{value}};'], |
| 1212 | 'stacked' => 'true' |
| 1213 | ], |
| 1214 | ]; |
| 1215 | } |
| 1216 | |
| 1217 | /** |
| 1218 | * Get Customize Tab Lightbox Section |
| 1219 | * |
| 1220 | * @since 4.0 |
| 1221 | * @return array |
| 1222 | */ |
| 1223 | public static function get_customize_lightbox_controls() |
| 1224 | { |
| 1225 | return [ |
| 1226 | |
| 1227 | [ |
| 1228 | 'type' => 'switcher', |
| 1229 | 'id' => 'disablelightbox', |
| 1230 | 'label' => __('Enable', 'custom-facebook-feed'), |
| 1231 | 'reverse' => 'true', |
| 1232 | 'stacked' => 'true', |
| 1233 | 'checkExtensionDimmed' => 'lightbox', |
| 1234 | 'checkExtensionPopup' => 'lightbox', |
| 1235 | 'disabledInput' => true, |
| 1236 | 'options' => [ |
| 1237 | 'enabled' => 'off', |
| 1238 | 'disabled' => 'on' |
| 1239 | ] |
| 1240 | ], |
| 1241 | [ |
| 1242 | 'type' => 'separator', |
| 1243 | 'condition' => ['disablelightbox' => ['off']], |
| 1244 | 'checkExtensionDimmed' => 'lightbox', |
| 1245 | 'checkExtensionPopup' => 'lightbox', |
| 1246 | 'top' => 10, |
| 1247 | 'bottom' => 10, |
| 1248 | ], |
| 1249 | [ |
| 1250 | 'type' => 'heading', |
| 1251 | 'condition' => ['disablelightbox' => ['off']], |
| 1252 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 1253 | ], |
| 1254 | [ |
| 1255 | 'type' => 'colorpicker', |
| 1256 | 'id' => 'lightboxbgcolor', |
| 1257 | 'condition' => ['disablelightbox' => ['off']], |
| 1258 | 'checkExtensionDimmed' => 'lightbox', |
| 1259 | 'checkExtensionPopup' => 'lightbox', |
| 1260 | 'disabledInput' => true, |
| 1261 | 'layout' => 'half', |
| 1262 | 'icon' => 'background', |
| 1263 | 'strongHeading' => 'false', |
| 1264 | 'heading' => __('Background', 'custom-facebook-feed'), |
| 1265 | 'style' => ['.cff-lightbox-sidebar' => 'background:{{value}}!important;'], |
| 1266 | 'stacked' => 'true' |
| 1267 | |
| 1268 | ], |
| 1269 | [ |
| 1270 | 'type' => 'colorpicker', |
| 1271 | 'id' => 'lightboxtextcolor', |
| 1272 | 'condition' => ['disablelightbox' => ['off']], |
| 1273 | 'checkExtensionDimmed' => 'lightbox', |
| 1274 | 'checkExtensionPopup' => 'lightbox', |
| 1275 | 'disabledInput' => true, |
| 1276 | 'layout' => 'half', |
| 1277 | 'icon' => 'text', |
| 1278 | 'strongHeading' => 'false', |
| 1279 | 'heading' => __('Text', 'custom-facebook-feed'), |
| 1280 | 'style' => ['.cff-lightbox-sidebar .cff-post-item-date,.cff-lightbox-cls,.cff-lightbox-sidebar .cff-post-item-text' => 'color:{{value}}!important;'], |
| 1281 | 'stacked' => 'true' |
| 1282 | |
| 1283 | ], |
| 1284 | [ |
| 1285 | 'type' => 'colorpicker', |
| 1286 | 'id' => 'lightboxlinkcolor', |
| 1287 | 'condition' => ['disablelightbox' => ['off']], |
| 1288 | 'checkExtensionDimmed' => 'lightbox', |
| 1289 | 'checkExtensionPopup' => 'lightbox', |
| 1290 | 'disabledInput' => true, |
| 1291 | 'layout' => 'half', |
| 1292 | 'icon' => 'link', |
| 1293 | 'strongHeading' => 'false', |
| 1294 | 'heading' => __('Link', 'custom-facebook-feed'), |
| 1295 | 'style' => ['.cff-lightbox-sidebar .cff-post-item-author-name,.cff-lightbox-sidebar .cff-post-meta-link,.cff-lightbox-sidebar .cff-post-comment-item-author.cff-post-meta-link,.cff-lightbox-sidebar .cff-post-item-text a' => 'color:{{value}}!important;'], |
| 1296 | 'stacked' => 'true' |
| 1297 | ], |
| 1298 | [ |
| 1299 | 'type' => 'separator', |
| 1300 | 'condition' => ['disablelightbox' => ['off']], |
| 1301 | 'checkExtensionDimmed' => 'lightbox', |
| 1302 | 'checkExtensionPopup' => 'lightbox', |
| 1303 | 'top' => 10, |
| 1304 | 'bottom' => 10, |
| 1305 | ], |
| 1306 | [ |
| 1307 | 'type' => 'switcher', |
| 1308 | 'id' => 'lightboxcomments', |
| 1309 | 'condition' => ['disablelightbox' => ['off']], |
| 1310 | 'checkExtensionDimmed' => 'lightbox', |
| 1311 | 'checkExtensionPopup' => 'lightbox', |
| 1312 | 'layout' => 'half', |
| 1313 | 'reverse' => 'true', |
| 1314 | 'heading' => __('Show Comments', 'custom-facebook-feed'), |
| 1315 | 'description' => __('For Timeline posts only', 'custom-facebook-feed'), |
| 1316 | 'stacked' => 'true', |
| 1317 | 'labelStrong' => 'true', |
| 1318 | 'options' => [ |
| 1319 | 'enabled' => 'on', |
| 1320 | 'disabled' => 'off' |
| 1321 | ] |
| 1322 | ], |
| 1323 | ]; |
| 1324 | } |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | /* |
| 1330 | ** NESTED SECTIONS |
| 1331 | */ |
| 1332 | /** |
| 1333 | * Get Customize Tab Post Style Nested Section |
| 1334 | * |
| 1335 | * @since 4.0 |
| 1336 | * @return array |
| 1337 | */ |
| 1338 | public static function get_nested_post_style_controls() |
| 1339 | { |
| 1340 | return [ |
| 1341 | [ |
| 1342 | 'type' => 'toggleset', |
| 1343 | 'id' => 'poststyle', |
| 1344 | 'heading' => __('Post Type', 'custom-facebook-feed'), |
| 1345 | 'options' => [ |
| 1346 | [ |
| 1347 | 'value' => 'boxed', |
| 1348 | 'icon' => 'boxed', |
| 1349 | 'label' => __('Boxed', 'custom-facebook-feed') |
| 1350 | ], |
| 1351 | [ |
| 1352 | 'value' => 'regular', |
| 1353 | 'icon' => 'thumbnail', |
| 1354 | 'label' => __('Regular', 'custom-facebook-feed') |
| 1355 | ] |
| 1356 | ] |
| 1357 | ], |
| 1358 | [ |
| 1359 | 'type' => 'separator', |
| 1360 | 'top' => 10, |
| 1361 | 'bottom' => 10, |
| 1362 | ], |
| 1363 | [ |
| 1364 | 'type' => 'heading', |
| 1365 | 'condition' => ['poststyle' => ['boxed']], |
| 1366 | 'conditionHide' => true, |
| 1367 | 'heading' => __('Individual Properties', 'custom-facebook-feed'), |
| 1368 | ], |
| 1369 | [ |
| 1370 | 'type' => 'colorpicker', |
| 1371 | 'id' => 'postbgcolor', |
| 1372 | 'condition' => ['poststyle' => ['boxed']], |
| 1373 | 'conditionHide' => true, |
| 1374 | 'layout' => 'half', |
| 1375 | 'icon' => 'background', |
| 1376 | 'strongHeading' => 'false', |
| 1377 | 'heading' => __('Background', 'custom-facebook-feed'), |
| 1378 | 'style' => ['.cff-post-item-ctn' => 'background:{{value}};'], |
| 1379 | 'stacked' => 'true' |
| 1380 | ], |
| 1381 | [ |
| 1382 | 'type' => 'number', |
| 1383 | 'id' => 'postcorners', |
| 1384 | 'condition' => ['poststyle' => ['boxed']], |
| 1385 | 'conditionHide' => true, |
| 1386 | 'fieldSuffix' => 'px', |
| 1387 | 'layout' => 'half', |
| 1388 | 'icon' => 'corner', |
| 1389 | 'strongHeading' => 'false', |
| 1390 | 'heading' => __('Border Radius', 'custom-facebook-feed'), |
| 1391 | 'style' => ['.cff-post-item-ctn' => 'border-radius:{{value}}px;'], |
| 1392 | 'stacked' => 'true' |
| 1393 | ], |
| 1394 | [ |
| 1395 | 'type' => 'separator', |
| 1396 | 'top' => 10, |
| 1397 | 'condition' => ['poststyle' => ['boxed']], |
| 1398 | 'conditionHide' => true, |
| 1399 | 'bottom' => 5, |
| 1400 | ], |
| 1401 | [ |
| 1402 | 'type' => 'checkbox', |
| 1403 | 'id' => 'boxshadow', |
| 1404 | 'condition' => ['poststyle' => ['boxed']], |
| 1405 | 'conditionHide' => true, |
| 1406 | 'label' => __('Box Shadow', 'custom-facebook-feed'), |
| 1407 | 'options' => [ |
| 1408 | 'enabled' => 'on', |
| 1409 | 'disabled' => 'off' |
| 1410 | ], |
| 1411 | 'stacked' => 'true' |
| 1412 | ], |
| 1413 | [ |
| 1414 | 'type' => 'heading', |
| 1415 | 'condition' => ['poststyle' => ['regular']], |
| 1416 | 'conditionHide' => true, |
| 1417 | 'heading' => __('Separating Line', 'custom-facebook-feed'), |
| 1418 | ], |
| 1419 | [ |
| 1420 | 'type' => 'colorpicker', |
| 1421 | 'id' => 'sepcolor', |
| 1422 | 'condition' => ['poststyle' => ['regular']], |
| 1423 | 'conditionHide' => true, |
| 1424 | 'layout' => 'half', |
| 1425 | 'strongHeading' => 'false', |
| 1426 | 'heading' => __('Color', 'custom-facebook-feed'), |
| 1427 | 'style' => ['.cff-post-item-ctn' => 'border-bottom-color:{{value}};'], |
| 1428 | 'stacked' => 'true' |
| 1429 | ], |
| 1430 | [ |
| 1431 | 'type' => 'number', |
| 1432 | 'id' => 'sepsize', |
| 1433 | 'condition' => ['poststyle' => ['regular']], |
| 1434 | 'conditionHide' => true, |
| 1435 | 'fieldSuffix' => 'px', |
| 1436 | 'layout' => 'half', |
| 1437 | 'strongHeading' => 'false', |
| 1438 | 'heading' => __('Thickness', 'custom-facebook-feed'), |
| 1439 | 'style' => ['.cff-post-item-ctn' => 'border-bottom-width:{{value}}px;border-bottom-style:solid;'], |
| 1440 | 'stacked' => 'true' |
| 1441 | ], |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | ]; |
| 1446 | } |
| 1447 | |
| 1448 | /** |
| 1449 | * Get Customize Tab Individual Elements Nested Section |
| 1450 | * |
| 1451 | * @since 4.0 |
| 1452 | * @return array |
| 1453 | */ |
| 1454 | public static function get_nested_individual_elements_controls() |
| 1455 | { |
| 1456 | return [ |
| 1457 | [ |
| 1458 | 'type' => 'checkboxsection', |
| 1459 | 'id' => 'include', |
| 1460 | 'value' => 'author', |
| 1461 | 'header' => true, |
| 1462 | 'label' => __('Post Author', 'custom-facebook-feed'), |
| 1463 | 'separator' => 'bottom', |
| 1464 | 'section' => [ |
| 1465 | 'id' => 'post_styling_author', |
| 1466 | 'separator' => 'none', |
| 1467 | 'heading' => __('Post Author', 'custom-facebook-feed'), |
| 1468 | 'description' => __('The author name and avatar image that\'s shown at the top of each timeline post', 'custom-facebook-feed'), |
| 1469 | 'controls' => CFF_Styling_Tab::post_styling_author(), |
| 1470 | ] |
| 1471 | ], |
| 1472 | [ |
| 1473 | 'type' => 'checkboxsection', |
| 1474 | 'id' => 'include', |
| 1475 | 'value' => 'text', |
| 1476 | 'separator' => 'bottom', |
| 1477 | 'label' => __('Post Text', 'custom-facebook-feed'), |
| 1478 | 'section' => [ |
| 1479 | 'id' => 'post_styling_text', |
| 1480 | 'separator' => 'none', |
| 1481 | 'heading' => __('Post Text', 'custom-facebook-feed'), |
| 1482 | 'description' => __('The main text of the Facebook post', 'custom-facebook-feed'), |
| 1483 | 'controls' => CFF_Styling_Tab::post_styling_text(), |
| 1484 | ] |
| 1485 | |
| 1486 | ], |
| 1487 | [ |
| 1488 | 'type' => 'checkboxsection', |
| 1489 | 'id' => 'include', |
| 1490 | 'value' => 'date', |
| 1491 | 'separator' => 'bottom', |
| 1492 | 'label' => __('Date', 'custom-facebook-feed'), |
| 1493 | 'section' => [ |
| 1494 | 'id' => 'post_styling_date', |
| 1495 | 'separator' => 'none', |
| 1496 | 'heading' => __('Post Date', 'custom-facebook-feed'), |
| 1497 | 'description' => __('The date of the post', 'custom-facebook-feed'), |
| 1498 | 'controls' => CFF_Styling_Tab::post_styling_date(), |
| 1499 | ] |
| 1500 | ], |
| 1501 | [ |
| 1502 | 'type' => 'checkboxsection', |
| 1503 | 'id' => 'include', |
| 1504 | 'value' => 'eventtitle', |
| 1505 | 'separator' => 'bottom', |
| 1506 | 'label' => __('Event Title', 'custom-facebook-feed'), |
| 1507 | 'section' => [ |
| 1508 | 'id' => 'post_styling_eventtitle', |
| 1509 | 'separator' => 'none', |
| 1510 | 'heading' => __('Event Title', 'custom-facebook-feed'), |
| 1511 | 'description' => __('The title of an event', 'custom-facebook-feed'), |
| 1512 | 'controls' => CFF_Styling_Tab::post_styling_eventtitle(), |
| 1513 | ] |
| 1514 | ], |
| 1515 | /* |
| 1516 | [ |
| 1517 | 'type' => 'checkboxsection', |
| 1518 | 'id' => 'include', |
| 1519 | 'value' => 'eventdetails', |
| 1520 | 'separator' => 'bottom', |
| 1521 | 'label' => __( 'Event Details', 'custom-facebook-feed' ), |
| 1522 | 'section' => [ |
| 1523 | 'id' => 'post_styling_eventdetails', |
| 1524 | 'separator' => 'none', |
| 1525 | 'heading' => __( 'Event Details', 'custom-facebook-feed' ), |
| 1526 | 'description' => __( 'The information associated with an event', 'custom-facebook-feed' ), |
| 1527 | 'controls' => CFF_Styling_Tab::post_styling_eventdetails(), |
| 1528 | ] |
| 1529 | ],*/ |
| 1530 | [ |
| 1531 | 'type' => 'checkboxsection', |
| 1532 | 'id' => 'include', |
| 1533 | 'value' => 'link', |
| 1534 | 'separator' => 'bottom', |
| 1535 | 'label' => __('Post Action Links', 'custom-facebook-feed'), |
| 1536 | 'section' => [ |
| 1537 | 'id' => 'post_styling_link', |
| 1538 | 'separator' => 'none', |
| 1539 | 'heading' => __('Post Action Links', 'custom-facebook-feed'), |
| 1540 | 'description' => __('The "View on Facebook" and "Share" links at the bottom of each post', 'custom-facebook-feed'), |
| 1541 | 'controls' => CFF_Styling_Tab::post_styling_link(), |
| 1542 | ] |
| 1543 | ], |
| 1544 | /* |
| 1545 | [ |
| 1546 | 'type' => 'checkboxsection', |
| 1547 | 'id' => 'include', |
| 1548 | 'value' => 'desc', |
| 1549 | 'separator' => 'bottom', |
| 1550 | 'label' => __( 'Shared Post Text', 'custom-facebook-feed' ), |
| 1551 | 'section' => [ |
| 1552 | 'id' => 'post_styling_desc', |
| 1553 | 'separator' => 'none', |
| 1554 | 'heading' => __( 'Shared Post Text', 'custom-facebook-feed' ), |
| 1555 | 'description' => __( 'The description text associated with shared photos, videos, or links', 'custom-facebook-feed' ), |
| 1556 | 'controls' => CFF_Styling_Tab::post_styling_desc(), |
| 1557 | ] |
| 1558 | ], |
| 1559 | */ |
| 1560 | [ |
| 1561 | 'type' => 'checkboxsection', |
| 1562 | 'id' => 'include', |
| 1563 | 'value' => 'sharedlinks', |
| 1564 | 'separator' => 'bottom', |
| 1565 | 'label' => __('Shared Link Box', 'custom-facebook-feed'), |
| 1566 | 'section' => [ |
| 1567 | 'id' => 'post_styling_sharedlinks', |
| 1568 | 'separator' => 'none', |
| 1569 | 'heading' => __('Shared Link Box', 'custom-facebook-feed'), |
| 1570 | 'description' => __('The link info box that\'s created when a link is shared in a Facebook post', 'custom-facebook-feed'), |
| 1571 | 'controls' => CFF_Styling_Tab::post_styling_sharedlinks(), |
| 1572 | ] |
| 1573 | ], |
| 1574 | [ |
| 1575 | 'type' => 'heading', |
| 1576 | 'heading' => __('Advanced', 'custom-facebook-feed'), |
| 1577 | 'proLabel' => true, |
| 1578 | 'checkExtensionPopupLeranMore' => 'mediaComment', |
| 1579 | 'description' => __('These properties are available in the PRO version.', 'custom-facebook-feed'), |
| 1580 | ], |
| 1581 | [ |
| 1582 | 'type' => 'checkboxsection', |
| 1583 | 'id' => 'include', |
| 1584 | 'value' => 'media', |
| 1585 | 'separator' => 'bottom', |
| 1586 | 'checkExtensionDimmed' => 'mediaComment', |
| 1587 | 'checkExtensionPopup' => 'mediaComment', |
| 1588 | 'disabledInput' => true, |
| 1589 | 'label' => __('Photos/Videos', 'custom-facebook-feed'), |
| 1590 | 'section' => [ |
| 1591 | 'id' => 'post_styling_media', |
| 1592 | 'separator' => 'none', |
| 1593 | 'heading' => __('Photos/Videos', 'custom-facebook-feed'), |
| 1594 | 'description' => __('Any photos or videos in your posts', 'custom-facebook-feed'), |
| 1595 | 'controls' => CFF_Styling_Tab::post_styling_media(), |
| 1596 | ] |
| 1597 | ], |
| 1598 | [ |
| 1599 | 'type' => 'checkboxsection', |
| 1600 | 'id' => 'include', |
| 1601 | 'value' => 'social', |
| 1602 | 'separator' => 'bottom', |
| 1603 | 'label' => __('Likes, Shares and Comments', 'custom-facebook-feed'), |
| 1604 | 'checkExtensionDimmed' => 'mediaComment', |
| 1605 | 'checkExtensionPopup' => 'mediaComment', |
| 1606 | 'disabledInput' => true, |
| 1607 | 'section' => [ |
| 1608 | 'id' => 'post_styling_social', |
| 1609 | 'separator' => 'none', |
| 1610 | 'heading' => __('Likes, Shares and Comments Box', 'custom-facebook-feed'), |
| 1611 | 'description' => __('The comments box displayed at the bottom of each timeline post', 'custom-facebook-feed'), |
| 1612 | 'controls' => CFF_Styling_Tab::post_styling_social(), |
| 1613 | ] |
| 1614 | ], |
| 1615 | [ |
| 1616 | 'type' => 'checkboxsection', |
| 1617 | 'id' => 'include', |
| 1618 | 'value' => 'social', |
| 1619 | 'separator' => 'bottom', |
| 1620 | 'label' => __('Event Details', 'custom-facebook-feed'), |
| 1621 | 'checkExtensionDimmed' => 'events', |
| 1622 | 'checkExtensionPopup' => 'events', |
| 1623 | 'disabledInput' => true, |
| 1624 | 'section' => [ |
| 1625 | 'id' => 'event_details_section', |
| 1626 | ] |
| 1627 | ], |
| 1628 | |
| 1629 | |
| 1630 | ]; |
| 1631 | } |
| 1632 | } |
| 1633 |