Eael_Adv_Accordion.php
7 years ago
Eael_Adv_Tabs.php
7 years ago
Eael_Caldera_Forms.php
7 years ago
Eael_Contact_Form_7.php
7 years ago
Eael_Content_Ticker.php
7 years ago
Eael_Countdown.php
7 years ago
Eael_Creative_Button.php
7 years ago
Eael_Cta_Box.php
7 years ago
Eael_Data_Table.php
7 years ago
Eael_Dual_Color_Header.php
7 years ago
Eael_Fancy_Text.php
7 years ago
Eael_Feature_List.php
7 years ago
Eael_Filterable_Gallery.php
7 years ago
Eael_Flip_Box.php
7 years ago
Eael_GravityForms.php
7 years ago
Eael_Image_Accordion.php
7 years ago
Eael_Info_Box.php
7 years ago
Eael_NinjaForms.php
7 years ago
Eael_Post_Grid.php
7 years ago
Eael_Post_Timeline.php
7 years ago
Eael_Pricing_Table.php
7 years ago
Eael_Product_Grid.php
7 years ago
Eael_Progress_Bar.php
7 years ago
Eael_Team_Member.php
7 years ago
Eael_Testimonial.php
7 years ago
Eael_Tooltip.php
7 years ago
Eael_Twitter_Feed.php
7 years ago
Eael_WeForms.php
7 years ago
Eael_WpForms.php
7 years ago
Eael_Team_Member.php
760 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 as Controls_Manager; |
| 10 | use \Elementor\Group_Control_Border as Group_Control_Border; |
| 11 | use \Elementor\Group_Control_Image_Size as Group_Control_Image_Size; |
| 12 | use \Elementor\Group_Control_Typography as Group_Control_Typography; |
| 13 | use \Elementor\Utils as Utils; |
| 14 | use \Elementor\Widget_Base as Widget_Base; |
| 15 | |
| 16 | class Eael_Team_Member extends Widget_Base { |
| 17 | |
| 18 | public function get_name() { |
| 19 | return 'eael-team-member'; |
| 20 | } |
| 21 | |
| 22 | public function get_title() { |
| 23 | return esc_html__( 'EA Team Member', 'essential-addons-elementor' ); |
| 24 | } |
| 25 | |
| 26 | public function get_icon() { |
| 27 | return 'eicon-person'; |
| 28 | } |
| 29 | |
| 30 | public function get_categories() { |
| 31 | return [ 'essential-addons-elementor' ]; |
| 32 | } |
| 33 | |
| 34 | |
| 35 | protected function _register_controls() { |
| 36 | |
| 37 | |
| 38 | $this->start_controls_section( |
| 39 | 'eael_section_team_member_image', |
| 40 | [ |
| 41 | 'label' => esc_html__( 'Team Member Image', 'essential-addons-elementor' ) |
| 42 | ] |
| 43 | ); |
| 44 | |
| 45 | |
| 46 | $this->add_control( |
| 47 | 'eael_team_member_image', |
| 48 | [ |
| 49 | 'label' => __( 'Team Member Avatar', 'essential-addons-elementor' ), |
| 50 | 'type' => Controls_Manager::MEDIA, |
| 51 | 'default' => [ |
| 52 | 'url' => Utils::get_placeholder_image_src(), |
| 53 | ], |
| 54 | ] |
| 55 | ); |
| 56 | |
| 57 | |
| 58 | $this->add_group_control( |
| 59 | Group_Control_Image_Size::get_type(), |
| 60 | [ |
| 61 | 'name' => 'thumbnail', |
| 62 | 'default' => 'full', |
| 63 | 'condition' => [ |
| 64 | 'eael_team_member_image[url]!' => '', |
| 65 | ], |
| 66 | ] |
| 67 | ); |
| 68 | |
| 69 | |
| 70 | $this->end_controls_section(); |
| 71 | |
| 72 | $this->start_controls_section( |
| 73 | 'eael_section_team_member_content', |
| 74 | [ |
| 75 | 'label' => esc_html__( 'Team Member Content', 'essential-addons-elementor' ) |
| 76 | ] |
| 77 | ); |
| 78 | |
| 79 | |
| 80 | $this->add_control( |
| 81 | 'eael_team_member_name', |
| 82 | [ |
| 83 | 'label' => esc_html__( 'Name', 'essential-addons-elementor' ), |
| 84 | 'type' => Controls_Manager::TEXT, |
| 85 | 'default' => esc_html__( 'John Doe', 'essential-addons-elementor' ), |
| 86 | ] |
| 87 | ); |
| 88 | |
| 89 | $this->add_control( |
| 90 | 'eael_team_member_job_title', |
| 91 | [ |
| 92 | 'label' => esc_html__( 'Job Position', 'essential-addons-elementor' ), |
| 93 | 'type' => Controls_Manager::TEXT, |
| 94 | 'default' => esc_html__( 'Software Engineer', 'essential-addons-elementor' ), |
| 95 | ] |
| 96 | ); |
| 97 | |
| 98 | $this->add_control( |
| 99 | 'eael_team_member_description', |
| 100 | [ |
| 101 | 'label' => esc_html__( 'Description', 'essential-addons-elementor' ), |
| 102 | 'type' => Controls_Manager::TEXTAREA, |
| 103 | 'default' => esc_html__( 'Add team member description here. Remove the text if not necessary.', 'essential-addons-elementor' ), |
| 104 | ] |
| 105 | ); |
| 106 | |
| 107 | |
| 108 | $this->end_controls_section(); |
| 109 | |
| 110 | |
| 111 | $this->start_controls_section( |
| 112 | 'eael_section_team_member_social_profiles', |
| 113 | [ |
| 114 | 'label' => esc_html__( 'Social Profiles', 'essential-addons-elementor' ) |
| 115 | ] |
| 116 | ); |
| 117 | |
| 118 | $this->add_control( |
| 119 | 'eael_team_member_enable_social_profiles', |
| 120 | [ |
| 121 | 'label' => esc_html__( 'Display Social Profiles?', 'essential-addons-elementor' ), |
| 122 | 'type' => Controls_Manager::SWITCHER, |
| 123 | 'default' => 'yes', |
| 124 | ] |
| 125 | ); |
| 126 | |
| 127 | |
| 128 | $this->add_control( |
| 129 | 'eael_team_member_social_profile_links', |
| 130 | [ |
| 131 | 'type' => Controls_Manager::REPEATER, |
| 132 | 'condition' => [ |
| 133 | 'eael_team_member_enable_social_profiles!' => '', |
| 134 | ], |
| 135 | 'default' => [ |
| 136 | [ |
| 137 | 'social' => 'fa fa-facebook', |
| 138 | ], |
| 139 | [ |
| 140 | 'social' => 'fa fa-twitter', |
| 141 | ], |
| 142 | [ |
| 143 | 'social' => 'fa fa-google-plus', |
| 144 | ], |
| 145 | [ |
| 146 | 'social' => 'fa fa-linkedin', |
| 147 | ], |
| 148 | ], |
| 149 | 'fields' => [ |
| 150 | [ |
| 151 | 'name' => 'social', |
| 152 | 'label' => esc_html__( 'Icon', 'essential-addons-elementor' ), |
| 153 | 'type' => Controls_Manager::ICON, |
| 154 | 'label_block' => true, |
| 155 | 'default' => 'fa fa-wordpress', |
| 156 | 'include' => [ |
| 157 | 'fa fa-apple', |
| 158 | 'fa fa-behance', |
| 159 | 'fa fa-bitbucket', |
| 160 | 'fa fa-codepen', |
| 161 | 'fa fa-delicious', |
| 162 | 'fa fa-digg', |
| 163 | 'fa fa-dribbble', |
| 164 | 'fa fa-envelope', |
| 165 | 'fa fa-facebook', |
| 166 | 'fa fa-flickr', |
| 167 | 'fa fa-foursquare', |
| 168 | 'fa fa-github', |
| 169 | 'fa fa-google-plus', |
| 170 | 'fa fa-houzz', |
| 171 | 'fa fa-instagram', |
| 172 | 'fa fa-jsfiddle', |
| 173 | 'fa fa-linkedin', |
| 174 | 'fa fa-medium', |
| 175 | 'fa fa-pinterest', |
| 176 | 'fa fa-product-hunt', |
| 177 | 'fa fa-reddit', |
| 178 | 'fa fa-shopping-cart', |
| 179 | 'fa fa-slideshare', |
| 180 | 'fa fa-snapchat', |
| 181 | 'fa fa-soundcloud', |
| 182 | 'fa fa-spotify', |
| 183 | 'fa fa-stack-overflow', |
| 184 | 'fa fa-tripadvisor', |
| 185 | 'fa fa-tumblr', |
| 186 | 'fa fa-twitch', |
| 187 | 'fa fa-twitter', |
| 188 | 'fa fa-vimeo', |
| 189 | 'fa fa-vk', |
| 190 | 'fa fa-whatsapp', |
| 191 | 'fa fa-wordpress', |
| 192 | 'fa fa-xing', |
| 193 | 'fa fa-yelp', |
| 194 | 'fa fa-youtube', |
| 195 | ], |
| 196 | ], |
| 197 | [ |
| 198 | 'name' => 'link', |
| 199 | 'label' => esc_html__( 'Link', 'essential-addons-elementor' ), |
| 200 | 'type' => Controls_Manager::URL, |
| 201 | 'label_block' => true, |
| 202 | 'default' => [ |
| 203 | 'url' => '', |
| 204 | 'is_external' => 'true', |
| 205 | ], |
| 206 | 'placeholder' => esc_html__( 'Place URL here', 'essential-addons-elementor' ), |
| 207 | ], |
| 208 | ], |
| 209 | 'title_field' => '<i class="{{ social }}"></i> {{{ social.replace( \'fa fa-\', \'\' ).replace( \'-\', \' \' ).replace( /\b\w/g, function( letter ){ return letter.toUpperCase() } ) }}}', |
| 210 | ] |
| 211 | ); |
| 212 | |
| 213 | $this->end_controls_section(); |
| 214 | |
| 215 | |
| 216 | $this->start_controls_section( |
| 217 | 'eael_section_pro', |
| 218 | [ |
| 219 | 'label' => __( 'Go Premium for More Features', 'essential-addons-elementor' ) |
| 220 | ] |
| 221 | ); |
| 222 | |
| 223 | $this->add_control( |
| 224 | 'eael_control_get_pro', |
| 225 | [ |
| 226 | 'label' => __( 'Unlock more possibilities', 'essential-addons-elementor' ), |
| 227 | 'type' => Controls_Manager::CHOOSE, |
| 228 | 'options' => [ |
| 229 | '1' => [ |
| 230 | 'title' => __( '', 'essential-addons-elementor' ), |
| 231 | 'icon' => 'fa fa-unlock-alt', |
| 232 | ], |
| 233 | ], |
| 234 | 'default' => '1', |
| 235 | 'description' => '<span class="pro-feature"> Get the <a href="https://essential-addons.com/elementor/#pricing" target="_blank">Pro version</a> for more stunning elements and customization options.</span>' |
| 236 | ] |
| 237 | ); |
| 238 | |
| 239 | $this->end_controls_section(); |
| 240 | |
| 241 | $this->start_controls_section( |
| 242 | 'eael_section_team_members_styles_general', |
| 243 | [ |
| 244 | 'label' => esc_html__( 'Team Member Styles', 'essential-addons-elementor' ), |
| 245 | 'tab' => Controls_Manager::TAB_STYLE |
| 246 | ] |
| 247 | ); |
| 248 | |
| 249 | |
| 250 | $this->add_control( |
| 251 | 'eael_team_members_preset', |
| 252 | [ |
| 253 | 'label' => esc_html__( 'Style Preset', 'essential-addons-elementor' ), |
| 254 | 'type' => Controls_Manager::SELECT, |
| 255 | 'default' => 'eael-team-members-simple', |
| 256 | 'options' => [ |
| 257 | 'eael-team-members-simple' => esc_html__( 'Simple Style', 'essential-addons-elementor' ), |
| 258 | 'eael-team-members-overlay' => esc_html__( 'Overlay Style', 'essential-addons-elementor' ), |
| 259 | 'eael-team-members-pro-style-3' => esc_html__( 'Centered Style', 'essential-addons-elementor' ), |
| 260 | 'eael-team-members-pro-style-4' => esc_html__( 'Circle Style', 'essential-addons-elementor' ), |
| 261 | 'eael-team-members-pro-style-5' => esc_html__( 'Social on Bottom', 'essential-addons-elementor' ), |
| 262 | ], |
| 263 | ] |
| 264 | ); |
| 265 | |
| 266 | $this->add_control( |
| 267 | 'eael_team_members_preset_pro_alert', |
| 268 | [ |
| 269 | 'label' => esc_html__( 'Only available in pro version!', 'essential-addons-elementor' ), |
| 270 | 'type' => Controls_Manager::HEADING, |
| 271 | 'condition' => [ |
| 272 | 'eael_team_members_preset' => ['eael-team-members-pro-style-3', 'eael-team-members-pro-style-4', 'eael-team-members-pro-style-5'], |
| 273 | ] |
| 274 | ] |
| 275 | ); |
| 276 | |
| 277 | $this->add_control( |
| 278 | 'eael_team_members_overlay_background', |
| 279 | [ |
| 280 | 'label' => esc_html__( 'Overlay Color', 'essential-addons-elementor' ), |
| 281 | 'type' => Controls_Manager::COLOR, |
| 282 | 'default' => 'rgba(255,255,255,0.8)', |
| 283 | 'selectors' => [ |
| 284 | '{{WRAPPER}} .eael-team-members-overlay .eael-team-content' => 'background-color: {{VALUE}};', |
| 285 | ], |
| 286 | 'condition' => [ |
| 287 | 'eael_team_members_preset' => 'eael-team-members-overlay', |
| 288 | ], |
| 289 | ] |
| 290 | ); |
| 291 | |
| 292 | $this->add_control( |
| 293 | 'eael_team_members_background', |
| 294 | [ |
| 295 | 'label' => esc_html__( 'Content Background Color', 'essential-addons-elementor' ), |
| 296 | 'type' => Controls_Manager::COLOR, |
| 297 | 'default' => '', |
| 298 | 'selectors' => [ |
| 299 | '{{WRAPPER}} .eael-team-item .eael-team-content' => 'background-color: {{VALUE}};', |
| 300 | ], |
| 301 | ] |
| 302 | ); |
| 303 | |
| 304 | $this->add_control( |
| 305 | 'eael_team_members_alignment', |
| 306 | [ |
| 307 | 'label' => esc_html__( 'Set Alignment', 'essential-addons-elementor' ), |
| 308 | 'type' => Controls_Manager::CHOOSE, |
| 309 | 'label_block' => true, |
| 310 | 'options' => [ |
| 311 | 'default' => [ |
| 312 | 'title' => __( 'Default', 'essential-addons-elementor' ), |
| 313 | 'icon' => 'fa fa-ban', |
| 314 | ], |
| 315 | 'left' => [ |
| 316 | 'title' => esc_html__( 'Left', 'essential-addons-elementor' ), |
| 317 | 'icon' => 'fa fa-align-left', |
| 318 | ], |
| 319 | 'centered' => [ |
| 320 | 'title' => esc_html__( 'Center', 'essential-addons-elementor' ), |
| 321 | 'icon' => 'fa fa-align-center', |
| 322 | ], |
| 323 | 'right' => [ |
| 324 | 'title' => esc_html__( 'Right', 'essential-addons-elementor' ), |
| 325 | 'icon' => 'fa fa-align-right', |
| 326 | ], |
| 327 | ], |
| 328 | 'default' => 'eael-team-align-default', |
| 329 | 'prefix_class' => 'eael-team-align-', |
| 330 | ] |
| 331 | ); |
| 332 | |
| 333 | $this->add_responsive_control( |
| 334 | 'eael_team_members_padding', |
| 335 | [ |
| 336 | 'label' => esc_html__( 'Content Padding', 'essential-addons-elementor' ), |
| 337 | 'type' => Controls_Manager::DIMENSIONS, |
| 338 | 'size_units' => [ 'px', '%', 'em' ], |
| 339 | 'selectors' => [ |
| 340 | '{{WRAPPER}} .eael-team-item .eael-team-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 341 | ], |
| 342 | ] |
| 343 | ); |
| 344 | |
| 345 | $this->add_group_control( |
| 346 | Group_Control_Border::get_type(), |
| 347 | [ |
| 348 | 'name' => 'eael_team_members_border', |
| 349 | 'label' => esc_html__( 'Border', 'essential-addons-elementor' ), |
| 350 | 'selector' => '{{WRAPPER}} .eael-team-item', |
| 351 | ] |
| 352 | ); |
| 353 | |
| 354 | $this->add_control( |
| 355 | 'eael_team_members_border_radius', |
| 356 | [ |
| 357 | 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ), |
| 358 | 'type' => Controls_Manager::DIMENSIONS, |
| 359 | 'selectors' => [ |
| 360 | '{{WRAPPER}} .eael-team-item' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', |
| 361 | ], |
| 362 | ] |
| 363 | ); |
| 364 | |
| 365 | $this->end_controls_section(); |
| 366 | |
| 367 | |
| 368 | $this->start_controls_section( |
| 369 | 'eael_section_team_members_image_styles', |
| 370 | [ |
| 371 | 'label' => esc_html__( 'Team Member Image Style', 'essential-addons-elementor' ), |
| 372 | 'tab' => Controls_Manager::TAB_STYLE |
| 373 | ] |
| 374 | ); |
| 375 | |
| 376 | $this->add_responsive_control( |
| 377 | 'eael_team_members_image_width', |
| 378 | [ |
| 379 | 'label' => esc_html__( 'Image Width', 'essential-addons-elementor' ), |
| 380 | 'type' => Controls_Manager::SLIDER, |
| 381 | 'default' => [ |
| 382 | 'size' => 100, |
| 383 | 'unit' => '%', |
| 384 | ], |
| 385 | 'range' => [ |
| 386 | '%' => [ |
| 387 | 'min' => 0, |
| 388 | 'max' => 100, |
| 389 | ], |
| 390 | 'px' => [ |
| 391 | 'min' => 0, |
| 392 | 'max' => 1000, |
| 393 | ], |
| 394 | ], |
| 395 | 'size_units' => [ '%', 'px' ], |
| 396 | 'selectors' => [ |
| 397 | '{{WRAPPER}} .eael-team-item figure img' => 'width:{{SIZE}}{{UNIT}};', |
| 398 | ], |
| 399 | ] |
| 400 | ); |
| 401 | |
| 402 | |
| 403 | $this->add_responsive_control( |
| 404 | 'eael_team_members_image_margin', |
| 405 | [ |
| 406 | 'label' => esc_html__( 'Margin', 'essential-addons-elementor' ), |
| 407 | 'type' => Controls_Manager::DIMENSIONS, |
| 408 | 'size_units' => [ 'px', '%' ], |
| 409 | 'selectors' => [ |
| 410 | '{{WRAPPER}} .eael-team-item figure img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 411 | ], |
| 412 | ] |
| 413 | ); |
| 414 | |
| 415 | $this->add_responsive_control( |
| 416 | 'eael_team_members_image_padding', |
| 417 | [ |
| 418 | 'label' => esc_html__( 'Padding', 'essential-addons-elementor' ), |
| 419 | 'type' => Controls_Manager::DIMENSIONS, |
| 420 | 'size_units' => [ 'px', '%', 'em' ], |
| 421 | 'selectors' => [ |
| 422 | '{{WRAPPER}} .eael-team-item figure img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 423 | ], |
| 424 | ] |
| 425 | ); |
| 426 | |
| 427 | |
| 428 | $this->add_group_control( |
| 429 | Group_Control_Border::get_type(), |
| 430 | [ |
| 431 | 'name' => 'eael_team_members_image_border', |
| 432 | 'label' => esc_html__( 'Border', 'essential-addons-elementor' ), |
| 433 | 'selector' => '{{WRAPPER}} .eael-team-item figure img', |
| 434 | ] |
| 435 | ); |
| 436 | |
| 437 | $this->add_control( |
| 438 | 'eael_team_members_image_rounded', |
| 439 | [ |
| 440 | 'label' => esc_html__( 'Rounded Avatar?', 'essential-addons-elementor' ), |
| 441 | 'type' => Controls_Manager::SWITCHER, |
| 442 | 'return_value' => 'team-avatar-rounded', |
| 443 | 'default' => '', |
| 444 | ] |
| 445 | ); |
| 446 | |
| 447 | |
| 448 | $this->add_control( |
| 449 | 'eael_team_members_image_border_radius', |
| 450 | [ |
| 451 | 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ), |
| 452 | 'type' => Controls_Manager::DIMENSIONS, |
| 453 | 'selectors' => [ |
| 454 | '{{WRAPPER}} .eael-team-item figure img' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', |
| 455 | ], |
| 456 | 'condition' => [ |
| 457 | 'eael_team_members_image_rounded!' => 'team-avatar-rounded', |
| 458 | ], |
| 459 | ] |
| 460 | ); |
| 461 | |
| 462 | $this->end_controls_section(); |
| 463 | |
| 464 | |
| 465 | $this->start_controls_section( |
| 466 | 'eael_section_team_members_typography', |
| 467 | [ |
| 468 | 'label' => esc_html__( 'Color & Typography', 'essential-addons-elementor' ), |
| 469 | 'tab' => Controls_Manager::TAB_STYLE |
| 470 | ] |
| 471 | ); |
| 472 | |
| 473 | $this->add_control( |
| 474 | 'eael_team_members_name_heading', |
| 475 | [ |
| 476 | 'label' => __( 'Member Name', 'essential-addons-elementor' ), |
| 477 | 'type' => Controls_Manager::HEADING, |
| 478 | ] |
| 479 | ); |
| 480 | |
| 481 | $this->add_control( |
| 482 | 'eael_team_members_name_color', |
| 483 | [ |
| 484 | 'label' => esc_html__( 'Member Name Color', 'essential-addons-elementor' ), |
| 485 | 'type' => Controls_Manager::COLOR, |
| 486 | 'default' => '#272727', |
| 487 | 'selectors' => [ |
| 488 | '{{WRAPPER}} .eael-team-item .eael-team-member-name' => 'color: {{VALUE}};', |
| 489 | ], |
| 490 | ] |
| 491 | ); |
| 492 | |
| 493 | $this->add_group_control( |
| 494 | Group_Control_Typography::get_type(), |
| 495 | [ |
| 496 | 'name' => 'eael_team_members_name_typography', |
| 497 | 'selector' => '{{WRAPPER}} .eael-team-item .eael-team-member-name', |
| 498 | ] |
| 499 | ); |
| 500 | |
| 501 | $this->add_control( |
| 502 | 'eael_team_members_position_heading', |
| 503 | [ |
| 504 | 'label' => __( 'Member Job Position', 'essential-addons-elementor' ), |
| 505 | 'type' => Controls_Manager::HEADING, |
| 506 | ] |
| 507 | ); |
| 508 | |
| 509 | $this->add_control( |
| 510 | 'eael_team_members_position_color', |
| 511 | [ |
| 512 | 'label' => esc_html__( 'Job Position Color', 'essential-addons-elementor' ), |
| 513 | 'type' => Controls_Manager::COLOR, |
| 514 | 'default' => '#272727', |
| 515 | 'selectors' => [ |
| 516 | '{{WRAPPER}} .eael-team-item .eael-team-member-position' => 'color: {{VALUE}};', |
| 517 | ], |
| 518 | ] |
| 519 | ); |
| 520 | |
| 521 | $this->add_group_control( |
| 522 | Group_Control_Typography::get_type(), |
| 523 | [ |
| 524 | 'name' => 'eael_team_members_position_typography', |
| 525 | 'selector' => '{{WRAPPER}} .eael-team-item .eael-team-member-position', |
| 526 | ] |
| 527 | ); |
| 528 | |
| 529 | $this->add_control( |
| 530 | 'eael_team_members_description_heading', |
| 531 | [ |
| 532 | 'label' => __( 'Member Description', 'essential-addons-elementor' ), |
| 533 | 'type' => Controls_Manager::HEADING, |
| 534 | ] |
| 535 | ); |
| 536 | |
| 537 | $this->add_control( |
| 538 | 'eael_team_members_description_color', |
| 539 | [ |
| 540 | 'label' => esc_html__( 'Description Color', 'essential-addons-elementor' ), |
| 541 | 'type' => Controls_Manager::COLOR, |
| 542 | 'default' => '#272727', |
| 543 | 'selectors' => [ |
| 544 | '{{WRAPPER}} .eael-team-item .eael-team-content .eael-team-text' => 'color: {{VALUE}};', |
| 545 | ], |
| 546 | ] |
| 547 | ); |
| 548 | |
| 549 | $this->add_group_control( |
| 550 | Group_Control_Typography::get_type(), |
| 551 | [ |
| 552 | 'name' => 'eael_team_members_description_typography', |
| 553 | 'selector' => '{{WRAPPER}} .eael-team-item .eael-team-content .eael-team-text', |
| 554 | ] |
| 555 | ); |
| 556 | |
| 557 | |
| 558 | $this->end_controls_section(); |
| 559 | |
| 560 | |
| 561 | $this->start_controls_section( |
| 562 | 'eael_section_team_members_social_profiles_styles', |
| 563 | [ |
| 564 | 'label' => esc_html__( 'Social Profiles Style', 'essential-addons-elementor' ), |
| 565 | 'tab' => Controls_Manager::TAB_STYLE |
| 566 | ] |
| 567 | ); |
| 568 | |
| 569 | |
| 570 | $this->add_control( |
| 571 | 'eael_team_members_social_icon_size', |
| 572 | [ |
| 573 | 'label' => esc_html__( 'Icon Size', 'essential-addons-elementor' ), |
| 574 | 'type' => Controls_Manager::SLIDER, |
| 575 | 'range' => [ |
| 576 | 'px' => [ |
| 577 | 'min' => 0, |
| 578 | 'max' => 200, |
| 579 | ], |
| 580 | ], |
| 581 | 'selectors' => [ |
| 582 | '{{WRAPPER}} .eael-team-member-social-link > a' => 'width: {{SIZE}}px; height: {{SIZE}}px; line-height: {{SIZE}}px;', |
| 583 | ], |
| 584 | ] |
| 585 | ); |
| 586 | |
| 587 | $this->add_responsive_control( |
| 588 | 'eael_team_members_social_profiles_padding', |
| 589 | [ |
| 590 | 'label' => esc_html__( 'Social Profiles Spacing', 'essential-addons-elementor' ), |
| 591 | 'type' => Controls_Manager::DIMENSIONS, |
| 592 | 'size_units' => [ 'px', '%', 'em' ], |
| 593 | 'selectors' => [ |
| 594 | '{{WRAPPER}} .eael-team-content > .eael-team-member-social-profiles' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 595 | ], |
| 596 | ] |
| 597 | ); |
| 598 | |
| 599 | |
| 600 | $this->start_controls_tabs( 'eael_team_members_social_icons_style_tabs' ); |
| 601 | |
| 602 | $this->start_controls_tab( 'normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-elementor' ) ] ); |
| 603 | |
| 604 | $this->add_control( |
| 605 | 'eael_team_members_social_icon_color', |
| 606 | [ |
| 607 | 'label' => esc_html__( 'Icon Color', 'essential-addons-elementor' ), |
| 608 | 'type' => Controls_Manager::COLOR, |
| 609 | 'default' => '#f1ba63', |
| 610 | 'selectors' => [ |
| 611 | '{{WRAPPER}} .eael-team-member-social-link > a' => 'color: {{VALUE}};', |
| 612 | ], |
| 613 | ] |
| 614 | ); |
| 615 | |
| 616 | |
| 617 | $this->add_control( |
| 618 | 'eael_team_members_social_icon_background', |
| 619 | [ |
| 620 | 'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ), |
| 621 | 'type' => Controls_Manager::COLOR, |
| 622 | 'default' => '', |
| 623 | 'selectors' => [ |
| 624 | '{{WRAPPER}} .eael-team-member-social-link > a' => 'background-color: {{VALUE}};', |
| 625 | ], |
| 626 | ] |
| 627 | ); |
| 628 | |
| 629 | $this->add_group_control( |
| 630 | Group_Control_Border::get_type(), |
| 631 | [ |
| 632 | 'name' => 'eael_team_members_social_icon_border', |
| 633 | 'selector' => '{{WRAPPER}} .eael-team-member-social-link > a', |
| 634 | ] |
| 635 | ); |
| 636 | |
| 637 | $this->add_control( |
| 638 | 'eael_team_members_social_icon_border_radius', |
| 639 | [ |
| 640 | 'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ), |
| 641 | 'type' => Controls_Manager::SLIDER, |
| 642 | 'range' => [ |
| 643 | 'px' => [ |
| 644 | 'max' => 100, |
| 645 | ], |
| 646 | ], |
| 647 | 'selectors' => [ |
| 648 | '{{WRAPPER}} .eael-team-member-social-link > a' => 'border-radius: {{SIZE}}px;', |
| 649 | ], |
| 650 | ] |
| 651 | ); |
| 652 | |
| 653 | $this->add_group_control( |
| 654 | Group_Control_Typography::get_type(), |
| 655 | [ |
| 656 | 'name' => 'eael_team_members_social_icon_typography', |
| 657 | 'selector' => '{{WRAPPER}} .eael-team-member-social-link > a', |
| 658 | ] |
| 659 | ); |
| 660 | |
| 661 | |
| 662 | $this->end_controls_tab(); |
| 663 | |
| 664 | $this->start_controls_tab( 'eael_team_members_social_icon_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-elementor' ) ] ); |
| 665 | |
| 666 | $this->add_control( |
| 667 | 'eael_team_members_social_icon_hover_color', |
| 668 | [ |
| 669 | 'label' => esc_html__( 'Icon Hover Color', 'essential-addons-elementor' ), |
| 670 | 'type' => Controls_Manager::COLOR, |
| 671 | 'default' => '#ad8647', |
| 672 | 'selectors' => [ |
| 673 | '{{WRAPPER}} .eael-team-member-social-link > a:hover' => 'color: {{VALUE}};', |
| 674 | ], |
| 675 | ] |
| 676 | ); |
| 677 | |
| 678 | $this->add_control( |
| 679 | 'eael_team_members_social_icon_hover_background', |
| 680 | [ |
| 681 | 'label' => esc_html__( 'Hover Background Color', 'essential-addons-elementor' ), |
| 682 | 'type' => Controls_Manager::COLOR, |
| 683 | 'default' => '', |
| 684 | 'selectors' => [ |
| 685 | '{{WRAPPER}} .eael-team-member-social-link > a:hover' => 'background-color: {{VALUE}};', |
| 686 | ], |
| 687 | ] |
| 688 | ); |
| 689 | |
| 690 | $this->add_control( |
| 691 | 'eael_team_members_social_icon_hover_border_color', |
| 692 | [ |
| 693 | 'label' => esc_html__( 'Hover Border Color', 'essential-addons-elementor' ), |
| 694 | 'type' => Controls_Manager::COLOR, |
| 695 | 'default' => '', |
| 696 | 'selectors' => [ |
| 697 | '{{WRAPPER}} .eael-team-member-social-link > a:hover' => 'border-color: {{VALUE}};', |
| 698 | ], |
| 699 | ] |
| 700 | ); |
| 701 | |
| 702 | $this->end_controls_tab(); |
| 703 | |
| 704 | $this->end_controls_tabs(); |
| 705 | |
| 706 | |
| 707 | $this->end_controls_section(); |
| 708 | |
| 709 | |
| 710 | } |
| 711 | |
| 712 | |
| 713 | protected function render( ) { |
| 714 | |
| 715 | $settings = $this->get_settings(); |
| 716 | $team_member_image = $this->get_settings( 'eael_team_member_image' ); |
| 717 | $team_member_image_url = Group_Control_Image_Size::get_attachment_image_src( $team_member_image['id'], 'thumbnail', $settings ); |
| 718 | if( empty( $team_member_image_url ) ) : $team_member_image_url = $team_member_image['url']; else: $team_member_image_url = $team_member_image_url; endif; |
| 719 | $team_member_classes = $this->get_settings('eael_team_members_preset') . " " . $this->get_settings('eael_team_members_image_rounded'); |
| 720 | |
| 721 | ?> |
| 722 | |
| 723 | |
| 724 | <div id="eael-team-member-<?php echo esc_attr($this->get_id()); ?>" class="eael-team-item <?php echo $team_member_classes; ?>"> |
| 725 | <div class="eael-team-item-inner"> |
| 726 | <div class="eael-team-image"> |
| 727 | <figure> |
| 728 | <img src="<?php echo esc_url($team_member_image_url);?>" alt="<?php echo $settings['eael_team_member_name'];?>"> |
| 729 | </figure> |
| 730 | </div> |
| 731 | |
| 732 | <div class="eael-team-content"> |
| 733 | <h3 class="eael-team-member-name"><?php echo $settings['eael_team_member_name']; ?></h3> |
| 734 | <h4 class="eael-team-member-position"><?php echo $settings['eael_team_member_job_title']; ?></h4> |
| 735 | |
| 736 | <?php if ( ! empty( $settings['eael_team_member_enable_social_profiles'] ) ): ?> |
| 737 | <ul class="eael-team-member-social-profiles"> |
| 738 | <?php foreach ( $settings['eael_team_member_social_profile_links'] as $item ) : ?> |
| 739 | <?php if ( ! empty( $item['social'] ) ) : ?> |
| 740 | <?php $target = $item['link']['is_external'] ? ' target="_blank"' : ''; ?> |
| 741 | <li class="eael-team-member-social-link"> |
| 742 | <a href="<?php echo esc_attr( $item['link']['url'] ); ?>"<?php echo $target; ?>><i class="<?php echo esc_attr($item['social'] ); ?>"></i></a> |
| 743 | </li> |
| 744 | <?php endif; ?> |
| 745 | <?php endforeach; ?> |
| 746 | </ul> |
| 747 | <?php endif; ?> |
| 748 | |
| 749 | <p class="eael-team-text"><?php echo $settings['eael_team_member_description']; ?></p> |
| 750 | </div> |
| 751 | </div> |
| 752 | </div> |
| 753 | |
| 754 | |
| 755 | <?php |
| 756 | |
| 757 | } |
| 758 | |
| 759 | protected function content_template() {} |
| 760 | } |