| @@ -110,29 +110,8 @@ | ||
| 110 | 110 | return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
| 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 | 114 | * Register image carousel widget controls. |
| 136 | 115 | * |
| 137 | 116 | * Adds different input fields to allow the user to change and customize the widget settings. |
| 138 | 117 | * |
| @@ -418,8 +397,18 @@ | ||
| 418 | 397 | ], |
| 419 | 398 | ] |
| 420 | 399 | ); |
| 421 | 400 | |
| 401 | + if ( ! Utils::has_pro() ) { | |
| 402 | + $this->add_control( | |
| 403 | + Utils::IMAGE_CAROUSEL . '_promotion', | |
| 404 | + [ | |
| 405 | + 'label' => esc_html__( 'Carousel PRO widget', 'elementor' ), | |
| 406 | + 'type' => Promotion_Control::TYPE, | |
| 407 | + ] | |
| 408 | + ); | |
| 409 | + } | |
| 410 | + | |
| 422 | 411 | $this->end_controls_section(); |
| 423 | 412 | |
| 424 | 413 | $this->start_controls_section( |
| 425 | 414 | 'section_additional_options', |
| @@ -843,10 +832,10 @@ | ||
| 843 | 832 | [ |
| 844 | 833 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 845 | 834 | 'type' => Controls_Manager::CHOOSE, |
| 846 | 835 | 'options' => [ |
| 847 | - 'start' => [ | |
| 848 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 836 | + 'left' => [ | |
| 837 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 849 | 838 | 'icon' => 'eicon-text-align-left', |
| 850 | 839 | ], |
| 851 | 840 | 'center' => [ |
| 852 | 841 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -851,10 +840,10 @@ | ||
| 851 | 840 | 'center' => [ |
| 852 | 841 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 853 | 842 | 'icon' => 'eicon-text-align-center', |
| 854 | 843 | ], |
| 855 | - 'end' => [ | |
| 856 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 844 | + 'right' => [ | |
| 845 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 857 | 846 | 'icon' => 'eicon-text-align-right', |
| 858 | 847 | ], |
| 859 | 848 | 'justify' => [ |
| 860 | 849 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| @@ -860,13 +849,8 @@ | ||
| 860 | 849 | 'title' => esc_html__( 'Justified', 'elementor' ), |
| 861 | 850 | 'icon' => 'eicon-text-align-justify', |
| 862 | 851 | ], |
| 863 | 852 | ], |
| 864 | - 'classes' => 'elementor-control-start-end', | |
| 865 | - 'selectors_dictionary' => [ | |
| 866 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 867 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 868 | - ], | |
| 869 | 853 | 'default' => 'center', |
| 870 | 854 | 'selectors' => [ |
| 871 | 855 | '{{WRAPPER}} .elementor-image-carousel-caption' => 'text-align: {{VALUE}};', |
| 872 | 856 | ], |
| @@ -1068,9 +1052,9 @@ | ||
| 1068 | 1052 | * |
| 1069 | 1053 | * @since 1.0.0 |
| 1070 | 1054 | * @access private |
| 1071 | 1055 | * |
| 1072 | - * @param array $attachment | |
| 1056 | + * @param array $attachment | |
| 1073 | 1057 | * @param object $instance |
| 1074 | 1058 | * |
| 1075 | 1059 | * @return array|string|false An array/string containing the attachment URL, or false if no link. |
| 1076 | 1060 | */ |
| @@ -1141,26 +1125,6 @@ | ||
| 1141 | 1125 | ]; |
| 1142 | 1126 | } |
| 1143 | 1127 | |
| 1144 | 1128 | 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[] = ' . ')'; | |
| 1163 | - } | |
| 1164 | - return implode( "\n\n", $images ); | |
| 1165 | 1129 | } |
| 1166 | 1130 | } |