HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/salamatk/takarzan.ir/wp-content/plugins/luman-plus/Includes/elementor/manager.php
<?php
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly.
}

if (!defined('LUMAN_PLUS_VERSION')) {
    define('LUMAN_PLUS_VERSION', '1.1.0');
}

class Luman_Elementor_Manager {
    private static $_instance = null;

    public static function instance() {
        if (is_null(self::$_instance)) {
            self::$_instance = new self();
        }
        return self::$_instance;
    }

    public function __construct() {
        add_action('elementor/widgets/register', [$this, 'register_widgets']);
        add_action('elementor/frontend/after_register_styles', [$this, 'register_styles']);
        add_action('elementor/frontend/after_register_scripts', [$this, 'register_scripts']);
        add_action('elementor/elements/categories_registered', [$this, 'add_elementor_widget_categories']);
    }

    public function add_elementor_widget_categories($elements_manager) {
        $elements_manager->add_category(
            'luman-plus',
            [
                'title' => esc_html__('لومان پلاس', 'luman-plus'),
                'icon'  => 'fa fa-plug',
            ]
        );
    }

    public function register_widgets($widgets_manager) {
        // 📦 ثبت ویجت‌های افزونه
        require_once(__DIR__ . '/widgets/ios-notification-box/widget.php');
        $widgets_manager->register(new \Luman_IOS_Notification_Box());

        require_once(__DIR__ . '/widgets/video-testimonials/widget.php');
        $widgets_manager->register(new \Luman_Video_Testimonials());
    }

    public function register_styles() {
        // 🎨 استایل ویجت ios notification
        wp_register_style(
            'luman-ios-notification-style',
            plugins_url('/assets/elementor/css/widgets/ios-notification-box/style.css', dirname(dirname(__FILE__))),
            [],
            LUMAN_PLUS_VERSION
        );
        wp_enqueue_style('luman-ios-notification-style');

        // 🎨 استایل ویجت video testimonials
        wp_register_style(
            'luman-video-testimonials-style',
            plugins_url('/assets/elementor/css/widgets/video-testimonials/style.css', dirname(dirname(__FILE__))),
            [],
            LUMAN_PLUS_VERSION
        );
    }

    public function register_scripts() {
        // 🧩 Swiper Web Component Bundle
        wp_register_script(
            'luman-swiper-bundle',
            plugins_url('/assets/js/swiper-element-bundle.min.js', dirname(dirname(__FILE__))),
            [],
            '10.0.0',
            true
        );

        // 📽️ اسکریپت ویجت video testimonials
        wp_register_script(
            'luman-video-testimonials-script',
            plugins_url('/assets/elementor/js/widgets/video-testimonials/script.js', dirname(dirname(__FILE__))),
            ['luman-swiper-bundle'],
            LUMAN_PLUS_VERSION,
            true
        );
    }
}

// Initialize the manager
Luman_Elementor_Manager::instance();