AnsPress::setup_constants()

Description #

Setup plugin constants.

Changelog #

VersionDescription
4.2.0Made constants compatible for code editors.
2.0.1Introduced.

Source #

File: anspress-question-answer.php

		private function setup_constants() {
			$plugin_dir = wp_normalize_path( plugin_dir_path( __FILE__ ) );

			define( 'DS', DIRECTORY_SEPARATOR );
			define( 'AP_VERSION', $this->_plugin_version );
			define( 'ANSPRESS_DIR', $plugin_dir );
			define( 'ANSPRESS_URL', plugin_dir_url( __FILE__ ) );
			define( 'ANSPRESS_WIDGET_DIR', $plugin_dir . 'widgets/' );
			define( 'ANSPRESS_THEME_DIR', $plugin_dir . 'templates' );
			define( 'ANSPRESS_THEME_URL', ANSPRESS_URL . 'templates' );
			define( 'ANSPRESS_CACHE_DIR', WP_CONTENT_DIR . '/cache/anspress' );
			define( 'ANSPRESS_CACHE_TIME', HOUR_IN_SECONDS );
			define( 'ANSPRESS_ADDONS_DIR', $plugin_dir . 'addons' );
		}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment