corrected XHTML hooks, CSS.

This commit is contained in:
Robin Cornett
2014-09-23 15:43:24 -04:00
parent 78483cf230
commit 326330b76a
5 changed files with 17 additions and 6 deletions
+3
View File
@@ -77,6 +77,9 @@ Additionally/alternatively, you could set a max-height for the backstretch image
## Changelog
###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
+1 -1
View File
@@ -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.1
* Author: Robin Cornett
* Author URI: http://robincornett.com
* License: GPL-2.0+
@@ -114,7 +114,7 @@ class Display_Featured_Image_Genesis_Output {
}
elseif ( ( $item->original[1] <= $item->large ) && ( $item->original[1] > $item->medium ) ) {
add_action( 'genesis_before_entry', array( $this, 'do_large_image' ) ); // HTML5
add_action( 'genesis_before_post_content', array( $this, 'do_large_image' ) ); // XHTML
add_action( 'genesis_before_post', array( $this, 'do_large_image' ) ); // XHTML
}
}
@@ -131,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 '<div class="big-leader"><div class="wrap">';
@@ -154,7 +155,7 @@ class Display_Featured_Image_Genesis_Output {
*/
public function do_large_image() {
global $post;
echo get_the_post_thumbnail( $post->ID, 'large', array( 'class' => 'aligncenter', 'alt' => the_title_attribute( 'echo=0' ) ) );
echo get_the_post_thumbnail( $post->ID, 'large', array( 'class' => 'aligncenter featured', 'alt' => the_title_attribute( 'echo=0' ) ) );
}
}
@@ -15,3 +15,7 @@
left: 0;
text-align: center;
}
img.featured {
max-width: 100%;
}
+5 -2
View File
@@ -5,7 +5,7 @@ Donate link: https://robincornett.com/donate/
Tags: backstretch, featured image, genesis, studiopress
Requires at least: 3.8
Tested up to: 4.0
Stable tag: 1.1.0
Stable tag: 1.1.1
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -59,10 +59,13 @@ Additionally/alternatively, you could set a max-height for the backstretch image
== Upgrade Notice ==
= 1.1.1 =
New setting to optionally reduce backstretch image height
corrected XHTML hooks
== Changelog ==
= 1.1.1 =
* corrected XHTML hooks
= 1.1.0 =
* added a setting in the admin to optionally reduce the height of the backstretch image (eg. due to header height issues)
* refactoring
* wp.org release