- Timestamp:
- 02/03/2023 01:33:18 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-request.php
r54663 r55210 292 292 293 293 /** 294 * Retrieves the content-type of the request.294 * Retrieves the Content-Type of the request. 295 295 * 296 296 * @since 4.4.0 297 297 * 298 298 * @return array|null Map containing 'value' and 'parameters' keys 299 * or null when no valid content-type header was299 * or null when no valid Content-Type header was 300 300 * available. 301 301 */ 302 302 public function get_content_type() { 303 $value = $this->get_header( ' content-type' );303 $value = $this->get_header( 'Content-Type' ); 304 304 if ( empty( $value ) ) { 305 305 return null; … … 326 326 327 327 /** 328 * Checks if the request has specified a JSON content-type.328 * Checks if the request has specified a JSON Content-Type. 329 329 * 330 330 * @since 5.6.0 331 331 * 332 * @return bool True if the content-type header is JSON.332 * @return bool True if the Content-Type header is JSON. 333 333 */ 334 334 public function is_json_content_type() { … … 720 720 721 721 /* 722 * Check that we got URL-encoded. Treat a missing content-type as722 * Check that we got URL-encoded. Treat a missing Content-Type as 723 723 * URL-encoded for maximum compatibility. 724 724 */
Note: See TracChangeset
for help on using the changeset viewer.