register_controls_section(); $this->style_tab_content(); } protected function register_controls_section() { // layout Panel $this->start_controls_section( 'be_hero_text', [ 'label' => esc_html__('Home Banner', 'being'), ] ); $this->add_control( 'be_banner_title', [ 'label' => esc_html__('Title', 'being'), 'description' => be_get_allowed_html_desc('intermediate'), 'type' => Controls_Manager::TEXTAREA, 'default' => be_kses('Alex Ryan', 'being'), 'label_block' => true, ] ); $this->add_control( 'be_banner_sub_title', [ 'label' => esc_html__('Small Description', 'being'), "type" => \Elementor\Controls_Manager::WYSIWYG, 'default' => be_kses('Hi, My name is Alex, I am a fashion desiner.Passionate about creating garments that are both aesthetically pleasing and functional.', 'being'), 'label_block' => true, ] ); $this->add_control( 'be_banner_footer_1', [ 'label' => esc_html__('Banner Footer Text 1', 'being'), 'type' => Controls_Manager::TEXTAREA, 'default' => be_kses('

Bristol, UK

12th Street

'), 'label_block' => true, ] ); $this->add_control( 'be_banner_footer_2', [ 'label' => esc_html__('Banner Footer Text 2', 'being'), 'type' => Controls_Manager::TEXTAREA, 'default' => be_kses('

info@alex.com

+92 000342

'), 'label_block' => true, ] ); $this->add_control( 'be_banner_social', [ 'label' => esc_html__('Disable Social Media', 'being'), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'description' => esc_html__('Disable Social Media on Banner', 'being'), ] ); $this->end_controls_section(); $this->start_controls_section( 'be_hero_image_section', [ 'label' => esc_html__('Home Banner images', 'being'), 'description' => esc_html__('Add profile image', 'being'), ] ); $this->add_control( 'be_hero_image', [ 'label' => esc_html__('Choose Image', 'being'), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); $this->end_controls_section(); } // style_tab_content protected function style_tab_content() { $this->section_style_controls( $this->style_control_id, 'Section - Style', ".being-section", "", "", "", false ); } /** * Render the widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $be_hero_image = ""; $be_hero_image_alt = ""; if (!empty($settings['be_hero_image']["id"])) { $be_hero_image = wp_get_attachment_image_url($settings["be_hero_image"]["id"], "full"); $be_hero_image_alt = get_post_meta($settings["be_hero_image"]["id"], "_wp_attachment_image_alt", true); } ?>
register(new BE_Hero()); ?>