mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-16 04:53:21 +09:00
Remove entry header markup if it will be empty
Fixes issue #6 by evaluating if the current post type supports genesis-entry-meta-before-content. If it doesn't, plugin assumes the entry header will be empty and removes the markup. Includes a filter to override.
This commit is contained in:
@@ -315,6 +315,10 @@ class Display_Featured_Image_Genesis_Output {
|
||||
if ( is_singular() && ! is_page_template( 'page_blog.php' ) ) {
|
||||
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); // HTML5
|
||||
remove_action( 'genesis_post_title', 'genesis_do_post_title' ); // XHTML
|
||||
if ( ! post_type_supports( get_post_type( get_the_ID() ), 'genesis-entry-meta-before-content' ) && apply_filters( 'displayfeaturedimagegenesis_remove_entry_header', true ) ) {
|
||||
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
|
||||
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
|
||||
}
|
||||
}
|
||||
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
|
||||
remove_action( 'genesis_before_loop', 'genesis_do_author_title_description', 15 );
|
||||
|
||||
Reference in New Issue
Block a user