| 1 |
<?php |
| 2 |
|
| 3 |
namespace Wdk\Elementor\Widgets; |
| 4 |
|
| 5 |
use Wdk\Elementor\Widgets\WdkElementorBase; |
| 6 |
use Elementor\Widget_Base; |
| 7 |
use Elementor\Controls_Manager; |
| 8 |
use Elementor\Utils; |
| 9 |
use Elementor\Typography; |
| 10 |
use Elementor\Editor; |
| 11 |
use Elementor\Plugin; |
| 12 |
use Elementor\Repeater; |
| 13 |
use Elementor\Core\Schemes; |
| 14 |
use Elementor\Icons_Manager; |
| 15 |
use Elementor\Group_Control_Typography; |
| 16 |
use Elementor\Group_Control_Border; |
| 17 |
use Elementor\Group_Control_Box_Shadow; |
| 18 |
|
| 19 |
if (!defined('ABSPATH')) |
| 20 |
exit; // Exit if accessed directly |
| 21 |
|
| 22 |
/** |
| 23 |
* @since 1.1.0 |
| 24 |
*/ |
| 25 |
class WdkListingAgentsListings extends WdkElementorBase { |
| 26 |
|
| 27 |
public function __construct($data = array(), $args = null) { |
| 28 |
|
| 29 |
\Elementor\Controls_Manager::add_tab( |
| 30 |
'tab_conf', |
| 31 |
esc_html__('Settings', 'wpdirectorykit') |
| 32 |
); |
| 33 |
|
| 34 |
\Elementor\Controls_Manager::add_tab( |
| 35 |
'tab_layout', |
| 36 |
esc_html__('Layout', 'wpdirectorykit') |
| 37 |
); |
| 38 |
|
| 39 |
\Elementor\Controls_Manager::add_tab( |
| 40 |
'tab_content', |
| 41 |
esc_html__('Main', 'wpdirectorykit') |
| 42 |
); |
| 43 |
|
| 44 |
if ($this->is_edit_mode_load()) { |
| 45 |
$this->enqueue_styles_scripts(); |
| 46 |
} |
| 47 |
|
| 48 |
parent::__construct($data, $args); |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* Retrieve the widget name. |
| 53 |
* |
| 54 |
* @since 1.1.0 |
| 55 |
* |
| 56 |
* @access public |
| 57 |
* |
| 58 |
* @return string Widget name. |
| 59 |
*/ |
| 60 |
public function get_name() { |
| 61 |
return 'wdk-listing-agents-listings'; |
| 62 |
} |
| 63 |
|
| 64 |
/** |
| 65 |
* Retrieve the list of categories the widget belongs to. |
| 66 |
* |
| 67 |
* Used to determine where to display the widget in the editor. |
| 68 |
* |
| 69 |
* Note that currently Elementor supports only one category. |
| 70 |
* When multiple categories passed, Elementor uses the first one. |
| 71 |
* |
| 72 |
* @since 1.1.0 |
| 73 |
* |
| 74 |
* @access public |
| 75 |
* |
| 76 |
* @return array Widget categories. |
| 77 |
*/ |
| 78 |
public function get_categories() { |
| 79 |
return [ 'wdk-elementor-listing-preview' ]; |
| 80 |
} |
| 81 |
|
| 82 |
/** |
| 83 |
* Retrieve the widget title. |
| 84 |
* |
| 85 |
* @since 1.1.0 |
| 86 |
* |
| 87 |
* @access public |
| 88 |
* |
| 89 |
* @return string Widget title. |
| 90 |
*/ |
| 91 |
public function get_title() { |
| 92 |
return esc_html__('Wdk Listing Agents Listings', 'wpdirectorykit'); |
| 93 |
} |
| 94 |
|
| 95 |
/** |
| 96 |
* Retrieve the widget icon. |
| 97 |
* |
| 98 |
* @since 1.1.0 |
| 99 |
* |
| 100 |
* @access public |
| 101 |
* |
| 102 |
* @return string Widget icon. |
| 103 |
*/ |
| 104 |
public function get_icon() { |
| 105 |
return 'eicon-posts-group'; |
| 106 |
} |
| 107 |
|
| 108 |
/** |
| 109 |
* Register the widget controls. |
| 110 |
* |
| 111 |
* Adds different input fields to allow the user to change and customize the widget settings. |
| 112 |
* |
| 113 |
* @since 1.1.0 |
| 114 |
* |
| 115 |
* @access protected |
| 116 |
*/ |
| 117 |
protected function register_controls() { |
| 118 |
$this->generate_controls_conf(); |
| 119 |
$this->generate_controls_layout(); |
| 120 |
$this->generate_controls_styles(); |
| 121 |
$this->generate_controls_content(); |
| 122 |
|
| 123 |
$this->insert_pro_message('tab_conf'); |
| 124 |
parent::register_controls(); |
| 125 |
} |
| 126 |
|
| 127 |
/** |
| 128 |
* Render the widget output on the frontend. |
| 129 |
* |
| 130 |
* Written in PHP and used to generate the final HTML. |
| 131 |
* |
| 132 |
* @since 1.1.0 |
| 133 |
* |
| 134 |
* @access protected |
| 135 |
*/ |
| 136 |
protected function render() { |
| 137 |
parent::render(); |
| 138 |
global $wdk_listing_id; |
| 139 |
|
| 140 |
$this->data['id_element'] = $this->get_id(); |
| 141 |
$this->data['settings'] = $this->get_settings(); |
| 142 |
|
| 143 |
$this->data['listings_count'] = 0; |
| 144 |
$this->data['results'] = array(); |
| 145 |
$this->data['pagination_output'] = ''; |
| 146 |
|
| 147 |
$columns = array('ID', 'location_id', 'category_id', 'post_title', 'post_date', 'search', 'order_by','is_featured', 'address'); |
| 148 |
$external_columns = array('location_id', 'category_id', 'post_title'); |
| 149 |
$custom_parameters = array(); |
| 150 |
|
| 151 |
$this->data['custom_order'] = array(); |
| 152 |
if ($this->data['settings']['custom_order_list']) { |
| 153 |
foreach ($this->data['settings']['custom_order_list'] as $item) { |
| 154 |
if (empty($item['title']) || empty($item['key'])) { |
| 155 |
continue; |
| 156 |
} |
| 157 |
$this->data['custom_order'][] = array('title'=>$item['title'],'key'=>$item['key']); |
| 158 |
} |
| 159 |
} |
| 160 |
|
| 161 |
$controller = 'listing'; |
| 162 |
$offset = NULL; |
| 163 |
|
| 164 |
if (isset($wdk_listing_id)) { |
| 165 |
foreach($this->data['settings']['similar_by_fields'] as $similar_field) { |
| 166 |
|
| 167 |
if(empty($similar_field['field'])) continue; |
| 168 |
|
| 169 |
if ($similar_field['field_skip_if_empty'] == 'true' && empty(wdk_field_value(str_replace('field','',$similar_field['field']), $wdk_listing_id))) { |
| 170 |
continue; |
| 171 |
} |
| 172 |
|
| 173 |
if($similar_field['field'] == 'is_featured') { |
| 174 |
if (!empty(wdk_field_value(str_replace('field','',$similar_field['field']), $wdk_listing_id))) { |
| 175 |
$custom_parameters[$similar_field['field']] = 'on'; |
| 176 |
} else { |
| 177 |
$custom_parameters[$similar_field['field']] = 'off'; |
| 178 |
} |
| 179 |
} else { |
| 180 |
$custom_parameters[$similar_field['field']] = wdk_field_value(str_replace('field','',$similar_field['field']), $wdk_listing_id); |
| 181 |
} |
| 182 |
} |
| 183 |
} |
| 184 |
|
| 185 |
if(wmvc_show_data('featured_query', $this->data['settings']) == 'only_featured') { |
| 186 |
$custom_parameters['is_featured'] = 'on'; |
| 187 |
} |
| 188 |
|
| 189 |
if(wmvc_show_data('featured_query', $this->data['settings']) == 'only_unfeatured') { |
| 190 |
$custom_parameters['is_featured'] = 'off'; |
| 191 |
} |
| 192 |
|
| 193 |
$custom_parameters['search_agents_ids'] = array(); |
| 194 |
|
| 195 |
if(wdk_field_value ('user_id_editor', $wdk_listing_id)) { |
| 196 |
$custom_parameters['search_agents_ids'][] = wdk_field_value ('user_id_editor', $wdk_listing_id); |
| 197 |
} |
| 198 |
|
| 199 |
$this->WMVC->model('listingusers_m'); |
| 200 |
|
| 201 |
if(Plugin::$instance->editor->is_edit_mode()) { |
| 202 |
$this->WMVC->db->limit(3); |
| 203 |
} |
| 204 |
|
| 205 |
if($this->data['settings']['alternative_agents_disabled'] !='yes') { |
| 206 |
$this->data['listing_alt_agents'] = $this->WMVC->listingusers_m->get($wdk_listing_id); |
| 207 |
foreach ($this->data['listing_alt_agents'] as $agent) { |
| 208 |
$custom_parameters['search_agents_ids'][] = $agent->user_id; |
| 209 |
} |
| 210 |
} |
| 211 |
|
| 212 |
$_GET['order_by'] = $this->data['settings']['conf_order_by'].' '.$this->data['settings']['conf_order']; |
| 213 |
|
| 214 |
/* if detected custom field for order */ |
| 215 |
if(!empty($this->data['settings']['conf_order_by_custom'])) { |
| 216 |
$_GET['order_by'] = $this->data['settings']['conf_order_by_custom'].' '.$this->data['settings']['conf_order']; |
| 217 |
} |
| 218 |
|
| 219 |
wdk_prepare_search_query_GET($columns, $controller.'_m', $external_columns, $custom_parameters, TRUE); |
| 220 |
|
| 221 |
/* filter same listing */ |
| 222 |
|
| 223 |
if (isset($wdk_listing_id)) { |
| 224 |
global $wpdb; |
| 225 |
$this->WMVC->db->where($wpdb->prefix.'wdk_listings.post_id != '.$wdk_listing_id) ; |
| 226 |
} |
| 227 |
|
| 228 |
$this->data['results'] = $this->WMVC->listing_m->get_pagination($this->data['settings']['per_page'], $offset, array('is_activated' => 1,'is_approved'=>1)); |
| 229 |
|
| 230 |
if(!empty($this->data['results']) && $this->data['listings_count'] == 0) |
| 231 |
$this->data['listings_count'] = wmvc_count($this->data['results']); |
| 232 |
|
| 233 |
$this->data['settings']['content_button_icon'] = $this->generate_icon($this->data['settings']['content_button_icon']); |
| 234 |
|
| 235 |
$this->data['is_edit_mode'] = false; |
| 236 |
if(Plugin::$instance->editor->is_edit_mode()) |
| 237 |
$this->data['is_edit_mode'] = true; |
| 238 |
|
| 239 |
if(isset($_GET['wmvc_view_type']) && $this->data['settings']['get_filters_enable'] == 'yes') { |
| 240 |
if(wmvc_xss_clean($_GET['wmvc_view_type']) == 'grid') |
| 241 |
$this->data['settings']['layout_type'] = 'grid'; |
| 242 |
if(wmvc_xss_clean($_GET['wmvc_view_type']) == 'list') |
| 243 |
$this->data['settings']['layout_type'] = 'list'; |
| 244 |
} |
| 245 |
|
| 246 |
echo $this->view('wdk-listing-agents-listings', $this->data); |
| 247 |
} |
| 248 |
|
| 249 |
|
| 250 |
private function generate_controls_conf() { |
| 251 |
$this->start_controls_section( |
| 252 |
'tab_conf_main_section', |
| 253 |
[ |
| 254 |
'label' => esc_html__('Main', 'wpdirectorykit'), |
| 255 |
'tab' => 'tab_conf', |
| 256 |
] |
| 257 |
); |
| 258 |
|
| 259 |
$this->add_control ( |
| 260 |
'user_editor_disabled', |
| 261 |
[ |
| 262 |
'label' => __( 'Hide Agent Editor listings', 'wpdirectorykit' ), |
| 263 |
'type' => Controls_Manager::SWITCHER, |
| 264 |
'label_on' => __( 'Hide', 'wpdirectorykit' ), |
| 265 |
'label_off' => __( 'Show', 'wpdirectorykit' ), |
| 266 |
'return_value' => 'yes', |
| 267 |
'default' => '', |
| 268 |
] |
| 269 |
); |
| 270 |
|
| 271 |
$this->add_control( |
| 272 |
'alternative_agents_disabled', |
| 273 |
[ |
| 274 |
'label' => __( 'Hide Alternative agents listings', 'wpdirectorykit' ), |
| 275 |
'type' => Controls_Manager::SWITCHER, |
| 276 |
'label_on' => __( 'Hide', 'wpdirectorykit' ), |
| 277 |
'label_off' => __( 'Show', 'wpdirectorykit' ), |
| 278 |
'return_value' => 'yes', |
| 279 |
'default' => '', |
| 280 |
'separator' => 'after', |
| 281 |
] |
| 282 |
); |
| 283 |
|
| 284 |
if(true){ |
| 285 |
$this->add_control( |
| 286 |
'per_page', |
| 287 |
[ |
| 288 |
'label' => __( 'Limit Results (Per page)', 'wpdirectorykit' ), |
| 289 |
'type' => \Elementor\Controls_Manager::NUMBER, |
| 290 |
'min' => 1, |
| 291 |
'max' => 250, |
| 292 |
'step' => 1, |
| 293 |
'default' => 6, |
| 294 |
] |
| 295 |
); |
| 296 |
|
| 297 |
$this->add_control( |
| 298 |
'conf_order_by', |
| 299 |
[ |
| 300 |
'label' => __('Default Order By Column', 'wpdirectorykit'), |
| 301 |
'type' => Controls_Manager::SELECT, |
| 302 |
'label_block' => true, |
| 303 |
'options' => [ |
| 304 |
'none' => __('None', 'wpdirectorykit'), |
| 305 |
'post_id' => __('ID', 'wpdirectorykit'), |
| 306 |
'post_title' => __('Title', 'wpdirectorykit'), |
| 307 |
], |
| 308 |
'default' => 'post_id', |
| 309 |
] |
| 310 |
); |
| 311 |
|
| 312 |
$this->add_control( |
| 313 |
'conf_order_by_custom', |
| 314 |
[ |
| 315 |
'label' => __('Default Custom Order By (小olumn', 'wpdirectorykit'), |
| 316 |
'description' => '<span style="word-break: break-all;">'.__( 'Example:', 'wpdirectorykit' ). |
| 317 |
'<br> field_13_NUMBER - where 13 is field id, NUMBER - field type'. |
| 318 |
'<br> field_4_NUMBER - where 4 is field id, NUMBER - field type'. |
| 319 |
'<br> field_6_DROPDOWN - where 6 is field id, DROPDOWN - field type'. |
| 320 |
'<br> category_title - Category Title'. |
| 321 |
'<br> location_title - Location Title'. |
| 322 |
'</span>', |
| 323 |
'type' => Controls_Manager::TEXT, |
| 324 |
'label_block' => true, |
| 325 |
'default' => 'post_id', |
| 326 |
] |
| 327 |
); |
| 328 |
|
| 329 |
$this->add_control( |
| 330 |
'conf_order', |
| 331 |
[ |
| 332 |
'label' => __('Default Listing Order', 'wpdirectorykit'), |
| 333 |
'type' => Controls_Manager::SELECT, |
| 334 |
'label_block' => true, |
| 335 |
'options' => [ |
| 336 |
'asc' => __('Ascending', 'wpdirectorykit'), |
| 337 |
'desc' => __('Descending', 'wpdirectorykit') |
| 338 |
], |
| 339 |
'default' => 'desc', |
| 340 |
] |
| 341 |
); |
| 342 |
|
| 343 |
$this->add_control ( |
| 344 |
'disable_not_found_alert', |
| 345 |
[ |
| 346 |
'label' => __( 'Disable not found listings alert', 'wpdirectorykit' ), |
| 347 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 348 |
'label_on' => __( 'On', 'wpdirectorykit' ), |
| 349 |
'label_off' => __( 'Off', 'wpdirectorykit' ), |
| 350 |
'return_value' => 'yes', |
| 351 |
'default' => '', |
| 352 |
] |
| 353 |
); |
| 354 |
|
| 355 |
} |
| 356 |
|
| 357 |
$this->add_control( |
| 358 |
'featured_query', |
| 359 |
[ |
| 360 |
'label' => __( 'Featured Listings', 'wpdirectorykit' ), |
| 361 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 362 |
'default' => 'any', |
| 363 |
'options' => [ |
| 364 |
'any' => __( 'Show Featured and Not Featured', 'wpdirectorykit' ), |
| 365 |
'only_featured' => __( 'Show Only Featured', 'wpdirectorykit' ), |
| 366 |
'only_unfeatured' => __( 'Show Only Not Featured', 'wpdirectorykit' ), |
| 367 |
], |
| 368 |
] |
| 369 |
); |
| 370 |
|
| 371 |
$WMVC = &wdk_get_instance(); |
| 372 |
$WMVC->model('field_m'); |
| 373 |
$fields_data = $WMVC->field_m->get_fields_data(); |
| 374 |
$fields_list = array('0' => esc_html__('Not Selected', 'wpdirectorykit')); |
| 375 |
$fields_list ['category_id'] = esc_html__('Category', 'wpdirectorykit'); |
| 376 |
$fields_list ['location_id'] = esc_html__('Location', 'wpdirectorykit'); |
| 377 |
$fields_list ['is_featured'] = esc_html__('Featured', 'wpdirectorykit'); |
| 378 |
|
| 379 |
foreach($fields_data as $field) |
| 380 |
{ |
| 381 |
$fields_list['field_'.wmvc_show_data('idfield', $field)] = '#'.wmvc_show_data('idfield', $field).' '.wmvc_show_data('field_label', $field).'['.wmvc_show_data('field_type', $field).']'; |
| 382 |
} |
| 383 |
|
| 384 |
$repeater_similar_by_fields = new Repeater(); |
| 385 |
$repeater_similar_by_fields->start_controls_tabs( 'repeater_similar_by_fields' ); |
| 386 |
|
| 387 |
$repeater_similar_by_fields->add_control( |
| 388 |
'field', |
| 389 |
[ |
| 390 |
'label' => __( 'Field', 'wpdirectorykit' ), |
| 391 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 392 |
'options' => $fields_list, |
| 393 |
] |
| 394 |
); |
| 395 |
|
| 396 |
$repeater_similar_by_fields->add_control ( |
| 397 |
'field_skip_if_empty', |
| 398 |
[ |
| 399 |
'label' => __( 'Skip from query if empty value', 'wpdirectorykit' ), |
| 400 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 401 |
'label_on' => __( 'On', 'wpdirectorykit' ), |
| 402 |
'label_off' => __( 'Off', 'wpdirectorykit' ), |
| 403 |
'return_value' => 'true', |
| 404 |
'default' => '', |
| 405 |
] |
| 406 |
); |
| 407 |
|
| 408 |
$repeater_similar_by_fields->end_controls_tabs(); |
| 409 |
|
| 410 |
$this->add_control( |
| 411 |
'similar_by_fields', |
| 412 |
[ |
| 413 |
'label' => esc_html__('Fields For Query Similar Listings', 'wpdirectorykit'), |
| 414 |
'type' => Controls_Manager::REPEATER, |
| 415 |
'fields' => $repeater_similar_by_fields->get_controls(), |
| 416 |
'default' => [ |
| 417 |
[ |
| 418 |
], |
| 419 |
], |
| 420 |
'title_field' => '{{{ field }}}', |
| 421 |
] |
| 422 |
); |
| 423 |
|
| 424 |
$this->add_control( |
| 425 |
'important_note', |
| 426 |
[ |
| 427 |
'label' => '', |
| 428 |
'type' => \Elementor\Controls_Manager::RAW_HTML, |
| 429 |
'raw' => wdk_sprintf(__( 'Edit Result Card Designer <a href="%1$s" target="_blank"> open </a>', 'wpdirectorykit' ), admin_url('admin.php?page=wdk_resultitem')), |
| 430 |
'content_classes' => 'wdk_elementor_hint', |
| 431 |
] |
| 432 |
); |
| 433 |
|
| 434 |
$this->end_controls_section(); |
| 435 |
|
| 436 |
$this->start_controls_section( |
| 437 |
'tab_conf_main_section_order', |
| 438 |
[ |
| 439 |
'label' => esc_html__('Custom Order', 'wpdirectorykit'), |
| 440 |
'tab' => 'tab_conf', |
| 441 |
] |
| 442 |
); |
| 443 |
|
| 444 |
$repeater_order = new Repeater(); |
| 445 |
$repeater_order->start_controls_tabs( 'orders' ); |
| 446 |
$repeater_order->add_control( |
| 447 |
'key', |
| 448 |
[ |
| 449 |
'label' => __( 'Order Key', 'wpdirectorykit' ), |
| 450 |
'type' => \Elementor\Controls_Manager::TEXT, |
| 451 |
'placeholder' => 'post_id ASC', |
| 452 |
'description' => '<span style="word-break: break-all;">'.__( 'Custom Fields Order Example:', 'wpdirectorykit' ). |
| 453 |
'<br> field_13_NUMBER ASC - where 13 is field id, NUMBER - field type'. |
| 454 |
'<br> field_4_NUMBER DESC - where 4 is field id, NUMBER - field type'. |
| 455 |
'<br> field_6_DROPDOWN ASC - where 6 is field id, DROPDOWN - field type'. |
| 456 |
'<br> category_title - Category Title'. |
| 457 |
'<br> location_title - Location Title'. |
| 458 |
'</span>', |
| 459 |
] |
| 460 |
); |
| 461 |
$repeater_order->add_control( |
| 462 |
'title', |
| 463 |
[ |
| 464 |
'label' => __( 'Title', 'wpdirectorykit' ), |
| 465 |
'type' => \Elementor\Controls_Manager::TEXT, |
| 466 |
'placeholder' => __( 'Title', 'wpdirectorykit' ), |
| 467 |
] |
| 468 |
); |
| 469 |
$repeater_order->end_controls_tabs(); |
| 470 |
|
| 471 |
$this->add_control( |
| 472 |
'custom_order_list', |
| 473 |
[ |
| 474 |
'type' => Controls_Manager::REPEATER, |
| 475 |
'fields' => $repeater_order->get_controls(), |
| 476 |
'title_field' => '{{{ title }}}', |
| 477 |
] |
| 478 |
); |
| 479 |
|
| 480 |
$this->end_controls_section(); |
| 481 |
|
| 482 |
} |
| 483 |
|
| 484 |
private function generate_controls_layout() { |
| 485 |
$this->start_controls_section( |
| 486 |
'tab_content', |
| 487 |
[ |
| 488 |
'label' => esc_html__('Basic', 'wpdirectorykit'), |
| 489 |
'tab' => 'tab_layout', |
| 490 |
] |
| 491 |
); |
| 492 |
|
| 493 |
$this->add_control( |
| 494 |
'layout_type', |
| 495 |
[ |
| 496 |
'label' => __( 'Layout Type', 'wpdirectorykit' ), |
| 497 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 498 |
'default' => 'grid', |
| 499 |
'options' => [ |
| 500 |
'grid' => __( 'Grid', 'wpdirectorykit' ), |
| 501 |
'list' => __( 'List', 'wpdirectorykit' ), |
| 502 |
'carousel' => __( 'Carousel', 'wpdirectorykit' ), |
| 503 |
], |
| 504 |
] |
| 505 |
); |
| 506 |
|
| 507 |
$this->add_responsive_control( |
| 508 |
'row_gap_col', |
| 509 |
[ |
| 510 |
'label' => __( 'Columns', 'wpdirectorykit' ), |
| 511 |
'type' => Controls_Manager::SELECT, |
| 512 |
'options' => [ |
| 513 |
'' => esc_html__('Default', 'wpdirectorykit'), |
| 514 |
'auto' => esc_html__('Auto', 'wpdirectorykit'), |
| 515 |
'100%' => '1', |
| 516 |
'50%' => '2', |
| 517 |
'calc(100% / 3)' => '3', |
| 518 |
'25%' => '4', |
| 519 |
'20%' => '5', |
| 520 |
'auto_flexible' => 'auto flexible', |
| 521 |
], |
| 522 |
'selectors_dictionary' => [ |
| 523 |
'auto' => 'width:auto;-webkit-flex:0 0 auto;flex:0 0 auto', |
| 524 |
'100%' => 'width:100%;-webkit-flex:0 0 100%;flex:0 0 100%', |
| 525 |
'50%' => 'width:50%;-webkit-flex:0 0 50%;flex:0 0 50%', |
| 526 |
'calc(100% / 3)' => 'width:calc(100% / 3);-webkit-flex:0 0 calc(100% / 3);flex:0 0 calc(100% / 3)', |
| 527 |
'25%' => 'width:25%;-webkit-flex:0 0 25%;flex:0 0 25%', |
| 528 |
'20%' => 'width:20%;-webkit-flex:0 0 20%;flex:0 0 20%', |
| 529 |
'auto' => 'width:auto;-webkit-flex:0 0 auto;flex:0 0 auto', |
| 530 |
'auto_flexible' => 'width:auto;-webkit-flex:1 2 auto;flex:1 2 auto', |
| 531 |
], |
| 532 |
'selectors' => [ |
| 533 |
'{{WRAPPER}} .wdk-row .wdk-col' => '{{UNIT}}', |
| 534 |
], |
| 535 |
'default' => '', |
| 536 |
'separator' => 'before', |
| 537 |
'conditions' => [ |
| 538 |
'terms' => [ |
| 539 |
[ |
| 540 |
'name' => 'layout_type', |
| 541 |
'operator' => '==', |
| 542 |
'value' => 'grid', |
| 543 |
] |
| 544 |
], |
| 545 |
], |
| 546 |
] |
| 547 |
); |
| 548 |
|
| 549 |
$this->add_responsive_control( |
| 550 |
'column_gap', |
| 551 |
[ |
| 552 |
'label' => esc_html__('Columns Gap', 'wpdirectorykit'), |
| 553 |
'type' => Controls_Manager::SLIDER, |
| 554 |
'default' => [ |
| 555 |
'size' => 10, |
| 556 |
], |
| 557 |
'range' => [ |
| 558 |
'px' => [ |
| 559 |
'min' => 0, |
| 560 |
'max' => 60, |
| 561 |
], |
| 562 |
], |
| 563 |
'selectors' => [ |
| 564 |
'{{WRAPPER}} .wdk-row .wdk-col' => 'padding-left: {{SIZE}}{{UNIT}};padding-right: {{SIZE}}{{UNIT}};;', |
| 565 |
'{{WRAPPER}} .wdk-row' => 'margin-left: -{{SIZE}}{{UNIT}};margin-right: -{{SIZE}}{{UNIT}};', |
| 566 |
], |
| 567 |
'conditions' => [ |
| 568 |
'terms' => [ |
| 569 |
[ |
| 570 |
'name' => 'layout_type', |
| 571 |
'operator' => '==', |
| 572 |
'value' => 'grid', |
| 573 |
] |
| 574 |
], |
| 575 |
], |
| 576 |
] |
| 577 |
); |
| 578 |
|
| 579 |
$this->add_responsive_control( |
| 580 |
'row_gap', |
| 581 |
[ |
| 582 |
'label' => esc_html__('Rows Gap', 'wpdirectorykit'), |
| 583 |
'type' => Controls_Manager::SLIDER, |
| 584 |
'default' => [ |
| 585 |
'size' => 10, |
| 586 |
], |
| 587 |
'range' => [ |
| 588 |
'px' => [ |
| 589 |
'min' => 0, |
| 590 |
'max' => 60, |
| 591 |
], |
| 592 |
], |
| 593 |
'selectors' => [ |
| 594 |
'{{WRAPPER}} .wdk-row .wdk-col' => 'margin-bottom: {{SIZE}}{{UNIT}};', |
| 595 |
'{{WRAPPER}} .wdk-row' => 'margin-bottom: -{{SIZE}}{{UNIT}};', |
| 596 |
], |
| 597 |
'conditions' => [ |
| 598 |
'terms' => [ |
| 599 |
[ |
| 600 |
'name' => 'layout_type', |
| 601 |
'operator' => '!=', |
| 602 |
'value' => 'carousel', |
| 603 |
] |
| 604 |
], |
| 605 |
], |
| 606 |
] |
| 607 |
); |
| 608 |
|
| 609 |
$this->add_responsive_control( |
| 610 |
'thumbnail_width', |
| 611 |
[ |
| 612 |
'label' => esc_html__('Thumbnail width (For List Version)', 'wpdirectorykit'), |
| 613 |
'type' => Controls_Manager::SLIDER, |
| 614 |
'default' => [ |
| 615 |
'size' => 35, |
| 616 |
'unit' => '%', |
| 617 |
], |
| 618 |
'size_units' => [ 'px', '%' ], |
| 619 |
'range' => [ |
| 620 |
'px' => [ |
| 621 |
'min' => 0, |
| 622 |
'max' => 600, |
| 623 |
], |
| 624 |
'%' => [ |
| 625 |
'min' => 0, |
| 626 |
'max' => 100, |
| 627 |
], |
| 628 |
], |
| 629 |
'selectors' => [ |
| 630 |
'{{WRAPPER}} .wdk-element .wdk-listing-card.list .wdk-thumbnail' => 'flex: 0 0 {{SIZE}}{{UNIT}};', |
| 631 |
], |
| 632 |
'conditions' => [ |
| 633 |
'terms' => [ |
| 634 |
[ |
| 635 |
'name' => 'layout_type', |
| 636 |
'operator' => '==', |
| 637 |
'value' => 'list', |
| 638 |
] |
| 639 |
], |
| 640 |
], |
| 641 |
] |
| 642 |
); |
| 643 |
|
| 644 |
/* Carousel Grid Config */ |
| 645 |
if(true) { |
| 646 |
$this->add_responsive_control( |
| 647 |
'carousel_column_gap_carousel', |
| 648 |
[ |
| 649 |
'label' => esc_html__('Slider Gap', 'wpdirectorykit'), |
| 650 |
'type' => Controls_Manager::SLIDER, |
| 651 |
'range' => [ |
| 652 |
'px' => [ |
| 653 |
'min' => 0, |
| 654 |
'max' => 60, |
| 655 |
], |
| 656 |
], |
| 657 |
'selectors' => [ |
| 658 |
'{{WRAPPER}} .slick-slider.wdk_results_listings_slider_ini ' => 'padding-left: {{SIZE}}{{UNIT}};padding-right: {{SIZE}}{{UNIT}};', |
| 659 |
], |
| 660 |
'conditions' => [ |
| 661 |
'terms' => [ |
| 662 |
[ |
| 663 |
'name' => 'layout_type', |
| 664 |
'operator' => '==', |
| 665 |
'value' => 'carousel', |
| 666 |
] |
| 667 |
], |
| 668 |
], |
| 669 |
] |
| 670 |
); |
| 671 |
|
| 672 |
$this->add_responsive_control ( |
| 673 |
'carousel_column_gap', |
| 674 |
[ |
| 675 |
'label' => esc_html__('Columns Gap', 'wpdirectorykit'), |
| 676 |
'type' => Controls_Manager::SLIDER, |
| 677 |
'default' => [ |
| 678 |
'size' => 10, |
| 679 |
], |
| 680 |
'range' => [ |
| 681 |
'px' => [ |
| 682 |
'min' => 0, |
| 683 |
'max' => 60, |
| 684 |
], |
| 685 |
], |
| 686 |
'selectors' => [ |
| 687 |
'{{WRAPPER}} .slick-slider.wdk_results_listings_slider_ini .wdk-col' => 'padding-left: {{SIZE}}{{UNIT}};padding-right: {{SIZE}}{{UNIT}};', |
| 688 |
'{{WRAPPER}} .slick-slider.wdk_results_listings_slider_ini' => 'margin-left: -{{SIZE}}{{UNIT}};margin-right: -{{SIZE}}{{UNIT}};', |
| 689 |
], |
| 690 |
'conditions' => [ |
| 691 |
'terms' => [ |
| 692 |
[ |
| 693 |
'name' => 'layout_type', |
| 694 |
'operator' => '==', |
| 695 |
'value' => 'carousel', |
| 696 |
] |
| 697 |
], |
| 698 |
], |
| 699 |
] |
| 700 |
); |
| 701 |
|
| 702 |
$this->add_responsive_control( |
| 703 |
'carousel_column_gap_top', |
| 704 |
[ |
| 705 |
'label' => esc_html__('Columns Gap Top', 'wpdirectorykit'), |
| 706 |
'type' => Controls_Manager::SLIDER, |
| 707 |
'default' => [ |
| 708 |
'size' => 0, |
| 709 |
], |
| 710 |
'range' => [ |
| 711 |
'px' => [ |
| 712 |
'min' => 0, |
| 713 |
'max' => 60, |
| 714 |
], |
| 715 |
], |
| 716 |
'selectors' => [ |
| 717 |
'{{WRAPPER}} .wdk_results_listings_slider_box' => 'padding-top: {{SIZE}}{{UNIT}};', |
| 718 |
], |
| 719 |
'conditions' => [ |
| 720 |
'terms' => [ |
| 721 |
[ |
| 722 |
'name' => 'layout_type', |
| 723 |
'operator' => '==', |
| 724 |
'value' => 'carousel', |
| 725 |
] |
| 726 |
], |
| 727 |
], |
| 728 |
] |
| 729 |
); |
| 730 |
|
| 731 |
$this->add_responsive_control( |
| 732 |
'carousel_column_gap_bottom', |
| 733 |
[ |
| 734 |
'label' => esc_html__('Columns Gap Bottom', 'wpdirectorykit'), |
| 735 |
'type' => Controls_Manager::SLIDER, |
| 736 |
'default' => [ |
| 737 |
'size' => 10, |
| 738 |
], |
| 739 |
'range' => [ |
| 740 |
'px' => [ |
| 741 |
'min' => 0, |
| 742 |
'max' => 60, |
| 743 |
], |
| 744 |
], |
| 745 |
'selectors' => [ |
| 746 |
'{{WRAPPER}} .wdk_results_listings_slider_box' => 'padding-bottom: {{SIZE}}{{UNIT}};', |
| 747 |
], |
| 748 |
'conditions' => [ |
| 749 |
'terms' => [ |
| 750 |
[ |
| 751 |
'name' => 'layout_type', |
| 752 |
'operator' => '==', |
| 753 |
'value' => 'carousel', |
| 754 |
] |
| 755 |
], |
| 756 |
], |
| 757 |
] |
| 758 |
); |
| 759 |
} |
| 760 |
|
| 761 |
$this->end_controls_section(); |
| 762 |
|
| 763 |
$this->start_controls_section( |
| 764 |
'layout_carousel_sec', |
| 765 |
[ |
| 766 |
'label' => esc_html__('Carousel Options', 'wpdirectorykit'), |
| 767 |
'tab' => 'tab_layout', |
| 768 |
'conditions' => [ |
| 769 |
'terms' => [ |
| 770 |
[ |
| 771 |
'name' => 'layout_type', |
| 772 |
'operator' => '==', |
| 773 |
'value' => 'carousel', |
| 774 |
] |
| 775 |
], |
| 776 |
], |
| 777 |
] |
| 778 |
); |
| 779 |
|
| 780 |
$this->add_control( |
| 781 |
'layout_carousel_is_infinite', |
| 782 |
[ |
| 783 |
'label' => __( 'Infinite', 'wpdirectorykit' ), |
| 784 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 785 |
'label_on' => __( 'On', 'wpdirectorykit' ), |
| 786 |
'label_off' => __( 'Off', 'wpdirectorykit' ), |
| 787 |
'return_value' => 'true', |
| 788 |
'default' => 'true', |
| 789 |
] |
| 790 |
); |
| 791 |
|
| 792 |
$this->add_control( |
| 793 |
'layout_carousel_is_autoplay', |
| 794 |
[ |
| 795 |
'label' => __( 'Autoplay', 'wpdirectorykit' ), |
| 796 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 797 |
'label_on' => __( 'On', 'wpdirectorykit' ), |
| 798 |
'label_off' => __( 'Off', 'wpdirectorykit' ), |
| 799 |
'return_value' => 'true', |
| 800 |
'default' => '', |
| 801 |
] |
| 802 |
); |
| 803 |
|
| 804 |
$this->add_control( |
| 805 |
'layout_carousel_speed', |
| 806 |
[ |
| 807 |
'label' => __( 'Speed', 'wpdirectorykit' ), |
| 808 |
'type' => \Elementor\Controls_Manager::NUMBER, |
| 809 |
'min' => 0, |
| 810 |
'max' => 100000, |
| 811 |
'step' => 100, |
| 812 |
'default' => 500, |
| 813 |
] |
| 814 |
); |
| 815 |
|
| 816 |
$this->add_control( |
| 817 |
'layout_carousel_animation_style', |
| 818 |
[ |
| 819 |
'label' => __( 'Animation Style', 'wpdirectorykit' ), |
| 820 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 821 |
'default' => 'fade', |
| 822 |
'options' => [ |
| 823 |
'slide' => __( 'Slide', 'wpdirectorykit' ), |
| 824 |
'fade' => __( 'Fade', 'wpdirectorykit' ), |
| 825 |
'fade_in_in' => __( 'Fade in', 'wpdirectorykit' ), |
| 826 |
], |
| 827 |
] |
| 828 |
); |
| 829 |
|
| 830 |
$this->add_control( |
| 831 |
'layout_carousel_cssease', |
| 832 |
[ |
| 833 |
'label' => __( 'cssEase', 'wpdirectorykit' ), |
| 834 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 835 |
'default' => 'linear', |
| 836 |
'options' => [ |
| 837 |
'linear' => __( 'linear', 'wpdirectorykit' ), |
| 838 |
'ease' => __( 'ease', 'wpdirectorykit' ), |
| 839 |
'ease-in' => __( 'ease-in', 'wpdirectorykit' ), |
| 840 |
'ease-out' => __( 'ease-out', 'wpdirectorykit' ), |
| 841 |
'ease-in-out' => __( 'ease-in-out', 'wpdirectorykit' ), |
| 842 |
'step-start' => __( 'step-start', 'wpdirectorykit' ), |
| 843 |
'step-end' => __( 'step-end', 'wpdirectorykit' ), |
| 844 |
], |
| 845 |
] |
| 846 |
); |
| 847 |
|
| 848 |
$this->add_responsive_control( |
| 849 |
'layout_carousel_columns', |
| 850 |
[ |
| 851 |
'label' => __( 'Count grid', 'wpdirectorykit' ), |
| 852 |
'type' => \Elementor\Controls_Manager::NUMBER, |
| 853 |
'min' => 1, |
| 854 |
'max' => 10, |
| 855 |
'step' => 1, |
| 856 |
'default' => 3, |
| 857 |
] |
| 858 |
); |
| 859 |
|
| 860 |
$this->end_controls_section(); |
| 861 |
|
| 862 |
} |
| 863 |
|
| 864 |
private function generate_controls_styles() { |
| 865 |
$this->start_controls_section( |
| 866 |
'sstyles_thmbn_section', |
| 867 |
[ |
| 868 |
'label' => esc_html__('Section Image', 'wpdirectorykit'), |
| 869 |
'tab' => Controls_Manager::TAB_STYLE, |
| 870 |
] |
| 871 |
); |
| 872 |
|
| 873 |
$this->add_responsive_control( |
| 874 |
'styles_thmbn_des_type', |
| 875 |
[ |
| 876 |
'label' => __( 'Design type', 'wpdirectorykit' ), |
| 877 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 878 |
'default' => 'wdk_size_image_cover', |
| 879 |
'options' => [ |
| 880 |
'wdk_size_image_ori' => __( 'Default Sizes', 'wpdirectorykit' ), |
| 881 |
'wdk_size_image_cover' => __( 'Image auto crop/resize', 'wpdirectorykit' ), |
| 882 |
], |
| 883 |
] |
| 884 |
); |
| 885 |
|
| 886 |
$this->add_responsive_control( |
| 887 |
'styles_thmbn_des_height', |
| 888 |
[ |
| 889 |
'label' => esc_html__('Height', 'wpdirectorykit'), |
| 890 |
'type' => Controls_Manager::SLIDER, |
| 891 |
'range' => [ |
| 892 |
'px' => [ |
| 893 |
'min' => 50, |
| 894 |
'max' => 1500, |
| 895 |
], |
| 896 |
'vw' => [ |
| 897 |
'min' => 0, |
| 898 |
'max' => 100, |
| 899 |
] |
| 900 |
], |
| 901 |
'size_units' => [ 'px', 'vw' ], |
| 902 |
'default' => [ |
| 903 |
'size' => 220, |
| 904 |
'unit' => 'px', |
| 905 |
], |
| 906 |
'selectors' => [ |
| 907 |
'{{WRAPPER}} .wdk_size_image_cover .wdk-listing-card .wdk-thumbnail .wdk-image' => 'height: {{SIZE}}{{UNIT}}', |
| 908 |
], |
| 909 |
'separator' => 'after', |
| 910 |
'conditions' => [ |
| 911 |
'relation' => 'or', |
| 912 |
'terms' => [ |
| 913 |
[ |
| 914 |
'name' => 'styles_thmbn_des_type', |
| 915 |
'operator' => '==', |
| 916 |
'value' => 'wdk_size_image_cover', |
| 917 |
], |
| 918 |
[ |
| 919 |
'name' => 'styles_thmbn_des_type', |
| 920 |
'operator' => '==', |
| 921 |
'value' => 'wdk_image_cover', |
| 922 |
] |
| 923 |
], |
| 924 |
] |
| 925 |
] |
| 926 |
); |
| 927 |
$this->end_controls_section(); |
| 928 |
|
| 929 |
$this->start_controls_section( |
| 930 |
'styles_carousel_arrows_section', |
| 931 |
[ |
| 932 |
'label' => esc_html__('Carousel Arrows', 'wpdirectorykit'), |
| 933 |
'tab' => Controls_Manager::TAB_STYLE, |
| 934 |
'conditions' => [ |
| 935 |
'terms' => [ |
| 936 |
[ |
| 937 |
'name' => 'layout_type', |
| 938 |
'operator' => '==', |
| 939 |
'value' => 'carousel', |
| 940 |
] |
| 941 |
], |
| 942 |
], |
| 943 |
] |
| 944 |
); |
| 945 |
|
| 946 |
$this->add_responsive_control( |
| 947 |
'styles_carousel_arrows_hide', |
| 948 |
[ |
| 949 |
'label' => esc_html__( 'Hide Element', 'wpdirectorykit' ), |
| 950 |
'type' => Controls_Manager::SWITCHER, |
| 951 |
'none' => esc_html__( 'Hide', 'wpdirectorykit' ), |
| 952 |
'block' => esc_html__( 'Show', 'wpdirectorykit' ), |
| 953 |
'return_value' => 'none', |
| 954 |
'default' => '', |
| 955 |
'selectors' => [ |
| 956 |
'{{WRAPPER}} .wdk_results_listings_slider_box .wdk_slider_arrows' => 'display: {{VALUE}};', |
| 957 |
], |
| 958 |
] |
| 959 |
); |
| 960 |
|
| 961 |
$this->add_responsive_control( |
| 962 |
'styles_carousel_arrows_position', |
| 963 |
[ |
| 964 |
'label' => __( 'Position', 'wpdirectorykit' ), |
| 965 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 966 |
'default' => 'wdk_slider_arrows_bottom', |
| 967 |
'options' => [ |
| 968 |
'wdk_slider_arrows_bottom' => __( 'Bottom', 'wpdirectorykit' ), |
| 969 |
'wdk_slider_arrows_middle' => __( 'Center', 'wpdirectorykit' ), |
| 970 |
'wdk_slider_arrows_top' => __( 'Top', 'wpdirectorykit' ), |
| 971 |
], |
| 972 |
] |
| 973 |
); |
| 974 |
|
| 975 |
if(false) |
| 976 |
$this->add_responsive_control( |
| 977 |
'styles_carousel_arrows_position_style', |
| 978 |
[ |
| 979 |
'label' => __( 'Position Style', 'wpdirectorykit' ), |
| 980 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 981 |
'default' => 'wdk_slider_arrows_out', |
| 982 |
'options' => [ |
| 983 |
'wdk_slider_arrows_out' => __( 'Out', 'wpdirectorykit' ), |
| 984 |
'wdk_slider_arrows_in' => __( 'In', 'wpdirectorykit' ), |
| 985 |
], |
| 986 |
] |
| 987 |
); |
| 988 |
|
| 989 |
$this->add_responsive_control( |
| 990 |
'styles_carousel_arrows_align', |
| 991 |
[ |
| 992 |
'label' => __( 'Align', 'wpdirectorykit' ), |
| 993 |
'type' => Controls_Manager::CHOOSE, |
| 994 |
'options' => [ |
| 995 |
'left' => [ |
| 996 |
'title' => esc_html__( 'Left', 'wpdirectorykit' ), |
| 997 |
'icon' => 'eicon-text-align-left', |
| 998 |
], |
| 999 |
'center' => [ |
| 1000 |
'title' => esc_html__( 'Center', 'wpdirectorykit' ), |
| 1001 |
'icon' => 'eicon-text-align-center', |
| 1002 |
], |
| 1003 |
'right' => [ |
| 1004 |
'title' => esc_html__( 'Right', 'wpdirectorykit' ), |
| 1005 |
'icon' => 'eicon-text-align-right', |
| 1006 |
], |
| 1007 |
'justify' => [ |
| 1008 |
'title' => esc_html__( 'Justified', 'wpdirectorykit' ), |
| 1009 |
'icon' => 'eicon-text-align-justify', |
| 1010 |
], |
| 1011 |
], |
| 1012 |
'render_type' => 'ui', |
| 1013 |
'selectors_dictionary' => [ |
| 1014 |
'left' => 'justify-content: flex-start;', |
| 1015 |
'center' => 'justify-content: center;', |
| 1016 |
'right' => 'justify-content: flex-end;', |
| 1017 |
'justify' => 'justify-content: space-between;', |
| 1018 |
], |
| 1019 |
'selectors' => [ |
| 1020 |
'{{WRAPPER}} .wdk_results_listings_slider_box .wdk_slider_arrows' => '{{VALUE}};', |
| 1021 |
], |
| 1022 |
'conditions' => [ |
| 1023 |
'relation' => 'or', |
| 1024 |
'terms' => [ |
| 1025 |
[ |
| 1026 |
'name' => 'styles_carousel_arrows_position', |
| 1027 |
'operator' => '!=', |
| 1028 |
'value' => 'wdk_slider_arrows_middle', |
| 1029 |
] |
| 1030 |
], |
| 1031 |
], |
| 1032 |
] |
| 1033 |
); |
| 1034 |
|
| 1035 |
$this->add_responsive_control( |
| 1036 |
'styles_carousel_arrows_icon_left_h', |
| 1037 |
[ |
| 1038 |
'label' => esc_html__('Arrow left', 'wpdirectorykit'), |
| 1039 |
'type' => Controls_Manager::HEADING, |
| 1040 |
'separator' => 'before', |
| 1041 |
] |
| 1042 |
); |
| 1043 |
|
| 1044 |
$this->add_responsive_control( |
| 1045 |
'styles_carousel_arrows_s_m_left_margin', |
| 1046 |
[ |
| 1047 |
'label' => esc_html__( 'Margin', 'wpdirectorykit' ), |
| 1048 |
'type' => Controls_Manager::DIMENSIONS, |
| 1049 |
'size_units' => [ 'px', 'em', '%' ], |
| 1050 |
'allowed_dimensions' => 'horizontal', |
| 1051 |
'selectors' => [ |
| 1052 |
'{{WRAPPER}} .wdk_results_listings_slider_box .wdk_slider_arrows .wdk_lr_slider_arrow.wdk-slider-prev' => 'margin-right:{{RIGHT}}{{UNIT}}; margin-left:{{LEFT}}{{UNIT}};', |
| 1053 |
], |
| 1054 |
] |
| 1055 |
); |
| 1056 |
|
| 1057 |
$this->add_responsive_control( |
| 1058 |
'styles_carousel_arrows_icon_left', |
| 1059 |
[ |
| 1060 |
'label' => esc_html__('Icon', 'wpdirectorykit'), |
| 1061 |
'type' => Controls_Manager::ICONS, |
| 1062 |
'label_block' => true, |
| 1063 |
'default' => [ |
| 1064 |
'value' => 'fa fa-angle-left', |
| 1065 |
'library' => 'solid', |
| 1066 |
], |
| 1067 |
] |
| 1068 |
); |
| 1069 |
|
| 1070 |
$this->add_responsive_control( |
| 1071 |
'styles_carousel_arrows_icon_right_h', |
| 1072 |
[ |
| 1073 |
'label' => esc_html__('Arrow right', 'wpdirectorykit'), |
| 1074 |
'type' => Controls_Manager::HEADING, |
| 1075 |
'separator' => 'before', |
| 1076 |
] |
| 1077 |
); |
| 1078 |
|
| 1079 |
$this->add_responsive_control( |
| 1080 |
'styles_carousel_arrows_s_m_right_margin', |
| 1081 |
[ |
| 1082 |
'label' => esc_html__( 'Margin', 'wpdirectorykit' ), |
| 1083 |
'type' => Controls_Manager::DIMENSIONS, |
| 1084 |
'size_units' => [ 'px', 'em', '%' ], |
| 1085 |
'allowed_dimensions' => 'horizontal', |
| 1086 |
'selectors' => [ |
| 1087 |
'{{WRAPPER}} .wdk_results_listings_slider_box .wdk_slider_arrows .wdk_lr_slider_arrow.wdk-slider-next' => 'margin-right:{{RIGHT}}{{UNIT}}; margin-left:{{LEFT}}{{UNIT}};', |
| 1088 |
], |
| 1089 |
] |
| 1090 |
); |
| 1091 |
|
| 1092 |
$this->add_responsive_control( |
| 1093 |
'styles_carousel_arrows_icon_right', |
| 1094 |
[ |
| 1095 |
'label' => esc_html__('Icon', 'wpdirectorykit'), |
| 1096 |
'type' => Controls_Manager::ICONS, |
| 1097 |
'label_block' => true, |
| 1098 |
'default' => [ |
| 1099 |
'value' => 'fa fa-angle-right', |
| 1100 |
'library' => 'solid', |
| 1101 |
], |
| 1102 |
] |
| 1103 |
); |
| 1104 |
|
| 1105 |
$selectors = array( |
| 1106 |
'normal' => '{{WRAPPER}} .wdk_results_listings_slider_box .wdk_slider_arrows .wdk_lr_slider_arrow', |
| 1107 |
'hover'=>'{{WRAPPER}} .wdk_results_listings_slider_box .wdk_slider_arrows .wdk_lr_slider_arrow%1$s' |
| 1108 |
); |
| 1109 |
$this->generate_renders_tabs($selectors, 'styles_carousel_arrows_dynamic', ['typo','color','background','border','border_radius','padding','shadow','transition']); |
| 1110 |
|
| 1111 |
$this->end_controls_section(); |
| 1112 |
$this->start_controls_section( |
| 1113 |
'styles_carousel_dots_section', |
| 1114 |
[ |
| 1115 |
'label' => esc_html__('Section Dots', 'wpdirectorykit'), |
| 1116 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1117 |
'conditions' => [ |
| 1118 |
'terms' => [ |
| 1119 |
[ |
| 1120 |
'name' => 'layout_type', |
| 1121 |
'operator' => '==', |
| 1122 |
'value' => 'carousel', |
| 1123 |
] |
| 1124 |
], |
| 1125 |
], |
| 1126 |
] |
| 1127 |
); |
| 1128 |
|
| 1129 |
$this->add_responsive_control( |
| 1130 |
'styles_carousel_dots_hide', |
| 1131 |
[ |
| 1132 |
'label' => esc_html__( 'Hide Element', 'wpdirectorykit' ), |
| 1133 |
'type' => Controls_Manager::SWITCHER, |
| 1134 |
'none' => esc_html__( 'Hide', 'wpdirectorykit' ), |
| 1135 |
'block' => esc_html__( 'Show', 'wpdirectorykit' ), |
| 1136 |
'return_value' => 'none', |
| 1137 |
'default' => '', |
| 1138 |
'selectors' => [ |
| 1139 |
'{{WRAPPER}} .wdk_results_listings_slider_box .slick-dots' => 'display: {{VALUE}} !important;', |
| 1140 |
], |
| 1141 |
] |
| 1142 |
); |
| 1143 |
|
| 1144 |
$this->add_responsive_control( |
| 1145 |
'styles_carousel_dots_position_style', |
| 1146 |
[ |
| 1147 |
'label' => __( 'Position Style', 'wpdirectorykit' ), |
| 1148 |
'type' => \Elementor\Controls_Manager::SELECT, |
| 1149 |
'default' => 'wdk_slider_dots_out', |
| 1150 |
'options' => [ |
| 1151 |
'wdk_slider_dots_out' => __( 'Out', 'wpdirectorykit' ), |
| 1152 |
'wdk_slider_dots_in' => __( 'In', 'wpdirectorykit' ), |
| 1153 |
], |
| 1154 |
] |
| 1155 |
); |
| 1156 |
|
| 1157 |
$this->add_responsive_control( |
| 1158 |
'styles_carousel_dots_align', |
| 1159 |
[ |
| 1160 |
'label' => __( 'Position', 'wpdirectorykit' ), |
| 1161 |
'type' => Controls_Manager::CHOOSE, |
| 1162 |
'options' => [ |
| 1163 |
'left' => [ |
| 1164 |
'title' => esc_html__( 'Left', 'wpdirectorykit' ), |
| 1165 |
'icon' => 'eicon-text-align-left', |
| 1166 |
], |
| 1167 |
'center' => [ |
| 1168 |
'title' => esc_html__( 'Center', 'wpdirectorykit' ), |
| 1169 |
'icon' => 'eicon-text-align-center', |
| 1170 |
], |
| 1171 |
'right' => [ |
| 1172 |
'title' => esc_html__( 'Right', 'wpdirectorykit' ), |
| 1173 |
'icon' => 'eicon-text-align-right', |
| 1174 |
], |
| 1175 |
'justify' => [ |
| 1176 |
'title' => esc_html__( 'Justified', 'wpdirectorykit' ), |
| 1177 |
'icon' => 'eicon-text-align-justify', |
| 1178 |
], |
| 1179 |
], |
| 1180 |
'render_type' => 'ui', |
| 1181 |
'selectors_dictionary' => [ |
| 1182 |
'left' => 'justify-content: flex-start;', |
| 1183 |
'center' => 'justify-content: center;', |
| 1184 |
'right' => 'justify-content: flex-end;', |
| 1185 |
'justify' => 'justify-content: space-between;', |
| 1186 |
], |
| 1187 |
'selectors' => [ |
| 1188 |
'{{WRAPPER}} .wdk_results_listings_slider_box .slick-dots' => '{{VALUE}};', |
| 1189 |
], |
| 1190 |
] |
| 1191 |
); |
| 1192 |
|
| 1193 |
$this->add_responsive_control( |
| 1194 |
'styles_carousel_dots_icon', |
| 1195 |
[ |
| 1196 |
'label' => esc_html__('Icon', 'wpdirectorykit'), |
| 1197 |
'type' => Controls_Manager::ICONS, |
| 1198 |
'label_block' => true, |
| 1199 |
'default' => [ |
| 1200 |
'value' => 'fas fa-circle', |
| 1201 |
'library' => 'solid', |
| 1202 |
], |
| 1203 |
] |
| 1204 |
); |
| 1205 |
|
| 1206 |
$selectors = array( |
| 1207 |
'normal' => '{{WRAPPER}} .wdk_results_listings_slider_box .slick-dots li .wdk_lr_dot', |
| 1208 |
'hover'=>'{{WRAPPER}} .wdk_results_listings_slider_box .slick-dots li .wdk_lr_dot%1$s' |
| 1209 |
); |
| 1210 |
$this->generate_renders_tabs($selectors, 'styles_carousel_dots_dynamic', ['margin','color','background','border','border_radius','padding','shadow','transition','font-size','hover_animation']); |
| 1211 |
|
| 1212 |
$this->end_controls_section(); |
| 1213 |
} |
| 1214 |
|
| 1215 |
private function generate_controls_content() { |
| 1216 |
$this->start_controls_section( |
| 1217 |
'content_thumbnail_section', |
| 1218 |
[ |
| 1219 |
'label' => esc_html__('Colors', 'wpdirectorykit'), |
| 1220 |
'tab' => '1', |
| 1221 |
] |
| 1222 |
); |
| 1223 |
|
| 1224 |
$this->add_control( |
| 1225 |
'content_thumbnail_section_header', |
| 1226 |
[ |
| 1227 |
'label' => esc_html__('Color Hover Thumbnail', 'wpdirectorykit'), |
| 1228 |
'type' => Controls_Manager::HEADING, |
| 1229 |
] |
| 1230 |
); |
| 1231 |
|
| 1232 |
$this->add_responsive_control( |
| 1233 |
'content_thumbnail_section_d_background', |
| 1234 |
[ |
| 1235 |
'label' => esc_html__( 'Color', 'wpdirectorykit' ), |
| 1236 |
'description' => esc_html__( 'Set some opacity for color', 'wpdirectorykit' ), |
| 1237 |
'type' => Controls_Manager::COLOR, |
| 1238 |
'selectors' => [ |
| 1239 |
'{{WRAPPER}} .wdk-listing-card .wdk-thumbnail::before, {{WRAPPER}} .wdk-listing-card .wdk-thumbnail::after,{{WRAPPER}} .wdk-listing-card .overlay' => 'background-color: {{VALUE}};', |
| 1240 |
], |
| 1241 |
] |
| 1242 |
); |
| 1243 |
|
| 1244 |
$this->add_control( |
| 1245 |
'content_thumbnail_section_header_f', |
| 1246 |
[ |
| 1247 |
'label' => esc_html__('Shadow around Card, for Featured Listings', 'wpdirectorykit'), |
| 1248 |
'type' => Controls_Manager::HEADING, |
| 1249 |
] |
| 1250 |
); |
| 1251 |
|
| 1252 |
$this->add_group_control( |
| 1253 |
Group_Control_Box_Shadow::get_type(), |
| 1254 |
[ |
| 1255 |
'name' => 'content_thumbnail_section_d_featured', |
| 1256 |
'exclude' => [ |
| 1257 |
'field_shadow_position', |
| 1258 |
], |
| 1259 |
'selector' => '{{WRAPPER}} .wdk-listing-card.is_featured', |
| 1260 |
] |
| 1261 |
); |
| 1262 |
|
| 1263 |
$this->end_controls_section(); |
| 1264 |
$items = [ |
| 1265 |
[ |
| 1266 |
'key'=>'content_card', |
| 1267 |
'label'=> esc_html__('Card', 'wpdirectorykit'), |
| 1268 |
'selector'=>'.wdk-element .wdk-listing-card', |
| 1269 |
'options'=>'full', |
| 1270 |
], |
| 1271 |
[ |
| 1272 |
'key'=>'content_label', |
| 1273 |
'label'=> esc_html__('Over Image Top', 'wpdirectorykit'), |
| 1274 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-thumbnail .wdk-over-image-top span', |
| 1275 |
'options'=>'full', |
| 1276 |
], |
| 1277 |
[ |
| 1278 |
'key'=>'content_type', |
| 1279 |
'label'=> esc_html__('Over Image Bottom', 'wpdirectorykit'), |
| 1280 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-thumbnail .wdk-over-image-bottom', |
| 1281 |
'is_featured'=>'.wdk-element .wdk-listing-card.is_featured .wdk-thumbnail .wdk-over-image-bottom', |
| 1282 |
'options'=>'full', |
| 1283 |
], |
| 1284 |
[ |
| 1285 |
'key'=>'content_title', |
| 1286 |
'label'=> esc_html__('Title Part', 'wpdirectorykit'), |
| 1287 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-title .title', |
| 1288 |
'options'=>'full', |
| 1289 |
], |
| 1290 |
[ |
| 1291 |
'key'=>'content_description', |
| 1292 |
'label'=> esc_html__('Subtitle part', 'wpdirectorykit'), |
| 1293 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-subtitle-part', |
| 1294 |
'options'=>'full', |
| 1295 |
], |
| 1296 |
[ |
| 1297 |
'key'=>'content_items', |
| 1298 |
'label'=> esc_html__('Features part', 'wpdirectorykit'), |
| 1299 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-features-part span', |
| 1300 |
'options'=>'full', |
| 1301 |
], |
| 1302 |
[ |
| 1303 |
'key'=>'wdk-divider', |
| 1304 |
'label'=> esc_html__('Divider', 'wpdirectorykit'), |
| 1305 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-divider', |
| 1306 |
'options'=>'full', |
| 1307 |
], |
| 1308 |
[ |
| 1309 |
'key'=>'content_price', |
| 1310 |
'label'=> esc_html__('Pricing part', 'wpdirectorykit'), |
| 1311 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-footer .wdk-price', |
| 1312 |
'options'=>'full', |
| 1313 |
], |
| 1314 |
[ |
| 1315 |
'key'=>'content_button', |
| 1316 |
'label'=> esc_html__('Button Open', 'wpdirectorykit'), |
| 1317 |
'selector'=>'.wdk-element .wdk-listing-card .wdk-footer .wdk-btn', |
| 1318 |
'options'=>'full', |
| 1319 |
], |
| 1320 |
]; |
| 1321 |
|
| 1322 |
foreach ($items as $item) { |
| 1323 |
$this->start_controls_section( |
| 1324 |
$item['key'].'_section', |
| 1325 |
[ |
| 1326 |
'label' => $item['label'], |
| 1327 |
'tab' => '1', |
| 1328 |
] |
| 1329 |
); |
| 1330 |
$this->add_responsive_control( |
| 1331 |
$item['key'].'_hide', |
| 1332 |
[ |
| 1333 |
'label' => esc_html__( 'Hide Element', 'wpdirectorykit' ), |
| 1334 |
'type' => Controls_Manager::SWITCHER, |
| 1335 |
'none' => esc_html__( 'Hide', 'wpdirectorykit' ), |
| 1336 |
'block' => esc_html__( 'Show', 'wpdirectorykit' ), |
| 1337 |
'return_value' => 'none', |
| 1338 |
'default' => '', |
| 1339 |
'selectors' => [ |
| 1340 |
'{{WRAPPER}} '.$item['selector'] => 'display: {{VALUE}};', |
| 1341 |
], |
| 1342 |
] |
| 1343 |
); |
| 1344 |
$selectors = array( |
| 1345 |
'normal' => '{{WRAPPER}} '.$item['selector'], |
| 1346 |
'hover'=>'{{WRAPPER}} '.$item['selector'].'%1$s' |
| 1347 |
); |
| 1348 |
|
| 1349 |
if(isset($item['is_featured'])) { |
| 1350 |
$selectors['featured'] = '{{WRAPPER}} '.$item['is_featured']; |
| 1351 |
} |
| 1352 |
|
| 1353 |
$this->generate_renders_tabs($selectors, $item['key'].'_dynamic', $item['options']); |
| 1354 |
|
| 1355 |
/* special for some elements */ |
| 1356 |
if ($item['key'] == 'content_description') { |
| 1357 |
|
| 1358 |
$this->add_control( |
| 1359 |
'content_description_limit', |
| 1360 |
[ |
| 1361 |
'label' => __( 'Limit Line (per field)', 'wpdirectorykit' ), |
| 1362 |
'type' => \Elementor\Controls_Manager::NUMBER, |
| 1363 |
'min' => 1, |
| 1364 |
'max' => 10, |
| 1365 |
'step' => 1, |
| 1366 |
'default' => 3, |
| 1367 |
'selectors' => [ |
| 1368 |
'{{WRAPPER}} .wdk-listing-card .wdk-subtitle-part span' => '-webkit-line-clamp: {{VALUE}};', |
| 1369 |
], |
| 1370 |
] |
| 1371 |
); |
| 1372 |
|
| 1373 |
} |
| 1374 |
if($item['key'] == 'content_button') { |
| 1375 |
$this->add_control( |
| 1376 |
$item['key'].'_icon', |
| 1377 |
[ |
| 1378 |
'label' => esc_html__('Icon', 'wpdirectorykit'), |
| 1379 |
'type' => Controls_Manager::ICONS, |
| 1380 |
'label_block' => true, |
| 1381 |
'default' => [ |
| 1382 |
'value' => 'fa fa-angle-right', |
| 1383 |
'library' => 'solid', |
| 1384 |
], |
| 1385 |
] |
| 1386 |
); |
| 1387 |
$this->add_responsive_control( |
| 1388 |
$item['key'].'_text', |
| 1389 |
[ |
| 1390 |
'label' => __( 'Text of Link', 'wpdirectorykit' ), |
| 1391 |
'type' => \Elementor\Controls_Manager::TEXT, |
| 1392 |
'default' => '', |
| 1393 |
] |
| 1394 |
); |
| 1395 |
|
| 1396 |
$selectors = array( |
| 1397 |
'normal' => '{{WRAPPER}} '.$item['selector'].' i', |
| 1398 |
); |
| 1399 |
$this->generate_renders_tabs($selectors, $item['key'].'_icon_dynamic', ['margin']); |
| 1400 |
} |
| 1401 |
|
| 1402 |
if($item['key'] == 'content_label') { |
| 1403 |
$this->add_control( |
| 1404 |
$item['key'].'_parent_head', |
| 1405 |
[ |
| 1406 |
'label' => esc_html__('Parent Box', 'wpdirectorykit'), |
| 1407 |
'type' => Controls_Manager::HEADING, |
| 1408 |
'separator' => 'before', |
| 1409 |
] |
| 1410 |
); |
| 1411 |
|
| 1412 |
$selectors = array( |
| 1413 |
'normal' => '{{WRAPPER}} .wdk-element .wdk-listing-card .wdk-over-image-top', |
| 1414 |
); |
| 1415 |
$this->generate_renders_tabs($selectors, $item['key'].'_parent_dynamic', ['margin']); |
| 1416 |
} |
| 1417 |
|
| 1418 |
if($item['key'] == 'content_items') { |
| 1419 |
$this->add_control( |
| 1420 |
$item['key'].'_parent_head', |
| 1421 |
[ |
| 1422 |
'label' => esc_html__('Parent Box', 'wpdirectorykit'), |
| 1423 |
'type' => Controls_Manager::HEADING, |
| 1424 |
'separator' => 'before', |
| 1425 |
] |
| 1426 |
); |
| 1427 |
|
| 1428 |
$selectors = array( |
| 1429 |
'normal' => '{{WRAPPER}} .wdk-element .wdk-listing-card .wdk-features-part', |
| 1430 |
); |
| 1431 |
$this->generate_renders_tabs($selectors, $item['key'].'_parent_dynamic', ['margin','align']); |
| 1432 |
} |
| 1433 |
|
| 1434 |
if($item['key'] == 'content_label') { |
| 1435 |
$this->add_responsive_control( |
| 1436 |
$item['key'] .'content_label_positions_y', |
| 1437 |
[ |
| 1438 |
'label' => __( 'Position Y', 'wpdirectorykit' ), |
| 1439 |
'type' => Controls_Manager::CHOOSE, |
| 1440 |
'options' => [ |
| 1441 |
'top' => [ |
| 1442 |
'title' => esc_html__( 'Top', 'wpdirectorykit' ), |
| 1443 |
'icon' => 'eicon-text-align-top', |
| 1444 |
], |
| 1445 |
'center' => [ |
| 1446 |
'title' => esc_html__( 'Center', 'wpdirectorykit' ), |
| 1447 |
'icon' => 'eicon-text-align-center', |
| 1448 |
], |
| 1449 |
'bottom' => [ |
| 1450 |
'title' => esc_html__( 'Bottom', 'wpdirectorykit' ), |
| 1451 |
'icon' => 'eicon-text-align-bottom', |
| 1452 |
], |
| 1453 |
], |
| 1454 |
'default' => 'left', |
| 1455 |
'render_type' => 'ui', |
| 1456 |
'selectors_dictionary' => [ |
| 1457 |
'top' => 'top:0;bottom:initial', |
| 1458 |
'center' => 'top:50%;transform: translateY(-50%)', |
| 1459 |
'bottom' => 'top:initial;bottom:0', |
| 1460 |
], |
| 1461 |
'selectors' => [ |
| 1462 |
'{{WRAPPER}} .wdk-listing-card .wdk-thumbnail .wdk-over-image-top' => '{{VALUE}};', |
| 1463 |
], |
| 1464 |
] |
| 1465 |
); |
| 1466 |
|
| 1467 |
$this->add_responsive_control( |
| 1468 |
$item['key'] .'content_label_positions_x', |
| 1469 |
[ |
| 1470 |
'label' => __( 'Position X', 'wpdirectorykit' ), |
| 1471 |
'type' => Controls_Manager::CHOOSE, |
| 1472 |
'options' => [ |
| 1473 |
'left' => [ |
| 1474 |
'title' => esc_html__( 'Left', 'wpdirectorykit' ), |
| 1475 |
'icon' => 'eicon-text-align-left', |
| 1476 |
], |
| 1477 |
'center' => [ |
| 1478 |
'title' => esc_html__( 'Center', 'wpdirectorykit' ), |
| 1479 |
'icon' => 'eicon-text-align-center', |
| 1480 |
], |
| 1481 |
'right' => [ |
| 1482 |
'title' => esc_html__( 'Right', 'wpdirectorykit' ), |
| 1483 |
'icon' => 'eicon-text-align-right', |
| 1484 |
], |
| 1485 |
], |
| 1486 |
'default' => 'left', |
| 1487 |
'render_type' => 'ui', |
| 1488 |
'selectors_dictionary' => [ |
| 1489 |
'left' => 'left:0', |
| 1490 |
'center' => 'left:50%;transform: translateX(-50%)', |
| 1491 |
'right' => 'left:initial; right:0', |
| 1492 |
], |
| 1493 |
'selectors' => [ |
| 1494 |
'{{WRAPPER}} .wdk-listing-card .wdk-thumbnail .wdk-over-image-top' => '{{VALUE}};', |
| 1495 |
], |
| 1496 |
] |
| 1497 |
); |
| 1498 |
} |
| 1499 |
|
| 1500 |
if($item['key'] == 'content_type') { |
| 1501 |
$this->add_responsive_control( |
| 1502 |
$item['key'] .'content_label_positions_y', |
| 1503 |
[ |
| 1504 |
'label' => __( 'Position Y', 'wpdirectorykit' ), |
| 1505 |
'type' => Controls_Manager::CHOOSE, |
| 1506 |
'options' => [ |
| 1507 |
'top' => [ |
| 1508 |
'title' => esc_html__( 'Top', 'wpdirectorykit' ), |
| 1509 |
'icon' => 'eicon-text-align-top', |
| 1510 |
], |
| 1511 |
'center' => [ |
| 1512 |
'title' => esc_html__( 'Center', 'wpdirectorykit' ), |
| 1513 |
'icon' => 'eicon-text-align-center', |
| 1514 |
], |
| 1515 |
'bottom' => [ |
| 1516 |
'title' => esc_html__( 'Bottom', 'wpdirectorykit' ), |
| 1517 |
'icon' => 'eicon-text-align-bottom', |
| 1518 |
], |
| 1519 |
], |
| 1520 |
'default' => 'left', |
| 1521 |
'render_type' => 'ui', |
| 1522 |
'selectors_dictionary' => [ |
| 1523 |
'top' => 'top:0;bottom:initial', |
| 1524 |
'center' => 'top:50%;transform: translateY(-50%)', |
| 1525 |
'bottom' => 'top:initial;bottom:0', |
| 1526 |
], |
| 1527 |
'selectors' => [ |
| 1528 |
'{{WRAPPER}} '.$item['selector'] => '{{VALUE}};', |
| 1529 |
], |
| 1530 |
] |
| 1531 |
); |
| 1532 |
|
| 1533 |
$this->add_responsive_control( |
| 1534 |
$item['key'] .'content_label_positions_x', |
| 1535 |
[ |
| 1536 |
'label' => __( 'Position X', 'wpdirectorykit' ), |
| 1537 |
'type' => Controls_Manager::CHOOSE, |
| 1538 |
'options' => [ |
| 1539 |
'left' => [ |
| 1540 |
'title' => esc_html__( 'Left', 'wpdirectorykit' ), |
| 1541 |
'icon' => 'eicon-text-align-left', |
| 1542 |
], |
| 1543 |
'center' => [ |
| 1544 |
'title' => esc_html__( 'Center', 'wpdirectorykit' ), |
| 1545 |
'icon' => 'eicon-text-align-center', |
| 1546 |
], |
| 1547 |
'right' => [ |
| 1548 |
'title' => esc_html__( 'Right', 'wpdirectorykit' ), |
| 1549 |
'icon' => 'eicon-text-align-right', |
| 1550 |
], |
| 1551 |
'justify' => [ |
| 1552 |
'title' => esc_html__( 'Justified', 'wpdirectorykit' ), |
| 1553 |
'icon' => 'eicon-text-align-justify', |
| 1554 |
], |
| 1555 |
], |
| 1556 |
'default' => 'left', |
| 1557 |
'render_type' => 'ui', |
| 1558 |
'selectors_dictionary' => [ |
| 1559 |
'top' => 'justify-content: flex-start;', |
| 1560 |
'center' => 'justify-content: center;', |
| 1561 |
'bottom' => 'justify-content: flex-end;', |
| 1562 |
'justify' => 'justify-content: stretch;', |
| 1563 |
], |
| 1564 |
'selectors' => [ |
| 1565 |
'{{WRAPPER}} '.$item['selector'] => '{{VALUE}};', |
| 1566 |
], |
| 1567 |
] |
| 1568 |
); |
| 1569 |
} |
| 1570 |
$this->end_controls_section(); |
| 1571 |
} |
| 1572 |
|
| 1573 |
} |
| 1574 |
|
| 1575 |
public function enqueue_styles_scripts() { |
| 1576 |
wp_enqueue_style('slick'); |
| 1577 |
wp_enqueue_style('slick-theme'); |
| 1578 |
wp_enqueue_script('slick'); |
| 1579 |
|
| 1580 |
wp_enqueue_style('wdk-notify'); |
| 1581 |
wp_enqueue_script('wdk-notify'); |
| 1582 |
} |
| 1583 |
} |
| 1584 |
|