ACF_Rest_Embed_Links

Class ACF_Rest_Embed_Links

  • Manage the addition of embed links on supported REST endpoints.

Properties

  • @var array Links to add to the response. These can be flagged as embeddable and expanded when _embed is passed with the request.

Methods

Hook into all REST-enabled post type, taxonomy, and the user controllers in order to prepare links.

Add links to internal property for subsequent use in \ACF_Rest_Embed_Links::load_item_links().

  • @param $post_id
  • @param array $field

Hook into the rest_prepare_{$type} filters and add links for the object being prepared.