XylotrechusZ
<?php
namespace ElementorWpbingo\Widgets;
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
if ( ! defined( 'ABSPATH' ) ) exit;
class Bwp_Ourteam extends Widget_Base {
public function get_name() {
return 'bwp_ourteam';
}
public function get_title() {
return __( 'Wpbingo Our Team', 'wpbingo' );
}
public function get_icon() {
return 'eicon-lock-user';
}
public function get_categories() {
return [ 'general' ];
}
protected function register_controls() {
$number = array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6);
$this->start_controls_section(
'content_section',
[
'label' => __( 'Content', 'wpbingo' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'title1',
[
'label' => __( 'Title', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => '',
'placeholder' => __( 'Type your title here', 'wpbingo' ),
]
);
$this->add_control(
'numberposts',
[
'label' => __( 'Number of Our Team', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => 6,
'description' => __( 'Type your Number of Our Team', 'wpbingo' ),
]
);
$this->add_control(
'columns',
[
'label' => __( 'Number of Columns >1200px', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '',
'options' => $number,
'default' => 1
]
);
$this->add_control(
'columns1',
[
'label' => __( 'Number of Columns on 992px to 1199px', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '',
'options' => $number,
'default' => 1
]
);
$this->add_control(
'columns2',
[
'label' => __( 'Number of Columns on 768px to 991px', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '',
'options' => $number,
'default' => 1
]
);
$this->add_control(
'columns3',
[
'label' => __( 'Number of Columns on 480px to 767px', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '',
'options' => $number,
'default' => 1
]
);
$this->add_control(
'columns4',
[
'label' => __( 'Number of Columns in 480px or less than', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => '',
'options' => $number,
'default' => 1
]
);
$this->add_control(
'show_pag',
[
'label' => __( 'Show Pagination', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'1' => __( 'Yes', 'wpbingo' ),
'0' => __( 'No', 'wpbingo' ),
],
'default' => '0'
]
);
$this->add_control(
'show_nav',
[
'label' => __( 'Show Navigation', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'1' => __( 'Yes', 'wpbingo' ),
'0' => __( 'No', 'wpbingo' ),
],
'default' => '0'
]
);
$this->add_control(
'layout',
[
'label' => __( 'Layout', 'wpbingo' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'default',
'options' => [
'default' => __( 'Default', 'wpbingo' )
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
extract( shortcode_atts(
array(
'title1' => '',
'numberposts' => 5,
'columns' => 3,
'columns1' => 3,
'columns2' => 3,
'columns3' => 1,
'columns4' => 1,
'show_pag' => '1',
'show_nav' => '1',
'layout' => 'default',
), $settings )
);
if( $layout == 'default' ){
include(WPBINGO_ELEMENTOR_TEMPLATE_PATH.'bwp-ourteam/default.php' );
}
}
}