wp_caption_input_textarea()WP 3.4.0

Outputs a textarea element for inputting an attachment caption.

Хуков нет.

Возвращает

Строку. HTML markup for the textarea element.

Использование

wp_caption_input_textarea( $edit_post );
$edit_post(WP_Post) (обязательный)
Attachment WP_Post object.

Список изменений

С версии 3.4.0 Введена.

Код wp_caption_input_textarea() WP 6.5.2

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