IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
727 | 727 | |
728 | 728 | $cookies_header = ''; |
729 | 729 | foreach ( (array) $r['cookies'] as $cookie ) { |
730 | | $cookies_header .= $cookie->getHeaderValue() . '; '; |
| 730 | $cookies_header .= $cookie->get_header_value() . '; '; |
731 | 731 | } |
732 | 732 | |
733 | 733 | $cookies_header = substr( $cookies_header, 0, -2 ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
13 | 13 | * Returned cookies are represented using this class, and when cookies are set, if they are not |
14 | 14 | * already a WP_Http_Cookie() object, then they are turned into one. |
15 | 15 | * |
16 | | * @todo The WordPress convention is to use underscores instead of camelCase for function and method |
17 | 16 | * names. Need to switch to use underscores instead for the methods. |
18 | 17 | * |
19 | 18 | * @since 2.8.0 |
… |
… |
|
84 | 83 | */ |
85 | 84 | public function __construct( $data, $requested_url = '' ) { |
86 | 85 | if ( $requested_url ) |
87 | | $arrURL = @parse_url( $requested_url ); |
| 86 | $arrURL = wp_parse_url( $requested_url ); |
88 | 87 | if ( isset( $arrURL['host'] ) ) |
89 | 88 | $this->domain = $arrURL['host']; |
90 | 89 | $this->path = isset( $arrURL['path'] ) ? $arrURL['path'] : '/'; |
… |
… |
|
190 | 189 | * |
191 | 190 | * @return string Header encoded cookie name and value. |
192 | 191 | */ |
193 | | public function getHeaderValue() { |
| 192 | public function get_header_value() { |
194 | 193 | if ( ! isset( $this->name ) || ! isset( $this->value ) ) |
195 | 194 | return ''; |
196 | 195 | |
… |
… |
|
205 | 204 | return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name ); |
206 | 205 | } |
207 | 206 | |
| 207 | /** |
| 208 | * Convert cookie name and value back to header string. |
| 209 | * |
| 210 | * @access public |
| 211 | * @since 2.8.0 |
| 212 | * @deprecated 4.8.0 Deprecated in favor of get_header_value() method. |
| 213 | * |
| 214 | * @return string Header encoded cookie name and value. |
| 215 | */ |
| 216 | public function getHeaderValue() { |
| 217 | _deprecated_function( __METHOD__, '4.8.0', __CLASS__ . '::get_header_value()' ); |
| 218 | |
| 219 | return $this->get_header_value(); |
| 220 | } |
| 221 | |
208 | 222 | /** |
209 | 223 | * Retrieve cookie header for usage in the rest of the WordPress HTTP API. |
210 | 224 | * |
… |
… |
|
213 | 227 | * |
214 | 228 | * @return string |
215 | 229 | */ |
| 230 | public function get_full_header() { |
| 231 | return 'Cookie: ' . $this->get_header_value(); |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Retrieve cookie header for usage in the rest of the WordPress HTTP API. |
| 236 | * |
| 237 | * @access public |
| 238 | * @since 2.8.0 |
| 239 | * @deprecated 4.4.0 Deprecated in favor of get_full_header() method. |
| 240 | * |
| 241 | * @return string |
| 242 | */ |
216 | 243 | public function getFullHeader() { |
217 | | return 'Cookie: ' . $this->getHeaderValue(); |
| 244 | _deprecated_function( __METHOD__, '4.8.0', __CLASS__ . '::get_full_header()' ); |
| 245 | |
| 246 | return $this->get_full_header(); |
218 | 247 | } |
219 | 248 | |
220 | 249 | /** |
… |
… |
|
233 | 262 | */ |
234 | 263 | public function get_attributes() { |
235 | 264 | return array( |
| 265 | 'name' => $this->name, |
| 266 | 'value' => $this->value, |
236 | 267 | 'expires' => $this->expires, |
237 | 268 | 'path' => $this->path, |
238 | 269 | 'domain' => $this->domain, |