Plugin Directory

Changeset 804951


Ignore:
Timestamp:
11/15/2013 04:55:47 PM (12 years ago)
Author:
sanchothefat
Message:

Added html5 support for output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • flickr-api/trunk/flickr.php

    r804934 r804951  
    693693        }
    694694
     695        $fig_element = current_theme_supports( 'html5' ) ? 'figure' : 'div';
     696        $caption_element = current_theme_supports( 'html5' ) ? 'figcaption' : 'p';
     697
    695698        ?>
    696         <div class="figure">
     699        <<?php echo $fig_element . ( $fig_element == 'div' ? ' class="figure"' : '' ); ?>>
    697700            <?php do_action( 'flickr_photo_before', $photo, $size ); ?>
    698701            <?php if ( ! empty( $url ) ) echo '<a href="'. $url .'">'; ?>
     
    700703            <?php if ( ! empty( $url ) ) echo '</a>'; ?>
    701704            <?php if ( $show_description && isset( $photo->description ) && ! empty( $photo->description->_content ) ) { ?>
    702             <p class="caption"><?php echo $photo->description->_content; ?></p>
     705            <<?php echo $caption_element . ( $caption_element == 'p' ? ' class="caption"' : '' ); ?>><?php echo $photo->description->_content; ?></<?php echo $caption_element; ?>>
    703706            <?php } ?>
    704707            <?php do_action( 'flickr_photo_after', $photo, $size ); ?>
    705         </div><?php
     708        </<?php echo $fig_element; ?>><?php
    706709    } } ?>
    707710    </div><?php
Note: See TracChangeset for help on using the changeset viewer.