- Timestamp:
- 05/22/2017 04:15:25 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-request.php
r40577 r40815 355 355 protected function get_parameter_order() { 356 356 $order = array(); 357 $order[] = 'JSON'; 357 358 $content_type = $this->get_content_type(); 359 if ( $content_type['value'] === 'application/json' ) { 360 $order[] = 'JSON'; 361 } 358 362 359 363 $this->parse_json_params(); … … 425 429 */ 426 430 public function set_param( $key, $value ) { 427 switch ( $this->method ) { 428 case 'POST': 429 $this->params['POST'][ $key ] = $value; 430 break; 431 432 default: 433 $this->params['GET'][ $key ] = $value; 434 break; 435 } 431 $order = $this->get_parameter_order(); 432 $this->params[ $order[0] ][ $key ] = $value; 436 433 } 437 434
Note: See TracChangeset
for help on using the changeset viewer.