Constants are referable terms in the code that can not be altered.
Below you’ll find the constants as defined or used in the code as of The SEO Framework v4.0.0.
Last update: October 5th, 2019
Predefined constants
The SEO Framework defines various constants itself. You can refer to these in your plugin or theme. You can not alter these.
Refer to the PHP manual on using constants.
/**
* The plugin version.
*
* 3 point: x.x.y; x.x is major; y is minor.
*
* @since 2.3.5
*/
define( 'THE_SEO_FRAMEWORK_VERSION', '3.1.0' );
/**
* The plugin Database version.
*
* Used for lightweight version upgrade comparing.
*
* @since 2.7.0
*/
define( 'THE_SEO_FRAMEWORK_DB_VERSION', '3103' );
/**
* The plugin file, absolute unix path.
* @since 2.2.9
*/
define( 'THE_SEO_FRAMEWORK_PLUGIN_BASE_FILE', __FILE__ );
/**
* The plugin's bootstrap folder location.
* @since 3.1.0
*/
define( 'THE_SEO_FRAMEWORK_BOOTSTRAP_PATH', dirname( THE_SEO_FRAMEWORK_PLUGIN_BASE_FILE ) . DIRECTORY_SEPARATOR . 'bootstrap' . DIRECTORY_SEPARATOR );
/**
* Tells the world the plugin is present and to be used.
* @since 3.1.0
*/
define( 'THE_SEO_FRAMEWORK_PRESENT', true );
/**
* The plugin options database option_name key.
*
* Used for storing the SEO options array.
*
* @since 2.2.2
* @param string THE_SEO_FRAMEWORK_SITE_OPTIONS
*/
define( 'THE_SEO_FRAMEWORK_SITE_OPTIONS', (string) apply_filters( 'the_seo_framework_site_options', 'autodescription-site-settings' ) );
/**
* The plugin network options.
*
* Unused in the code.
*
* @since 2.2.2
* @param string THE_SEO_FRAMEWORK_NETWORK_OPTIONS
*/
define( 'THE_SEO_FRAMEWORK_NETWORK_OPTIONS', (string) apply_filters( 'the_seo_framework_network_settings', 'autodescription-network-settings' ) );
/**
* Plugin term options key.
*
* @since 2.7.0
* @param string THE_SEO_FRAMEWORK_TERM_OPTIONS
*/
define( 'THE_SEO_FRAMEWORK_TERM_OPTIONS', (string) apply_filters( 'the_seo_framework_term_options', 'autodescription-term-settings' ) );
/**
* Plugin user term options key.
*
* @since 2.7.0
* @param string THE_SEO_FRAMEWORK_USER_OPTIONS
*/
define( 'THE_SEO_FRAMEWORK_USER_OPTIONS', (string) apply_filters( 'the_seo_framework_user_options', 'autodescription-user-settings' ) );
/**
* Plugin updates cache key.
*
* @since 3.1.0
* @param string THE_SEO_FRAMEWORK_SITE_CACHE
*/
define( 'THE_SEO_FRAMEWORK_SITE_CACHE', (string) apply_filters( 'the_seo_framework_site_cache', 'autodescription-updates-cache' ) );
/**
* The plugin folder URL. Has a trailing slash.
* Used for calling browser files.
*
* @since 2.2.2
*/
define( 'THE_SEO_FRAMEWORK_DIR_URL', plugin_dir_url( THE_SEO_FRAMEWORK_PLUGIN_BASE_FILE ) );
/**
* The plugin file relative to the plugins dir. Does not have a trailing slash.
*
* @since 2.2.8
*/
define( 'THE_SEO_FRAMEWORK_PLUGIN_BASENAME', plugin_basename( THE_SEO_FRAMEWORK_PLUGIN_BASE_FILE ) );
/**
* The plugin folder absolute path.
* Used for calling php files.
*
* @since 2.2.2
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH', dirname( THE_SEO_FRAMEWORK_PLUGIN_BASE_FILE ) . DIRECTORY_SEPARATOR );
/**
* The plugin views folder absolute path.
*
* @since 2.7.0
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH_VIEWS', THE_SEO_FRAMEWORK_DIR_PATH . 'inc' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR );
/**
* The plugin class folder absolute path.
*
* @since 2.2.9
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH_CLASS', THE_SEO_FRAMEWORK_DIR_PATH . 'inc' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR );
/**
* The plugin trait folder absolute path.
*
* @since 3.1.0
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH_TRAIT', THE_SEO_FRAMEWORK_DIR_PATH . 'inc' . DIRECTORY_SEPARATOR . 'traits' . DIRECTORY_SEPARATOR );
/**
* The plugin interface folder absolute path.
*
* @since 2.8.0
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH_INTERFACE', THE_SEO_FRAMEWORK_DIR_PATH . 'inc' . DIRECTORY_SEPARATOR . 'interfaces' . DIRECTORY_SEPARATOR );
/**
* The plugin function folder absolute path.
*
* @since 2.2.9
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH_FUNCT', THE_SEO_FRAMEWORK_DIR_PATH . 'inc' . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR );
/**
* The plugin compatibility folder absolute path.
*
* @since 2.8.0
*/
define( 'THE_SEO_FRAMEWORK_DIR_PATH_COMPAT', THE_SEO_FRAMEWORK_DIR_PATH . 'inc' . DIRECTORY_SEPARATOR . 'compat' . DIRECTORY_SEPARATOR );
/**
* Robots setting, ignore protection.
*
* @since 4.0.0
* @see \The_SEO_Framework\Generate\robots_meta()
*/
const \The_SEO_Framework\ROBOTS_IGNORE_PROTECTION = 0b01;
/**
* Robots setting, ignore settings.
*
* @since 4.0.0
* @see \The_SEO_Framework\Generate\robots_meta()
*/
const \The_SEO_Framework\ROBOTS_IGNORE_SETTINGS = 0b01;
User definable constants
The following constants can be defined by the user in wp-config.php
or a mu-plugin. These constants should not be defined in theme-files. They shouldn’t be defined in a plugin either, as there might be load-sequence issues that will cause fatal errors.
Below you’ll find examples.
/**
* Enables the site-wide SEO debugging interface.
*
* @since 2.3.4
* @param bool
*/
define( 'THE_SEO_FRAMEWORK_DEBUG', false );
/**
* Disables all (but sitemap-pinging) transients in The SEO Framework, for debugging only.
*
* @since 2.6.0
* @param bool
*/
define( 'THE_SEO_FRAMEWORK_DISABLE_TRANSIENTS', false );
/**
* Disables our infrequent notification from us to one who can install plugins.
*
* @since 3.0.6
* @param bool
*/
define( 'TSF_DISABLE_SUGGESTIONS', false );