Skip to content

v1.2.0

Latest

Choose a tag to compare

@CapitanPNG CapitanPNG released this 05 Nov 14:14

Added

  • POST /posts accepts thumbnail, the featured image of the post: a URL (imported or reused from the Media Library) or an attachment_id, or a WPML language map of them. null, "", 0 or "0" removes it, and leaving it out keeps it. A post type without featured image support answers 400 invalid_param.
  • GET /posts and GET /posts/{id} return thumbnail_id, the attachment_id of the featured image, or null.
  • ACF gallery fields in acf_fields accept a list of remote URLs and/or attachment_ids, on every endpoint and as a repeater, group or flexible_content sub-field. Each URL is imported (or reused from the Media Library) like an image value, attached to the parent post, and the field stores the attachment IDs in the order sent. A gallery used to be stored as sent, so it took attachment_ids only.

Changed

  • An ACF gallery item that is neither an existing attachment_id nor a valid URL now answers 400 input_invalid, naming its position (Field 'photos[2]' in acf_fields must be an existing attachment ID or a valid URL). It used to be stored as sent.