wp_caption_input_textarea( WP_Post $edit_post ): string

In this article

Outputs a textarea element for inputting an attachment caption.

Parameters

$edit_postWP_Postrequired
Attachment WP_Post object.

Return

string HTML markup for the textarea element.

Source

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>';
}

Changelog

VersionDescription
3.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.