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-news-ticker.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_News_Ticker_Widget extends Widget_Base {

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

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

    public function get_style_depends() {
        return [ 'rhnewsticker' ];
    }

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

    /**
     * category name in which this widget will be shown
     * @since 1.0.0
     * @access public
     *
     * @return array Widget categories.
     */
    public function get_categories() {
        return [ 'content-modules' ];
    }

    protected function register_controls() {
        $this->start_controls_section( 'general_section', [
            'label' => esc_html__( 'General', 'rehub-theme' ),
            'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
        ]);
        $this->add_control( 'label', [
            'type'        => \Elementor\Controls_Manager::TEXT,
            'label'       => esc_html__( 'Label', 'rehub-theme' ),
            'description' => esc_html__('Label before news ticker', 'rehub-theme'),
            'label_block'  => true,
            'default' => 'Latest News',
        ]);
        $this->add_control( 'catname', [
            'type'        => \Elementor\Controls_Manager::TEXT,
            'label'       => esc_html__( 'Category name', 'rehub-theme' ),
            'description' => esc_html__('Category name to show in ticker', 'rehub-theme'),
        ]);
        $this->add_control( 'catslug', [
            'type'        => \Elementor\Controls_Manager::TEXT,
            'label'       => esc_html__( 'Category taxonomy', 'rehub-theme' ),
            'description' => esc_html__('Category taxonomy name. Leave blank if you need Post category. For post tags - set as post_tag', 'rehub-theme'),
            'default' => 'category',
        ]);
        $this->add_control( 'fetch', [
            'type'        => \Elementor\Controls_Manager::TEXT,
            'label'       => esc_html__( 'Number of posts to show', 'rehub-theme' ),
            'description' => esc_html__('Default is 5', 'rehub-theme'),
            'default' => '5',
        ]);

        $this->end_controls_section();
    }

    /* Widget output Rendering */
    protected function render() {
        $settings = $this->get_settings_for_display();
        echo wpsm_news_ticker_shortcode( $settings );
    }
}

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

Youez - 2016 - github.com/yon3zu
LinuXploit