PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | elementor-elements/classes/wdk-elementor-base.php +42 -32 1.3.2 → 1.5.9 View file →
@@ -29,8 +29,9 @@
29 29 protected $data = array();
30 30 protected $WMVC = NULL;
31 31
32 32 public function __construct($data = array(), $args = null) {
33 +
33 34 /* load icons for tabs in edit mode */
34 35 wp_enqueue_style( 'wdk-elementor-main', WPDIRECTORYKIT_URL. 'elementor-elements/assets/css/wdk-main.css' );
35 36
36 37 if ($this->is_edit_mode_load()) {
@@ -36,8 +37,13 @@
36 37 if ($this->is_edit_mode_load()) {
37 38 $this->enqueue_styles_scripts();
38 39 }
39 40
41 +
42 + $this->WMVC = &wdk_get_instance();
43 + $this->WMVC->model('listingfield_m');
44 + $this->WMVC->model('listing_m');
45 + $this->WMVC->load_helper('listing');
40 46 parent::__construct($data, $args);
41 47 }
42 48
43 49 /**
@@ -161,13 +167,8 @@
161 167 */
162 168 protected function render() {
163 169 $this->enqueue_styles_scripts();
164 170 $this->add_page_settings_css();
165 -
166 - $this->WMVC = &wdk_get_instance();
167 - $this->WMVC->model('listingfield_m');
168 - $this->WMVC->model('listing_m');
169 - $this->WMVC->load_helper('listing');
170 171 }
171 172
172 173
173 174 public function view($view_file = '', $element = NULL, $print = false)
@@ -224,9 +225,10 @@
224 225 case 'text': $enable_options = ['align','typo','color','background','border','border_radius','padding','shadow','transition'];
225 226 break;
226 227 case 'full': $enable_options = ['margin','align','typo','color','background','border','border_radius','padding','shadow','transition'];
227 228 break;
228 - deafult: $enable_options = ['margin','align','typo','color','background','border','border_radius','padding','shadow','transition'];
229 + default: $enable_options = ['margin','align','typo','color','background','border','border_radius','padding','shadow','transition'];
230 +
229 231 break;
230 232 }
231 233 }
232 234
@@ -349,18 +351,18 @@
349 351
350 352 $this->add_responsive_control(
351 353 $type.'_outline'.$prefix,
352 354 [
353 - 'label' => esc_html_x( 'Outline Type', 'Outline Control', 'elementor' ),
355 + 'label' => esc_html_x( 'Outline Type', 'Outline Control', 'wpdirectorykit' ),
354 356 'type' => \Elementor\Controls_Manager::SELECT,
355 357 'options' => [
356 - '' => esc_html__( 'Default', 'elementor' ),
357 - 'none' => esc_html__( 'None', 'elementor' ),
358 - 'solid' => esc_html_x( 'Solid', 'Outline Control', 'elementor' ),
359 - 'double' => esc_html_x( 'Double', 'Outline Control', 'elementor' ),
360 - 'dotted' => esc_html_x( 'Dotted', 'Outline Control', 'elementor' ),
361 - 'dashed' => esc_html_x( 'Dashed', 'Outline Control', 'elementor' ),
362 - 'groove' => esc_html_x( 'Groove', 'Outline Control', 'elementor' ),
358 + '' => esc_html__( 'Default', 'wpdirectorykit' ),
359 + 'none' => esc_html__( 'None', 'wpdirectorykit' ),
360 + 'solid' => esc_html_x( 'Solid', 'Outline Control', 'wpdirectorykit' ),
361 + 'double' => esc_html_x( 'Double', 'Outline Control', 'wpdirectorykit' ),
362 + 'dotted' => esc_html_x( 'Dotted', 'Outline Control', 'wpdirectorykit' ),
363 + 'dashed' => esc_html_x( 'Dashed', 'Outline Control', 'wpdirectorykit' ),
364 + 'groove' => esc_html_x( 'Groove', 'Outline Control', 'wpdirectorykit' ),
363 365 ],
364 366 'selectors' => [
365 367 $selector => 'outline-style: {{VALUE}};',
366 368 ],
@@ -369,9 +371,9 @@
369 371
370 372 $this->add_responsive_control(
371 373 $type.'_outline_width'.$prefix,
372 374 [
373 - 'label' => esc_html_x( 'Width', 'Outline Control', 'elementor' ),
375 + 'label' => esc_html_x( 'Width', 'Outline Control', 'wpdirectorykit' ),
374 376 'type' => \Elementor\Controls_Manager::NUMBER,
375 377 'default' => '',
376 378 'selectors' => [
377 379 $selector => 'outline-width: {{VALUE}}px;',
@@ -384,9 +386,9 @@
384 386
385 387 $this->add_responsive_control(
386 388 $type.'_outline_color'.$prefix,
387 389 [
388 - 'label' => esc_html_x( 'Color', 'Outline Control', 'elementor' ),
390 + 'label' => esc_html_x( 'Color', 'Outline Control', 'wpdirectorykit' ),
389 391 'type' => \Elementor\Controls_Manager::COLOR,
390 392 'default' => '',
391 393 'selectors' => [
392 394 $selector => 'outline-color: {{VALUE}};',
@@ -399,9 +401,9 @@
399 401
400 402 $this->add_responsive_control(
401 403 $type.'_outline_offset'.$prefix,
402 404 [
403 - 'label' => esc_html_x( 'Offset', 'Outline Control', 'elementor' ),
405 + 'label' => esc_html_x( 'Offset', 'Outline Control', 'wpdirectorykit' ),
404 406 'type' => \Elementor\Controls_Manager::NUMBER,
405 407 'default' => '',
406 408 'selectors' => [
407 409 $selector => 'outline-offset: {{VALUE}}px;',
@@ -664,17 +666,17 @@
664 666
665 667 $this->add_control(
666 668 $type.'_image_fit_control'.$prefix,
667 669 [
668 - 'label' => esc_html__( 'Fit', 'textdomain' ),
670 + 'label' => esc_html__( 'Fit', 'wpdirectorykit' ),
669 671 'type' => \Elementor\Controls_Manager::SELECT,
670 672 'options' => [
671 - '' => esc_html__( 'Default', 'textdomain' ),
672 - 'fill' => esc_html__( 'Fill', 'textdomain' ),
673 - 'contain' => esc_html__( 'Contain', 'textdomain' ),
674 - 'cover' => esc_html__( 'Cover', 'textdomain' ),
675 - 'none' => esc_html__( 'None', 'textdomain' ),
676 - 'scale-down' => esc_html__( 'Scale down', 'textdomain' ),
673 + '' => esc_html__( 'Default', 'wpdirectorykit' ),
674 + 'fill' => esc_html__( 'Fill', 'wpdirectorykit' ),
675 + 'contain' => esc_html__( 'Contain', 'wpdirectorykit' ),
676 + 'cover' => esc_html__( 'Cover', 'wpdirectorykit' ),
677 + 'none' => esc_html__( 'None', 'wpdirectorykit' ),
678 + 'scale-down' => esc_html__( 'Scale down', 'wpdirectorykit' ),
677 679 ],
678 680 'selectors' => [
679 681 $selector => 'object-fit: {{VALUE}};',
680 682 ],
@@ -682,17 +684,17 @@
682 684 );
683 685 $this->add_control(
684 686 $type.'_image_fit_control_position'.$prefix,
685 687 [
686 - 'label' => esc_html__( 'Fit Position', 'textdomain' ),
688 + 'label' => esc_html__( 'Fit Position', 'wpdirectorykit' ),
687 689 'type' => \Elementor\Controls_Manager::SELECT,
688 690 'options' => [
689 - '' => esc_html__( 'Default', 'textdomain' ),
690 - 'top' => esc_html__( 'Top', 'textdomain' ),
691 - 'bottom' => esc_html__( 'Bottom', 'textdomain' ),
692 - 'left' => esc_html__( 'Left', 'textdomain' ),
693 - 'right' => esc_html__( 'Right', 'textdomain' ),
694 - 'center' => esc_html__( 'Center', 'textdomain' ),
691 + '' => esc_html__( 'Default', 'wpdirectorykit' ),
692 + 'top' => esc_html__( 'Top', 'wpdirectorykit' ),
693 + 'bottom' => esc_html__( 'Bottom', 'wpdirectorykit' ),
694 + 'left' => esc_html__( 'Left', 'wpdirectorykit' ),
695 + 'right' => esc_html__( 'Right', 'wpdirectorykit' ),
696 + 'center' => esc_html__( 'Center', 'wpdirectorykit' ),
695 697 ],
696 698 'selectors' => [
697 699 $selector => 'object-position: {{VALUE}};',
698 700 ],
@@ -812,8 +814,12 @@
812 814 * @param $post_css Post
813 815 */
814 816 public function add_page_settings_css() {
815 817 $settings = $this->get_settings();
818 +
819 + if(!isset($settings['custom_css']))
820 + return;
821 +
816 822 $custom_css = $settings['custom_css'];
817 823 $custom_css = trim( $custom_css );
818 824
819 825 if ( empty( $custom_css ) ) {
@@ -826,8 +832,9 @@
826 832 str_replace( 'selector', '.elementor-element.elementor-element-' . $this->get_id(), $custom_css ).
827 833 '/* End custom CSS */';
828 834
829 835
836 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
830 837 echo '<style>'.wmvc_xss_clean($custom_css_file).'</style>';
831 838 }
832 839
833 840 private function break_css($css)
@@ -949,8 +956,9 @@
949 956 ],
950 957 ],
951 958 'default' => '1',
952 959 'toggle' => false,
960 + /* translators: 1: Tag with link open, 2: close link tag. */
953 961 'description' => '<span class="wdk_control_get_pro">'.wdk_sprintf(esc_html__(' %1$sGet our Addons%2$s for more awesome elements and powerful features!','wpdirectorykit'),'<a href="//wpdirectorykit.com/plugins.html" target="_blank">','</a>').'</span>'
954 962
955 963 ]
956 964 );
@@ -963,8 +971,10 @@
963 971 $this->add_inline_editing_attributes( $key, $toolbar );
964 972 foreach ($attr as $key_attr => $value_attr) {
965 973 $this->add_render_attribute( $key, $key_attr, $value_attr );
966 974 }
975 +
976 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
967 977 echo $this->get_render_attribute_string( $key );
968 978 }
969 979
970 -}
980 +}