Interface: AttachmentEntity
@headstartwp/core.AttachmentEntity
Interface for entities from the /wp/v2/media endpoint.
Hierarchy
↳
AttachmentEntity
Properties
_embedded
• _embedded: Object
Type declaration
Name | Type |
---|---|
author | AuthorEntity [] |
wp:term | TermEntity [][] |
Inherited from
Defined in
packages/core/src/data/types/entities.ts:98
alt_text
• alt_text: string
Alternative text to display when attachment is not displayed.
Defined in
packages/core/src/data/types/entities.ts:259
author
• Optional
author: AuthorEntity
[]
Inherited from
Defined in
packages/core/src/data/types/entities.ts:94
caption
• caption: Rendered
The attachment caption.
Defined in
packages/core/src/data/types/entities.ts:264
comment_status
• Optional
comment_status: "open"
| "closed"
Whether or not comments are open on the object.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:106
date
• date: string
The date the object was published, in the site's timezone.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:42
date_gmt
• date_gmt: string
The date the object was published, as GMT.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:47
description
• description: Rendered
The attachment description.
Defined in
packages/core/src/data/types/entities.ts:269
guid
• guid: Rendered
The globally unique identifier for the object.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:52
id
• id: number
Unique identifier for the object.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:67
link
• link: string
URL to the object.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:72
media_details
• Optional
media_details: Object
Details about the media file, specific to its type.
Type declaration
Name | Type | Description |
---|---|---|
file | string | The file path relative to wp-content/uploads . |
height | number | The height of the attachment. |
image_meta | Record <string , unknown > | The metadata of the attachment. |
sizes | Record <string , { file : string ; height : number ; mime_type : string ; source_url : string ; width : number }> | The different sizes that WordPress created for this attachment. |
width | number | The width of the attachment. |
Defined in
packages/core/src/data/types/entities.ts:284
media_type
• media_type: "image"
| "file"
Attachment type.
Defined in
packages/core/src/data/types/entities.ts:274
meta
• Optional
meta: Record
<string
, unknown
>
Meta fields.
Defined in
packages/core/src/data/types/entities.ts:249
mime_type
• mime_type: string
The attachment MIME type.
Defined in
packages/core/src/data/types/entities.ts:279
missing_image_sizes
• missing_image_sizes: string
[]
List of the missing image sizes of the attachment.
Defined in
packages/core/src/data/types/entities.ts:352
modified
• modified: string
The date the object was last modified, in the site's timezone.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:57
modified_gmt
• modified_gmt: string
The date the object was last modified, as GMT.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:62
ping_status
• ping_status: "open"
| "closed"
Whether or not the object can be pinged.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:111
post
• post: number
The ID for the associated post of the attachment.
Defined in
packages/core/src/data/types/entities.ts:342
slug
• slug: string
An alphanumeric identifier for the object unique to its type.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:77
source_url
• source_url: string
URL to the original attachment file.
Defined in
packages/core/src/data/types/entities.ts:347
status
• status: "publish"
| "future"
| "draft"
| "pending"
| "private"
A named status for the object.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:82
template
• Optional
template: string
The theme file to use to display the object.
Defined in
packages/core/src/data/types/entities.ts:254
terms
• Optional
terms: Record
<string
, TermEntity
[]>
Inherited from
Defined in
packages/core/src/data/types/entities.ts:96
title
• title: Rendered
The title for the object.
Inherited from
Defined in
packages/core/src/data/types/entities.ts:92
type
• type: "attachment"
Type of Post for the object.
Overrides
Defined in
packages/core/src/data/types/entities.ts:244
yoast_head
• Optional
yoast_head: null
| string
Inherited from
Defined in
packages/core/src/data/types/entities.ts:114
yoast_head_json
• Optional
yoast_head_json: null
| Record
<string
, any
>
Inherited from
PostTypeEntity.yoast_head_json