[wp-trac] [WordPress Trac] #41937: Change name of "wp-settings-" and "wp-settings-time-" cookie

WordPress Trac noreply at wordpress.org
Thu Sep 21 20:07:33 UTC 2017


#41937: Change name of "wp-settings-" and "wp-settings-time-" cookie
----------------------------------------+------------------------------
 Reporter:  Neustradamus                |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Users                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by birgire):

 The related core (PHP) functions are:

 - {{{wp_clear_auth_cookie()}}}:
 https://core.trac.wordpress.org/browser/tags/4.8.2/src/wp-
 includes/pluggable.php#L922-L965

 - {{{wp_user_settings()}}}:
 [https://core.trac.wordpress.org/browser/tags/4.8.2/src/wp-
 includes/option.php#L792-L840

 but it's more complicated than that, because it's hardcoded in the
 Javascript function {{{setUserSetting()}}}, where:

 {{{
 ...
 settings = wpCookies.getHash( 'wp-settings-' + uid ),
 ...
 wpCookies.setHash( 'wp-settings-' + uid, settings, 31536000, path, '',
 secure );
 wpCookies.set( 'wp-settings-time-' + uid, userSettings.time, 31536000,
 path, '', secure );
 ...
 }}}

 in {{{/wp-includes/js/utils.js}}}:

 https://core.trac.wordpress.org/browser/tags/4.8.2/src/wp-
 includes/js/utils.js#L151-L184

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41937#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list