Skip to content

Attachment Queries #16

@jasonbahl

Description

@jasonbahl

The "attachment" type needs to be defined with all the attributes of attachments (captions, alt_text, etc).

We should compare the attributes that the REST API outputs, as well as what wp_prepare_attachment_for_json outputs

Based on my initial research, the data that core uses for images either as part of the main post object or in post_meta are:

  • id
  • post_name
  • post_parent
  • post_parent
  • _edit_last
  • _edit_lock
  • _wp_attached_file
  • _wp_attachment_backup_sizes
  • _wp_attachment_context
  • _wp_attachment_image_alt
  • _wp_attachment_metadata
  • _wp_old_slug
  • comment_count
  • comment_status
  • guid
  • menu_order
  • mime_type
  • ping_status
  • pinged
  • post_author
  • post_content
  • post_content_filtered
  • post_date
  • post_date_gmt
  • post_excerpt
  • post_modified
  • post_modified_gmt
  • post_password
  • post_status
  • post_title
  • post_type
  • to_ping

The wp_prepare_attachment_for_json function returns the following fields:

  • id
  • title
  • filename
  • url
  • link
  • alt
  • author
  • description
  • caption
  • name
  • status
  • uploadedTo
  • date
  • modified
  • menuOrder
  • mime
  • type
  • subtype
  • icon
  • dateFormatted
  • nonces
  • editLink
  • sizes
  • width
  • height
  • fileLength
  • compat

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: architectureRelating to fundamental architectural decisions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions