Make WordPress Core


Ignore:
Timestamp:
04/08/2019 05:31:35 AM (6 years ago)
Author:
pento
Message:

HTTP: Add support for the host-only flag to Wp_Http_Cookie.

Props soulseekah.
Fixes #43231.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-http.php

    r44397 r45135  
    450450        foreach ( $cookies as $name => $value ) {
    451451            if ( $value instanceof WP_Http_Cookie ) {
    452                 $cookie_jar[ $value->name ] = new Requests_Cookie( $value->name, $value->value, $value->get_attributes() );
     452                $cookie_jar[ $value->name ] = new Requests_Cookie( $value->name, $value->value, $value->get_attributes(), array( 'host-only' => $value->host_only ) );
    453453            } elseif ( is_scalar( $value ) ) {
    454454                $cookie_jar[ $name ] = new Requests_Cookie( $name, $value );
Note: See TracChangeset for help on using the changeset viewer.