templates
1 year ago
Accordion.php
1 year ago
Alerts_Box.php
1 year ago
Animated_Heading.php
1 year ago
Before_after.php
1 year ago
Blog_Grid.php
1 year ago
Buttons.php
1 year ago
Cheat_sheet.php
1 year ago
Counter.php
1 year ago
Fullscreen_Slider.php
1 year ago
Icon_box.php
1 year ago
Instagram.php
1 year ago
Integrations.php
1 year ago
List_Item.php
1 year ago
Pricing_Table_Switcher.php
1 year ago
Pricing_Table_Tabs.php
1 year ago
Tabs.php
1 year ago
Team_Carousel.php
1 year ago
Testimonial.php
1 year ago
Timeline.php
1 year ago
Video_Playlist.php
1 year ago
Video_Popup.php
1 year ago
Testimonial.php
1733 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SPEL\Widgets; |
| 4 | |
| 5 | use Elementor\Repeater; |
| 6 | use Elementor\Utils; |
| 7 | use Elementor\Widget_Base; |
| 8 | use Elementor\Controls_Manager; |
| 9 | use Elementor\Group_Control_Border; |
| 10 | use Elementor\Group_Control_Typography; |
| 11 | use Elementor\Group_Control_Background; |
| 12 | |
| 13 | // Exit if accessed directly |
| 14 | if ( ! defined( 'ABSPATH' ) ) { |
| 15 | exit; |
| 16 | } |
| 17 | |
| 18 | |
| 19 | /** |
| 20 | * Class Testimonial |
| 21 | * |
| 22 | * @package spider\Widgets |
| 23 | */ |
| 24 | class Testimonial extends Widget_Base { |
| 25 | |
| 26 | public function get_name() { |
| 27 | return 'docy_testimonial'; // ID of the widget (Don't change this name) |
| 28 | } |
| 29 | |
| 30 | public function get_title() { |
| 31 | return esc_html__( 'Testimonials', 'spider-elements' ); |
| 32 | } |
| 33 | |
| 34 | public function get_icon() { |
| 35 | return 'eicon-testimonial-carousel spel-icon'; |
| 36 | } |
| 37 | |
| 38 | public function get_keywords() { |
| 39 | return [ 'spider', 'spider elements', 'testimonial' ]; |
| 40 | } |
| 41 | |
| 42 | public function get_categories() { |
| 43 | return [ 'spider-elements' ]; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Name: get_style_depends() |
| 48 | * Desc: Register the required CSS dependencies for the frontend. |
| 49 | */ |
| 50 | public function get_style_depends() { |
| 51 | return [ 'slick', 'slick-theme', 'swiper', 'spel-main' ]; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Name: get_script_depends() |
| 56 | * Desc: Register the required JS dependencies for the frontend. |
| 57 | */ |
| 58 | public function get_script_depends() { |
| 59 | return [ 'slick', 'swiper', 'wow', 'spel-el-widgets' ]; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Name: register_controls() |
| 64 | * Desc: Register controls for these widgets |
| 65 | * Params: no params |
| 66 | * Return: @void |
| 67 | * Since: @1.0.0 |
| 68 | * Package: @spider-elements |
| 69 | * Author: spider-themes |
| 70 | */ |
| 71 | protected function register_controls() { |
| 72 | $this->elementor_content_control(); |
| 73 | $this->elementor_rating_controls(); |
| 74 | $this->elementor_general_style(); |
| 75 | $this->elementor_style_control(); |
| 76 | $this->elementor_style_image(); |
| 77 | $this->elementor_style_icon(); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Name: elementor_content_control() |
| 82 | * Desc: Register the Content Tab output on the Elementor editor. |
| 83 | * Params: no params |
| 84 | * Return: @void |
| 85 | * Since: @1.0.0 |
| 86 | * Package: @spider-elements |
| 87 | * Author: spider-themes |
| 88 | */ |
| 89 | public function elementor_content_control() { |
| 90 | |
| 91 | //========================= Select Style ======================// |
| 92 | $this->start_controls_section( |
| 93 | 'select_style', [ |
| 94 | 'label' => esc_html__( 'Preset Skins', 'spider-elements' ), |
| 95 | ] |
| 96 | ); |
| 97 | |
| 98 | $this->add_control( |
| 99 | 'style', [ |
| 100 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 101 | 'type' => Controls_Manager::CHOOSE, |
| 102 | 'options' => [ |
| 103 | '1' => [ |
| 104 | 'icon' => 'testimonial1', |
| 105 | 'title' => esc_html__( '01 : Carousel Testimonials', 'spider-elements' ) |
| 106 | ], |
| 107 | '2' => [ |
| 108 | 'icon' => 'testimonial2', |
| 109 | 'title' => esc_html__( '02 : Carousel Testimonials', 'spider-elements' ), |
| 110 | ], |
| 111 | '3' => [ |
| 112 | 'icon' => 'testimonial3', |
| 113 | 'title' => esc_html__( '03 : Carousel Testimonials', 'spider-elements' ), |
| 114 | ], |
| 115 | '4' => [ |
| 116 | 'icon' => 'testimonial4', |
| 117 | 'title' => esc_html__( '04 : Carousel Testimonials', 'spider-elements' ), |
| 118 | ], |
| 119 | '5' => [ |
| 120 | 'icon' => 'testimonial5', |
| 121 | 'title' => esc_html__( '05 : Carousel Testimonials', 'spider-elements' ), |
| 122 | ], |
| 123 | '6' => [ |
| 124 | 'icon' => 'testimonial6', |
| 125 | 'title' => esc_html__( '06 : Carousel Testimonials', 'spider-elements' ), |
| 126 | ], |
| 127 | '7' => [ |
| 128 | 'icon' => 'testimonial7', |
| 129 | 'title' => esc_html__( '07 : Carousel Testimonials', 'spider-elements' ), |
| 130 | ], |
| 131 | '8' => [ |
| 132 | 'icon' => 'testimonial8', |
| 133 | 'title' => esc_html__( '08 : Carousel Testimonials', 'spider-elements' ), |
| 134 | ], |
| 135 | '9' => [ |
| 136 | 'icon' => 'testimonial9', |
| 137 | 'title' => esc_html__( '09 : Carousel Testimonials', 'spider-elements' ), |
| 138 | ], |
| 139 | '10' => [ |
| 140 | 'icon' => 'testimonial10', |
| 141 | 'title' => esc_html__( '10 : Carousel Testimonials', 'spider-elements' ), |
| 142 | ], |
| 143 | ], |
| 144 | 'default' => '1', |
| 145 | ] |
| 146 | ); |
| 147 | |
| 148 | $this->end_controls_section(); // End Style |
| 149 | |
| 150 | |
| 151 | //============================ Testimonials =========================// |
| 152 | $this->start_controls_section( |
| 153 | 'sec_testimonials', [ |
| 154 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 155 | ] |
| 156 | ); |
| 157 | |
| 158 | //=== Testimonials 01 |
| 159 | $testimonial = new Repeater(); |
| 160 | $testimonial->add_control( |
| 161 | 'author_image', [ |
| 162 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 163 | 'type' => Controls_Manager::MEDIA, |
| 164 | 'default' => [ |
| 165 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 166 | ], |
| 167 | ] |
| 168 | ); |
| 169 | |
| 170 | $testimonial->add_control( |
| 171 | 'name', [ |
| 172 | 'label' => esc_html__( 'Name', 'spider-elements' ), |
| 173 | 'type' => Controls_Manager::TEXT, |
| 174 | 'default' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 175 | ] |
| 176 | ); |
| 177 | |
| 178 | $testimonial->add_control( |
| 179 | 'designation', [ |
| 180 | 'label' => esc_html__( 'Designation', 'spider-elements' ), |
| 181 | 'type' => Controls_Manager::TEXT, |
| 182 | 'default' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 183 | ] |
| 184 | ); |
| 185 | |
| 186 | $testimonial->add_control( |
| 187 | 'review_content', [ |
| 188 | 'label' => esc_html__( 'Review Content', 'spider-elements' ), |
| 189 | 'type' => Controls_Manager::TEXTAREA, |
| 190 | ] |
| 191 | ); |
| 192 | |
| 193 | $testimonial->add_control( |
| 194 | 'signature', [ |
| 195 | 'label' => esc_html__( 'Signature', 'spider-elements' ), |
| 196 | 'type' => Controls_Manager::MEDIA, |
| 197 | 'default' => [ |
| 198 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 199 | ], |
| 200 | ] |
| 201 | ); |
| 202 | |
| 203 | $this->add_control( |
| 204 | 'testimonials', [ |
| 205 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 206 | 'type' => Controls_Manager::REPEATER, |
| 207 | 'fields' => $testimonial->get_controls(), |
| 208 | 'title_field' => '{{{ name }}}', |
| 209 | 'prevent_empty' => false, |
| 210 | 'default' => [ |
| 211 | [ |
| 212 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 213 | 'designation' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 214 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 215 | 'spider-elements' ), |
| 216 | ], |
| 217 | [ |
| 218 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 219 | 'designation' => esc_html__( 'App Developer', 'spider-elements' ), |
| 220 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 221 | 'spider-elements' ), |
| 222 | ], |
| 223 | [ |
| 224 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 225 | 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ), |
| 226 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 227 | 'spider-elements' ), |
| 228 | ], |
| 229 | ], |
| 230 | 'condition' => [ |
| 231 | 'style' => '1' |
| 232 | ] |
| 233 | ] |
| 234 | ); // End Testimonials 01 |
| 235 | |
| 236 | |
| 237 | //=== Testimonials 02 |
| 238 | $testimonial2 = new Repeater(); |
| 239 | $testimonial2->add_control( |
| 240 | 'author_image', [ |
| 241 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 242 | 'type' => Controls_Manager::MEDIA, |
| 243 | 'default' => [ |
| 244 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 245 | ], |
| 246 | ] |
| 247 | ); |
| 248 | |
| 249 | $testimonial2->add_control( |
| 250 | 'name', [ |
| 251 | 'label' => esc_html__( 'Name', 'spider-elements' ), |
| 252 | 'type' => Controls_Manager::TEXT, |
| 253 | 'default' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 254 | ] |
| 255 | ); |
| 256 | |
| 257 | $testimonial2->add_control( |
| 258 | 'designation', [ |
| 259 | 'label' => esc_html__( 'Designation', 'spider-elements' ), |
| 260 | 'type' => Controls_Manager::TEXT, |
| 261 | 'default' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 262 | ] |
| 263 | ); |
| 264 | |
| 265 | $testimonial2->add_control( |
| 266 | 'review_content', [ |
| 267 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 268 | 'type' => Controls_Manager::TEXTAREA, |
| 269 | ] |
| 270 | ); |
| 271 | |
| 272 | $this->add_control( |
| 273 | 'testimonials2', [ |
| 274 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 275 | 'type' => Controls_Manager::REPEATER, |
| 276 | 'fields' => $testimonial2->get_controls(), |
| 277 | 'title_field' => '{{{ name }}}', |
| 278 | 'prevent_empty' => false, |
| 279 | 'default' => [ |
| 280 | [ |
| 281 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 282 | 'designation' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 283 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 284 | 'spider-elements' ), |
| 285 | ], |
| 286 | [ |
| 287 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 288 | 'designation' => esc_html__( 'App Developer', 'spider-elements' ), |
| 289 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 290 | 'spider-elements' ), |
| 291 | ], |
| 292 | [ |
| 293 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 294 | 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ), |
| 295 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 296 | 'spider-elements' ), |
| 297 | ], |
| 298 | ], |
| 299 | 'condition' => [ |
| 300 | 'style' => '2' |
| 301 | ] |
| 302 | ] |
| 303 | ); //End Testimonials 02 |
| 304 | |
| 305 | //=== Testimonials 03 |
| 306 | $testimonial3 = new Repeater(); |
| 307 | $testimonial3->add_control( |
| 308 | 'author_image', [ |
| 309 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 310 | 'type' => Controls_Manager::MEDIA, |
| 311 | 'default' => [ |
| 312 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 313 | ], |
| 314 | ] |
| 315 | ); |
| 316 | |
| 317 | $testimonial3->add_control( |
| 318 | 'name', [ |
| 319 | 'label' => esc_html__( 'Name', 'spider-elements' ), |
| 320 | 'type' => Controls_Manager::TEXT, |
| 321 | 'default' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 322 | ] |
| 323 | ); |
| 324 | |
| 325 | $testimonial3->add_control( |
| 326 | 'designation', [ |
| 327 | 'label' => esc_html__( 'Designation', 'spider-elements' ), |
| 328 | 'type' => Controls_Manager::TEXT, |
| 329 | 'default' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 330 | ] |
| 331 | ); |
| 332 | |
| 333 | $testimonial3->add_control( |
| 334 | 'review_content', [ |
| 335 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 336 | 'type' => Controls_Manager::TEXTAREA, |
| 337 | ] |
| 338 | ); |
| 339 | |
| 340 | $this->add_control( |
| 341 | 'testimonials3', [ |
| 342 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 343 | 'type' => Controls_Manager::REPEATER, |
| 344 | 'fields' => $testimonial3->get_controls(), |
| 345 | 'title_field' => '{{{ name }}}', |
| 346 | 'prevent_empty' => false, |
| 347 | 'default' => [ |
| 348 | [ |
| 349 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 350 | 'designation' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 351 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 352 | 'spider-elements' ), |
| 353 | ], |
| 354 | [ |
| 355 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 356 | 'designation' => esc_html__( 'App Developer', 'spider-elements' ), |
| 357 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 358 | 'spider-elements' ), |
| 359 | ], |
| 360 | [ |
| 361 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 362 | 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ), |
| 363 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 364 | 'spider-elements' ), |
| 365 | ], |
| 366 | ], |
| 367 | 'condition' => [ |
| 368 | 'style' => '3' |
| 369 | ] |
| 370 | ] |
| 371 | ); |
| 372 | |
| 373 | //End Testimonials 03 |
| 374 | |
| 375 | //=== Testimonials 04 |
| 376 | $testimonial4 = new Repeater(); |
| 377 | $testimonial4->add_control( |
| 378 | 'author_image', [ |
| 379 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 380 | 'type' => Controls_Manager::MEDIA, |
| 381 | 'default' => [ |
| 382 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 383 | ], |
| 384 | ] |
| 385 | ); |
| 386 | |
| 387 | $testimonial4->add_control( |
| 388 | 'name', [ |
| 389 | 'label' => esc_html__( 'Name', 'spider-elements' ), |
| 390 | 'type' => Controls_Manager::TEXT, |
| 391 | 'default' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 392 | ] |
| 393 | ); |
| 394 | |
| 395 | $testimonial4->add_control( |
| 396 | 'designation', [ |
| 397 | 'label' => esc_html__( 'Designation', 'spider-elements' ), |
| 398 | 'type' => Controls_Manager::TEXT, |
| 399 | 'default' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 400 | ] |
| 401 | ); |
| 402 | |
| 403 | $testimonial4->add_control( |
| 404 | 'review_content', [ |
| 405 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 406 | 'type' => Controls_Manager::TEXTAREA, |
| 407 | ] |
| 408 | ); |
| 409 | |
| 410 | $testimonial4->add_control( |
| 411 | 'c_logo', [ |
| 412 | 'label' => esc_html__( 'Company Logo', 'spider-elements' ), |
| 413 | 'type' => Controls_Manager::MEDIA, |
| 414 | 'default' => [ |
| 415 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 416 | ], |
| 417 | ] |
| 418 | ); |
| 419 | |
| 420 | $this->add_control( |
| 421 | 'testimonials4', [ |
| 422 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 423 | 'type' => Controls_Manager::REPEATER, |
| 424 | 'fields' => $testimonial4->get_controls(), |
| 425 | 'title_field' => '{{{ name }}}', |
| 426 | 'prevent_empty' => false, |
| 427 | 'default' => [ |
| 428 | [ |
| 429 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 430 | 'designation' => esc_html__( 'Software Developer', 'spider-elements' ), |
| 431 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 432 | 'spider-elements' ), |
| 433 | ], |
| 434 | [ |
| 435 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 436 | 'designation' => esc_html__( 'App Developer', 'spider-elements' ), |
| 437 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 438 | 'spider-elements' ), |
| 439 | ], |
| 440 | [ |
| 441 | 'name' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 442 | 'designation' => esc_html__( 'UI/UX Designer', 'spider-elements' ), |
| 443 | 'review_content' => esc_html__( 'Hendrerit laoreet incidunt molestie eum placeat, neque ridiculus? Maecenas incididunt aperiam tempora cumque quos?”', |
| 444 | 'spider-elements' ), |
| 445 | ], |
| 446 | ], |
| 447 | 'condition' => [ |
| 448 | 'style' => '4' |
| 449 | ] |
| 450 | ] |
| 451 | ); //End Testimonials 04 |
| 452 | |
| 453 | //=== Testimonials 05 |
| 454 | $testimonial5 = new Repeater(); |
| 455 | $testimonial5->add_control( |
| 456 | 'author_image', [ |
| 457 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 458 | 'type' => Controls_Manager::MEDIA, |
| 459 | 'default' => [ |
| 460 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 461 | ], |
| 462 | ] |
| 463 | ); |
| 464 | |
| 465 | $testimonial5->add_control( |
| 466 | 'company_name', [ |
| 467 | 'label' => esc_html__( 'Company Name', 'spider-elements' ), |
| 468 | 'type' => Controls_Manager::TEXT, |
| 469 | 'default' => esc_html__( 'Karina', 'spider-elements' ), |
| 470 | ] |
| 471 | ); |
| 472 | |
| 473 | $testimonial5->add_control( |
| 474 | 'review_content', [ |
| 475 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 476 | 'type' => Controls_Manager::TEXTAREA, |
| 477 | ] |
| 478 | ); |
| 479 | |
| 480 | $testimonial5->add_control( |
| 481 | 'title', [ |
| 482 | 'label' => esc_html__( 'Title', 'spider-elements' ), |
| 483 | 'type' => Controls_Manager::TEXT, |
| 484 | 'default' => esc_html__( 'Madelyn Press', 'spider-elements' ), |
| 485 | ] |
| 486 | ); |
| 487 | |
| 488 | $testimonial5->add_control( |
| 489 | 'name', [ |
| 490 | 'label' => esc_html__( 'Name', 'spider-elements' ), |
| 491 | 'type' => Controls_Manager::TEXT, |
| 492 | 'default' => esc_html__( 'Mark Tony', 'spider-elements' ), |
| 493 | ] |
| 494 | ); |
| 495 | |
| 496 | $this->add_control( |
| 497 | 'testimonials5', [ |
| 498 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 499 | 'type' => Controls_Manager::REPEATER, |
| 500 | 'fields' => $testimonial5->get_controls(), |
| 501 | 'title_field' => '{{{ name }}}', |
| 502 | 'prevent_empty' => false, |
| 503 | 'default' => [ |
| 504 | [ |
| 505 | 'name' => esc_html__( 'Zain Torff', 'spider-elements' ), |
| 506 | 'company_name' => esc_html__( 'Olga', 'spider-elements' ), |
| 507 | 'title' => esc_html__( 'Madelyn Press', 'spider-elements' ), |
| 508 | 'review_content' => esc_html__( 'Thank you and your entire team for your kind and attentive attitude.', 'spider-elements' ), |
| 509 | ], |
| 510 | [ |
| 511 | 'name' => esc_html__( 'Madelyn Press', 'spider-elements' ), |
| 512 | 'company_name' => esc_html__( 'Family S', 'spider-elements' ), |
| 513 | 'title' => esc_html__( 'Madelyn Press', 'spider-elements' ), |
| 514 | 'review_content' => esc_html__( 'Thank you and your entire team for your kind and attentive attitude.', 'spider-elements' ), |
| 515 | ], |
| 516 | [ |
| 517 | 'name' => esc_html__( 'Lincoln Levin', 'spider-elements' ), |
| 518 | 'company_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 519 | 'title' => esc_html__( 'Madelyn Press', 'spider-elements' ), |
| 520 | 'review_content' => esc_html__( 'Thank you and your entire team for your kind and attentive attitude.', 'spider-elements' ), |
| 521 | ], |
| 522 | [ |
| 523 | 'name' => esc_html__( 'Charlie Rhiel', 'spider-elements' ), |
| 524 | 'company_name' => esc_html__( 'Meta', 'spider-elements' ), |
| 525 | 'title' => esc_html__( 'Madelyn Press', 'spider-elements' ), |
| 526 | 'review_content' => esc_html__( 'Thank you and your entire team for your kind and attentive attitude.', 'spider-elements' ), |
| 527 | ], |
| 528 | ], |
| 529 | 'condition' => [ |
| 530 | 'style' => '5' |
| 531 | ] |
| 532 | ] |
| 533 | ); //End Testimonials 05 |
| 534 | |
| 535 | //=== Testimonials 06 |
| 536 | $testimonial6 = new Repeater(); |
| 537 | $testimonial6->add_control( |
| 538 | 'author_rating', |
| 539 | [ |
| 540 | 'label' => esc_html__( 'Rating', 'spider-elements' ), |
| 541 | 'type' => \Elementor\Controls_Manager::NUMBER, |
| 542 | 'min' => 0, |
| 543 | 'max' => 10, |
| 544 | 'step' => 0.1, |
| 545 | 'default' => 5, |
| 546 | 'dynamic' => [ |
| 547 | 'active' => true, |
| 548 | ], |
| 549 | ] |
| 550 | ); |
| 551 | |
| 552 | $testimonial6->add_control( |
| 553 | 'author_rating_title', |
| 554 | [ |
| 555 | 'label' => esc_html__( 'Title', 'spider-elements' ), |
| 556 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 557 | 'separator' => 'before', |
| 558 | 'default' => esc_html__( '4.8 Awesome', 'spider-elements' ), |
| 559 | ] |
| 560 | ); |
| 561 | |
| 562 | $testimonial6->add_control( |
| 563 | 'company_image', [ |
| 564 | 'label' => esc_html__( 'Company Image', 'spider-elements' ), |
| 565 | 'type' => Controls_Manager::MEDIA, |
| 566 | 'default' => [ |
| 567 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 568 | ], |
| 569 | ] |
| 570 | ); |
| 571 | |
| 572 | $testimonial6->add_control( |
| 573 | 'review_content', [ |
| 574 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 575 | 'type' => Controls_Manager::TEXTAREA, |
| 576 | ] |
| 577 | ); |
| 578 | $testimonial6->add_control( |
| 579 | 'author_name', [ |
| 580 | 'label' => esc_html__( 'Author Name', 'spider-elements' ), |
| 581 | 'type' => Controls_Manager::TEXT, |
| 582 | 'default' => esc_html__( 'Karina', 'spider-elements' ), |
| 583 | ] |
| 584 | ); |
| 585 | |
| 586 | $testimonial6->add_control( |
| 587 | 'author_position', [ |
| 588 | 'label' => esc_html__( 'Author Position', 'spider-elements' ), |
| 589 | 'type' => Controls_Manager::TEXT, |
| 590 | 'default' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 591 | ] |
| 592 | ); |
| 593 | |
| 594 | $testimonial6->add_control( |
| 595 | 'author_image', [ |
| 596 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 597 | 'description'=> esc_html__('This will only work for Style 7', 'spider-elements'), |
| 598 | 'type' => Controls_Manager::MEDIA, |
| 599 | 'default' => [ |
| 600 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 601 | ], |
| 602 | ] |
| 603 | ); |
| 604 | |
| 605 | |
| 606 | $this->add_control( |
| 607 | 'testimonials6', [ |
| 608 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 609 | 'type' => Controls_Manager::REPEATER, |
| 610 | 'fields' => $testimonial6->get_controls(), |
| 611 | 'title_field' => '{{{ name }}}', |
| 612 | 'prevent_empty' => false, |
| 613 | 'default' => [ |
| 614 | [ |
| 615 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 616 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 617 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 618 | ], |
| 619 | [ |
| 620 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 621 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 622 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 623 | ], |
| 624 | [ |
| 625 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 626 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 627 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 628 | ], |
| 629 | ], |
| 630 | 'condition' => [ |
| 631 | 'style' => [ '6', '7', '9' ] |
| 632 | ] |
| 633 | ] |
| 634 | ); //End Testimonials 06 |
| 635 | |
| 636 | //=== Testimonials 08 |
| 637 | $testimonial8 = new Repeater(); |
| 638 | $testimonial8->add_control( |
| 639 | 'review_content', [ |
| 640 | 'label' => esc_html__( 'Contents', 'spider-elements' ), |
| 641 | 'type' => Controls_Manager::WYSIWYG, |
| 642 | ] |
| 643 | ); |
| 644 | |
| 645 | $testimonial8->add_control( |
| 646 | 'author_name', [ |
| 647 | 'label' => esc_html__( 'Author Name', 'spider-elements' ), |
| 648 | 'type' => Controls_Manager::TEXT, |
| 649 | 'default' => esc_html__( 'Karina', 'spider-elements' ), |
| 650 | ] |
| 651 | ); |
| 652 | $testimonial8->add_control( |
| 653 | 'author_position', [ |
| 654 | 'label' => esc_html__( 'Author Position', 'spider-elements' ), |
| 655 | 'type' => Controls_Manager::TEXT, |
| 656 | 'default' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 657 | ] |
| 658 | ); |
| 659 | $testimonial8->add_control( |
| 660 | 'author_image', [ |
| 661 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 662 | 'type' => Controls_Manager::MEDIA, |
| 663 | 'default' => [ |
| 664 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 665 | ], |
| 666 | ] |
| 667 | ); |
| 668 | |
| 669 | $this->add_control( |
| 670 | 'testimonials8', [ |
| 671 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 672 | 'type' => Controls_Manager::REPEATER, |
| 673 | 'fields' => $testimonial8->get_controls(), |
| 674 | 'title_field' => '{{{ name }}}', |
| 675 | 'prevent_empty' => false, |
| 676 | 'default' => [ |
| 677 | [ |
| 678 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 679 | 'author_position' => esc_html__( 'Italy', 'spider-elements' ), |
| 680 | 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', |
| 681 | 'spider-elements' ), |
| 682 | ], |
| 683 | [ |
| 684 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 685 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 686 | 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', |
| 687 | 'spider-elements' ), |
| 688 | ], |
| 689 | [ |
| 690 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 691 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 692 | 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', |
| 693 | 'spider-elements' ), |
| 694 | ], |
| 695 | ], |
| 696 | 'condition' => [ |
| 697 | 'style' => [ '8' ] |
| 698 | ] |
| 699 | ] |
| 700 | ); //End Testimonials 08 |
| 701 | |
| 702 | //=== Testimonials 10 |
| 703 | $testimonial10 = new Repeater(); |
| 704 | $testimonial10->add_control( |
| 705 | 'review_content', [ |
| 706 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 707 | 'type' => Controls_Manager::TEXTAREA, |
| 708 | ] |
| 709 | ); |
| 710 | $testimonial10->add_control( |
| 711 | 'author_name', [ |
| 712 | 'label' => esc_html__( 'Author Name', 'spider-elements' ), |
| 713 | 'type' => Controls_Manager::TEXT, |
| 714 | 'default' => esc_html__( 'Karina', 'spider-elements' ), |
| 715 | ] |
| 716 | ); |
| 717 | $testimonial10->add_control( |
| 718 | 'author_position', [ |
| 719 | 'label' => esc_html__( 'Author Position', 'spider-elements' ), |
| 720 | 'type' => Controls_Manager::TEXT, |
| 721 | 'default' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 722 | ] |
| 723 | ); |
| 724 | $testimonial10->add_control( |
| 725 | 'author_image', [ |
| 726 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 727 | 'type' => Controls_Manager::MEDIA, |
| 728 | 'default' => [ |
| 729 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 730 | ], |
| 731 | ] |
| 732 | ); |
| 733 | |
| 734 | $this->add_control( |
| 735 | 'testimonials10', [ |
| 736 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 737 | 'type' => Controls_Manager::REPEATER, |
| 738 | 'fields' => $testimonial10->get_controls(), |
| 739 | 'title_field' => '{{{ name }}}', |
| 740 | 'prevent_empty' => false, |
| 741 | 'default' => [ |
| 742 | [ |
| 743 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 744 | 'author_position' => esc_html__( 'Italy', 'spider-elements' ), |
| 745 | 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', |
| 746 | 'spider-elements' ), |
| 747 | ], |
| 748 | [ |
| 749 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 750 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 751 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 752 | ], |
| 753 | [ |
| 754 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 755 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 756 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 757 | ], |
| 758 | ], |
| 759 | 'condition' => [ |
| 760 | 'style' => '10' |
| 761 | ] |
| 762 | ] |
| 763 | ); //End Testimonials 10 |
| 764 | |
| 765 | //=== Testimonials 11 |
| 766 | $testimonial11 = new Repeater(); |
| 767 | $testimonial11->add_control( |
| 768 | 'review_content', [ |
| 769 | 'label' => esc_html__( 'Testimonial Text', 'spider-elements' ), |
| 770 | 'type' => Controls_Manager::TEXTAREA, |
| 771 | ] |
| 772 | ); |
| 773 | $testimonial11->add_control( |
| 774 | 'author_name', [ |
| 775 | 'label' => esc_html__( 'Author Name', 'spider-elements' ), |
| 776 | 'type' => Controls_Manager::TEXT, |
| 777 | 'default' => esc_html__( 'Karina', 'spider-elements' ), |
| 778 | ] |
| 779 | ); |
| 780 | $testimonial11->add_control( |
| 781 | 'author_position', [ |
| 782 | 'label' => esc_html__( 'Author Position', 'spider-elements' ), |
| 783 | 'type' => Controls_Manager::TEXT, |
| 784 | 'default' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 785 | ] |
| 786 | ); |
| 787 | $testimonial11->add_control( |
| 788 | 'author_image', [ |
| 789 | 'label' => esc_html__( 'Author Image', 'spider-elements' ), |
| 790 | 'type' => Controls_Manager::MEDIA, |
| 791 | 'default' => [ |
| 792 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 793 | ], |
| 794 | ] |
| 795 | ); |
| 796 | |
| 797 | $this->add_control( |
| 798 | 'testimonials11', [ |
| 799 | 'label' => esc_html__( 'Testimonials', 'spider-elements' ), |
| 800 | 'type' => Controls_Manager::REPEATER, |
| 801 | 'fields' => $testimonial11->get_controls(), |
| 802 | 'title_field' => '{{{ name }}}', |
| 803 | 'prevent_empty' => false, |
| 804 | 'default' => [ |
| 805 | [ |
| 806 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 807 | 'author_position' => esc_html__( 'Italy', 'spider-elements' ), |
| 808 | 'review_content' => esc_html__( '“Very easy to set-up. I had no experience with hosting before signing up with Jobi but they have made everything seem simple.”', |
| 809 | 'spider-elements' ), |
| 810 | ], |
| 811 | [ |
| 812 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 813 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 814 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 815 | ], |
| 816 | [ |
| 817 | 'author_name' => esc_html__( 'Karina', 'spider-elements' ), |
| 818 | 'author_position' => esc_html__( 'Lead Designer', 'spider-elements' ), |
| 819 | 'review_content' => esc_html__( '“Seattle opera simplifies Performance planning with deski eSignature.”', 'spider-elements' ), |
| 820 | ], |
| 821 | ], |
| 822 | 'condition' => [ |
| 823 | 'style' => '11' |
| 824 | ] |
| 825 | ] |
| 826 | ); //End Testimonials 11 |
| 827 | |
| 828 | |
| 829 | $this->add_control( |
| 830 | 'shape', [ |
| 831 | 'label' => esc_html__( 'Shape', 'spider-elements' ), |
| 832 | 'type' => Controls_Manager::MEDIA, |
| 833 | 'separator' => 'before', |
| 834 | 'condition' => [ |
| 835 | 'style' => '1' |
| 836 | ], |
| 837 | ] |
| 838 | ); |
| 839 | $this->add_control( |
| 840 | 'quote_img', [ |
| 841 | 'label' => esc_html__( 'Quote Image', 'spider-elements' ), |
| 842 | 'type' => Controls_Manager::MEDIA, |
| 843 | 'separator' => 'before', |
| 844 | 'default' => [ |
| 845 | 'url' => \Elementor\Utils::get_placeholder_image_src(), |
| 846 | ], |
| 847 | 'condition' => [ |
| 848 | 'style' => '10' |
| 849 | ], |
| 850 | ] |
| 851 | ); |
| 852 | |
| 853 | $this->add_control( |
| 854 | 'quote_icon', |
| 855 | [ |
| 856 | 'label' => esc_html__( 'Quote Icon', 'spider-elements' ), |
| 857 | 'type' => Controls_Manager::ICONS, |
| 858 | 'default' => [ |
| 859 | 'value' => 'fas fa-quote-left', |
| 860 | 'library' => 'fa-solid', |
| 861 | ], |
| 862 | 'condition' => [ |
| 863 | 'style' => '4' |
| 864 | ], |
| 865 | ] |
| 866 | ); |
| 867 | |
| 868 | $this->end_controls_section(); // End Testimonials |
| 869 | |
| 870 | } |
| 871 | |
| 872 | // Testimonial Repeater |
| 873 | protected function elementor_rating_controls() { |
| 874 | $this->start_controls_section( |
| 875 | 'section_rating', |
| 876 | [ |
| 877 | 'label' => esc_html__( 'Rating', 'spider-elements' ), |
| 878 | 'condition' => [ |
| 879 | 'style' => [ '6', '7', '9' ] |
| 880 | ], |
| 881 | ], |
| 882 | |
| 883 | ); |
| 884 | |
| 885 | $this->add_control( |
| 886 | 'testimonial_ratting_icon', |
| 887 | [ |
| 888 | 'label' => esc_html__( 'Show Rating', 'spider-elements' ), |
| 889 | 'type' => \Elementor\Controls_Manager::SWITCHER, |
| 890 | 'label_on' => esc_html__( 'Show', 'spider-elements' ), |
| 891 | 'label_off' => esc_html__( 'Hide', 'spider-elements' ), |
| 892 | 'return_value' => 'yes', |
| 893 | 'default' => 'yes', |
| 894 | ] |
| 895 | ); |
| 896 | |
| 897 | |
| 898 | $this->add_control( |
| 899 | 'rating_scale', |
| 900 | [ |
| 901 | 'label' => esc_html__( 'Rating Scale', 'spider-elements' ), |
| 902 | 'type' => \Elementor\Controls_Manager::SELECT, |
| 903 | 'options' => [ |
| 904 | '5' => '0-5', |
| 905 | '10' => '0-10', |
| 906 | ], |
| 907 | 'default' => '5', |
| 908 | 'condition' => [ |
| 909 | 'testimonial_ratting_icon' => [ 'yes' ], |
| 910 | ], |
| 911 | ] |
| 912 | ); |
| 913 | |
| 914 | $this->add_control( |
| 915 | 'star_style', |
| 916 | [ |
| 917 | 'label' => esc_html__( 'Icon', 'spider-elements' ), |
| 918 | 'type' => \Elementor\Controls_Manager::SELECT, |
| 919 | 'options' => [ |
| 920 | 'star_fontawesome' => 'Font Awesome', |
| 921 | 'star_unicode' => 'Unicode', |
| 922 | ], |
| 923 | 'default' => 'star_fontawesome', |
| 924 | 'render_type' => 'template', |
| 925 | 'prefix_class' => 'elementor--star-style-', |
| 926 | 'separator' => 'before', |
| 927 | ] |
| 928 | ); |
| 929 | |
| 930 | $this->add_control( |
| 931 | 'unmarked_star_style', |
| 932 | [ |
| 933 | 'label' => esc_html__( 'Unmarked Style', 'spider-elements' ), |
| 934 | 'type' => \Elementor\Controls_Manager::CHOOSE, |
| 935 | 'options' => [ |
| 936 | 'solid' => [ |
| 937 | 'title' => esc_html__( 'Solid', 'spider-elements' ), |
| 938 | 'icon' => 'eicon-star', |
| 939 | ], |
| 940 | 'outline' => [ |
| 941 | 'title' => esc_html__( 'Outline', 'spider-elements' ), |
| 942 | 'icon' => 'eicon-star-o', |
| 943 | ], |
| 944 | ], |
| 945 | 'default' => 'solid', |
| 946 | ] |
| 947 | ); |
| 948 | |
| 949 | $this->end_controls_section(); |
| 950 | } |
| 951 | |
| 952 | |
| 953 | /** |
| 954 | * Name: elementor_style_control() |
| 955 | * Desc: Register the Style Tab output on the Elementor editor. |
| 956 | * Params: no params |
| 957 | * Return: @void |
| 958 | * Since: @1.0.0 |
| 959 | * Package: @spider-elements |
| 960 | * Author: spider-themes |
| 961 | */ |
| 962 | |
| 963 | public function elementor_general_style() { |
| 964 | $this->start_controls_section( |
| 965 | 'style_item_tabs', [ |
| 966 | 'label' => esc_html__( 'Testimonial Item', 'spider-elements' ), |
| 967 | 'tab' => Controls_Manager::TAB_STYLE, |
| 968 | 'condition' => [ |
| 969 | 'style' => [ '6', '7', '9', '10' ] |
| 970 | ] |
| 971 | ] |
| 972 | ); |
| 973 | |
| 974 | $this->start_controls_tabs( |
| 975 | 'style_testimonial_item_tabs' |
| 976 | ); |
| 977 | |
| 978 | //=== Normal testimonial |
| 979 | $this->start_controls_tab( |
| 980 | 'style_normal', |
| 981 | [ |
| 982 | 'label' => esc_html__( 'Normal', 'spider-elements' ), |
| 983 | ] |
| 984 | ); |
| 985 | |
| 986 | $this->add_group_control( |
| 987 | Group_Control_Background::get_type(), |
| 988 | [ |
| 989 | 'name' => 'testimonial_item_background', |
| 990 | 'types' => [ 'classic', 'gradient' ], |
| 991 | 'selector' => '{{WRAPPER}} .feedback-block-one, |
| 992 | {{WRAPPER}} .testimonial-item, |
| 993 | {{WRAPPER}} .feedback-section-four .bg-wrapper ', |
| 994 | ] |
| 995 | ); |
| 996 | |
| 997 | // $this->add_group_control( |
| 998 | // Group_Control_Background::get_type(), |
| 999 | // [ |
| 1000 | // 'name' => 'background', |
| 1001 | // 'types' => [ 'classic', 'gradient', 'video' ], |
| 1002 | // 'selector' => '{{WRAPPER}} .testimonial-item, |
| 1003 | // {{WRAPPER}} .feedback-section-four .bg-wrapper', |
| 1004 | // 'condition' => [ |
| 1005 | // 'style' => [ '5', '10' ], |
| 1006 | // 'style!' => [ '9' ] |
| 1007 | // ] |
| 1008 | // ] |
| 1009 | // ); |
| 1010 | |
| 1011 | $this->add_group_control( |
| 1012 | \Elementor\Group_Control_Border::get_type(), |
| 1013 | [ |
| 1014 | 'name' => 'item_border', |
| 1015 | 'label' => esc_html__( 'Border', 'spider-elements' ), |
| 1016 | 'selector' => '{{WRAPPER}} .feedback-block-one, |
| 1017 | {{WRAPPER}} .testimonial-item, |
| 1018 | {{WRAPPER}} .feedback-section-four .bg-wrapper |
| 1019 | ', |
| 1020 | ] |
| 1021 | ); |
| 1022 | |
| 1023 | $this->add_responsive_control( |
| 1024 | 'item_border_radius', |
| 1025 | [ |
| 1026 | 'label' => esc_html__( 'Border Radius', 'spider-elements' ), |
| 1027 | 'type' => Controls_Manager::DIMENSIONS, |
| 1028 | 'size_units' => [ 'px', '%', 'em' ], |
| 1029 | 'selectors' => [ |
| 1030 | '{{WRAPPER}} .feedback-block-one' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1031 | '{{WRAPPER}} .testimonial-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1032 | '{{WRAPPER}} .feedback-section-four .bg-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1033 | ], |
| 1034 | ] |
| 1035 | ); |
| 1036 | |
| 1037 | $this->add_responsive_control( |
| 1038 | 'testimonial_item_mar', |
| 1039 | [ |
| 1040 | 'label' => esc_html__( 'Margin', 'spider-elements' ), |
| 1041 | 'type' => Controls_Manager::DIMENSIONS, |
| 1042 | 'size_units' => [ 'px', '%', 'em' ], |
| 1043 | 'selectors' => [ |
| 1044 | '{{WRAPPER}} .feedback-slider-two .item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1045 | ], |
| 1046 | 'condition' => [ |
| 1047 | 'style' => '9' |
| 1048 | ] |
| 1049 | ] |
| 1050 | ); |
| 1051 | |
| 1052 | $this->add_responsive_control( |
| 1053 | 'testimonial_item_pad', |
| 1054 | [ |
| 1055 | 'label' => esc_html__( 'Padding', 'spider-elements' ), |
| 1056 | 'type' => Controls_Manager::DIMENSIONS, |
| 1057 | 'size_units' => [ 'px', '%', 'em' ], |
| 1058 | 'selectors' => [ |
| 1059 | '{{WRAPPER}} .feedback-block-one' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1060 | '{{WRAPPER}} .testimonial-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1061 | '{{WRAPPER}} .feedback-section-four .bg-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1062 | ], |
| 1063 | ] |
| 1064 | ); |
| 1065 | |
| 1066 | $this->end_controls_tab(); //End Normal Testimonial |
| 1067 | |
| 1068 | |
| 1069 | //=== Hover Testimonial |
| 1070 | $this->start_controls_tab( |
| 1071 | 'testimonial_item_hover', [ |
| 1072 | 'label' => esc_html__( 'Hover', 'spider-elements' ), |
| 1073 | ] |
| 1074 | ); |
| 1075 | |
| 1076 | $this->add_group_control( |
| 1077 | Group_Control_Background::get_type(), |
| 1078 | [ |
| 1079 | 'name' => 'item_hover_background', |
| 1080 | 'types' => [ 'classic', 'gradient' ], |
| 1081 | 'selector' => '{{WRAPPER}} .feedback-block-one:hover, |
| 1082 | {{WRAPPER}} .feedback-section-four .bg-wrapper:hover', |
| 1083 | ] |
| 1084 | ); |
| 1085 | |
| 1086 | $this->add_control( |
| 1087 | 'relative_hover_color', |
| 1088 | [ |
| 1089 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1090 | 'type' => Controls_Manager::COLOR, |
| 1091 | 'selectors' => [ |
| 1092 | '{{WRAPPER}} .feedback-section-four:hover .bg-wrapper p' => 'color: {{VALUE}};', |
| 1093 | ], |
| 1094 | 'condition' => [ |
| 1095 | 'style' => '10' |
| 1096 | ] |
| 1097 | ] |
| 1098 | ); |
| 1099 | |
| 1100 | $this->add_control( |
| 1101 | 'author_hover_color', |
| 1102 | [ |
| 1103 | 'label' => esc_html__( 'Name Color', 'spider-elements' ), |
| 1104 | 'type' => Controls_Manager::COLOR, |
| 1105 | 'selectors' => [ |
| 1106 | '{{WRAPPER}} .feedback-section-four:hover .bg-wrapper .name' => 'color: {{VALUE}};', |
| 1107 | ], |
| 1108 | 'condition' => [ |
| 1109 | 'style' => '10' |
| 1110 | ] |
| 1111 | ] |
| 1112 | ); |
| 1113 | |
| 1114 | $this->add_control( |
| 1115 | 'testimonial_item_hover_border', [ |
| 1116 | 'label' => esc_html__( 'Border Color', 'spider-elements' ), |
| 1117 | 'type' => Controls_Manager::COLOR, |
| 1118 | 'selectors' => [ |
| 1119 | '{{WRAPPER}} .feedback-block-one:hover' => 'border-color: {{VALUE}};', |
| 1120 | '{{WRAPPER}} .feedback-section-four .bg-wrapper:hover' => 'border-color: {{VALUE}};', |
| 1121 | ], |
| 1122 | ] |
| 1123 | ); |
| 1124 | $this->end_controls_tab(); // End testimonial hover Tab |
| 1125 | |
| 1126 | $this->end_controls_tabs(); // End Accordion icon Normal/Active/ State |
| 1127 | $this->end_controls_section(); // End Contents Style |
| 1128 | |
| 1129 | |
| 1130 | //========================= Arrow Icons =======================// |
| 1131 | $this->start_controls_section( |
| 1132 | 'arrow_icons_sec', [ |
| 1133 | 'label' => esc_html__( 'Arrow Icon', 'spider-elements' ), |
| 1134 | 'condition' => [ |
| 1135 | 'style' => [ '6', '7', '8', '10' ] |
| 1136 | ] |
| 1137 | ] |
| 1138 | ); |
| 1139 | |
| 1140 | $this->add_control( |
| 1141 | 'prev_arrow_icon', [ |
| 1142 | 'label' => esc_html__( 'Prev Icon', 'spider-elements' ), |
| 1143 | 'type' => \Elementor\Controls_Manager::ICONS, |
| 1144 | 'default' => [ |
| 1145 | 'value' => 'arrow_carrot-left', |
| 1146 | 'library' => 'ElegantIcons' |
| 1147 | ], |
| 1148 | ] |
| 1149 | ); |
| 1150 | |
| 1151 | $this->add_control( |
| 1152 | 'next_arrow_icon', [ |
| 1153 | 'label' => esc_html__( 'Next Icon', 'spider-elements' ), |
| 1154 | 'type' => \Elementor\Controls_Manager::ICONS, |
| 1155 | 'default' => [ |
| 1156 | 'value' => 'arrow_carrot-right', |
| 1157 | 'library' => 'ElegantIcons' |
| 1158 | ], |
| 1159 | ] |
| 1160 | ); |
| 1161 | |
| 1162 | $this->end_controls_section(); //End Arrow Icons |
| 1163 | |
| 1164 | } |
| 1165 | |
| 1166 | |
| 1167 | public function elementor_style_control() { |
| 1168 | //========================= Contents =========================// |
| 1169 | $this->start_controls_section( |
| 1170 | 'style_content_sec', [ |
| 1171 | 'label' => esc_html__( 'Contents', 'spider-elements' ), |
| 1172 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1173 | ] |
| 1174 | ); |
| 1175 | |
| 1176 | //=== Title Style |
| 1177 | $this->add_control( |
| 1178 | 'title_style', [ |
| 1179 | 'label' => esc_html__( 'Title', 'spider-elements' ), |
| 1180 | 'type' => Controls_Manager::HEADING, |
| 1181 | 'separator' => 'before', |
| 1182 | 'condition' => [ |
| 1183 | 'style' => [ '5' ], |
| 1184 | 'style!' => [ '1', '2', '3', ] |
| 1185 | ] |
| 1186 | ] |
| 1187 | ); |
| 1188 | |
| 1189 | $this->add_group_control( |
| 1190 | Group_Control_Typography::get_type(), [ |
| 1191 | 'name' => 'title_typo', |
| 1192 | 'selector' => '{{WRAPPER}} .se_title', |
| 1193 | 'condition' => [ |
| 1194 | 'style' => [ '5' ], |
| 1195 | 'style!' => [ '1', '2', '3', ] |
| 1196 | ] |
| 1197 | ] |
| 1198 | ); |
| 1199 | |
| 1200 | $this->add_control( |
| 1201 | 'title_color', [ |
| 1202 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1203 | 'type' => Controls_Manager::COLOR, |
| 1204 | 'selectors' => [ |
| 1205 | '{{WRAPPER}} .se_title' => 'color: {{VALUE}};', |
| 1206 | ], |
| 1207 | 'condition' => [ |
| 1208 | 'style' => [ '5' ], |
| 1209 | 'style!' => [ '1', '2', '3', '4' ] |
| 1210 | ] |
| 1211 | ] |
| 1212 | ); |
| 1213 | //End Title Style |
| 1214 | |
| 1215 | $this->add_control( |
| 1216 | 'box-padding', |
| 1217 | [ |
| 1218 | 'label' => esc_html__( 'Box Padding', 'spider-elements' ), |
| 1219 | 'type' => Controls_Manager::DIMENSIONS, |
| 1220 | 'size_units' => [ 'px', 'em', '%' ], |
| 1221 | 'selectors' => [ |
| 1222 | '{{WRAPPER}} .testimonial-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1223 | ], |
| 1224 | 'condition' => [ |
| 1225 | 'style' => [ '3' ], |
| 1226 | 'style!' => [ '1', '2', '4', '5', '6', '7', '8', '9', '10', '11' ] |
| 1227 | ] |
| 1228 | ] |
| 1229 | ); |
| 1230 | |
| 1231 | //=== Author Name |
| 1232 | $this->add_control( |
| 1233 | 'author_name_options', [ |
| 1234 | 'label' => esc_html__( 'Author Name', 'spider-elements' ), |
| 1235 | 'type' => Controls_Manager::HEADING, |
| 1236 | 'separator' => 'before', |
| 1237 | ] |
| 1238 | ); |
| 1239 | |
| 1240 | $this->add_group_control( |
| 1241 | Group_Control_Typography::get_type(), [ |
| 1242 | 'name' => 'author_name_typo', |
| 1243 | 'selector' => '{{WRAPPER}} .se_name, |
| 1244 | {{WRAPPER}} .feedback-block-one .name, |
| 1245 | {{WRAPPER}} #feedBack_carousel .name, |
| 1246 | {{WRAPPER}} .feedback-section-four .bg-wrapper .name', |
| 1247 | ] |
| 1248 | ); |
| 1249 | |
| 1250 | $this->add_control( |
| 1251 | 'author_name_color', [ |
| 1252 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1253 | 'type' => Controls_Manager::COLOR, |
| 1254 | 'selectors' => [ |
| 1255 | '{{WRAPPER}} .se_name' => 'color: {{VALUE}};', |
| 1256 | '{{WRAPPER}} .feedback-block-one .name' => 'color: {{VALUE}};', |
| 1257 | '{{WRAPPER}} #feedBack_carousel .name' => 'color: {{VALUE}};', |
| 1258 | '{{WRAPPER}} .feedback-section-four .bg-wrapper .name' => 'color: {{VALUE}};', |
| 1259 | ], |
| 1260 | ] |
| 1261 | ); |
| 1262 | //End Author Name |
| 1263 | |
| 1264 | //=== Review Content |
| 1265 | $this->add_control( |
| 1266 | 'review_content_options', [ |
| 1267 | 'label' => esc_html__( 'Review Content', 'spider-elements' ), |
| 1268 | 'type' => Controls_Manager::HEADING, |
| 1269 | 'separator' => 'before', |
| 1270 | ] |
| 1271 | ); |
| 1272 | |
| 1273 | $this->add_group_control( |
| 1274 | Group_Control_Typography::get_type(), [ |
| 1275 | 'name' => 'review_text_typo', |
| 1276 | 'selector' => '{{WRAPPER}} .se_review_content, |
| 1277 | {{WRAPPER}} .feedback-block-one h3, |
| 1278 | {{WRAPPER}} #feedBack_carousel .carousel-inner p, |
| 1279 | {{WRAPPER}} .spel_review_content, |
| 1280 | {{WRAPPER}} .feedback-section-four .bg-wrapper p', |
| 1281 | ] |
| 1282 | ); |
| 1283 | |
| 1284 | $this->add_control( |
| 1285 | 'review_content_color', [ |
| 1286 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1287 | 'type' => Controls_Manager::COLOR, |
| 1288 | 'selectors' => [ |
| 1289 | '{{WRAPPER}} .se_review_content' => 'color: {{VALUE}};', |
| 1290 | '{{WRAPPER}} .feedback-block-one h3' => 'color: {{VALUE}};', |
| 1291 | '{{WRAPPER}} #feedBack_carousel .carousel-inner p' => 'color: {{VALUE}};', |
| 1292 | '{{WRAPPER}} .feedback-section-four .bg-wrapper p' => 'color: {{VALUE}};', |
| 1293 | '{{WRAPPER}} .spel_review_content' => 'color: {{VALUE}};', |
| 1294 | ], |
| 1295 | ] |
| 1296 | ); |
| 1297 | |
| 1298 | $this->add_control( |
| 1299 | 'border_color', [ |
| 1300 | 'label' => esc_html__( 'Border Color', 'spider-elements' ), |
| 1301 | 'type' => Controls_Manager::COLOR, |
| 1302 | 'selectors' => [ |
| 1303 | '{{WRAPPER}} .testimonial-slider-inner .testimonial-item' => 'border-color: {{VALUE}};', |
| 1304 | ], |
| 1305 | 'condition' => [ |
| 1306 | 'style' => [ '3' ], |
| 1307 | 'style!' => [ '1', '2', '4', '5', '6', '7', '8', '9' ] |
| 1308 | ] |
| 1309 | ] |
| 1310 | ); |
| 1311 | |
| 1312 | $this->add_responsive_control( |
| 1313 | 'Content_margin', |
| 1314 | [ |
| 1315 | 'label' => esc_html__( 'Margin', 'spider-elements' ), |
| 1316 | 'type' => Controls_Manager::DIMENSIONS, |
| 1317 | 'size_units' => [ 'px', '%', 'em' ], |
| 1318 | 'selectors' => [ |
| 1319 | '{{WRAPPER}} .feedback-block-two h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1320 | '{{WRAPPER}} .feedback-block-one h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1321 | '{{WRAPPER}} .feedback-block-three h3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1322 | '{{WRAPPER}} .testimonial-slider-inner .testimonial-item p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1323 | ], |
| 1324 | 'condition' => [ |
| 1325 | 'style' => [ '3', '6', '7', '9' ] |
| 1326 | ] |
| 1327 | ] |
| 1328 | ); |
| 1329 | |
| 1330 | //End Review Content |
| 1331 | |
| 1332 | //=== Category Style |
| 1333 | $this->add_control( |
| 1334 | 'category_options', [ |
| 1335 | 'label' => esc_html__( 'Category', 'spider-elements' ), |
| 1336 | 'type' => Controls_Manager::HEADING, |
| 1337 | 'separator' => 'before', |
| 1338 | 'condition' => [ |
| 1339 | 'style' => '5' |
| 1340 | ] |
| 1341 | ] |
| 1342 | ); |
| 1343 | |
| 1344 | $this->add_group_control( |
| 1345 | Group_Control_Typography::get_type(), [ |
| 1346 | 'name' => 'category_typo', |
| 1347 | 'selector' => '{{WRAPPER}} .se_category', |
| 1348 | 'condition' => [ |
| 1349 | 'style' => '5' |
| 1350 | ] |
| 1351 | ] |
| 1352 | ); |
| 1353 | |
| 1354 | $this->add_control( |
| 1355 | 'category_color', [ |
| 1356 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1357 | 'type' => Controls_Manager::COLOR, |
| 1358 | 'selectors' => [ |
| 1359 | '{{WRAPPER}} .se_category' => 'color: {{VALUE}};', |
| 1360 | ], |
| 1361 | 'condition' => [ |
| 1362 | 'style' => '5' |
| 1363 | ] |
| 1364 | ] |
| 1365 | |
| 1366 | );//End Category Style |
| 1367 | |
| 1368 | //=== Designation |
| 1369 | $this->add_control( |
| 1370 | 'designation_options', [ |
| 1371 | 'label' => esc_html__( 'Designation', 'spider-elements' ), |
| 1372 | 'type' => Controls_Manager::HEADING, |
| 1373 | 'separator' => 'before', |
| 1374 | 'condition' => [ |
| 1375 | 'style' => [ '1', '2', '3', '4', '9', ] |
| 1376 | ] |
| 1377 | ] |
| 1378 | ); |
| 1379 | |
| 1380 | $this->add_group_control( |
| 1381 | Group_Control_Typography::get_type(), [ |
| 1382 | 'name' => 'designation_typo', |
| 1383 | 'selector' => '{{WRAPPER}} .se_designation, |
| 1384 | {{WRAPPER}} .feedback-block-two .block-footer span', |
| 1385 | 'condition' => [ |
| 1386 | 'style' => [ '1', '2', '3', '4', '9', '11' ] |
| 1387 | ] |
| 1388 | ] |
| 1389 | ); |
| 1390 | |
| 1391 | $this->add_control( |
| 1392 | 'designation_color', [ |
| 1393 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1394 | 'type' => Controls_Manager::COLOR, |
| 1395 | 'selectors' => [ |
| 1396 | '{{WRAPPER}} .se_designation' => 'color: {{VALUE}};', |
| 1397 | '{{WRAPPER}} .feedback-block-two .block-footer span' => 'color: {{VALUE}};', |
| 1398 | ], |
| 1399 | 'condition' => [ |
| 1400 | 'style' => [ '1', '2', '3', '4', '9', ] |
| 1401 | ] |
| 1402 | ] |
| 1403 | ); |
| 1404 | //End Designation |
| 1405 | |
| 1406 | $this->end_controls_section(); |
| 1407 | |
| 1408 | //========================= Contents =========================// |
| 1409 | $this->start_controls_section( |
| 1410 | 'style_rating_sec', [ |
| 1411 | 'label' => esc_html__( 'Rating', 'spider-elements' ), |
| 1412 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1413 | 'condition' => [ |
| 1414 | 'style' => [ '6', '7', '9' ] |
| 1415 | ] |
| 1416 | ] |
| 1417 | ); |
| 1418 | |
| 1419 | $this->add_group_control( |
| 1420 | Group_Control_Typography::get_type(), [ |
| 1421 | 'name' => 'rating_title_typo', |
| 1422 | 'selector' => '{{WRAPPER}} .feedback-block-one .review .text-md, |
| 1423 | {{WRAPPER}} .feedback-block-two .review .text-md, |
| 1424 | {{WRAPPER}} .feedback-block-three .review .text-md', |
| 1425 | 'condition' => [ |
| 1426 | 'style' => [ '6', '7', '9' ] |
| 1427 | ] |
| 1428 | ] |
| 1429 | ); |
| 1430 | |
| 1431 | $this->add_control( |
| 1432 | 'rating_title_color', [ |
| 1433 | 'label' => esc_html__( 'Text Color', 'spider-elements' ), |
| 1434 | 'type' => Controls_Manager::COLOR, |
| 1435 | 'selectors' => [ |
| 1436 | '{{WRAPPER}} .feedback-block-one .review .text-md' => 'color: {{VALUE}};', |
| 1437 | '{{WRAPPER}} .feedback-block-two .review .text-md' => 'color: {{VALUE}};', |
| 1438 | '{{WRAPPER}} .feedback-block-three .review .text-md' => 'color: {{VALUE}};', |
| 1439 | ], |
| 1440 | 'condition' => [ |
| 1441 | 'style' => [ '6', '7', '9' ] |
| 1442 | ] |
| 1443 | ] |
| 1444 | ); |
| 1445 | |
| 1446 | $this->add_responsive_control( |
| 1447 | 'rating_pad', |
| 1448 | [ |
| 1449 | 'label' => esc_html__( 'Padding', 'spider-elements' ), |
| 1450 | 'type' => Controls_Manager::DIMENSIONS, |
| 1451 | 'size_units' => [ 'px', '%', 'em' ], |
| 1452 | 'selectors' => [ |
| 1453 | '{{WRAPPER}} .feedback-block-one .review' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1454 | ], |
| 1455 | 'condition' => [ |
| 1456 | 'style' => [ '6' ], |
| 1457 | 'style!' => [ '7', '9' ] |
| 1458 | ] |
| 1459 | ] |
| 1460 | ); |
| 1461 | |
| 1462 | $this->add_group_control( |
| 1463 | \Elementor\Group_Control_Border::get_type(), |
| 1464 | [ |
| 1465 | 'name' => 'review_border', |
| 1466 | 'label' => esc_html__( 'Border', 'spider-elements' ), |
| 1467 | 'selector' => '{{WRAPPER}} .feedback-block-one .review', |
| 1468 | 'condition' => [ |
| 1469 | 'style' => [ '6' ], |
| 1470 | 'style!' => [ '7', '9' ] |
| 1471 | ] |
| 1472 | ] |
| 1473 | ); |
| 1474 | |
| 1475 | $this->add_control( |
| 1476 | 'rating_star_color', [ |
| 1477 | 'label' => esc_html__( 'Star Color', 'spider-elements' ), |
| 1478 | 'type' => Controls_Manager::COLOR, |
| 1479 | 'selectors' => [ |
| 1480 | '{{WRAPPER}} .feedback-block-one .star-rating i::before' => 'color: {{VALUE}};', |
| 1481 | '{{WRAPPER}} .feedback-block-three .star-rating i:before' => 'color: {{VALUE}};', |
| 1482 | ], |
| 1483 | 'condition' => [ |
| 1484 | 'style' => [ '6', '7', '9' ] |
| 1485 | ] |
| 1486 | ] |
| 1487 | ); |
| 1488 | |
| 1489 | $this->end_controls_section(); |
| 1490 | |
| 1491 | } |
| 1492 | |
| 1493 | |
| 1494 | public function elementor_style_image() { |
| 1495 | //========================= Contents =========================// |
| 1496 | $this->start_controls_section( |
| 1497 | 'style_image', [ |
| 1498 | 'label' => esc_html__( 'Image', 'spider-elements' ), |
| 1499 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1500 | 'condition' => [ |
| 1501 | 'style' => [ '3' ] |
| 1502 | ] |
| 1503 | ] |
| 1504 | ); |
| 1505 | |
| 1506 | $this->add_responsive_control( |
| 1507 | 'image_size', |
| 1508 | [ |
| 1509 | 'label' => esc_html__( 'Size', 'spider-elements' ), |
| 1510 | 'type' => Controls_Manager::SLIDER, |
| 1511 | 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], |
| 1512 | 'range' => [ |
| 1513 | 'px' => [ |
| 1514 | 'min' => 6, |
| 1515 | 'max' => 1000, |
| 1516 | ], |
| 1517 | ], |
| 1518 | 'selectors' => [ |
| 1519 | '{{WRAPPER}} .testimonial-slider-inner .author-image img' => 'width: {{SIZE}}{{UNIT}};', |
| 1520 | ], |
| 1521 | ] |
| 1522 | ); |
| 1523 | |
| 1524 | $this->add_control( |
| 1525 | 'img_bg_color', |
| 1526 | [ |
| 1527 | 'label' => esc_html__( 'Background', 'spider-elements' ), |
| 1528 | 'type' => Controls_Manager::COLOR, |
| 1529 | 'selectors' => [ |
| 1530 | '{{WRAPPER}} .testimonial-slider-inner .author-image' => 'background: {{VALUE}}', |
| 1531 | ], |
| 1532 | ] |
| 1533 | ); |
| 1534 | |
| 1535 | //=== shape Style |
| 1536 | $this->add_control( |
| 1537 | 'shape_style', [ |
| 1538 | 'label' => esc_html__( 'Shape', 'spider-elements' ), |
| 1539 | 'type' => Controls_Manager::HEADING, |
| 1540 | 'separator' => 'before', |
| 1541 | ] |
| 1542 | ); |
| 1543 | |
| 1544 | $this->add_responsive_control( |
| 1545 | 'shape_size', |
| 1546 | [ |
| 1547 | 'label' => esc_html__( 'Size', 'spider-elements' ), |
| 1548 | 'type' => Controls_Manager::SLIDER, |
| 1549 | 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ], |
| 1550 | 'range' => [ |
| 1551 | 'px' => [ |
| 1552 | 'min' => 6, |
| 1553 | 'max' => 500, |
| 1554 | ], |
| 1555 | ], |
| 1556 | 'selectors' => [ |
| 1557 | '{{WRAPPER}} .quote-img-top img, .quote-img-bottom img' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', |
| 1558 | ], |
| 1559 | ] |
| 1560 | ); |
| 1561 | |
| 1562 | $this->end_controls_section(); |
| 1563 | } |
| 1564 | |
| 1565 | // start testimonial style 3 icon section======// |
| 1566 | public function elementor_style_icon() { |
| 1567 | //========================= Contents =========================// |
| 1568 | $this->start_controls_section( |
| 1569 | 'style_icon', [ |
| 1570 | 'label' => esc_html__( 'Arrow Icon', 'spider-elements' ), |
| 1571 | 'tab' => Controls_Manager::TAB_STYLE, |
| 1572 | 'condition' => [ |
| 1573 | 'style' => [ '3' ] |
| 1574 | ] |
| 1575 | ] |
| 1576 | ); |
| 1577 | |
| 1578 | $this->start_controls_tabs( |
| 1579 | 'style_tabs' |
| 1580 | ); |
| 1581 | |
| 1582 | $this->start_controls_tab( |
| 1583 | 'style_icon_normal_tab', |
| 1584 | [ |
| 1585 | 'label' => esc_html__( 'Normal', 'spider-elements' ), |
| 1586 | ] |
| 1587 | ); |
| 1588 | |
| 1589 | $this->add_responsive_control( |
| 1590 | 'icon_size', |
| 1591 | [ |
| 1592 | 'label' => esc_html__( 'Size', 'spider-elements' ), |
| 1593 | 'type' => Controls_Manager::SLIDER, |
| 1594 | 'size_units' => [ 'px', '%' ], |
| 1595 | 'range' => [ |
| 1596 | 'px' => [ |
| 1597 | 'min' => 6, |
| 1598 | 'max' => 100, |
| 1599 | ], |
| 1600 | ], |
| 1601 | 'selectors' => [ |
| 1602 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:after' => 'font-size: {{SIZE}}{{UNIT}}', |
| 1603 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-next:after' => 'font-size: {{SIZE}}{{UNIT}}', |
| 1604 | ], |
| 1605 | ] |
| 1606 | ); |
| 1607 | |
| 1608 | $this->add_control( |
| 1609 | 'icon_hover_color', |
| 1610 | [ |
| 1611 | 'label' => esc_html__( 'Color', 'spider-elements' ), |
| 1612 | 'type' => Controls_Manager::COLOR, |
| 1613 | 'selectors' => [ |
| 1614 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:after, .testimonial_area_nine .navigation .swiper-button-next:after' => 'color: {{VALUE}}', |
| 1615 | ], |
| 1616 | ] |
| 1617 | ); |
| 1618 | |
| 1619 | $this->add_control( |
| 1620 | 'icon_bg_color', |
| 1621 | [ |
| 1622 | 'label' => esc_html__( 'Background', 'spider-elements' ), |
| 1623 | 'type' => Controls_Manager::COLOR, |
| 1624 | 'selectors' => [ |
| 1625 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev' => 'background: {{VALUE}}', |
| 1626 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-next' => 'background: {{VALUE}}', |
| 1627 | ], |
| 1628 | ] |
| 1629 | ); |
| 1630 | |
| 1631 | $this->end_controls_tab(); |
| 1632 | |
| 1633 | $this->start_controls_tab( |
| 1634 | 'style_hover_tab', |
| 1635 | [ |
| 1636 | 'label' => esc_html__( 'Hover', 'spider-elements' ), |
| 1637 | ] |
| 1638 | ); |
| 1639 | |
| 1640 | $this->add_control( |
| 1641 | 'icon_color', |
| 1642 | [ |
| 1643 | 'label' => esc_html__( 'Color', 'spider-elements' ), |
| 1644 | 'type' => Controls_Manager::COLOR, |
| 1645 | 'selectors' => [ |
| 1646 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:hover:after, .testimonial_area_nine .navigation .swiper-button-next:hover:after' => 'color: {{VALUE}}', |
| 1647 | ], |
| 1648 | ] |
| 1649 | ); |
| 1650 | |
| 1651 | $this->add_control( |
| 1652 | 'icon_bg_hover_color', |
| 1653 | [ |
| 1654 | 'label' => esc_html__( 'Background', 'spider-elements' ), |
| 1655 | 'type' => Controls_Manager::COLOR, |
| 1656 | 'selectors' => [ |
| 1657 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-prev:hover' => 'background: {{VALUE}}', |
| 1658 | '{{WRAPPER}} .testimonial_area_nine .navigation .swiper-button-next:hover' => 'background: {{VALUE}}', |
| 1659 | ], |
| 1660 | ] |
| 1661 | ); |
| 1662 | |
| 1663 | $this->end_controls_tab(); |
| 1664 | // end icon hover |
| 1665 | $this->end_controls_tabs(); |
| 1666 | // end icon normal and hover tabs style |
| 1667 | $this->end_controls_section(); |
| 1668 | } |
| 1669 | // end testimonial style 3 icon style section============// |
| 1670 | |
| 1671 | |
| 1672 | /** |
| 1673 | * Print the actual stars and calculate their filling. |
| 1674 | * |
| 1675 | * Rating type is float to allow stars-count to be a fraction. |
| 1676 | * Floored-rating type is int, to represent the rounded-down stars count. |
| 1677 | * In the `for` loop, the index type is float to allow comparing with the rating value. |
| 1678 | * |
| 1679 | * @since 2.3.0 |
| 1680 | * @access protected |
| 1681 | */ |
| 1682 | protected function render_stars( $icon, $dat = 0 ) { |
| 1683 | $rating_data = $this->get_rating( $dat ); |
| 1684 | $rating = (float) $rating_data[0]; |
| 1685 | $floored_rating = floor( $rating ); |
| 1686 | $stars_html = ''; |
| 1687 | |
| 1688 | for ( $stars = 1.0; $stars <= $rating_data[1]; $stars ++ ) { |
| 1689 | if ( $stars <= $floored_rating ) { |
| 1690 | $stars_html .= '<i class="elementor-star-full">' . $icon . '</i>'; |
| 1691 | } elseif ( $floored_rating + 1 === $stars && $rating !== $floored_rating ) { |
| 1692 | $stars_html .= '<i class="elementor-star-' . ( $rating - $floored_rating ) * 10 . '">' . $icon . '</i>'; |
| 1693 | } else { |
| 1694 | $stars_html .= '<i class="elementor-star-empty">' . $icon . '</i>'; |
| 1695 | } |
| 1696 | } |
| 1697 | |
| 1698 | return $stars_html; |
| 1699 | } |
| 1700 | |
| 1701 | /** |
| 1702 | * @since 2.3.0 |
| 1703 | * @access protected |
| 1704 | */ |
| 1705 | protected function get_rating( $ratting ) { |
| 1706 | $settings = $this->get_settings_for_display(); |
| 1707 | $rating_scale = (int) $settings['rating_scale']; |
| 1708 | $rating = (float) $ratting > $rating_scale ? $rating_scale : $ratting; |
| 1709 | |
| 1710 | return [ $rating, $rating_scale ]; |
| 1711 | } |
| 1712 | |
| 1713 | /** |
| 1714 | * Name: elementor_render() |
| 1715 | * Desc: Render the widget output on the frontend. |
| 1716 | * Params: no params |
| 1717 | * Return: @void |
| 1718 | * Since: @1.0.0 |
| 1719 | * Package: @spider-elements |
| 1720 | * Author: spider-themes |
| 1721 | */ |
| 1722 | protected function render() { |
| 1723 | $settings = $this->get_settings_for_display(); |
| 1724 | extract( $settings ); //extract all settings array to variables converted to name of key |
| 1725 | $icon = ''; |
| 1726 | |
| 1727 | $testimonial_id = $this->get_id(); |
| 1728 | |
| 1729 | //======================== Template Parts ==========================// |
| 1730 | include "templates/testimonials/testimonial-{$settings['style']}.php"; |
| 1731 | |
| 1732 | } |
| 1733 | } |