/home/vianto5/ceibaresidencial.mx/wp-content/themes/moore_old/elementor/widgets
Edit: /home/vianto5/ceibaresidencial.mx/wp-content/themes/moore_old/elementor/widgets/team.php (6309B)
start_controls_section(
'section_content',
[
'label' => esc_html__( 'Content', 'moore' ),
]
);
// Add Class control
$this->add_control(
'link_to',
[
'label' => esc_html__( 'Link', 'moore' ),
'type' => Controls_Manager::SELECT,
'options' => [
'none' => esc_html__( 'None', 'moore' ),
'custom' => esc_html__( 'Custom URL', 'moore' ),
],
'default' => 'custom',
]
);
$this->add_control(
'link',
[
'label' => esc_html__( 'Link', 'moore' ),
'type' => Controls_Manager::URL,
'dynamic' => [
'active' => true,
],
'placeholder' => esc_html__( 'https://your-link.com', 'moore' ),
'condition' => [
'link_to' => 'custom',
],
'show_label' => false,
]
);
$this->add_control(
'image',
[
'label' => esc_html__( 'Image Team', 'moore' ),
'type' => Controls_Manager::MEDIA,
'dynamic' => [
'active' => true,
],
'default' => [
'url' => Utils::get_placeholder_image_src(),
],
'separator' => 'before'
]
);
$this->add_control(
'name',
[
'label' => esc_html__( 'Name', 'moore' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'Johan Johnson ', 'moore' ),
]
);
$this->add_control(
'job',
[
'label' => esc_html__( 'Job', 'moore' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'Architect', 'moore' ),
]
);
$this->add_responsive_control(
'align',
[
'label' => esc_html__( 'Text Alignment', 'moore' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'moore' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'moore' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'moore' ),
'icon' => 'eicon-text-align-right',
],
],
'selectors' => [
'{{WRAPPER}} .ova-team .info' => 'text-align: {{VALUE}};',
],
'default' => 'center',
'separator' => 'before'
]
);
$this->end_controls_section();
// INFO Tab
$this->start_controls_section(
'section_style_info',
[
'label' => esc_html__( 'Info', 'moore' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->start_controls_tabs( 'Style Info' );
$this->start_controls_tab(
'info_normal',
[
'label' => esc_html__( 'Normal', 'moore' ),
]
);
$this->add_control(
'color_name',
[
'label' => esc_html__( 'Color Name', 'moore' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ova-team .info .name' => 'color : {{VALUE}};'
],
]
);
$this->add_control(
'color_job',
[
'label' => esc_html__( 'Color Job', 'moore' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ova-team .info .job' => 'color : {{VALUE}};',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'info_hover',
[
'label' => esc_html__( 'Hover', 'moore' ),
]
);
$this->add_control(
'color_name_hover',
[
'label' => esc_html__( 'Color Name', 'moore' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ova-team .info .name:hover' => 'color : {{VALUE}};',
],
]
);
$this->add_control(
'color_job_hover',
[
'label' => esc_html__( 'Color Job', 'moore' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ova-team .info .job:hover' => 'color : {{VALUE}};',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
}
private function get_link_url( $settings ) {
if ( 'none' === $settings['link_to'] ) {
return false;
}
if ( 'custom' === $settings['link_to'] ) {
if ( empty( $settings['link']['url'] ) ) {
return false;
}
return $settings['link'];
}
return false;
}
// Render Template Here
protected function render() {
$settings = $this->get_settings();
// get url image
$url = $settings['image']['url'];
if ( empty( $url ) ) {
return;
}
// get
$name = $settings['name'];
$job = $settings['job'];
$alt_img = $name ? $name : esc_html__( 'team', 'moore' );
$link = $this->get_link_url( $settings );
?>
>
register( new Moore_Elementor_Team() );