Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LifterLMS_REST_API::__construct()
Constructor.
Contents
Return Return
(void)
Source Source
File: libraries/lifterlms-rest/class-lifterlms-rest-api.php
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | private function __construct() { if ( ! defined( 'LLMS_REST_API_VERSION' ) ) { define( 'LLMS_REST_API_VERSION' , $this ->version ); } /** * When loaded as a library included by the LifterLMS core localization is handled by the LifterLMS core. * * When the plugin is loaded by itself as a plugin, we must localize it independently. */ if ( ! defined( 'LLMS_REST_API_LIB' ) || ! LLMS_REST_API_LIB ) { add_action( 'init' , array ( $this , 'load_textdomain' ), 0 ); } // Authentication needs to run early to handle basic auth. include_once LLMS_REST_API_PLUGIN_DIR . 'includes/class-llms-rest-authentication.php' ; // Load everything else. add_action( 'plugins_loaded' , array ( $this , 'init' ), 10 ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.4 | Load authentication early. |
1.0.0-beta.17 | Only localize when loaded as an independent plugin. |
1.0.0-beta.1 | Introduced. |