403Webshell
Server IP : 5.129.245.98  /  Your IP : 216.73.217.98
Web Server : Apache/2.4.66 (Debian)
System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/themes/rehub-theme/rehub-elementor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/themes/rehub-theme/rehub-elementor/wpsm-countdown.php
<?php
namespace Elementor;

if ( ! defined( 'ABSPATH' ) ) {
    exit('Restricted Access');
} // Exit if accessed directly

/**
 * Info box Widget class.
 *
 * 'wpsm_box' shortcode
 *
 * @since 1.0.0
 */
class WPSM_Countdown_Widget extends Widget_Base {

    /* Widget Name */
    public function get_name() {
        return 'wpsm_countdown';
    }

    /* Widget Title */
    public function get_title() {
        return esc_html__('Countdown', 'rehub-theme');
    }

        /**
     * Get widget icon.
     * @since 1.0.0
     * @access public
     *
     * @return string Widget icon.
     */
    public function get_icon() {
        return 'eicon-countdown';
    }

    /**
     * category name in which this widget will be shown
     * @since 1.0.0
     * @access public
     *
     * @return array Widget categories.
     */
    public function get_categories() {
        return [ 'rhwow-modules' ];
    }
    protected function register_controls() {
        $this->general_controls();
    }
    protected function general_controls() {
        $this->start_controls_section( 'general_section', [
            'label' => esc_html__( 'General', 'rehub-theme' ),
            'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
        ]);

        $this->add_control( 'date', [
            'type'        => \Elementor\Controls_Manager::DATE_TIME,
            'label'       => esc_html__( 'Choose date of finish', 'rehub-theme' ),
            'label_block'  => true,
        ]);


        $this->add_control( 'enable_light', [
            'type'        => \Elementor\Controls_Manager::SWITCHER,
            'label'       => esc_html__( 'Enable light compact style?', 'rehub-theme' ),
            'label_on'    => esc_html__('Yes', 'rehub-theme'),
            'label_off'   => esc_html__('No', 'rehub-theme'),
        ]);

        $this->end_controls_section();
    }

    /* Widget output Rendering */
    protected function render() {
        $settings = $this->get_settings_for_display();
        $date = date_create_from_format( 'Y-m-d H:i', $this->get_settings( 'date' ) );
        $new_date = date_format($date, 'Y-m-d');
        $new_time = date_format($date, 'H:i');
        $countdown = explode('-', $new_date);
        $timedown = explode(':', $new_time);
        $year = $countdown[0];
        $month = $countdown[1];
        $day  = $countdown[2];
        $hour = $timedown[0];
        $min = $timedown[1];
        $light = $this->get_settings( 'enable_light' );
        $lightclass = $light ? 'gridcountdown' : '';
        echo '<div class="'.$lightclass.'">';
        echo wpsm_countdown(array('year'=> $year, 'month'=>$month, 'day'=>$day, 'hour'=>$hour, 'minute' => $min));
        echo '</div>';
    }

}

Plugin::instance()->widgets_manager->register( new WPSM_Countdown_Widget );

Youez - 2016 - github.com/yon3zu
LinuXploit