wp_caption_input_textarea

The timeline below displays how wordpress function wp_caption_input_textarea has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Outputs a textarea element for inputting an attachment caption.
 *
 * @since 3.4.0
 *
 * @param WP_Post $edit_post Attachment WP_Post object.
 * @return string HTML markup for the textarea element.
 */
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>';
}

WordPress Version: 4.3

/**
 * Output a textarea element for inputting an attachment caption.
 *
 * @since 3.4.0
 *
 * @param WP_Post $edit_post Attachment WP_Post object.
 * @return string HTML markup for the textarea element.
 */
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>';
}

WordPress Version: 4.0

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

WordPress Version: 3.7

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