|
@@ 388-390 (lines=3) @@
|
| 385 |
|
$response->set_status( 201 ); |
| 386 |
|
|
| 387 |
|
$base = '/' . $this->namespace . '/' . $this->rest_base; |
| 388 |
|
if ( ! empty( $request['attribute_id'] ) ) { |
| 389 |
|
$base = str_replace( '(?P<attribute_id>[\d]+)', (int) $request['attribute_id'], $base ); |
| 390 |
|
} |
| 391 |
|
|
| 392 |
|
$response->header( 'Location', rest_url( $base . '/' . $term->term_id ) ); |
| 393 |
|
|
|
@@ 531-533 (lines=3) @@
|
| 528 |
|
protected function prepare_links( $term, $request ) { |
| 529 |
|
$base = '/' . $this->namespace . '/' . $this->rest_base; |
| 530 |
|
|
| 531 |
|
if ( ! empty( $request['attribute_id'] ) ) { |
| 532 |
|
$base = str_replace( '(?P<attribute_id>[\d]+)', (int) $request['attribute_id'], $base ); |
| 533 |
|
} |
| 534 |
|
|
| 535 |
|
$links = array( |
| 536 |
|
'self' => array( |