wp_caption_input_textarea() WordPress Function
The wp_caption_input_textarea() function allows you to add a caption to an image in a WordPress post. This function is typically used when you want to add a caption to an image that you have uploaded to your WordPress site.
wp_caption_input_textarea( WP_Post $edit_post ) #
Outputs a textarea element for inputting an attachment caption.
Parameters
Return
(string) HTML markup for the textarea element.
Source
File: wp-admin/includes/media.php
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>'; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |