Done !
Server IP : 162.0.217.223 / Your IP : 216.73.216.168 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/www/wp-content/themes/woodmart/inc/integrations/elementor/elements/ |
Upload File : |
<?php /** * Compare map * * @package xts */ namespace XTS\Elementor; use Elementor\Controls_Manager; use Elementor\Widget_Base; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; // Direct access not allowed. } /** * Elementor widget that inserts an embeddable content into the page, from any given URL. * * @since 1.0.0 */ class Compare extends Widget_Base { /** * Get widget name. * * @return string Widget name. * @since 1.0.0 * @access public */ public function get_name() { return 'wd_compare'; } /** * Get widget title. * * @return string Widget title. * @since 1.0.0 * @access public */ public function get_title() { return esc_html__( 'Compare', 'woodmart' ); } /** * Get widget icon. * * @return string Widget icon. * @since 1.0.0 * @access public */ public function get_icon() { return 'wd-icon-compare'; } /** * Get widget categories. * * @return array Widget categories. * @since 1.0.0 * @access public */ public function get_categories() { return [ 'wd-elements' ]; } /** * Register the widget controls. * * @since 1.0.0 * @access protected */ protected function register_controls() { /** * Content tab */ /** * General settings */ $this->start_controls_section( 'general_content_section', [ 'label' => esc_html__( 'General', 'woodmart' ), ] ); $this->add_control( 'description', [ 'raw' => esc_html__( 'This element is created for the compare page and you can find all its configuration in Theme Settings.', 'woodmart' ), 'type' => Controls_Manager::RAW_HTML, 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', ] ); $this->end_controls_section(); } /** * 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() { if ( woodmart_woocommerce_installed() ) { echo do_shortcode( '[woodmart_compare]' ); } } } Plugin::instance()->widgets_manager->register( new Compare() );