wpseek.com
A WordPress-centric search engine for devs and theme authors
ms_cookie_constants › WordPress Function
Since3.0.0
Deprecatedn/a
› ms_cookie_constants ( No parameters )
Defined at: |
|
Codex: |
Defines Multisite cookie constants.
Related Functions: wp_cookie_constants, ms_file_constants, ms_upload_constants, ms_subdomain_constants, rest_cookie_collect_status
Source
function ms_cookie_constants() { $current_network = get_network(); /** * @since 1.2.0 */ if ( ! defined( 'COOKIEPATH' ) ) { define( 'COOKIEPATH', $current_network->path ); } /** * @since 1.5.0 */ if ( ! defined( 'SITECOOKIEPATH' ) ) { define( 'SITECOOKIEPATH', $current_network->path ); } /** * @since 2.6.0 */ if ( ! defined( 'ADMIN_COOKIE_PATH' ) ) { $site_path = parse_url( get_option( 'siteurl' ), PHP_URL_PATH ); if ( ! is_subdomain_install() || is_string( $site_path ) && trim( $site_path, '/' ) ) { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); } else { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); } } /** * @since 2.0.0 */ if ( ! defined( 'COOKIE_DOMAIN' ) && is_subdomain_install() ) { if ( ! empty( $current_network->cookie_domain ) ) { define( 'COOKIE_DOMAIN', '.' . $current_network->cookie_domain ); } else { define( 'COOKIE_DOMAIN', '.' . $current_network->domain ); } } }