Adv_Accordion.php
2 months ago
Adv_Tabs.php
2 months ago
Advanced_Data_Table.php
2 weeks ago
Better_Payment.php
4 years ago
Betterdocs_Category_Box.php
3 months ago
Betterdocs_Category_Grid.php
3 months ago
Betterdocs_Search_Form.php
2 months ago
Breadcrumbs.php
2 months ago
Business_Reviews.php
6 days ago
Caldera_Forms.php
2 months ago
Career_Page.php
4 years ago
Code_Snippet.php
4 months ago
Contact_Form_7.php
2 months ago
Content_Ticker.php
4 months ago
Countdown.php
2 months ago
Creative_Button.php
1 month ago
Cta_Box.php
2 months ago
Data_Table.php
2 months ago
Dual_Color_Header.php
6 days ago
EmbedPress.php
4 years ago
Event_Calendar.php
1 week ago
Facebook_Feed.php
4 months ago
Fancy_Text.php
2 months ago
Feature_List.php
4 months ago
Filterable_Gallery.php
6 days ago
Flip_Box.php
2 months ago
FluentForm.php
2 months ago
Formstack.php
2 months ago
GravityForms.php
6 days ago
Image_Accordion.php
2 months ago
Info_Box.php
6 days ago
Interactive_Circle.php
2 months ago
Login_Register.php
6 days ago
NFT_Gallery.php
4 months ago
NinjaForms.php
2 months ago
Post_Grid.php
4 months ago
Post_Timeline.php
10 months ago
Pricing_Table.php
2 months ago
Product_Grid.php
3 weeks ago
Progress_Bar.php
2 months ago
SVG_Draw.php
4 months ago
Simple_Menu.php
6 days ago
Sticky_Video.php
4 months ago
Team_Member.php
4 months ago
Testimonial.php
2 months ago
Tooltip.php
2 months ago
Twitter_Feed.php
4 months ago
TypeForm.php
5 months ago
WeForms.php
1 year ago
Woo_Add_To_Cart.php
2 months ago
Woo_Cart.php
4 months ago
Woo_Checkout.php
4 months ago
Woo_Product_Carousel.php
1 month ago
Woo_Product_Compare.php
1 year ago
Woo_Product_Gallery.php
4 months ago
Woo_Product_Images.php
1 month ago
Woo_Product_List.php
2 months ago
Woo_Product_Price.php
2 months ago
Woo_Product_Rating.php
2 months ago
WpForms.php
2 months ago
index.php
3 years ago
Testimonial.php
1128 lines
| 1 | <?php |
| 2 | namespace Essential_Addons_Elementor\Elements; |
| 3 | |
| 4 | // If this file is called directly, abort. |
| 5 | if (!defined('ABSPATH')) { |
| 6 | exit; |
| 7 | } |
| 8 | |
| 9 | use \Elementor\Controls_Manager; |
| 10 | use \Elementor\Group_Control_Border; |
| 11 | use \Elementor\Group_Control_Image_Size; |
| 12 | use \Elementor\Group_Control_Typography; |
| 13 | use \Elementor\Utils; |
| 14 | use \Elementor\Widget_Base; |
| 15 | use Essential_Addons_Elementor\Classes\Helper as HelperClass; |
| 16 | |
| 17 | class Testimonial extends Widget_Base { |
| 18 | |
| 19 | public function get_name() { |
| 20 | return 'eael-testimonial'; |
| 21 | } |
| 22 | |
| 23 | public function get_title() { |
| 24 | return esc_html__( 'Testimonial', 'essential-addons-for-elementor-lite'); |
| 25 | } |
| 26 | |
| 27 | public function get_icon() { |
| 28 | return 'eaicon-testimonial'; |
| 29 | } |
| 30 | |
| 31 | public function get_categories() { |
| 32 | return [ 'essential-addons-elementor' ]; |
| 33 | } |
| 34 | |
| 35 | public function get_keywords() |
| 36 | { |
| 37 | return [ |
| 38 | 'testimonial', |
| 39 | 'ea testimonial', |
| 40 | 'ea testimonials', |
| 41 | 'testimony', |
| 42 | 'review', |
| 43 | 'endorsement', |
| 44 | 'recommendation', |
| 45 | 'reference', |
| 46 | 'appreciation', |
| 47 | 'feedback', |
| 48 | 'star rating', |
| 49 | 'social proof', |
| 50 | 'ea', |
| 51 | 'essential addons' |
| 52 | ]; |
| 53 | } |
| 54 | |
| 55 | protected function is_dynamic_content():bool { |
| 56 | return false; |
| 57 | } |
| 58 | |
| 59 | public function has_widget_inner_wrapper(): bool { |
| 60 | return ! HelperClass::eael_e_optimized_markup(); |
| 61 | } |
| 62 | |
| 63 | public function get_custom_help_url() |
| 64 | { |
| 65 | return 'https://essential-addons.com/elementor/docs/testimonials/'; |
| 66 | } |
| 67 | |
| 68 | public function get_style_depends() |
| 69 | { |
| 70 | return [ |
| 71 | 'font-awesome-5-all', |
| 72 | 'font-awesome-4-shim', |
| 73 | ]; |
| 74 | } |
| 75 | |
| 76 | public function get_script_depends() |
| 77 | { |
| 78 | return [ |
| 79 | 'font-awesome-4-shim' |
| 80 | ]; |
| 81 | } |
| 82 | |
| 83 | |
| 84 | protected function register_controls() { |
| 85 | |
| 86 | $this->start_controls_section( |
| 87 | 'eael_section_testimonial_Layouts', |
| 88 | [ |
| 89 | 'label' => esc_html__( 'Layout', 'essential-addons-for-elementor-lite'), |
| 90 | ] |
| 91 | ); |
| 92 | |
| 93 | $image_path = EAEL_PLUGIN_URL . 'assets/admin/images/layout-previews/testimonial-'; |
| 94 | $this->add_control( |
| 95 | 'eael_testimonial_style', |
| 96 | [ |
| 97 | 'label' => esc_html__( 'Skin', 'essential-addons-for-elementor-lite' ), |
| 98 | 'type' => Controls_Manager::CHOOSE, |
| 99 | 'options' => [ |
| 100 | 'default-style' => [ |
| 101 | 'title' => esc_html__('Default', 'essential-addons-for-elementor-lite'), |
| 102 | 'image' => $image_path . 'default-style.png' |
| 103 | ], |
| 104 | 'classic-style' => [ |
| 105 | 'title' => esc_html__('Classic', 'essential-addons-for-elementor-lite'), |
| 106 | 'image' => $image_path . 'classic-style.png' |
| 107 | ], |
| 108 | 'middle-style' => [ |
| 109 | 'title' => esc_html__('Content | Icon/Image | Bio', 'essential-addons-for-elementor-lite'), |
| 110 | 'image' => $image_path . 'middle-style.png' |
| 111 | ], |
| 112 | 'icon-img-left-content' => [ |
| 113 | 'title' => esc_html__('Icon/Image | Content', 'essential-addons-for-elementor-lite'), |
| 114 | 'image' => $image_path . 'icon-img-left-content.png' |
| 115 | ], |
| 116 | 'icon-img-right-content' => [ |
| 117 | 'title' => esc_html__('Content | Icon/Image', 'essential-addons-for-elementor-lite'), |
| 118 | 'image' => $image_path . 'icon-img-right-content.png' |
| 119 | ], |
| 120 | 'content-top-icon-title-inline' => [ |
| 121 | 'title' => esc_html__('Content Top | Icon Title Inline', 'essential-addons-for-elementor-lite'), |
| 122 | 'image' => $image_path . 'content-bottom-icon-title-inline.png' |
| 123 | ], |
| 124 | 'content-bottom-icon-title-inline' => [ |
| 125 | 'title' => esc_html__('Content Bottom | Icon Title Inline', 'essential-addons-for-elementor-lite'), |
| 126 | 'image' => $image_path . 'content-top-icon-title-inline.png' |
| 127 | ], |
| 128 | 'simple-layout' => [ |
| 129 | 'title' => esc_html__('Simple Layout', 'essential-addons-for-elementor-lite'), |
| 130 | 'image' => $image_path . 'icon-img-left-content.png' |
| 131 | ], |
| 132 | ], |
| 133 | 'default' => 'default-style', |
| 134 | 'label_block' => true, |
| 135 | 'toggle' => false, |
| 136 | 'image_choose'=> true, |
| 137 | ] |
| 138 | ); |
| 139 | |
| 140 | $this->end_controls_section(); |
| 141 | |
| 142 | $this->start_controls_section( |
| 143 | 'eael_section_testimonial_image', |
| 144 | [ |
| 145 | 'label' => esc_html__( 'Image', 'essential-addons-for-elementor-lite') |
| 146 | ] |
| 147 | ); |
| 148 | |
| 149 | $this->add_control( |
| 150 | 'eael_testimonial_enable_avatar', |
| 151 | [ |
| 152 | 'label' => esc_html__( 'Display Avatar?', 'essential-addons-for-elementor-lite'), |
| 153 | 'type' => Controls_Manager::SWITCHER, |
| 154 | 'default' => 'yes', |
| 155 | ] |
| 156 | ); |
| 157 | |
| 158 | $this->add_control( |
| 159 | 'image', |
| 160 | [ |
| 161 | 'label' => '', |
| 162 | 'type' => Controls_Manager::MEDIA, |
| 163 | 'default' => [ |
| 164 | 'url' => Utils::get_placeholder_image_src(), |
| 165 | ], |
| 166 | 'condition' => [ |
| 167 | 'eael_testimonial_enable_avatar' => 'yes', |
| 168 | ], |
| 169 | 'ai' => [ |
| 170 | 'active' => false, |
| 171 | ], |
| 172 | ] |
| 173 | ); |
| 174 | |
| 175 | |
| 176 | $this->add_group_control( |
| 177 | Group_Control_Image_Size::get_type(), |
| 178 | [ |
| 179 | 'name' => 'image', |
| 180 | 'default' => 'thumbnail', |
| 181 | 'condition' => [ |
| 182 | 'image[url]!' => '', |
| 183 | 'eael_testimonial_enable_avatar' => 'yes', |
| 184 | ], |
| 185 | ] |
| 186 | ); |
| 187 | |
| 188 | $this->end_controls_section(); |
| 189 | |
| 190 | $this->start_controls_section( |
| 191 | 'eael_section_testimonial_content', |
| 192 | [ |
| 193 | 'label' => esc_html__( 'Content', 'essential-addons-for-elementor-lite') |
| 194 | ] |
| 195 | ); |
| 196 | |
| 197 | $this->add_control( |
| 198 | 'eael_testimonial_name', |
| 199 | [ |
| 200 | 'label' => esc_html__( 'User Name', 'essential-addons-for-elementor-lite'), |
| 201 | 'type' => Controls_Manager::TEXT, |
| 202 | 'default' => esc_html__( 'John Doe', 'essential-addons-for-elementor-lite'), |
| 203 | 'dynamic' => [ 'active' => true ], |
| 204 | 'ai' => [ |
| 205 | 'active' => true, |
| 206 | ], |
| 207 | ] |
| 208 | ); |
| 209 | |
| 210 | $this->add_control( |
| 211 | 'eael_testimonial_company_title', |
| 212 | [ |
| 213 | 'label' => esc_html__( 'Company Name', 'essential-addons-for-elementor-lite'), |
| 214 | 'type' => Controls_Manager::TEXT, |
| 215 | 'default' => esc_html__( 'Codetic', 'essential-addons-for-elementor-lite'), |
| 216 | 'dynamic' => [ 'active' => true ], |
| 217 | 'ai' => [ |
| 218 | 'active' => true, |
| 219 | ], |
| 220 | ] |
| 221 | ); |
| 222 | |
| 223 | $this->add_control( |
| 224 | 'eael_testimonial_description', |
| 225 | [ |
| 226 | 'label' => esc_html__( 'Description', 'essential-addons-for-elementor-lite'), |
| 227 | 'type' => Controls_Manager::WYSIWYG, |
| 228 | 'default' => esc_html__( 'Add testimonial description here. Edit and place your own text.', 'essential-addons-for-elementor-lite'), |
| 229 | ] |
| 230 | ); |
| 231 | |
| 232 | $this->add_responsive_control( |
| 233 | 'content_height', |
| 234 | [ |
| 235 | 'label' => esc_html__( 'Height', 'essential-addons-for-elementor-lite'), |
| 236 | 'type' => Controls_Manager::SLIDER, |
| 237 | 'size_units' => ['px', '%', 'em'], |
| 238 | 'range' => [ |
| 239 | 'px' => [ 'max' => 300 ], |
| 240 | '%' => [ 'max' => 100 ] |
| 241 | ], |
| 242 | 'selectors' => [ |
| 243 | '{{WRAPPER}} .eael-testimonial-content' => 'height: {{SIZE}}{{UNIT}};', |
| 244 | ], |
| 245 | ] |
| 246 | ); |
| 247 | |
| 248 | $this->add_control( |
| 249 | 'eael_testimonial_show_quote', |
| 250 | [ |
| 251 | 'label' => esc_html__( 'Display Quote?', 'essential-addons-for-elementor-lite'), |
| 252 | 'type' => Controls_Manager::SWITCHER, |
| 253 | 'default' => 'yes', |
| 254 | ] |
| 255 | ); |
| 256 | |
| 257 | $this->add_control( |
| 258 | 'eael_testimonial_enable_rating', |
| 259 | [ |
| 260 | 'label' => esc_html__( 'Display Rating?', 'essential-addons-for-elementor-lite'), |
| 261 | 'type' => Controls_Manager::SWITCHER, |
| 262 | 'default' => 'yes', |
| 263 | ] |
| 264 | ); |
| 265 | |
| 266 | $this->add_control( |
| 267 | 'eael_testimonial_rating_number', |
| 268 | [ |
| 269 | 'label' => __( 'Rating Number', 'essential-addons-for-elementor-lite'), |
| 270 | 'type' => Controls_Manager::SELECT, |
| 271 | 'default' => 'rating-five', |
| 272 | 'options' => [ |
| 273 | 'rating-one' => __( '1', 'essential-addons-for-elementor-lite'), |
| 274 | 'rating-two' => __( '2', 'essential-addons-for-elementor-lite'), |
| 275 | 'rating-three' => __( '3', 'essential-addons-for-elementor-lite'), |
| 276 | 'rating-four' => __( '4', 'essential-addons-for-elementor-lite'), |
| 277 | 'rating-five' => __( '5', 'essential-addons-for-elementor-lite'), |
| 278 | ], |
| 279 | 'condition' => [ |
| 280 | 'eael_testimonial_enable_rating' => 'yes', |
| 281 | ], |
| 282 | ] |
| 283 | ); |
| 284 | |
| 285 | |
| 286 | $this->add_control( |
| 287 | 'eael_testimonial_rating_position', |
| 288 | [ |
| 289 | 'label' => esc_html__( 'Rating Position', 'essential-addons-for-elementor-lite' ), |
| 290 | 'type' => Controls_Manager::CHOOSE, |
| 291 | 'options' => [ |
| 292 | 'default' => [ |
| 293 | 'title' => esc_html__( 'Default', 'essential-addons-for-elementor-lite' ), |
| 294 | 'icon' => 'eicon-align-start-h', |
| 295 | ], |
| 296 | 'top' => [ |
| 297 | 'title' => esc_html__( 'Top', 'essential-addons-for-elementor-lite' ), |
| 298 | 'icon' => 'eicon-v-align-top', |
| 299 | ], |
| 300 | ], |
| 301 | 'default' => 'default', |
| 302 | 'toggle' => false, |
| 303 | 'condition' => [ |
| 304 | 'eael_testimonial_enable_rating' => 'yes', |
| 305 | ], |
| 306 | ] |
| 307 | ); |
| 308 | |
| 309 | $this->end_controls_section(); |
| 310 | |
| 311 | |
| 312 | if(!apply_filters('eael/pro_enabled', false)) { |
| 313 | $this->start_controls_section( |
| 314 | 'eael_section_pro', |
| 315 | [ |
| 316 | 'label' => __( 'Go Premium for More Features', 'essential-addons-for-elementor-lite') |
| 317 | ] |
| 318 | ); |
| 319 | |
| 320 | $this->add_control( |
| 321 | 'eael_control_get_pro', |
| 322 | [ |
| 323 | 'label' => __( 'Unlock more possibilities', 'essential-addons-for-elementor-lite'), |
| 324 | 'type' => Controls_Manager::CHOOSE, |
| 325 | 'options' => [ |
| 326 | '1' => [ |
| 327 | 'title' => '', |
| 328 | 'icon' => 'fa fa-unlock-alt', |
| 329 | ], |
| 330 | ], |
| 331 | 'default' => '1', |
| 332 | 'description' => '<span class="pro-feature"> Get the <a href="https://wpdeveloper.com/upgrade/ea-pro" target="_blank">Pro version</a> for more stunning elements and customization options.</span>' |
| 333 | ] |
| 334 | ); |
| 335 | |
| 336 | $this->end_controls_section(); |
| 337 | } |
| 338 | |
| 339 | |
| 340 | $this->start_controls_section( |
| 341 | 'eael_section_testimonial_styles_general', |
| 342 | [ |
| 343 | 'label' => esc_html__( 'Testimonial', 'essential-addons-for-elementor-lite'), |
| 344 | 'tab' => Controls_Manager::TAB_STYLE |
| 345 | ] |
| 346 | ); |
| 347 | |
| 348 | $this->add_control( |
| 349 | 'eael_testimonial_is_gradient_background', |
| 350 | [ |
| 351 | 'label' => __('Gradient Background', 'essential-addons-for-elementor-lite'), |
| 352 | 'type' => Controls_Manager::SWITCHER, |
| 353 | 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'), |
| 354 | 'label_off' => __('No', 'essential-addons-for-elementor-lite'), |
| 355 | 'return_value' => 'yes', |
| 356 | ] |
| 357 | ); |
| 358 | |
| 359 | $this->add_control( |
| 360 | 'eael_testimonial_background', |
| 361 | [ |
| 362 | 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'), |
| 363 | 'type' => Controls_Manager::COLOR, |
| 364 | 'default' => '', |
| 365 | 'selectors' => [ |
| 366 | '{{WRAPPER}} .eael-testimonial-item' => 'background-color: {{VALUE}};', |
| 367 | ], |
| 368 | 'condition' => [ |
| 369 | 'eael_testimonial_is_gradient_background' => '' |
| 370 | ] |
| 371 | ] |
| 372 | ); |
| 373 | |
| 374 | $this->add_group_control( |
| 375 | \Elementor\Group_Control_Background::get_type(), |
| 376 | [ |
| 377 | 'name' => 'eael_testimonial_gradient_background', |
| 378 | 'label' => __('Gradient Background', 'essential-addons-for-elementor-lite'), |
| 379 | 'types' => ['classic', 'gradient'], |
| 380 | 'selector' => '{{WRAPPER}} .eael-testimonial-item', |
| 381 | 'condition' => [ |
| 382 | 'eael_testimonial_is_gradient_background' => 'yes' |
| 383 | ] |
| 384 | ] |
| 385 | ); |
| 386 | |
| 387 | $this->add_control( |
| 388 | 'eael_testimonial_alignment', |
| 389 | [ |
| 390 | 'label' => esc_html__( 'Content Alignment', 'essential-addons-for-elementor-lite'), |
| 391 | 'type' => Controls_Manager::CHOOSE, |
| 392 | 'label_block' => true, |
| 393 | 'options' => [ |
| 394 | 'default' => [ |
| 395 | 'title' => __( 'Default', 'essential-addons-for-elementor-lite'), |
| 396 | 'icon' => 'eicon-ban', |
| 397 | ], |
| 398 | 'left' => [ |
| 399 | 'title' => esc_html__( 'Left', 'essential-addons-for-elementor-lite'), |
| 400 | 'icon' => 'eicon-text-align-left', |
| 401 | ], |
| 402 | 'center' => [ |
| 403 | 'title' => esc_html__( 'Center', 'essential-addons-for-elementor-lite'), |
| 404 | 'icon' => 'eicon-text-align-center', |
| 405 | ], |
| 406 | 'right' => [ |
| 407 | 'title' => esc_html__( 'Right', 'essential-addons-for-elementor-lite'), |
| 408 | 'icon' => 'eicon-text-align-right', |
| 409 | ], |
| 410 | ], |
| 411 | 'default' => 'default', |
| 412 | 'selectors' => [ |
| 413 | '{{WRAPPER}} .eael-testimonial-content' => 'text-align: {{VALUE}};', |
| 414 | '{{WRAPPER}} .eael-testimonial-image' => 'text-align: {{VALUE}};', |
| 415 | ], |
| 416 | ] |
| 417 | ); |
| 418 | |
| 419 | $this->add_control( |
| 420 | 'eael_testimonial_user_display_block', |
| 421 | [ |
| 422 | 'label' => esc_html__( 'User & Company Line Break', 'essential-addons-for-elementor-lite'), |
| 423 | 'type' => Controls_Manager::SWITCHER, |
| 424 | 'return_value' => 'yes', |
| 425 | 'default' => '', |
| 426 | 'condition' => [ |
| 427 | 'eael_testimonial_style!' => 'simple-layout' |
| 428 | ] |
| 429 | ] |
| 430 | ); |
| 431 | |
| 432 | $this->add_group_control( |
| 433 | Group_Control_Border::get_type(), |
| 434 | [ |
| 435 | 'name' => 'eael_testimonial_border', |
| 436 | 'selector' => '{{WRAPPER}} .eael-testimonial-item', |
| 437 | ] |
| 438 | ); |
| 439 | |
| 440 | $this->add_responsive_control( |
| 441 | 'eael_testimonial_border_radius', |
| 442 | [ |
| 443 | 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), |
| 444 | 'type' => Controls_Manager::DIMENSIONS, |
| 445 | 'size_units' => [ 'px', '%', 'em', 'rem' ], |
| 446 | 'selectors' => [ |
| 447 | '{{WRAPPER}} .eael-testimonial-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 448 | ], |
| 449 | ] |
| 450 | ); |
| 451 | |
| 452 | $this->add_responsive_control( |
| 453 | 'eael_testimonial_margin', |
| 454 | [ |
| 455 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), |
| 456 | 'type' => Controls_Manager::DIMENSIONS, |
| 457 | 'size_units' => [ 'px', '%', 'em', 'rem' ], |
| 458 | 'selectors' => [ |
| 459 | '{{WRAPPER}} .eael-testimonial-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 460 | ], |
| 461 | ] |
| 462 | ); |
| 463 | |
| 464 | $this->add_responsive_control( |
| 465 | 'eael_testimonial_padding', |
| 466 | [ |
| 467 | 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), |
| 468 | 'type' => Controls_Manager::DIMENSIONS, |
| 469 | 'size_units' => [ 'px', '%', 'em', 'rem' ], |
| 470 | 'selectors' => [ |
| 471 | '{{WRAPPER}} .eael-testimonial-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 472 | ], |
| 473 | ] |
| 474 | ); |
| 475 | |
| 476 | $this->end_controls_section(); |
| 477 | |
| 478 | |
| 479 | $this->start_controls_section( |
| 480 | 'eael_section_testimonial_image_styles', |
| 481 | [ |
| 482 | 'label' => esc_html__( 'Image', 'essential-addons-for-elementor-lite'), |
| 483 | 'tab' => Controls_Manager::TAB_STYLE, |
| 484 | 'condition' => [ |
| 485 | 'eael_testimonial_enable_avatar' => 'yes' |
| 486 | ] |
| 487 | ] |
| 488 | ); |
| 489 | |
| 490 | $this->add_responsive_control( |
| 491 | 'eael_testimonial_image_width', |
| 492 | [ |
| 493 | 'label' => esc_html__( 'Width', 'essential-addons-for-elementor-lite'), |
| 494 | 'type' => Controls_Manager::SLIDER, |
| 495 | 'default' => [ |
| 496 | 'size' => 150, |
| 497 | 'unit' => 'px', |
| 498 | ], |
| 499 | 'range' => [ |
| 500 | '%' => [ |
| 501 | 'min' => 0, |
| 502 | 'max' => 100, |
| 503 | ], |
| 504 | 'px' => [ |
| 505 | 'min' => 0, |
| 506 | 'max' => 1000, |
| 507 | ], |
| 508 | ], |
| 509 | 'size_units' => [ '%', 'px' ], |
| 510 | 'selectors' => [ |
| 511 | '{{WRAPPER}} .eael-testimonial-image figure > img' => 'width:{{SIZE}}{{UNIT}};', |
| 512 | ], |
| 513 | ] |
| 514 | ); |
| 515 | |
| 516 | $this->add_responsive_control( |
| 517 | 'eael_testimonial_image_height', |
| 518 | [ |
| 519 | 'label' => esc_html__( 'Image Height', 'essential-addons-for-elementor-lite'), |
| 520 | 'type' => Controls_Manager::SLIDER, |
| 521 | 'range' => [ |
| 522 | '%' => [ |
| 523 | 'min' => 0, |
| 524 | 'max' => 100, |
| 525 | ], |
| 526 | 'px' => [ |
| 527 | 'min' => 0, |
| 528 | 'max' => 1000, |
| 529 | ], |
| 530 | ], |
| 531 | 'size_units' => [ '%', 'px' ], |
| 532 | 'selectors' => [ |
| 533 | '{{WRAPPER}} .eael-testimonial-image figure > img' => 'height: {{SIZE}}{{UNIT}};', |
| 534 | ], |
| 535 | ] |
| 536 | ); |
| 537 | |
| 538 | $this->add_responsive_control( |
| 539 | 'eael_testimonial_max_image_width', |
| 540 | [ |
| 541 | 'label' => esc_html__( 'Max Width', 'essential-addons-for-elementor-lite'), |
| 542 | 'type' => Controls_Manager::SLIDER, |
| 543 | 'default' => [ |
| 544 | 'size' => 100, |
| 545 | 'unit' => '%', |
| 546 | ], |
| 547 | 'range' => [ |
| 548 | '%' => [ |
| 549 | 'min' => 0, |
| 550 | 'max' => 100, |
| 551 | ], |
| 552 | ], |
| 553 | 'size_units' => [ '%' ], |
| 554 | 'selectors' => [ |
| 555 | '{{WRAPPER}} .eael-testimonial-image' => 'max-width:{{SIZE}}{{UNIT}};', |
| 556 | ], |
| 557 | ] |
| 558 | ); |
| 559 | |
| 560 | $this->add_responsive_control( |
| 561 | 'eael_testimonial_image_margin', |
| 562 | [ |
| 563 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite'), |
| 564 | 'type' => Controls_Manager::DIMENSIONS, |
| 565 | 'size_units' => [ 'px', '%' ], |
| 566 | 'selectors' => [ |
| 567 | '{{WRAPPER}} .eael-testimonial-image img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 568 | ], |
| 569 | ] |
| 570 | ); |
| 571 | |
| 572 | $this->add_responsive_control( |
| 573 | 'eael_testimonial_image_padding', |
| 574 | [ |
| 575 | 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite'), |
| 576 | 'type' => Controls_Manager::DIMENSIONS, |
| 577 | 'size_units' => [ 'px', '%', 'em' ], |
| 578 | 'selectors' => [ |
| 579 | '{{WRAPPER}} .eael-testimonial-image img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 580 | ], |
| 581 | ] |
| 582 | ); |
| 583 | |
| 584 | |
| 585 | $this->add_group_control( |
| 586 | Group_Control_Border::get_type(), |
| 587 | [ |
| 588 | 'name' => 'eael_testimonial_image_border', |
| 589 | 'label' => esc_html__( 'Border', 'essential-addons-for-elementor-lite'), |
| 590 | 'selector' => '{{WRAPPER}} .eael-testimonial-image img', |
| 591 | ] |
| 592 | ); |
| 593 | |
| 594 | $this->add_control( |
| 595 | 'eael_testimonial_image_rounded', |
| 596 | [ |
| 597 | 'label' => esc_html__( 'Rounded Avatar?', 'essential-addons-for-elementor-lite'), |
| 598 | 'type' => Controls_Manager::SWITCHER, |
| 599 | 'return_value' => 'testimonial-avatar-rounded', |
| 600 | 'default' => '', |
| 601 | ] |
| 602 | ); |
| 603 | |
| 604 | |
| 605 | $this->add_control( |
| 606 | 'eael_testimonial_image_border_radius', |
| 607 | [ |
| 608 | 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite'), |
| 609 | 'type' => Controls_Manager::DIMENSIONS, |
| 610 | 'selectors' => [ |
| 611 | '{{WRAPPER}} .eael-testimonial-image img' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', |
| 612 | ], |
| 613 | 'condition' => [ |
| 614 | 'eael_testimonial_image_rounded!' => 'testimonial-avatar-rounded', |
| 615 | ], |
| 616 | ] |
| 617 | ); |
| 618 | |
| 619 | $this->end_controls_section(); |
| 620 | |
| 621 | // color, Typography & Spacing |
| 622 | $this->start_controls_section( |
| 623 | 'eael_section_testimonial_typography', |
| 624 | [ |
| 625 | 'label' => esc_html__( 'Content', 'essential-addons-for-elementor-lite'), |
| 626 | 'tab' => Controls_Manager::TAB_STYLE |
| 627 | ] |
| 628 | ); |
| 629 | |
| 630 | $this->add_control( |
| 631 | 'eael_testimonial_name_heading', |
| 632 | [ |
| 633 | 'label' => __( 'User Name', 'essential-addons-for-elementor-lite'), |
| 634 | 'type' => Controls_Manager::HEADING, |
| 635 | ] |
| 636 | ); |
| 637 | |
| 638 | $this->add_control( |
| 639 | 'eael_testimonial_name_color', |
| 640 | [ |
| 641 | 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite'), |
| 642 | 'type' => Controls_Manager::COLOR, |
| 643 | 'default' => '#272727', |
| 644 | 'selectors' => [ |
| 645 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-user' => 'color: {{VALUE}};', |
| 646 | ], |
| 647 | ] |
| 648 | ); |
| 649 | |
| 650 | $this->add_group_control( |
| 651 | Group_Control_Typography::get_type(), |
| 652 | [ |
| 653 | 'name' => 'eael_testimonial_name_typography', |
| 654 | 'selector' => '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-user', |
| 655 | ] |
| 656 | ); |
| 657 | |
| 658 | $this->add_control( |
| 659 | 'eael_testimonial_name_margin', |
| 660 | [ |
| 661 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite'), |
| 662 | 'type' => Controls_Manager::DIMENSIONS, |
| 663 | 'size_units' => [ 'px', '%', 'em' ], |
| 664 | 'selectors' => [ |
| 665 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-user' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 666 | ], |
| 667 | ] |
| 668 | ); |
| 669 | |
| 670 | $this->add_control( |
| 671 | 'eael_testimonial_company_heading', |
| 672 | [ |
| 673 | 'label' => __( 'Company Name', 'essential-addons-for-elementor-lite'), |
| 674 | 'type' => Controls_Manager::HEADING, |
| 675 | 'separator' => 'before' |
| 676 | ] |
| 677 | ); |
| 678 | |
| 679 | $this->add_control( |
| 680 | 'eael_testimonial_company_color', |
| 681 | [ |
| 682 | 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite'), |
| 683 | 'type' => Controls_Manager::COLOR, |
| 684 | 'default' => '#272727', |
| 685 | 'selectors' => [ |
| 686 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-user-company' => 'color: {{VALUE}};', |
| 687 | ], |
| 688 | ] |
| 689 | ); |
| 690 | |
| 691 | $this->add_group_control( |
| 692 | Group_Control_Typography::get_type(), |
| 693 | [ |
| 694 | 'name' => 'eael_testimonial_position_typography', |
| 695 | 'selector' => '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-user-company', |
| 696 | ] |
| 697 | ); |
| 698 | |
| 699 | $this->add_control( |
| 700 | 'eael_testimonial_company_margin', |
| 701 | [ |
| 702 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite'), |
| 703 | 'type' => Controls_Manager::DIMENSIONS, |
| 704 | 'size_units' => [ 'px', '%', 'em' ], |
| 705 | 'selectors' => [ |
| 706 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-user-company' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 707 | ], |
| 708 | ] |
| 709 | ); |
| 710 | |
| 711 | $this->add_control( |
| 712 | 'eael_testimonial_description_heading', |
| 713 | [ |
| 714 | 'label' => __( 'Testimonial Text', 'essential-addons-for-elementor-lite'), |
| 715 | 'type' => Controls_Manager::HEADING, |
| 716 | 'separator' => 'before' |
| 717 | ] |
| 718 | ); |
| 719 | |
| 720 | $this->add_control( |
| 721 | 'eael_testimonial_description_color', |
| 722 | [ |
| 723 | 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite'), |
| 724 | 'type' => Controls_Manager::COLOR, |
| 725 | 'default' => '#292929', |
| 726 | 'selectors' => [ |
| 727 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-text' => 'color: {{VALUE}};', |
| 728 | ], |
| 729 | ] |
| 730 | ); |
| 731 | |
| 732 | $this->add_group_control( |
| 733 | Group_Control_Typography::get_type(), |
| 734 | [ |
| 735 | 'name' => 'eael_testimonial_description_typography', |
| 736 | 'selector' => '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-text', |
| 737 | ] |
| 738 | ); |
| 739 | |
| 740 | $this->add_responsive_control( |
| 741 | 'eael_testimonial_description_margin', |
| 742 | [ |
| 743 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite'), |
| 744 | 'type' => Controls_Manager::DIMENSIONS, |
| 745 | 'size_units' => [ 'px', '%', 'em' ], |
| 746 | 'selectors' => [ |
| 747 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 748 | ], |
| 749 | ] |
| 750 | ); |
| 751 | |
| 752 | $this->add_responsive_control( |
| 753 | 'eael_testimonial_description_padding', |
| 754 | [ |
| 755 | 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite'), |
| 756 | 'type' => Controls_Manager::DIMENSIONS, |
| 757 | 'size_units' => [ 'px', '%', 'em', 'rem' ], |
| 758 | 'selectors' => [ |
| 759 | '{{WRAPPER}} .eael-testimonial-content .eael-testimonial-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 760 | ], |
| 761 | ] |
| 762 | ); |
| 763 | |
| 764 | $this->add_control( |
| 765 | 'eael_testimonial_rating_heading', |
| 766 | [ |
| 767 | 'label' => __( 'Rating', 'essential-addons-for-elementor-lite'), |
| 768 | 'type' => Controls_Manager::HEADING, |
| 769 | 'separator' => 'before' |
| 770 | ] |
| 771 | ); |
| 772 | |
| 773 | $this->add_control( |
| 774 | 'eael_testimonial_rating_item_color', |
| 775 | [ |
| 776 | 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite'), |
| 777 | 'type' => Controls_Manager::COLOR, |
| 778 | 'default' => '#f2b01e', |
| 779 | 'selectors' => [ |
| 780 | '{{WRAPPER}} .rating-five .testimonial-star-rating li i' => 'color: {{VALUE}};', |
| 781 | '{{WRAPPER}} .rating-one .testimonial-star-rating li:first-child i' => 'color: {{VALUE}};', |
| 782 | '{{WRAPPER}} .rating-two .testimonial-star-rating li:nth-child(1) i, {{WRAPPER}} .rating-two .testimonial-star-rating li:nth-child(2) i' => 'color: {{VALUE}};', |
| 783 | '{{WRAPPER}} .rating-three .testimonial-star-rating li:nth-child(1) i, {{WRAPPER}} .rating-three .testimonial-star-rating li:nth-child(2) i, {{WRAPPER}} .rating-three .testimonial-star-rating li:nth-child(3) i' => 'color: {{VALUE}};', |
| 784 | '{{WRAPPER}} .rating-four .testimonial-star-rating li:nth-child(1) i, {{WRAPPER}} .rating-four .testimonial-star-rating li:nth-child(2) i, {{WRAPPER}} .rating-four .testimonial-star-rating li:nth-child(3) i, {{WRAPPER}} .rating-four .testimonial-star-rating li:nth-child(4) i' => 'color: {{VALUE}};', |
| 785 | ], |
| 786 | ] |
| 787 | ); |
| 788 | |
| 789 | $this->add_control( |
| 790 | 'eael_testimonial_rating_item_size', |
| 791 | [ |
| 792 | 'label' => esc_html__( 'Icon Size', 'essential-addons-for-elementor-lite'), |
| 793 | 'type' => Controls_Manager::SLIDER, |
| 794 | 'size_units' => [ 'px', '%' ], |
| 795 | 'selectors' => [ |
| 796 | '{{WRAPPER}} .eael-testimonial-item .testimonial-star-rating li i' => 'font-size: {{SIZE}}{{UNIT}};', |
| 797 | ], |
| 798 | ] |
| 799 | ); |
| 800 | |
| 801 | $this->add_control( |
| 802 | 'eael_testimonial_rating_item_distance', |
| 803 | [ |
| 804 | 'label' => esc_html__( 'Space Between Icons', 'essential-addons-for-elementor-lite'), |
| 805 | 'type' => Controls_Manager::SLIDER, |
| 806 | 'size_units' => [ 'px', '%', 'em' ], |
| 807 | 'selectors' => [ |
| 808 | '{{WRAPPER}} .eael-testimonial-item .testimonial-star-rating li' => 'margin-right: {{SIZE}}{{UNIT}};', |
| 809 | ], |
| 810 | ] |
| 811 | ); |
| 812 | |
| 813 | $this->add_control( |
| 814 | 'eael_testimonial_rating_margin', |
| 815 | [ |
| 816 | 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite'), |
| 817 | 'type' => Controls_Manager::DIMENSIONS, |
| 818 | 'size_units' => [ 'px', '%', 'em' ], |
| 819 | 'selectors' => [ |
| 820 | '{{WRAPPER}} .eael-testimonial-item .testimonial-star-rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 821 | ], |
| 822 | ] |
| 823 | ); |
| 824 | |
| 825 | $this->end_controls_section(); |
| 826 | |
| 827 | $this->start_controls_section( |
| 828 | 'eael_section_testimonial_quotation_typography', |
| 829 | [ |
| 830 | 'label' => esc_html__( 'Quotation', 'essential-addons-for-elementor-lite'), |
| 831 | 'tab' => Controls_Manager::TAB_STYLE |
| 832 | ] |
| 833 | ); |
| 834 | |
| 835 | $this->add_control( |
| 836 | 'eael_testimonial_quotation_color', |
| 837 | [ |
| 838 | 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite'), |
| 839 | 'type' => Controls_Manager::COLOR, |
| 840 | 'default' => 'rgba(0,0,0,0.15)', |
| 841 | 'selectors' => [ |
| 842 | '{{WRAPPER}} .eael-testimonial-quote' => 'color: {{VALUE}};', |
| 843 | ], |
| 844 | ] |
| 845 | ); |
| 846 | |
| 847 | $this->add_group_control( |
| 848 | Group_Control_Typography::get_type(), |
| 849 | [ |
| 850 | 'name' => 'eael_testimonial_quotation_typography', |
| 851 | 'selector' => '{{WRAPPER}} .eael-testimonial-quote', |
| 852 | ] |
| 853 | ); |
| 854 | |
| 855 | $this->add_responsive_control( |
| 856 | 'eael_testimonial_quotation_top', |
| 857 | [ |
| 858 | 'label' => esc_html__( 'Position From Top (%)', 'essential-addons-for-elementor-lite'), |
| 859 | 'type' => Controls_Manager::SLIDER, |
| 860 | 'default' => [ |
| 861 | 'size' => 5, |
| 862 | 'unit' => '%', |
| 863 | ], |
| 864 | 'range' => [ |
| 865 | '%' => [ |
| 866 | 'min' => 0, |
| 867 | 'max' => 100, |
| 868 | ] |
| 869 | ], |
| 870 | 'size_units' => [ '%' ], |
| 871 | 'selectors' => [ |
| 872 | '{{WRAPPER}} span.eael-testimonial-quote' => 'top:{{SIZE}}{{UNIT}};', |
| 873 | ], |
| 874 | ] |
| 875 | ); |
| 876 | |
| 877 | $this->add_responsive_control( |
| 878 | 'eael_testimonial_quotation_right', |
| 879 | [ |
| 880 | 'label' => esc_html__( 'Position From Right (%)', 'essential-addons-for-elementor-lite'), |
| 881 | 'type' => Controls_Manager::SLIDER, |
| 882 | 'default' => [ |
| 883 | 'size' => 5, |
| 884 | 'unit' => '%', |
| 885 | ], |
| 886 | 'range' => [ |
| 887 | '%' => [ |
| 888 | 'min' => 0, |
| 889 | 'max' => 100, |
| 890 | ] |
| 891 | ], |
| 892 | 'size_units' => [ '%' ], |
| 893 | 'selectors' => [ |
| 894 | '{{WRAPPER}} span.eael-testimonial-quote' => 'right:{{SIZE}}{{UNIT}};', |
| 895 | ], |
| 896 | ] |
| 897 | ); |
| 898 | |
| 899 | $this->end_controls_section(); |
| 900 | } |
| 901 | |
| 902 | protected function render_testimonial_image() { |
| 903 | $settings = $this->get_settings(); |
| 904 | $image = Group_Control_Image_Size::get_attachment_image_html( $settings ); |
| 905 | if( ! empty($image) && ! empty($settings['eael_testimonial_enable_avatar']) ) { |
| 906 | ob_start(); |
| 907 | ?> |
| 908 | <div class="eael-testimonial-image"> |
| 909 | <?php if( 'yes' == $settings['eael_testimonial_enable_avatar'] ) : ?> |
| 910 | <figure><?php echo wp_kses( $image, HelperClass::eael_allowed_tags( [ 'img' => [ 'loading' => [] ] ] ) ); ?></figure> |
| 911 | <?php endif; ?> |
| 912 | </div> |
| 913 | <?php |
| 914 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 915 | echo ob_get_clean(); |
| 916 | } |
| 917 | } |
| 918 | |
| 919 | protected function render_testimonial_rating() { |
| 920 | $settings = $this->get_settings_for_display('eael_testimonial_enable_rating'); |
| 921 | |
| 922 | if ( $settings == 'yes' ) : |
| 923 | ob_start(); |
| 924 | ?> |
| 925 | <ul class="testimonial-star-rating"> |
| 926 | <li><i class="fas fa-star" aria-hidden="true"></i></li> |
| 927 | <li><i class="fas fa-star" aria-hidden="true"></i></li> |
| 928 | <li><i class="fas fa-star" aria-hidden="true"></i></li> |
| 929 | <li><i class="fas fa-star" aria-hidden="true"></i></li> |
| 930 | <li><i class="fas fa-star" aria-hidden="true"></i></li> |
| 931 | </ul> |
| 932 | <?php |
| 933 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 934 | echo ob_get_clean(); |
| 935 | endif; |
| 936 | } |
| 937 | |
| 938 | protected function render_user_name_and_company() { |
| 939 | $settings = $this->get_settings_for_display(); |
| 940 | if( ! empty($settings['eael_testimonial_name']) ) : ?><p <?php $this->print_render_attribute_string('eael_testimonial_user'); ?>><?php echo wp_kses( $settings['eael_testimonial_name'], HelperClass::eael_allowed_tags() ); ?></p><?php endif; |
| 941 | if( ! empty($settings['eael_testimonial_company_title']) ) : ?><p class="eael-testimonial-user-company"><?php echo wp_kses( $settings['eael_testimonial_company_title'], HelperClass::eael_allowed_tags() ); ?></p><?php endif; |
| 942 | } |
| 943 | |
| 944 | protected function testimonial_desc() { |
| 945 | $settings = $this->get_settings_for_display(); |
| 946 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 947 | echo '<div class="eael-testimonial-text">'. $this->parse_text_editor( wp_kses( $settings['eael_testimonial_description'], HelperClass::eael_allowed_tags() ) ) .'</div>'; |
| 948 | } |
| 949 | |
| 950 | |
| 951 | protected function render() { |
| 952 | |
| 953 | $settings = $this->get_settings_for_display(); |
| 954 | $rating = $this->get_settings_for_display('eael_testimonial_enable_rating'); |
| 955 | |
| 956 | $this->add_render_attribute( |
| 957 | 'eael_testimonial_wrap', |
| 958 | [ |
| 959 | 'id' => 'eael-testimonial-'.esc_attr($this->get_id()), |
| 960 | 'class' => [ |
| 961 | 'eael-testimonial-item', |
| 962 | 'clearfix', |
| 963 | $this->get_settings('eael_testimonial_image_rounded'), |
| 964 | esc_attr($settings['eael_testimonial_style']), |
| 965 | ] |
| 966 | ] |
| 967 | ); |
| 968 | |
| 969 | if ( $rating == 'yes' ) |
| 970 | $this->add_render_attribute('eael_testimonial_wrap', 'class', $this->get_settings('eael_testimonial_rating_number') ); |
| 971 | |
| 972 | $this->add_render_attribute('eael_testimonial_user', 'class', 'eael-testimonial-user'); |
| 973 | if ( ! empty( $settings['eael_testimonial_user_display_block'] ) ) |
| 974 | $this->add_render_attribute('eael_testimonial_user', 'style', 'display: block; float: none;'); |
| 975 | |
| 976 | |
| 977 | ?> |
| 978 | |
| 979 | <div <?php $this->print_render_attribute_string('eael_testimonial_wrap'); ?>> |
| 980 | <?php |
| 981 | if ( 'top' === $settings['eael_testimonial_rating_position'] && 'simple-layout' !== $settings['eael_testimonial_style'] ) { |
| 982 | $this->render_testimonial_rating(); |
| 983 | } |
| 984 | ?> |
| 985 | <?php if('classic-style' == $settings['eael_testimonial_style']) { ?> |
| 986 | <div class="eael-testimonial-content"> |
| 987 | <?php |
| 988 | $this->testimonial_desc(); |
| 989 | ?> |
| 990 | <div class="clearfix"> |
| 991 | <?php $this->render_user_name_and_company(); ?> |
| 992 | </div> |
| 993 | <?php |
| 994 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 995 | $this->render_testimonial_rating(); |
| 996 | } |
| 997 | ?> |
| 998 | </div> |
| 999 | <?php $this->render_testimonial_image(); ?> |
| 1000 | <?php } ?> |
| 1001 | |
| 1002 | <?php if('middle-style' == $settings['eael_testimonial_style']) { ?> |
| 1003 | <div class="eael-testimonial-content"> |
| 1004 | <?php |
| 1005 | $this->testimonial_desc(); |
| 1006 | ?> |
| 1007 | <?php $this->render_testimonial_image(); ?> |
| 1008 | <div class="clearfix"> |
| 1009 | <?php $this->render_user_name_and_company(); ?> |
| 1010 | </div> |
| 1011 | <?php |
| 1012 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1013 | $this->render_testimonial_rating(); |
| 1014 | } |
| 1015 | ?> |
| 1016 | </div> |
| 1017 | <?php } ?> |
| 1018 | |
| 1019 | <?php if('default-style' == $settings['eael_testimonial_style']) { ?> |
| 1020 | <?php $this->render_testimonial_image(); ?> |
| 1021 | <div class="eael-testimonial-content"> |
| 1022 | <?php |
| 1023 | $this->testimonial_desc(); |
| 1024 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1025 | $this->render_testimonial_rating(); |
| 1026 | } |
| 1027 | $this->render_user_name_and_company(); |
| 1028 | ?> |
| 1029 | </div> |
| 1030 | <?php } ?> |
| 1031 | |
| 1032 | <?php if('icon-img-left-content' == $settings['eael_testimonial_style']) { ?> |
| 1033 | <?php |
| 1034 | $this->render_testimonial_image(); |
| 1035 | ?> |
| 1036 | <div class="eael-testimonial-content"> |
| 1037 | <?php |
| 1038 | $this->testimonial_desc(); |
| 1039 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1040 | $this->render_testimonial_rating(); |
| 1041 | } |
| 1042 | ?> |
| 1043 | <div class="bio-text clearfix"> |
| 1044 | <?php $this->render_user_name_and_company(); ?> |
| 1045 | </div> |
| 1046 | </div> |
| 1047 | <?php } ?> |
| 1048 | |
| 1049 | <?php if('icon-img-right-content' == $settings['eael_testimonial_style']) { ?> |
| 1050 | <?php |
| 1051 | $this->render_testimonial_image(); |
| 1052 | ?> |
| 1053 | <div class="eael-testimonial-content"> |
| 1054 | <?php |
| 1055 | $this->testimonial_desc(); |
| 1056 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1057 | $this->render_testimonial_rating(); |
| 1058 | } |
| 1059 | ?> |
| 1060 | <div class="bio-text-right"><?php $this->render_user_name_and_company(); ?></div> |
| 1061 | </div> |
| 1062 | <?php } ?> |
| 1063 | |
| 1064 | <?php if('content-top-icon-title-inline' == $settings['eael_testimonial_style']) { ?> |
| 1065 | <div class="eael-testimonial-content eael-testimonial-inline-bio"> |
| 1066 | <?php $this->render_testimonial_image(); ?> |
| 1067 | <div class="bio-text"><?php $this->render_user_name_and_company(); ?></div> |
| 1068 | <?php |
| 1069 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1070 | $this->render_testimonial_rating(); |
| 1071 | } |
| 1072 | ?> |
| 1073 | </div> |
| 1074 | <div class="eael-testimonial-content"> |
| 1075 | <?php $this->testimonial_desc(); ?> |
| 1076 | </div> |
| 1077 | <?php } ?> |
| 1078 | |
| 1079 | <?php if('content-bottom-icon-title-inline' == $settings['eael_testimonial_style']) { ?> |
| 1080 | <div class="eael-testimonial-content"> |
| 1081 | <?php $this->testimonial_desc(); ?> |
| 1082 | </div> |
| 1083 | <div class="eael-testimonial-content eael-testimonial-inline-bio"> |
| 1084 | <?php $this->render_testimonial_image(); ?> |
| 1085 | <div class="bio-text"><?php $this->render_user_name_and_company(); ?></div> |
| 1086 | <?php |
| 1087 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1088 | $this->render_testimonial_rating(); |
| 1089 | } |
| 1090 | ?> |
| 1091 | </div> |
| 1092 | <?php } ?> |
| 1093 | |
| 1094 | <?php if('simple-layout' == $settings['eael_testimonial_style']) { ?> |
| 1095 | <?php $this->render_testimonial_image(); ?> |
| 1096 | <div class="eael-testimonial-content"> |
| 1097 | <?php |
| 1098 | if ( 'top' === $settings['eael_testimonial_rating_position'] ) { |
| 1099 | $this->render_testimonial_rating(); |
| 1100 | } |
| 1101 | ?> |
| 1102 | <h3 class="eael-testimonial-user"><?php echo wp_kses( $settings['eael_testimonial_name'], HelperClass::eael_allowed_tags() ); ?></h3> |
| 1103 | <p class="eael-testimonial-user-company"><?php echo wp_kses( $settings['eael_testimonial_company_title'], HelperClass::eael_allowed_tags() ); ?></p> |
| 1104 | <?php |
| 1105 | if ( 'default' === $settings['eael_testimonial_rating_position'] ) { |
| 1106 | $this->render_testimonial_rating(); |
| 1107 | } |
| 1108 | ?> |
| 1109 | <div class="eael-testimonial-text"> |
| 1110 | <?php echo wp_kses( $settings['eael_testimonial_description'], HelperClass::eael_allowed_tags() ); ?> |
| 1111 | </div> |
| 1112 | </div> |
| 1113 | |
| 1114 | <?php } ?> |
| 1115 | |
| 1116 | <?php |
| 1117 | if( 'yes' === $settings['eael_testimonial_show_quote'] ) { |
| 1118 | echo '<span class="eael-testimonial-quote"></span>'; |
| 1119 | } |
| 1120 | ?> |
| 1121 | |
| 1122 | </div> |
| 1123 | |
| 1124 | <?php } |
| 1125 | |
| 1126 | protected function content_template() {} |
| 1127 | } |
| 1128 |