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


Description Description


Source Source

File: lifterlms.php

	private function define_constants() {

		if ( ! defined( 'LLMS_PLUGIN_FILE' ) ) {
			define( 'LLMS_PLUGIN_FILE', __FILE__ );
		}

		if ( ! defined( 'LLMS_VERSION' ) ) {
			define( 'LLMS_VERSION', $this->version );
		}

		if ( ! defined( 'LLMS_TEMPLATE_PATH' ) ) {
			define( 'LLMS_TEMPLATE_PATH', $this->template_path() );
		}

		if ( ! defined( 'LLMS_PLUGIN_DIR' ) ) {
			define( 'LLMS_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . plugin_basename( dirname( __FILE__ ) ) . '/' );
		}

		if ( ! defined( 'LLMS_SVG_DIR' ) ) {
			define( 'LLMS_SVG_DIR', plugins_url( '/assets/svg/svg.svg', LLMS_PLUGIN_FILE ) );
		}

		$upload_dir = wp_upload_dir();
		if ( ! defined( 'LLMS_LOG_DIR' ) ) {
			define( 'LLMS_LOG_DIR', $upload_dir['basedir'] . '/llms-logs/' );
		}

		if ( ! defined( 'LLMS_TMP_DIR' ) ) {
			define( 'LLMS_TMP_DIR', $upload_dir['basedir'] . '/llms-tmp/' );
		}

		if ( ! defined( 'LLMS_PLUGIN_URL' ) ) {

			/**
			 * URL to the plugin directory for assets, etc
			 * @since   3.17.8
			 * @version 3.17.8
			 */
			define( 'LLMS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );

		}

		if ( ! defined( 'LLMS_ASSETS_SUFFIX' ) ) {

			// if we're loading in debug mode
			$debug = ( defined( 'SCRIPT_DEBUG' ) ) ? SCRIPT_DEBUG : false;

			/* if debugging, load the unminified version
			 * on production, load the minified one
			 */
			$min = ( $debug ) ? '' : '.min';

			/**
			 * Assets suffix
			 * Defines if minified versions of assets should be loaded
			 * @since   3.17.8
			 * @version 3.17.8
			 */
			define( 'LLMS_ASSETS_SUFFIX', $min );
		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: