← All changes
|
elementor-elements/classes/wdk-listing-fields-section.php
+12
-9
1.2.4
→
1.5.9
View file →
| @@ -137,9 +137,9 @@ | ||
| 137 | 137 | * |
| 138 | 138 | * @access protected |
| 139 | 139 | */ |
| 140 | 140 | protected function render() { |
| 141 | - parent::render(); | |
| 141 | + | |
| 142 | 142 | global $wdk_listing_id; |
| 143 | 143 | |
| 144 | 144 | $this->data['id_element'] = $this->get_id(); |
| 145 | 145 | $this->data['settings'] = $this->get_settings(); |
| @@ -162,9 +162,10 @@ | ||
| 162 | 162 | $this->data['is_edit_mode']= false; |
| 163 | 163 | if(Plugin::$instance->editor->is_edit_mode()){ |
| 164 | 164 | $this->data['is_edit_mode']= true; |
| 165 | 165 | if(empty($this->data['section_data'])){ |
| 166 | - echo '<p class="wdk_alert wdk_alert-danger">'.sprintf(esc_html__('Section #%1$s not found', 'wpdirectorykit'), $this->data['settings']['section_id']).'</p>'; | |
| 166 | + /* translators: 1: Section ID. */ | |
| 167 | + echo '<p class="wdk_alert wdk_alert-danger">'.esc_html(wdk_sprintf(esc_html__('Section #%1$s not found', 'wpdirectorykit'), $this->data['settings']['section_id'])).'</p>'; | |
| 167 | 168 | return false; |
| 168 | 169 | } |
| 169 | 170 | } else { |
| 170 | 171 | if(empty($this->data['section_data'])){ |
| @@ -190,9 +191,10 @@ | ||
| 190 | 191 | return false; |
| 191 | 192 | } |
| 192 | 193 | } |
| 193 | 194 | |
| 194 | - echo $this->view('wdk-listing-fields-section', $this->data); | |
| 195 | + $this->view('wdk-listing-fields-section', $this->data, true); | |
| 196 | + parent::render(); | |
| 195 | 197 | } |
| 196 | 198 | |
| 197 | 199 | |
| 198 | 200 | private function generate_controls_conf() { |
| @@ -216,9 +218,9 @@ | ||
| 216 | 218 | $this->add_control( |
| 217 | 219 | 'section_id', |
| 218 | 220 | [ |
| 219 | 221 | 'label' => __( 'Section id', 'wpdirectorykit' ), |
| 220 | - 'type' => \Elementor\Controls_Manager::SELECT, | |
| 222 | + 'type' => \Elementor\Controls_Manager::SELECT2, | |
| 221 | 223 | 'default' => '', |
| 222 | 224 | 'options' => $sections_list, |
| 223 | 225 | 'separator' => 'after', |
| 224 | 226 | ] |
| @@ -282,9 +284,10 @@ | ||
| 282 | 284 | 'important_note', |
| 283 | 285 | [ |
| 284 | 286 | 'label' => '', |
| 285 | 287 | 'type' => \Elementor\Controls_Manager::RAW_HTML, |
| 286 | - 'raw' => sprintf(__( 'Manager Fields <a href="%1$s" target="_blank"> open </a>', 'wpdirectorykit' ), admin_url('admin.php?page=wdk_fields')), | |
| 288 | + /* translators: 1: URL. */ | |
| 289 | + 'raw' => wdk_sprintf(__( 'Manager Fields <a href="%1$s" target="_blank"> open </a>', 'wpdirectorykit' ), admin_url('admin.php?page=wdk_fields')), | |
| 287 | 290 | 'content_classes' => 'wdk_elementor_hint', |
| 288 | 291 | ] |
| 289 | 292 | ); |
| 290 | 293 | |
| @@ -447,9 +450,9 @@ | ||
| 447 | 450 | 'right' => 'justify-content: flex-end;', |
| 448 | 451 | 'justify' => 'justify-content: space-between;', |
| 449 | 452 | ], |
| 450 | 453 | 'selectors' => [ |
| 451 | - '{{WRAPPER}} .wdk-listing-fields-section .wdk-col' => '{{VALUE}};', | |
| 454 | + '{{WRAPPER}} .wdk-listing-fields-section .wdk-col .field-group' => '{{VALUE}};', | |
| 452 | 455 | ], |
| 453 | 456 | 'conditions' => [ |
| 454 | 457 | 'terms' => [ |
| 455 | 458 | [ |
| @@ -492,9 +495,9 @@ | ||
| 492 | 495 | 'right' => 'justify-content: flex-start;', |
| 493 | 496 | 'justify' => 'justify-content: space-between;', |
| 494 | 497 | ], |
| 495 | 498 | 'selectors' => [ |
| 496 | - '{{WRAPPER}} .wdk-listing-fields-section .wdk-col' => '{{VALUE}};', | |
| 499 | + '{{WRAPPER}} .wdk-listing-fields-section .wdk-col .field-group' => '{{VALUE}};', | |
| 497 | 500 | ], |
| 498 | 501 | 'conditions' => [ |
| 499 | 502 | 'terms' => [ |
| 500 | 503 | [ |
| @@ -533,9 +536,9 @@ | ||
| 533 | 536 | 'center' => 'align-items: center;', |
| 534 | 537 | 'right' => 'align-items: flex-end;', |
| 535 | 538 | ], |
| 536 | 539 | 'selectors' => [ |
| 537 | - '{{WRAPPER}} .wdk-listing-fields-section .wdk-col' => '{{VALUE}};', | |
| 540 | + '{{WRAPPER}} .wdk-listing-fields-section .wdk-col .field-group' => '{{VALUE}};', | |
| 538 | 541 | ], |
| 539 | 542 | 'conditions' => [ |
| 540 | 543 | 'terms' => [ |
| 541 | 544 | [ |
| @@ -572,9 +575,9 @@ | ||
| 572 | 575 | 'default' => 'yes', |
| 573 | 576 | ] |
| 574 | 577 | ); |
| 575 | 578 | |
| 576 | - $this->add_responsive_control ( | |
| 579 | + $this->add_responsive_control ( | |
| 577 | 580 | 'field_group_icon_max_heigth', |
| 578 | 581 | [ |
| 579 | 582 | 'label' => esc_html__('Max Height', 'wpdirectorykit'), |
| 580 | 583 | 'type' => Controls_Manager::SLIDER, |