public static function get_instance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; }
/** * Configure autoloader also for full Types (it has been loaded by embedded Types by now). */ function wpcf_initialize_autoloader_full() { WPCF_Autoloader::get_instance()->add_path(WPCF_INC_ABSPATH . '/classes'); }
/** * Initialize the autoloader (for newer parts of code). */ function wpcf_initialize_autoloader_embedded() { require_once WPCF_EMBEDDED_INC_ABSPATH . '/autoloader.php'; $autoloader = WPCF_Autoloader::get_instance(); $autoloader->add_prefix('WPCF'); // This will trigger the loading mechanism for legacy classes. $autoloader->add_prefix('Types'); $autoloader->add_prefix('WPToolset'); $autoloader->add_path(WPCF_EMBEDDED_ABSPATH . '/classes'); }