Make WordPress Core

Changeset 8289


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

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/classic/style.css

    r8239 r8289  
    323323/* Captions & aligment */
    324324.aligncenter,
    325 dl.aligncenter {
     325div.aligncenter {
    326326    display: block;
    327327    margin-left: auto;
     
    337337}
    338338
    339 .wp_caption {
     339.wp-caption {
    340340    border: 1px solid #ddd;
    341341    text-align: center;
     
    349349}
    350350
    351 .wp_caption img {
     351.wp-caption img {
    352352    margin: 0;
    353353    padding: 0;
     
    355355}
    356356
    357 .wp_caption_dd {
     357.wp-caption p.wp-caption-text {
    358358    font-size: 11px;
    359359    line-height: 17px;
  • trunk/wp-content/themes/default/style.css

    r8239 r8289  
    641641/* Captions */
    642642.aligncenter,
    643 dl.aligncenter {
     643div.aligncenter {
    644644    display: block;
    645645    margin-left: auto;
     
    647647}
    648648
    649 .wp_caption {
     649.wp-caption {
    650650    border: 1px solid #ddd;
    651651    text-align: center;
     
    659659}
    660660
    661 .wp_caption img {
     661.wp-caption img {
    662662    margin: 0;
    663663    padding: 0;
     
    665665}
    666666
    667 .wp_caption_dd {
     667.wp-caption p.wp-caption-text {
    668668    font-size: 11px;
    669669    line-height: 17px;
  • 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.