Skip to content

Commit

Permalink
Implement #5.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoereth committed Sep 7, 2015
1 parent 1756a7a commit 9ba19fd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions php/class-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) );

add_filter( 'post_thumbnail_html', array( $this, 'filter_post_thumbnail' ), 99, 5 );
add_filter( 'genesis_pre_get_image', array( $this, 'genesis_filter_image' ), 10, 2 );
add_filter( 'post_class', array( $this, 'has_post_video_class' ) );

add_shortcode( 'featured-video-plus', array( $this, 'shortcode' ) );
Expand Down Expand Up @@ -190,6 +191,21 @@ public function filter_post_thumbnail(
}


public function genesis_filter_image( $output, $args ) {
if( 'html' === $args['format'] && 'achive' === $args['context'] ) {
return $this->filter_post_thumbnail(
$output,
$args['post_id'],
null,
$args['size'],
null
);
} else {
return $output;
}
}


/**
* Add a 'has-post-video' class to posts if appropriate.
*
Expand Down

0 comments on commit 9ba19fd

Please sign in to comment.