From 545ab8f09857f3d17fa66616ea212a11fff4ec55 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Mon, 8 Dec 2014 13:25:52 -0500 Subject: [PATCH] tidy comments --- includes/class-displayfeaturedimagegenesis-output.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis-output.php b/includes/class-displayfeaturedimagegenesis-output.php index 1e7884a..db8a709 100644 --- a/includes/class-displayfeaturedimagegenesis-output.php +++ b/includes/class-displayfeaturedimagegenesis-output.php @@ -38,17 +38,18 @@ class Display_Featured_Image_Genesis_Output { $version = Display_Featured_Image_Genesis_Common::$version; $item = Display_Featured_Image_Genesis_Common::get_image_variables(); - // if there is no backstretch image set, or it is too small, die + //* if there is no backstretch image set, or it is too small, die if ( empty( $item->backstretch ) || $item->width <= $item->medium ) { return; } - // if the featured image is not part of the content, or we're not on a singular page, carry on + //* if the featured image is not part of the content, or we're not on a singular page, carry on if ( false === $item->content || ! is_singular() ) { wp_enqueue_style( 'displayfeaturedimage-style', plugins_url( 'includes/css/display-featured-image-genesis.css', dirname( __FILE__ ) ), array(), $version ); - //check if the image is large enough for backstretch + //* check if the image is large enough for backstretch if ( $item->width > $item->large ) { + wp_enqueue_script( 'displayfeaturedimage-backstretch', plugins_url( '/includes/js/backstretch.js', dirname( __FILE__ ) ), array( 'jquery' ), $version, true ); wp_enqueue_script( 'displayfeaturedimage-backstretch-set', plugins_url( '/includes/js/backstretch-set.js', dirname( __FILE__ ) ), array( 'jquery', 'displayfeaturedimage-backstretch' ), $version, true ); @@ -61,7 +62,7 @@ class Display_Featured_Image_Genesis_Output { } - // otherwise it's a large image. + //* otherwise it's a large image. elseif ( $item->width <= $item->large ) { add_action( 'genesis_before_loop', array( $this, 'do_large_image' ) ); // works for both HTML5 and XHTML }