wp_caption_input_textarea()
Outputs a textarea element for inputting an attachment caption.
No Hooks.
Returns
String. HTML markup for the textarea element.
Usage
wp_caption_input_textarea( $edit_post );
- $edit_post(WP_Post) (required)
- Attachment WP_Post object.
Changelog
| Since 3.4.0 | Introduced. |
wp_caption_input_textarea() wp caption input textarea code WP 6.9.1
function wp_caption_input_textarea( $edit_post ) {
// Post data is already escaped.
$name = "attachments[{$edit_post->ID}][post_excerpt]";
return '<textarea name="' . $name . '" id="' . $name . '">' . $edit_post->post_excerpt . '</textarea>';
}