WC_Meta_Box_Product_Images
in package
WC_Meta_Box_Product_Images Class.
Table of Contents
- output() : mixed
- Output the metabox.
- save() : mixed
- Save meta box data.
- decode_media_gallery_json() : array<string|int, mixed>
- Decode the posted media gallery hidden field.
- get_media_gallery_json() : string
- Encode media gallery items for the hidden form field.
- get_video_preview_html() : string
- Get HTML preview for a video attachment.
Methods
output()
Output the metabox.
public
static output(WP_Post $post) : mixed
Parameters
- $post : WP_Post
Return values
mixed —save()
Save meta box data.
public
static save(int $post_id, WP_Post $post) : mixed
Parameters
- $post_id : int
- $post : WP_Post
Return values
mixed —decode_media_gallery_json()
Decode the posted media gallery hidden field.
private
static decode_media_gallery_json(mixed $media_gallery_json) : array<string|int, mixed>
Parameters
- $media_gallery_json : mixed
-
JSON-encoded media gallery field value.
Return values
array<string|int, mixed> —get_media_gallery_json()
Encode media gallery items for the hidden form field.
private
static get_media_gallery_json(array<string|int, mixed> $media_gallery) : string
Parameters
- $media_gallery : array<string|int, mixed>
-
Media gallery items.
Return values
string —get_video_preview_html()
Get HTML preview for a video attachment.
private
static get_video_preview_html(int $attachment_id) : string
Parameters
- $attachment_id : int
-
Attachment ID.
