Changeset 45135 for trunk/src/wp-includes/class-wp-http-cookie.php
- Timestamp:
- 04/08/2019 05:31:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-cookie.php
r42343 r45135 62 62 63 63 /** 64 * host-only flag. 65 * 66 * @since 5.2.0 67 * @var bool 68 */ 69 public $host_only; 70 71 /** 64 72 * Sets up this cookie object. 65 73 * … … 68 76 * 69 77 * @since 2.8.0 78 * @since 5.2.0 Added `host_only` to the `$data` parameter. 70 79 * 71 80 * @param string|array $data { 72 81 * Raw cookie data as header string or data array. 73 82 * 74 * @type string $name Cookie name. 75 * @type mixed $value Value. Should NOT already be urlencoded. 76 * @type string|int $expires Optional. Unix timestamp or formatted date. Default null. 77 * @type string $path Optional. Path. Default '/'. 78 * @type string $domain Optional. Domain. Default host of parsed $requested_url. 79 * @type int $port Optional. Port. Default null. 83 * @type string $name Cookie name. 84 * @type mixed $value Value. Should NOT already be urlencoded. 85 * @type string|int $expires Optional. Unix timestamp or formatted date. Default null. 86 * @type string $path Optional. Path. Default '/'. 87 * @type string $domain Optional. Domain. Default host of parsed $requested_url. 88 * @type int $port Optional. Port. Default null. 89 * @type bool $host_only Optional. host-only storage flag. Default true. 80 90 * } 81 91 * @param string $requested_url The URL which the cookie was set on, used for default $domain … … 129 139 130 140 // Set properties based directly on parameters. 131 foreach ( array( 'name', 'value', 'path', 'domain', 'port' ) as $field ) {141 foreach ( array( 'name', 'value', 'path', 'domain', 'port', 'host_only' ) as $field ) { 132 142 if ( isset( $data[ $field ] ) ) { 133 143 $this->$field = $data[ $field ];
Note: See TracChangeset
for help on using the changeset viewer.