IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
474 | 474 | $data = $this->prepare_item_for_response( $post, $request ); |
475 | 475 | $response = rest_ensure_response( $data ); |
476 | 476 | |
477 | | if ( is_post_type_viewable( get_post_type_object( $post->post_type ) ) ) { |
| 477 | if ( ! is_wp_error( $response ) && is_post_type_viewable( get_post_type_object( $post->post_type ) ) ) { |
478 | 478 | $response->link_header( 'alternate', get_permalink( $post->ID ), array( 'type' => 'text/html' ) ); |
479 | 479 | } |
480 | 480 | |