Make WordPress Core


Ignore:
Timestamp:
07/08/2008 11:37:56 PM (18 years ago)
Author:
ryan
Message:

Use dash instead of underscore for CSS names. Props azaozz. see #6812

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r8261 r8289  
    351351}
    352352
    353 add_shortcode('wp_caption', 'wp_caption_shortcode');
    354 
    355 function wp_caption_shortcode($attr, $content = null) {
     353add_shortcode('wp_caption', 'img_caption_shortcode');
     354
     355function img_caption_shortcode($attr, $content = null) {
    356356   
    357357    // Allow plugins/themes to override the default caption template.
    358     $output = apply_filters('wp_caption_shortcode', '', $attr, $content);
     358    $output = apply_filters('img_caption_shortcode', '', $attr, $content);
    359359    if ( $output != '' )
    360360        return $output;
     
    372372    if ( $id ) $id = 'id="' . $id . '" ';
    373373   
    374     return '<dl ' . $id . 'class="wp_caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
    375     . '<dt class="wp_caption_dt">' . $content . '</dt><dd class="wp_caption_dd">' . $caption . '</dd></dl>';
     374    return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'
     375    . $content . '<p class="wp-caption-text">' . $caption . '</p></div>';
    376376}
    377377
Note: See TracChangeset for help on using the changeset viewer.