Added filter to remove Genesis default image fallback of first-attached.

This commit is contained in:
MickeyKay
2014-02-14 11:59:01 -08:00
parent cc28151109
commit 86a35025d1
2 changed files with 20 additions and 0 deletions
+3
View File
@@ -84,6 +84,9 @@ function trestle_theme_setup() {
// Manually control where Post Info & Meta display
add_action( 'the_post', 'trestle_post_info_meta', 0 );
// Remove default featured image fallback of 'first-attached'
add_filter( 'genesis_get_image_default_args', 'trestle_featured_image_fallback' );
/*===========================================
* General Actions & Filters
+17
View File
@@ -261,6 +261,23 @@ function trestle_post_info_meta() {
}
}
/**
* Unset Genesis default featured image fallback of 'first-attached'
*
* This function prevents Genesis' default behavior of displaying
* the 'first-attached' image as a post's featured image (in archive)
* views, even when the post has no current featured image.
*
* @since 1.0.0
*
* @param array $args Default Genesis image args
* @return array Updated image args
*/
function trestle_featured_image_fallback( $args ) {
$args['fallback'] = false;
return $args;
}
/*===========================================
* General Actions & Filters