[wp-trac] [WordPress Trac] #55440: Introduce a wrapper fro setcookie()

WordPress Trac noreply at wordpress.org
Tue Mar 22 10:54:05 UTC 2022


#55440: Introduce a wrapper fro setcookie()
-------------------------+-----------------------------
 Reporter:  Chouby       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Recent browsers expect the parameter `samesite` to be set. A new parameter
 `sameparty` is on its way too.

 The old (PHP < 7.3) `setcookie()` signature doesn't accept these new
 parameters. It's however possible to set them with a hack.

 I propose to introduce a new `wp_set_cookie()` function to support all
 versions of PHP. I also propose to introduce a filter in this function.
 This should help for #37000.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55440>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list