Changeset 984929
- Timestamp:
- 09/09/2014 03:19:58 AM (12 years ago)
- File:
-
- 1 edited
-
freefolio/trunk/class.Freefolio.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
freefolio/trunk/class.Freefolio.php
r971794 r984929 56 56 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) ); 57 57 add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) ); 58 add_filter( 'the_content', array( $this, 'prepend_featured_image' ) ); 58 59 59 60 // Portfolio shortcode … … 397 398 398 399 /** 400 * Prepend the featured image for portfolio items when no featured image is supported. 401 */ 402 function prepend_featured_image( $content ) { 403 global $_wp_theme_features; 404 if( ! current_theme_supports( 'jetpack-portfolio' ) || ( current_theme_supports( 'jetpack-portfolio' ) && ! $_wp_theme_features['jetpack-portfolio'][0]['has-featured-image'] ) ){ 405 $content = get_the_post_thumbnail( $post->ID, 'original' ) . $content; 406 } 407 return $content; 408 } 409 410 /** 399 411 * Our [portfolio] shortcode. 400 412 * Prints Portfolio data styled to look good on *any* theme.
Note: See TracChangeset
for help on using the changeset viewer.