/
/
home
/
melaqxso
/
public_html
/
wp-content
/
plugins
/
hub-elementor-addons
/
elementor
/
widgets
Server: server63.web-hosting.com (198.54.116.184)
You: 216.73.216.61
PHP 7.4.33
Dir:
/home/melaqxso/public_html/wp-content/plugins/hub-elementor-addons/elementor/widgets
Edit:
/home/melaqxso/public_html/wp-content/plugins/hub-elementor-addons/elementor/widgets/banner.php
<?php namespace LiquidElementor\Widgets; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Image_Size; use Elementor\Group_Control_Typography; use Elementor\Scheme_Color; use Elementor\Scheme_Typography; use Elementor\Utils; use Elementor\Control_Media; use Elementor\Group_Control_Border; use Elementor\Group_Control_Box_Shadow; use Elementor\Group_Control_Text_Shadow; use Elementor\Group_Control_Background; use Elementor\Repeater; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Elementor heading widget. * * Elementor widget that displays an eye-catching headlines. * * @since 1.0.0 */ class LD_Banner extends Widget_Base { /** * Get widget name. * * Retrieve heading widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'ld_banner'; } /** * Get widget title. * * Retrieve heading widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'Liquid Overlay Banner', 'hub-elementor-addons' ); } /** * Get widget icon. * * Retrieve heading widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-image-rollover lqd-element'; } /** * Get widget categories. * * Retrieve the list of categories the heading widget belongs to. * * Used to determine where to display the widget in the editor. * * @since 1.0.0 * @access public * * @return array Widget categories. */ public function get_categories() { return [ 'hub-core' ]; } /** * Get widget keywords. * * Retrieve the list of keywords the widget belongs to. * * @since 1.0.0 * @access public * * @return array Widget keywords. */ public function get_keywords() { return [ 'banner', 'image' ]; } /** * Register heading widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * @access protected */ protected function register_controls() { // General Section $this->start_controls_section( 'general_section', [ 'label' => __( 'Banner Bananas', 'hub-elementor-addons' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'hub-elementor-addons' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Type your title here', 'hub-elementor-addons' ), 'placeholder' => __( 'Type your title here', 'hub-elementor-addons' ), ] ); $this->add_control( 'image', [ 'label' => __( 'Image', 'hub-elementor-addons' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->end_controls_section(); $this->start_controls_section( 'content_section', [ 'label' => __( 'Banner Styles', 'hub-elementor-addons' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'banner_typography', 'label' => __( 'Typography', 'hub-elementor-addons' ), 'selector' => '{{WRAPPER}} h3', ] ); $this->add_control( 'title_color', [ 'label' => __( 'Title Color', 'hub-elementor-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} h3' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'bg_color', [ 'label' => __( 'Background Color', 'hub-elementor-addons' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .lqd-bnnr-left' => 'background: {{VALUE}}', ], ] ); $this->end_controls_section(); ld_el_btn($this, 'ib_'); // load button } /** * Render heading 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(); ?> <div class="lqd-bnnr-1 d-flex flex-column overflow-hidden border-radius-10"> <div class="lqd-bnnr-left d-flex align-items-center pos-rel z-index-2"> <div class="lqd-bnnr-in"> <?php if ( !empty($settings['title'])) : ?> <h3 class="mt-0 mb-5"><?php echo $settings['title']; ?></h3> <?php endif; ?> <?php $button = new \LQD_Elementor_Render_Button; $button->get_button( $this, 'ib_' ); ?> </div> </div> <div class="lqd-bnnr-right"> <div class="lqd-bnnr-in"> <figure> <?php echo wp_get_attachment_image( $settings['image']['id'], 'full', array('class' => 'w-100') ); ?> </figure> </div> </div> </div> <?php } } \Elementor\Plugin::instance()->widgets_manager->register( new LD_Banner() );
Ukuran: 4.8 KB