403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.2
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/test30.chuangfenglink.xyz/wp-content/plugins/chatway-live-chat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/test30.chuangfenglink.xyz/wp-content/plugins/chatway-live-chat/chatway.php
<?php
/**
 * Plugin Name:       Chatway Live Chat
 * Contributors:      chatway, galdub, tomeraharon
 * Description:       Chatway is a live chat app. Use Chatway to chat with your website's visitors.
 * Version:           1.4.7
 * Tested up to:      6.9
 * Author:            Chatway Live Chat
 * Author URI:        https://chatway.app/
 * License:           GPL v3 or later
 * License URI:       http://www.gnu.org/licenses/gpl-3.0.html
 * Text Domain:       chatway
 * Domain Path:       /languages
 */

use Chatway\App\ExternalApi;

class Chatway {
    function __construct() {
        add_action( 'plugins_loaded', [$this, 'boot'] );
    }

    /**
     * @source chatway.php
     * You need to change version from 4 different places. 
     * 1. chatway.php comment section 
     * 2. chatway.php version() method 
     * 3. Gruntfile.js version property
     * 4. readme.txt Stable tag
     */ 
    public static function version() {
        return '1.4.7';
    }

    /**
     * Retrieves the plugin's base name.
     *
     * @return string The base name of the plugin.
     */
    public static function plugin_base() {
        return plugin_basename(__FILE__);
    }

    /**
     * Generates and returns the URL for the support page.
     *
     * @return string The URL of the support page.
     */
    public static function support_url() {
        return 'https://chatway.app/help';
    }

    /**
     * Checks if the WooCommerce plugin is active.
     *
     * Determines whether the WooCommerce plugin is installed, activated, and its related
     * class is loaded in the current WordPress environment.
     *
     * @return bool True if WooCommerce is active, otherwise false.
     */
    public static function is_woocomerce_active() {
        if (!function_exists( 'is_plugin_active' ) ) {
            require_once ABSPATH . 'wp-admin/includes/plugin.php';
        }
        if(is_plugin_active('woocommerce/woocommerce.php') && class_exists('WooCommerce')) {
            return 1;
        }
        return 0;
    }

    public function boot() {
        $this->add_textdomain();
        new Chatway\App\Assets();
        new Chatway\App\Front();
        new Chatway\App\View();
        new Chatway\App\User();
        new Chatway\App\ChatwayApi();

        $version = get_option('chatway_wp_plugin_version', '');
        if($version != \Chatway::version()) {
            ExternalApi::sync_wp_plugin_version();
        }
    }

    private function add_textdomain() {
        load_plugin_textdomain( 'chatway', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    }

    /**
     * Get the path or require any file
     * @param string $file_or_dir takes the path based on the root dir
     * @param boolean $path_only (optional, default: false) if you want the path in return make the value true 
     */ 
    public static function require( $file_or_dir = '', $path_only = false ) { 
        if ( ! $path_only ) {
            require trailingslashit( plugin_dir_path( __FILE__ ) ) . $file_or_dir;
        } else {
            return trailingslashit( plugin_dir_path( __FILE__ ) ) . $file_or_dir;
        }
    }

    /**
     * Include once or include once and get the path
     * @param string $file takes the path based on the root dir
     * @param boolean $no_return (optional, default: false) if you want the path in return make the value true 
     */ 
    public static function include_once( $file = '', $no_return = false ) {
        if ( ! $no_return ) {
            return include_once( self::require( $file, true ) );
        } else {
            include_once( self::require( $file, true ) );
        }
    }

    /**
     * Get the url of any assets file like css, js, images, fonts etc.
     * @param string $file - Define the file path based on the plugin root directory 
     */ 
    public static function url( $file = '' ) {
        return esc_url( trailingslashit( plugins_url( '/', __FILE__ ) ) . $file );
    }
}

/**
 * Autoloader 
 */ 
require_once( 'autoloader.php' );
require_once( 'inc/clear-all-cache.php' );
$loader = new Chatway\AutoLoader();
$loader->register();
/**
 * register the namespace
 * 
 * @param {1} will take the namespace
 * @param {2} path of the folder 
 */ 
$loader->add_namespace( 'Chatway\App', Chatway::require( 'app', true ) );

/**
 * Register the activation and deactivation hook 
 */ 
$chatwayBase = new Chatway\App\Base();
register_activation_hook( __FILE__, [ $chatwayBase, 'activate' ] );
register_deactivation_hook( __FILE__, [ $chatwayBase, 'deactivate' ] );


/**
 * Initialize the plugin 
 */ 
new Chatway();

Youez - 2016 - github.com/yon3zu
LinuXploit