-
<private, static> _audioVideo(type, props, attachment)
-
Helper function to create a media shortcode string
Parameters:
Name |
Type |
Description |
type |
string
|
The shortcode tag name: 'audio' or 'video'. |
props |
Object
|
Attachment details (align, link, size, etc). |
attachment |
Object
|
The attachment object, media version of Post. |
- Source:
-
Returns:
The media shortcode
-
Type
-
string
-
<static> audio(props, attachment)
-
Create an Audio shortcode string that is suitable for passing to the editor
Parameters:
Name |
Type |
Description |
props |
Object
|
Attachment details (align, link, size, etc). |
attachment |
Object
|
The attachment object, media version of Post. |
- Source:
-
Returns:
The audio shortcode
-
Type
-
string
-
<static> image(props, attachment)
-
Create image markup, optionally with a link and/or wrapped in a caption shortcode,
that is suitable for passing to the editor
Parameters:
Name |
Type |
Description |
props |
Object
|
Attachment details (align, link, size, etc). |
attachment |
Object
|
The attachment object, media version of Post. |
- Source:
-
Returns:
-
Type
-
string
-
<static> link(props, attachment)
-
Create link markup that is suitable for passing to the editor
Parameters:
Name |
Type |
Description |
props |
Object
|
Attachment details (align, link, size, etc). |
attachment |
Object
|
The attachment object, media version of Post. |
- Source:
-
Returns:
The link markup
-
Type
-
string
-
<static> props( [props], attachment)
-
Joins the `props` and `attachment` objects,
outputting the proper object format based on the
attachment's type.
Parameters:
Name |
Type |
Argument |
Default |
Description |
props |
Object
|
<optional>
|
{}
|
Attachment details (align, link, size, etc). |
attachment |
Object
|
|
|
The attachment object, media version of Post. |
- Source:
-
Returns:
Joined props
-
Type
-
Object
-
<static> video(props, attachment)
-
Create a Video shortcode string that is suitable for passing to the editor
Parameters:
Name |
Type |
Description |
props |
Object
|
Attachment details (align, link, size, etc). |
attachment |
Object
|
The attachment object, media version of Post. |
- Source:
-
Returns:
The video shortcode
-
Type
-
string