And/or maybe auto hide when there is an image already pulled up by WP?
Screenshot- http://screencast.com/t/YrV09nOn
Hi Jad,
Sorry for the late replay, I was on holiday.
There are filters which you can use to make exceptions.
Example:
function dfi_skip_page ( $dfi_id, $post_id ) {
if ( $post_id == 23 ) {
return 0; // invalid id
}
return $dfi_id; // the original featured image id
}
add_filter( 'dfi_thumbnail_id', 'dfi_skip_page', 10 , 2 );
I suggest you check for the shortcode with has_shortcode.
Untested example:
function dfi_skip_gallery ( $dfi_id, $post_id ) {
$post = get_post($post_id);
if ( has_shortcode( $post->post_content, 'gallery' ) ) {
return 0; // invalid id
}
return $dfi_id; // the original featured image id
}
add_filter( 'dfi_thumbnail_id', 'dfi_skip_gallery', 10 , 2 );
You second post should be possible to do with the same filter. With different checks.
Let me know how it went.