AnsPress::setup_constants()
Description #
Setup plugin constants.
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' );
}
Expand full source code Collapse full source code View on GitHub: anspress-question-answer.php:270
Add your comment