Posts, Post Types: Clear post password cookie when logging out.

Props skoldin, subrataemfluence, ianbelanger, johnbillion.
Merges [43317] and [43318] to the 4.9 branch.
Fixes #44089.
Built from https://develop.svn.wordpress.org/branches/4.9@43349


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-06-28 02:31:05 +00:00
parent ddc8032efd
commit 1bb5174584
2 changed files with 4 additions and 1 deletions

View File

@ -967,6 +967,9 @@ function wp_clear_auth_cookie() {
setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
// Post password cookie
setcookie( 'wp-postpass_' . COOKIEHASH, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
}
endif;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.7-alpha-43342';
$wp_version = '4.9.7-alpha-43349';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.