← All changes
|
elementor-elements/classes/wdk-listing-fields-section.php
+7
-4
1.2.8
→
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">'.wdk_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,8 +284,9 @@ | ||
| 282 | 284 | 'important_note', |
| 283 | 285 | [ |
| 284 | 286 | 'label' => '', |
| 285 | 287 | 'type' => \Elementor\Controls_Manager::RAW_HTML, |
| 288 | + /* translators: 1: URL. */ | |
| 286 | 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 | ); |