APP_Listing_Post_Meta_Object::handle_media( int $item_id, array $fields = array(), bool $duplicate = false )
Handles media related post data.
Package
Description Description
Parameters Parameters
- $item_id
(int) (Required) Item ID to which attachments will be assigned.
- $fields
(array) (Optional) (optional) The media fields that should be handled. Expects the fields index type: 'attachs' or 'embeds' (e.g: $fields = array( 'attach' => array( 'field1', 'field2' ), 'embeds' => array( 'field1', 'field2' ) ) ).
Default value: array()
- $duplicate
(bool) (Optional) (optional) Should the media files be duplicated, thus keeping the original file unattached.
Default value: false
Return Return
(null|bool) False if no media was processed, null otherwise