Changeset 3283199 for happy-elementor-addons/trunk/base.php
- Timestamp:
- 04/28/2025 08:21:10 AM (7 months ago)
- File:
-
- 1 edited
-
happy-elementor-addons/trunk/base.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
happy-elementor-addons/trunk/base.php
r3237854 r3283199 23 23 } 24 24 return self::$instance; 25 } 26 27 private function __construct() { 28 $this->run_autoload(); 25 29 } 26 30 … … 104 108 include_once( HAPPY_ADDONS_DIR_PATH . 'classes/conditions-cache.php' ); 105 109 include_once( HAPPY_ADDONS_DIR_PATH . 'classes/theme-builder.php' ); 106 include_once( HAPPY_ADDONS_DIR_PATH . 'classes/condition-manager.php' );110 // include_once( HAPPY_ADDONS_DIR_PATH . 'classes/condition-manager.php' ); 107 111 108 112 include_once( HAPPY_ADDONS_DIR_PATH . 'classes/builder-compatibility/astra.php'); … … 117 121 118 122 public function include_on_init() { 123 Condition_Manager::instance(); 119 124 include_once( HAPPY_ADDONS_DIR_PATH . 'classes/extensions-manager.php' ); 120 125 include_once( HAPPY_ADDONS_DIR_PATH . 'classes/credentials-manager.php' ); … … 159 164 $controls_Manager->add_group_control( $Text_Stroke::get_type(), new $Text_Stroke() ); 160 165 } 166 167 protected function autoload( $class_name ) { 168 if ( 0 !== strpos( $class_name, __NAMESPACE__ ) ) { 169 return; 170 } 171 172 if( 'Happy_Addons\Elementor\Condition_Manager' == $class_name ) { 173 $file_name = strtolower( 174 str_replace( 175 [ __NAMESPACE__ . '\\', '_', '\\' ], // replace namespace, underscrore & backslash 176 [ '', '-', '/' ], 177 $class_name 178 ) 179 ); 180 $file = HAPPY_ADDONS_DIR_PATH . 'classes/' . $file_name . '.php'; 181 if ( ! class_exists( $class_name ) && is_readable( $file ) ) { 182 include_once $file; 183 } 184 } 185 } 186 187 public function run_autoload() { 188 spl_autoload_register( [ $this, 'autoload' ] ); 189 } 161 190 }
Note: See TracChangeset
for help on using the changeset viewer.