PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.4
Elementor Website Builder – more than just a page builder v3.26.4
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/widgets/image-carousel.php +15 -65 4.1.13.26.4 View file →
@@ -91,48 +91,13 @@
91 91 public function get_style_depends(): array {
92 92 return [ 'e-swiper', 'widget-image-carousel' ];
93 93 }
94 94
95 - /**
96 - * Get script dependencies.
97 - *
98 - * Retrieve the list of script dependencies the widget requires.
99 - *
100 - * @since 3.27.0
101 - * @access public
102 - *
103 - * @return array Widget script dependencies.
104 - */
105 - public function get_script_depends(): array {
106 - return [ 'swiper' ];
107 - }
108 -
109 95 public function has_widget_inner_wrapper(): bool {
110 96 return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
111 97 }
112 98
113 99 /**
114 - * Get widget upsale data.
115 - *
116 - * Retrieve the widget promotion data.
117 - *
118 - * @since 3.18.0
119 - * @access protected
120 - *
121 - * @return array Widget promotion data.
122 - */
123 - protected function get_upsale_data() {
124 - return [
125 - 'condition' => ! Utils::has_pro(),
126 - 'image' => esc_url( ELEMENTOR_ASSETS_URL . 'images/go-pro.svg' ),
127 - 'image_alt' => esc_attr__( 'Upgrade', 'elementor' ),
128 - 'description' => esc_html__( 'Gain complete freedom to design every slide with Elementor"s Pro Carousel.', 'elementor' ),
129 - 'upgrade_url' => esc_url( 'https://go.elementor.com/go-pro-image-carousel-widget/' ),
130 - 'upgrade_text' => esc_html__( 'Upgrade Now', 'elementor' ),
131 - ];
132 - }
133 -
134 - /**
135 100 * Register image carousel widget controls.
136 101 *
137 102 * Adds different input fields to allow the user to change and customize the widget settings.
138 103 *
@@ -418,8 +383,18 @@
418 383 ],
419 384 ]
420 385 );
421 386
387 + if ( ! Utils::has_pro() ) {
388 + $this->add_control(
389 + Utils::IMAGE_CAROUSEL . '_promotion',
390 + [
391 + 'label' => esc_html__( 'Carousel PRO widget', 'elementor' ),
392 + 'type' => Promotion_Control::TYPE,
393 + ]
394 + );
395 + }
396 +
422 397 $this->end_controls_section();
423 398
424 399 $this->start_controls_section(
425 400 'section_additional_options',
@@ -843,10 +818,10 @@
843 818 [
844 819 'label' => esc_html__( 'Alignment', 'elementor' ),
845 820 'type' => Controls_Manager::CHOOSE,
846 821 'options' => [
847 - 'start' => [
848 - 'title' => esc_html__( 'Start', 'elementor' ),
822 + 'left' => [
823 + 'title' => esc_html__( 'Left', 'elementor' ),
849 824 'icon' => 'eicon-text-align-left',
850 825 ],
851 826 'center' => [
852 827 'title' => esc_html__( 'Center', 'elementor' ),
@@ -851,10 +826,10 @@
851 826 'center' => [
852 827 'title' => esc_html__( 'Center', 'elementor' ),
853 828 'icon' => 'eicon-text-align-center',
854 829 ],
855 - 'end' => [
856 - 'title' => esc_html__( 'End', 'elementor' ),
830 + 'right' => [
831 + 'title' => esc_html__( 'Right', 'elementor' ),
857 832 'icon' => 'eicon-text-align-right',
858 833 ],
859 834 'justify' => [
860 835 'title' => esc_html__( 'Justified', 'elementor' ),
@@ -860,13 +835,8 @@
860 835 'title' => esc_html__( 'Justified', 'elementor' ),
861 836 'icon' => 'eicon-text-align-justify',
862 837 ],
863 838 ],
864 - 'classes' => 'elementor-control-start-end',
865 - 'selectors_dictionary' => [
866 - 'left' => is_rtl() ? 'end' : 'start',
867 - 'right' => is_rtl() ? 'start' : 'end',
868 - ],
869 839 'default' => 'center',
870 840 'selectors' => [
871 841 '{{WRAPPER}} .elementor-image-carousel-caption' => 'text-align: {{VALUE}};',
872 842 ],
@@ -1068,9 +1038,9 @@
1068 1038 *
1069 1039 * @since 1.0.0
1070 1040 * @access private
1071 1041 *
1072 - * @param array $attachment
1042 + * @param array $attachment
1073 1043 * @param object $instance
1074 1044 *
1075 1045 * @return array|string|false An array/string containing the attachment URL, or false if no link.
1076 1046 */
@@ -1141,26 +1111,6 @@
1141 1111 ];
1142 1112 }
1143 1113
1144 1114 Icons_Manager::render_icon( $icon_settings, [ 'aria-hidden' => 'true' ] );
1145 - }
1146 -
1147 - public function render_markdown(): string {
1148 - $settings = $this->get_settings_for_display();
1149 - if ( empty( $settings['carousel'] ) ) {
1150 - return '';
1151 - }
1152 - $images = [];
1153 - foreach ( $settings['carousel'] as $item ) {
1154 - $url = $item['url'] ?? '';
1155 - if ( empty( $url ) ) {
1156 - continue;
1157 - }
1158 - $alt = '';
1159 - if ( ! empty( $item['id'] ) ) {
1160 - $alt = get_post_meta( $item['id'], '_wp_attachment_image_alt', true );
1161 - }
1162 - $images[] = '![' . $alt . '](' . esc_url( $url ) . ')';
1163 - }
1164 - return implode( "\n\n", $images );
1165 1115 }
1166 1116 }