Changeset 40265
- Timestamp:
- 03/10/2017 03:05:36 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
- Property svn:mergeinfo changed
/trunk merged: 40263-40264
- Property svn:mergeinfo changed
-
branches/4.7/src/wp-includes/pluggable.php
r40184 r40265 891 891 do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' ); 892 892 893 /** 894 * Allows preventing auth cookies from actually being sent to the client. 895 * 896 * @since 4.7.4 897 * 898 * @param bool $send Whether to send auth cookies to the client. 899 */ 900 if ( ! apply_filters( 'send_auth_cookies', true ) ) { 901 return; 902 } 903 893 904 setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); 894 905 setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true); … … 912 923 */ 913 924 do_action( 'clear_auth_cookie' ); 925 926 /** This filter is documented in wp-includes/pluggable.php */ 927 if ( ! apply_filters( 'send_auth_cookies', true ) ) { 928 return; 929 } 914 930 915 931 setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN ); -
branches/4.7/tests/phpunit/includes/functions.php
r39219 r40265 165 165 // Skip `setcookie` calls in auth_cookie functions due to warning: 166 166 // Cannot modify header information - headers already sent by ... 167 168 function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) { 169 $auth_cookie = null; 170 $expire = null; 171 $expiration = null; 172 $user_id = null; 173 $scheme = null; 174 /** This action is documented in wp-inclues/pluggable.php */ 175 do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme ); 176 $logged_in_cookie = null; 177 /** This action is documented in wp-inclues/pluggable.php */ 178 do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' ); 179 } 180 181 function wp_clear_auth_cookie() { 182 /** This action is documented in wp-inclues/pluggable.php */ 183 do_action( 'clear_auth_cookie' ); 184 } 167 tests_add_filter( 'send_auth_cookies', '__return_false' );
Note: See TracChangeset
for help on using the changeset viewer.