<?php namespace PremiumAddonsPro\Includes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * Class Plugin */ class Plugin { /** * @var Plugin */ private static $_instance; /** * @var Manager */ private $_modules_manager; /** * @return Plugin */ public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } private function _includes() { require PREMIUM_PRO_ADDONS_PATH . 'includes/class-modules-manager.php'; } public function autoload( $class ) { if ( 0 !== strpos( $class, 'PremiumAddonsPro' ) ) { return; } $filename = strtolower( preg_replace( array( '/^PremiumAddonsPro\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/' ), array( '', '$1-$2', '-', DIRECTORY_SEPARATOR ), $class ) ); $filename = PREMIUM_PRO_ADDONS_PATH . $filename . '.php'; if ( is_readable( $filename ) ) { include $filename; } } public function elementor_controls_init() { $this->_modules_manager = new Manager(); } private function setup_hooks() { add_action( 'elementor/init', array( $this, 'elementor_controls_init' ) ); } /** * Plugin constructor. */ private function __construct() { spl_autoload_register( array( $this, 'autoload' ) ); $this->_includes(); $this->setup_hooks(); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
compatibility | Folder | 0755 |
|
|
deps | Folder | 0755 |
|
|
grid-builder | Folder | 0755 |
|
|
white-label | Folder | 0755 |
|
|
addons-integration.php | File | 21 KB | 0644 |
|
class-modules-manager.php | File | 248.94 KB | 0644 |
|
class-papro-core.php | File | 7.61 KB | 0644 |
|
pa-post-ticker-helper.php | File | 7.88 KB | 0644 |
|
pa-smart-post-listing-helper.php | File | 4.56 KB | 0644 |
|
papro-helper.php | File | 6.17 KB | 0644 |
|
plugin.php | File | 1.43 KB | 0644 |
|