add nonces for auto-draft #357

This commit is contained in:
vnmedeiros 2020-10-22 17:12:08 -03:00
parent d1404a3178
commit d9d483e77d
1 changed files with 3 additions and 0 deletions

View File

@ -236,6 +236,9 @@ class REST_Items_Controller extends REST_Controller {
$item_arr['thumbnail'] = $item->get_thumbnail();
$item_arr['thumbnail_alt'] = get_post_meta( $item->get__thumbnail_id(), '_wp_attachment_image_alt', true );
$item_arr['thumbnail_id'] = $item->get__thumbnail_id();
$item_arr['nonces'] = array(
'update-post_' . $item->get_id() => wp_create_nonce('update-post_' . $item->get_id())
);
}
} else {