PATH:
home
/
centosnipponia
/
public_html
/
BAK_doohannl
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
elementor
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Elementor icon list widget. * * Elementor widget that displays a bullet list with any chosen icons and texts. * * @since 1.0.0 */ class aThemes_Elementor_Image_Hotspots extends Widget_Base { /** * Get widget name. * * Retrieve icon list widget name. * * @since 1.0.0 * @access public * * @return string Widget name. */ public function get_name() { return 'athemes-image-hotspots'; } /** * Get widget title. * * Retrieve icon list widget title. * * @since 1.0.0 * @access public * * @return string Widget title. */ public function get_title() { return __( 'aThemes: Image hotspots', 'sydney' ); } /** * Get widget icon. * * Retrieve icon list widget icon. * * @since 1.0.0 * @access public * * @return string Widget icon. */ public function get_icon() { return 'eicon-image-hotspot'; } /** * Get widget categories. * * Retrieve the list of categories the icon list 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 [ 'sydney-elements' ]; } /** * Register icon list 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() { $this->start_controls_section( 'section_animated_heading', [ 'label' => __( 'Image hotspots', 'sydney' ), ] ); $this->add_control( 'image', [ 'label' => esc_html__( 'Choose Image', 'sydney' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ 'active' => true, ], 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'image', 'default' => 'large', 'separator' => 'none', ] ); $this->add_control( 'hotspots_title', [ 'label' => __( 'Hotspots', 'sydney' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $repeater = new Repeater(); $repeater->add_control( 'hotspot_element', [ 'label' => __( 'Label', 'sydney' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'developer', 'sydney' ), 'show_label' => true, ] ); $repeater->add_control( 'hotspot_pos_top', [ 'label' => __( 'Top offset [%]', 'sydney' ), 'type' => Controls_Manager::NUMBER, 'label_block' => true, 'placeholder' => '', 'default' => 50, 'min' => 0, 'max' => 100, 'step' => 1, ] ); $repeater->add_control( 'hotspot_pos_left', [ 'label' => __( 'Left offset [%]', 'sydney' ), 'type' => Controls_Manager::NUMBER, 'label_block' => true, 'placeholder' => '', 'default' => 50, 'min' => 0, 'max' => 100, 'step' => 1, ] ); $this->add_control( 'hotspot_elements', [ 'label' => '', 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'hotspot_element' => __( 'Feature 1', 'sydney' ), 'hotspot_pos_top' => 30, 'hotspot_pos_left' => 30, ], [ 'hotspot_element' => __( 'Feature 2', 'sydney' ), 'hotspot_pos_top' => 60, 'hotspot_pos_left' => 60, ], ], 'title_field' => '{{{ name }}}', ] ); $this->add_control( 'size', [ 'label' => __( 'Circle size', 'sydney' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .hotspot-symbol' => 'width: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'view', [ 'label' => __( 'View', 'sydney' ), 'type' => Controls_Manager::HIDDEN, 'default' => 'traditional', ] ); $this->end_controls_section(); //Styling $this->start_controls_section( 'section_styles', [ 'label' => __( 'Styles', 'sydney' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'symbol_color', [ 'label' => __( 'Hotspot circle color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .hotspot-element .hotspot-symbol' => '--sp-hotspot-color: {{VALUE}};', ], ] ); $this->add_control( 'text_color', [ 'label' => __( 'Label color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .hotspot-element .hotspot-tooltip' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'text_background_color', [ 'label' => __( 'Label background color', 'sydney' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .hotspot-element .hotspot-tooltip' => 'background-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_after_typography', 'selector' => '{{WRAPPER}} .hotspot-element .hotspot-tooltip', 'scheme' => Core\Schemes\Typography::TYPOGRAPHY_3, ] ); $this->end_controls_section(); } /** * Render icon list 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="hotspot-image-wrapper" style="position: relative;display:inline-block;"> <?php Group_Control_Image_Size::print_attachment_image_html( $settings ); ?> <?php foreach ( $settings['hotspot_elements'] as $item ) : ?> <div class="hotspot-element" style="position:absolute;top: <?php echo esc_attr( $item['hotspot_pos_top'] ); ?>%;left: <?php echo esc_attr( $item['hotspot_pos_left'] ); ?>%;"> <span class="hotspot-symbol"></span> <span class="hotspot-tooltip on-hover"><?php echo wp_kses_post( $item['hotspot_element'] ); ?></span> </div> <?php endforeach; ?> </div> <?php } /** * Render icon list widget output in the editor. * * Written as a Backbone JavaScript template and used to generate the live preview. * * @since 1.0.0 * @access protected */ protected function content_template() { } } Plugin::instance()->widgets_manager->register_widget_type( new aThemes_Elementor_Image_Hotspots() );
[+]
..
[-] block-animated-heading.php
[edit]
[-] block-contact-form7.php
[edit]
[-] block-dual-buttons.php
[edit]
[-] block-dual-heading.php
[edit]
[-] block-food-menu.php
[edit]
[-] block-hotspots.php
[edit]
[-] block-ninjaforms.php
[edit]
[-] block-wpforms.php
[edit]
[-] .htaccess.disabled
[edit]