<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[57603] trunk: REST API: Add `featured_media` field to attachments endpoint.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/57603">57603</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/57603","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>swissspidy</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-02-12 22:15:45 +0000 (Mon, 12 Feb 2024)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>REST API: Add `featured_media` field to attachments endpoint.

Audio and video attachments can have a featured image, also known as a poster image. This functionality is now properly exposed by the `wp/v2/media` endpoint.

Props swissspidy, timothyblynjacobs, wonderboymusic, dlh, spacedmonkey.
Fixes <a href="https://core.trac.wordpress.org/ticket/41692">#41692</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestattachmentscontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestpostscontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php</a></li>
<li><a href="#trunktestsphpunitincludestestcaserestposttypecontrollerphp">trunk/tests/phpunit/includes/testcase-rest-post-type-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestattachmentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php</a></li>
<li><a href="#trunktestsqunitfixtureswpapigeneratedjs">trunk/tests/qunit/fixtures/wp-api-generated.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesrestapiendpointsclasswprestattachmentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php 2024-02-12 21:55:44 UTC (rev 57602)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php   2024-02-12 22:15:45 UTC (rev 57603)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -171,6 +171,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        update_post_meta( $attachment_id, '_wp_attachment_image_alt', sanitize_text_field( $request['alt_text'] ) );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( ! empty( $schema['properties']['featured_media'] ) && isset( $request['featured_media'] ) ) {
+                       $thumbnail_update = $this->handle_featured_media( $request['featured_media'], $attachment_id );
+
+                       if ( is_wp_error( $thumbnail_update ) ) {
+                               return $thumbnail_update;
+                       }
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $meta_update = $this->meta->update_value( $request['meta'], $attachment_id );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -323,6 +331,43 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * Determines the featured media based on a request param.
+        *
+        * @since 6.5.0
+        *
+        * @param int $featured_media Featured Media ID.
+        * @param int $post_id        Post ID.
+        * @return bool|WP_Error Whether the post thumbnail was successfully deleted, otherwise WP_Error.
+        */
+       protected function handle_featured_media( $featured_media, $post_id ) {
+               $post_type         = get_post_type( $post_id );
+               $thumbnail_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' );
+
+               // Similar check as in wp_insert_post().
+               if ( ! $thumbnail_support && get_post_mime_type( $post_id ) ) {
+                       if ( wp_attachment_is( 'audio', $post_id ) ) {
+                               $thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' );
+                       } elseif ( wp_attachment_is( 'video', $post_id ) ) {
+                               $thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' );
+                       }
+               }
+
+               if ( $thumbnail_support ) {
+                       return parent::handle_featured_media( $featured_media, $post_id );
+               }
+
+               return new WP_Error(
+                       'rest_no_featured_media',
+                       sprintf(
+                               /* translators: %s: attachment mime type */
+                               __( 'This site does not support post thumbnails on attachments with MIME type %s.' ),
+                               get_post_mime_type( $post_id )
+                       ),
+                       array( 'status' => 400 )
+               );
+       }
+
+       /**
</ins><span class="cx" style="display: block; padding: 0 10px">          * Updates a single attachment.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 4.7.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -355,6 +400,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $attachment = get_post( $request['id'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( ! empty( $schema['properties']['featured_media'] ) && isset( $request['featured_media'] ) ) {
+                       $thumbnail_update = $this->handle_featured_media( $request['featured_media'], $attachment->ID );
+
+                       if ( is_wp_error( $thumbnail_update ) ) {
+                               return $thumbnail_update;
+                       }
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $fields_update = $this->update_additional_fields_for_object( $attachment, $request );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_wp_error( $fields_update ) ) {
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestpostscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php       2024-02-12 21:55:44 UTC (rev 57602)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 2024-02-12 22:15:45 UTC (rev 57603)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2377,6 +2377,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'comments',
</span><span class="cx" style="display: block; padding: 0 10px">                                'revisions',
</span><span class="cx" style="display: block; padding: 0 10px">                                'custom-fields',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'thumbnail',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunitincludestestcaserestposttypecontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/testcase-rest-post-type-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/testcase-rest-post-type-controller.php       2024-02-12 21:55:44 UTC (rev 57602)
+++ trunk/tests/phpunit/includes/testcase-rest-post-type-controller.php 2024-02-12 22:15:45 UTC (rev 57603)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,7 +77,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertSame( get_page_template_slug( $post->ID ), $data['template'] );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( post_type_supports( $post->post_type, 'thumbnail' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if (
+                       post_type_supports( $post->post_type, 'thumbnail' ) ||
+                       (
+                               'attachment' === $post->post_type &&
+                               (
+                                       post_type_supports( 'attachment:audio', 'thumbnail' ) ||
+                                       post_type_supports( 'attachment:video', 'thumbnail' )
+                               )
+                       )
+               ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->assertSame( (int) get_post_thumbnail_id( $post->ID ), $data['featured_media'] );
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertArrayNotHasKey( 'featured_media', $data );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestattachmentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php        2024-02-12 21:55:44 UTC (rev 57602)
+++ trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php  2024-02-12 22:15:45 UTC (rev 57603)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1067,6 +1067,77 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $category['term_id'], $term[0]->term_id );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        /**
+        * @ticket 41692
+        */
+       public function test_create_update_post_with_featured_media() {
+               // Add support for thumbnails on all attachment types to avoid incorrect-usage notice.
+               add_post_type_support( 'attachment', 'thumbnail' );
+
+               wp_set_current_user( self::$editor_id );
+
+               $request = new WP_REST_Request( 'POST', '/wp/v2/media' );
+               $request->set_file_params(
+                       array(
+                               'file' => array(
+                                       'file'     => file_get_contents( self::$test_file ),
+                                       'name'     => 'canola.jpg',
+                                       'size'     => filesize( self::$test_file ),
+                                       'tmp_name' => self::$test_file,
+                               ),
+                       )
+               );
+               $request->set_header( 'Content-MD5', md5_file( self::$test_file ) );
+
+               $file          = DIR_TESTDATA . '/images/canola.jpg';
+               $attachment_id = self::factory()->attachment->create_object(
+                       $file,
+                       0,
+                       array(
+                               'post_mime_type' => 'image/jpeg',
+                               'menu_order'     => rand( 1, 100 ),
+                       )
+               );
+
+               $request->set_param( 'featured_media', $attachment_id );
+
+               $response = rest_get_server()->dispatch( $request );
+               $data     = $response->get_data();
+
+               $this->assertEquals( 201, $response->get_status() );
+
+               $new_attachment = get_post( $data['id'] );
+
+               $this->assertEquals( $attachment_id, (int) get_post_thumbnail_id( $new_attachment->ID ) );
+               $this->assertEquals( $attachment_id, $data['featured_media'] );
+
+               $request = new WP_REST_Request( 'PUT', '/wp/v2/media/' . $new_attachment->ID );
+               $params  = $this->set_post_data(
+                       array(
+                               'featured_media' => 0,
+                       )
+               );
+               $request->set_body_params( $params );
+               $response = rest_get_server()->dispatch( $request );
+               $this->assertEquals( 200, $response->get_status() );
+               $data = $response->get_data();
+               $this->assertEquals( 0, $data['featured_media'] );
+               $this->assertEquals( 0, (int) get_post_thumbnail_id( $new_attachment->ID ) );
+
+               $request = new WP_REST_Request( 'PUT', '/wp/v2/media/' . $new_attachment->ID );
+               $params  = $this->set_post_data(
+                       array(
+                               'featured_media' => $attachment_id,
+                       )
+               );
+               $request->set_body_params( $params );
+               $response = rest_get_server()->dispatch( $request );
+               $this->assertEquals( 200, $response->get_status() );
+               $data = $response->get_data();
+               $this->assertEquals( $attachment_id, $data['featured_media'] );
+               $this->assertEquals( $attachment_id, (int) get_post_thumbnail_id( $new_attachment->ID ) );
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         public function test_update_item() {
</span><span class="cx" style="display: block; padding: 0 10px">                wp_set_current_user( self::$editor_id );
</span><span class="cx" style="display: block; padding: 0 10px">                $attachment_id = self::factory()->attachment->create_object(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1576,7 +1647,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response   = rest_get_server()->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $data       = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $properties = $data['schema']['properties'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertCount( 27, $properties );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertCount( 28, $properties );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'alt_text', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'caption', $properties );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1610,6 +1681,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'rendered', $properties['title']['properties'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'type', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'missing_image_sizes', $properties );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $this->assertArrayHasKey( 'featured_media', $properties );
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_additional_field_registration() {
</span></span></pre></div>
<a id="trunktestsqunitfixtureswpapigeneratedjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/qunit/fixtures/wp-api-generated.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/qunit/fixtures/wp-api-generated.js    2024-02-12 21:55:44 UTC (rev 57602)
+++ trunk/tests/qunit/fixtures/wp-api-generated.js      2024-02-12 22:15:45 UTC (rev 57603)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7315,6 +7315,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "integer",
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        "featured_media": {
+                            "description": "The ID of the featured media for the post.",
+                            "type": "integer",
+                            "required": false
+                        },
</ins><span class="cx" style="display: block; padding: 0 10px">                         "comment_status": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "description": "Whether or not comments are open on the post.",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "string",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7517,6 +7522,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "integer",
</span><span class="cx" style="display: block; padding: 0 10px">                             "required": false
</span><span class="cx" style="display: block; padding: 0 10px">                         },
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        "featured_media": {
+                            "description": "The ID of the featured media for the post.",
+                            "type": "integer",
+                            "required": false
+                        },
</ins><span class="cx" style="display: block; padding: 0 10px">                         "comment_status": {
</span><span class="cx" style="display: block; padding: 0 10px">                             "description": "Whether or not comments are open on the post.",
</span><span class="cx" style="display: block; padding: 0 10px">                             "type": "string",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12693,6 +12703,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">             "rendered": "REST API Client Fixture: Attachment"
</span><span class="cx" style="display: block; padding: 0 10px">         },
</span><span class="cx" style="display: block; padding: 0 10px">         "author": 0,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        "featured_media": 0,
</ins><span class="cx" style="display: block; padding: 0 10px">         "comment_status": "open",
</span><span class="cx" style="display: block; padding: 0 10px">         "ping_status": "closed",
</span><span class="cx" style="display: block; padding: 0 10px">         "template": "",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12754,6 +12765,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         "rendered": "REST API Client Fixture: Attachment"
</span><span class="cx" style="display: block; padding: 0 10px">     },
</span><span class="cx" style="display: block; padding: 0 10px">     "author": 0,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    "featured_media": 0,
</ins><span class="cx" style="display: block; padding: 0 10px">     "comment_status": "open",
</span><span class="cx" style="display: block; padding: 0 10px">     "ping_status": "closed",
</span><span class="cx" style="display: block; padding: 0 10px">     "template": "",
</span></span></pre>
</div>
</div>

</body>
</html>