D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
proc
/
self
/
cwd
/
wp-content
/
plugins
/
aeen-core
/
elementor
/
team
/
Filename :
class.php
back
Copy
<?php /** * This file can be overridden by copying it to yourtheme/elementor-custom/title/class.php * * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Aeen_Core; use Elementor\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; class Rt_Team extends Custom_Widget_Base { public function __construct( $data = [], $args = null ){ $this->rt_name = __( 'RT Team', 'aeen-core' ); $this->rt_base = 'rt-team'; parent::__construct( $data, $args ); } public function rt_fields(){ $cpt = AEEN_CORE_CPT; $terms = get_terms( array( 'taxonomy' => "{$cpt}_team_category", 'fields' => 'id=>name' ) ); $category_dropdown = array( '0' => esc_html__( 'All Categories', 'aeen-core' ) ); foreach ( $terms as $id => $name ) { $category_dropdown[$id] = $name; } $fields = array( array( 'id' => 'sec_rt_team', 'mode' => 'section_start', 'label' => esc_html__( 'Team', 'aeen-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'style', 'label' => esc_html__( 'Layout', 'aeen-core' ), 'options' => array( 'style1' => esc_html__( 'Style 1', 'aeen-core' ), 'style2' => esc_html__( 'Style 2', 'aeen-core' ), 'style3' => esc_html__( 'Style 3', 'aeen-core' ), ), 'default' => 'style1', ), array( 'type' => Controls_Manager::NUMBER, 'id' => 'number', 'label' => esc_html__( 'Total number of items', 'aeen-core' ), 'default' => 3, 'description' => esc_html__( 'Write -1 to show all', 'aeen-core' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'cat', 'label' => esc_html__( 'Categories', 'aeen-core' ), 'options' => $category_dropdown, 'default' => '0', ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'orderby', 'label' => esc_html__( 'Order By', 'aeen-core' ), 'options' => array( 'date' => esc_html__( 'Date (Recents comes first)', 'aeen-core' ), 'title' => esc_html__( 'Title', 'aeen-core' ), 'menu_order' => esc_html__( 'Custom Order (Available via Order field inside Page Attributes box)', 'aeen-core' ), ), 'default' => 'date', ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'designation_display', 'label' => esc_html__( 'Designation Display', 'aeen-core' ), 'label_on' => esc_html__( 'On', 'aeen-core' ), 'label_off' => esc_html__( 'Off', 'aeen-core' ), 'default' => 'yes', 'description' => esc_html__( 'Show or Hide Designation. Default: On', 'aeen-core' ), ), array( 'type' => Controls_Manager::SWITCHER, 'id' => 'item_social', 'label' => esc_html__( 'Item Social', 'aeen-core' ), 'label_on' => esc_html__( 'On', 'aeen-core' ), 'label_off' => esc_html__( 'Off', 'aeen-core' ), 'default' => 'yes', 'description' => esc_html__( 'Show or Hide Social link. Default: On', 'aeen-core' ), 'condition' => array( 'style' => array( 'style2', 'style3' )), ), array( 'mode' => 'section_end', ), // Category Style array( 'mode' => 'section_start', 'id' => 'sec_cat_style', 'label' => esc_html__( 'Team Style', 'aeen-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'team_title_typo', 'label' => esc_html__( 'Title Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .team-box-layout1 .item-content .item-title a, {{WRAPPER}} .team-box-layout2 .item-content .item-title a', ), array( 'id' => 'team_title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .team-box-layout1 .item-content .item-title a' => 'color: {{VALUE}}', '{{WRAPPER}} .team-box-layout2 .item-content .item-title a' => 'color: {{VALUE}}', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'designation_typo', 'label' => esc_html__( 'Subtitle Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .team-box-layout1 .item-content .item-sub-title, {{WRAPPER}} .team-box-layout2 .item-content .item-sub-title', ), array( 'id' => 'team_sub_title_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Color', 'aeen-core' ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .team-box-layout1 .item-content .item-sub-title' => 'color: {{VALUE}}', '{{WRAPPER}} .team-box-layout2 .item-content .item-sub-title' => 'color: {{VALUE}}', ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'short_typo', 'label' => esc_html__( 'Short Content Typography', 'aeen-core' ), 'selector' => '{{WRAPPER}} .short-content', 'condition' => array( 'style' => array( 'style3'),'designation_content' => array( 'yes')), ), array( 'mode' => 'section_end', ), array( 'id' => 'nav_style', 'mode' => 'section_start', 'tab' => Controls_Manager::TAB_STYLE, 'label' => __( 'Nav Style', 'aeen-core' ), 'condition' => array( 'style' => array( 'style3' ) ), ), array( 'id' => 'arrowa_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Active', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'arrowa_border_bgcolor', 'type' => Controls_Manager::COLOR, 'label' => __( 'Border Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .testimonial-active .slick-arrow' => 'border-color: {{VALUE}} !important;', ), ), array( 'id' => 'arrowa_icon_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Icon Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .testimonial-active .slick-arrow i' => 'color: {{VALUE}} !important;', ), ), array( 'id' => 'arrowh_heading', 'type' => Controls_Manager::HEADING, 'label' => __( 'Hover', 'aeen-core' ), 'separator' => 'before', ), array( 'id' => 'arrowh_icon_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Icon Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .testimonial-active .slick-arrow:hover i' => 'color: {{VALUE}} !important;', ), ), array( 'id' => 'arrowh_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Hover Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .testimonial-active .slick-arrow:hover' => 'background-color: {{VALUE}} !important;', ), ), array( 'id' => 'arrowhb_color', 'type' => Controls_Manager::COLOR, 'label' => __( 'Border Color', 'aeen-core' ), 'selectors' => array( '{{WRAPPER}} .testimonial-active .slick-arrow:hover' => 'border-color: {{VALUE}} !important;', ), ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); switch ($data['style']) { case 'style3': $template = 'view-3'; break; case 'style2': $template = 'view-2'; break; default: $template = 'view-1'; break; } return $this->rt_template( $template, $data ); } }