Description
Retrieve an HTML form for modifying a image attachment.
Usage
<?php get_media_item( $attachment_id, $args ); ?>
Parameters
- $attachment_id
- (int) (required) Attachment ID for modification.
- Default: None
- $args
- (string|array) (optional) Optional. Override defaults.
- Default: null
Arguments
- errors
- (array) (optional) Passed to get_attachment_fields_to_edit() by this function. Presumably used to change default error messages for default fields
- Default: null
- send
- (boolean) (optional) Whether to include the submit button html.
- Default: the result of conditional logic. Set to the result of post_type_supports( post->ID, 'editor' ) if the post has an ID. Or, if the post doesn't have an ID, "true".
- delete
- (boolean) (optional) Whether to include delete link html.
- Default: true
- toggle
- (boolean) (optional) Whether to include toggle link html.
- Default: true
- show_title
- (boolean) (optional) Whether to include attachment title html.
- Default: true
Return Values
- (string)
- HTML form for attachment.
Change Log
Since: 2.5
Source File
get_media_item() is located in wp-admin/includes/media.php