
WordPress Cookies和PHP会话——你需要知道的一切
wp_functionality_constants ( No parameters )
wp_functionality_constants: 这个函数用来定义常量,可以在其他WordPress函数和模板中使用。它通常用于定义与特定插件或主题有关的常量。
定义了与功能相关的WordPress常量。
function wp_functionality_constants() { /** * @since 2.5.0 */ if ( ! defined( 'AUTOSAVE_INTERVAL' ) ) { define( 'AUTOSAVE_INTERVAL', MINUTE_IN_SECONDS ); } /** * @since 2.9.0 */ if ( ! defined( 'EMPTY_TRASH_DAYS' ) ) { define( 'EMPTY_TRASH_DAYS', 30 ); } if ( ! defined( 'WP_POST_REVISIONS' ) ) { define( 'WP_POST_REVISIONS', true ); } /** * @since 3.3.0 */ if ( ! defined( 'WP_CRON_LOCK_TIMEOUT' ) ) { define( 'WP_CRON_LOCK_TIMEOUT', MINUTE_IN_SECONDS ); } }