diff --git a/README.md b/README.md index 135fce2..92a282f 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,13 @@ Additionally/alternatively, you could set a max-height for the backstretch image ## Changelog +###1.1.2 +* plugin properly deactivates if Genesis isn't running + ###1.1.1 +* corrected XHTML hooks + +###1.1.0 * added a setting in the admin to optionally reduce the height of the backstretch image * refactoring diff --git a/display-featured-image-genesis.php b/display-featured-image-genesis.php index aea101d..feee32a 100644 --- a/display-featured-image-genesis.php +++ b/display-featured-image-genesis.php @@ -12,7 +12,7 @@ * Plugin Name: Display Featured Image for Genesis * Plugin URI: http://github.com/robincornett/display-featured-image-genesis/ * Description: This plugin requires the Genesis Framework. It varies the display of the post or page featured image, depending on size. - * Version: 1.1.0 + * Version: 1.1.2 * Author: Robin Cornett * Author URI: http://robincornett.com * License: GPL-2.0+ diff --git a/includes/class-displayfeaturedimagegenesis-output.php b/includes/class-displayfeaturedimagegenesis-output.php index dc5afd6..f86612c 100644 --- a/includes/class-displayfeaturedimagegenesis-output.php +++ b/includes/class-displayfeaturedimagegenesis-output.php @@ -18,7 +18,7 @@ class Display_Featured_Image_Genesis_Output { $item = new stdClass(); global $post; if ( is_home() ) { - $postspage = get_option( 'page_for_posts' ); + $postspage = get_option( 'page_for_posts' ); $item->original = wp_get_attachment_image_src( get_post_thumbnail_id( $postspage ), 'original' ); } else { @@ -113,7 +113,8 @@ class Display_Featured_Image_Genesis_Output { add_action( 'genesis_after_header', array( $this, 'do_backstretch_image' ) ); } elseif ( ( $item->original[1] <= $item->large ) && ( $item->original[1] > $item->medium ) ) { - add_action( 'genesis_before_entry', array( $this, 'do_large_image' ) ); + add_action( 'genesis_before_entry', array( $this, 'do_large_image' ) ); // HTML5 + add_action( 'genesis_before_post', array( $this, 'do_large_image' ) ); // XHTML } } @@ -130,7 +131,8 @@ class Display_Featured_Image_Genesis_Output { $item = $this->get_image_variables(); if ( ! is_home() ) { - remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); + remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); // HTML5 + remove_action( 'genesis_post_title', 'genesis_do_post_title' ); // XHTML } echo '
' . sprintf( - __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. You can deactivate the plugin, since it is not working anyway, or you can activate a Genesis child theme.', 'display-featured-image-genesis' ), - esc_url( admin_url( 'plugins.php' ) ), - esc_url( admin_url( 'themes.php' ) ) - ) . '
' . sprintf( + __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated.', 'display-featured-image-genesis' ) ) . '
' . sprintf( + __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated. But since we're talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you.', 'display-featured-image-genesis' ), + PHP_VERSION + ) . '