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::define_constants()

Define LifterLMS Constants


Return Return

(void)


Top ↑

Source Source

File: class-lifterlms.php

129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
*/
private function define_constants() {
 
    llms_maybe_define_constant( 'LLMS_VERSION', $this->version );
    llms_maybe_define_constant( 'LLMS_TEMPLATE_PATH', $this->template_path() );
    llms_maybe_define_constant( 'LLMS_PLUGIN_URL', plugin_dir_url( LLMS_PLUGIN_FILE ) );
 
    $upload_dir = wp_upload_dir();
    llms_maybe_define_constant( 'LLMS_LOG_DIR', $upload_dir['basedir'] . '/llms-logs/' );
    llms_maybe_define_constant( 'LLMS_TMP_DIR', $upload_dir['basedir'] . '/llms-tmp/' );
 
    // If we're loading in debug mode.
    $script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
    $wp_debug     = defined( 'WP_DEBUG' ) && WP_DEBUG;
 
    // If debugging, load the unminified version otherwise load minified.
    if ( ! defined( 'LLMS_ASSETS_SUFFIX' ) ) {
        define( 'LLMS_ASSETS_SUFFIX', $script_debug ? '' : '.min' );
    }
 
    // If debugging, use time for asset version otherwise use plugin version.
    if ( ! defined( 'LLMS_ASSETS_VERSION' ) ) {
        define( 'LLMS_ASSETS_VERSION', ( $script_debug || $wp_debug ) ? time() : $this->version );


Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Moved definitions of LLMS_PLUGIN_FILE and LLMS_PLUGIN_DIR to the main lifterlms.php file. Use llms_maybe_define_constant() to reduce code complexity.
3.17.8 Added LLMS_PLUGIN_URL && LLMS_ASSETS_SUFFIX.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.