Make WordPress Core

Ticket #29607: 29607.2.patch

File 29607.2.patch, 868 bytes (added by collinsinternet, 11 years ago)

Documented and up to coding standards.

  • wp-admin/includes/media.php

     
    159159function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) {
    160160
    161161        /**
     162         * Filter to alter the caption text.
     163         *
     164         * Allows the caption text to be altered.  By default, if the $caption variable is empty, the image_add_action()
     165         * function returns, which prevents the usage of the image_add_caption_shortcode filter.
     166         *
     167         * @since 4.1.0
     168         *
     169         * @param string $caption The $caption parameter passed into image_add_caption. (Original caption text).
     170         */
     171        $caption = apply_filters( 'image_add_caption', $caption );
     172
     173        /**
    162174         * Filter whether to disable captions.
    163175         *
    164176         * Prevents image captions from being appended to image HTML when inserted into the editor.