Make WordPress Core

Ticket #14380: 14380-filter.diff

File 14380-filter.diff, 623 bytes (added by iandunn, 12 years ago)

Adds wp-caption-width filter

  • wp-includes/media.php

     
    651651
    652652        if ( $id ) $id = 'id="' . esc_attr($id) . '" ';
    653653
    654         return '<div ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="width: ' . (10 + (int) $width) . 'px">'
     654        return '<div ' . $id . 'class="wp-caption ' . esc_attr( $align ) . '" style="width: ' . apply_filters( 'wp-caption-width', ( 10 + (int) $width ) ) . 'px">'
    655655        . do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>';
    656656}
    657657