Add alt attribute to backstretch image

This commit is contained in:
Robin Cornett
2016-06-24 13:02:39 -04:00
parent 24f3612d67
commit 5b78206179
2 changed files with 4 additions and 0 deletions
@@ -145,6 +145,7 @@ class Display_Featured_Image_Genesis_Output {
'centeredX' => (bool) $backstretch_vars['centeredX'],
'centeredY' => (bool) $backstretch_vars['centeredY'],
'fade' => (int) $backstretch_vars['fade'],
'title' => esc_attr( $this->item->title ),
);
wp_localize_script( 'displayfeaturedimage-backstretch-set', 'BackStretchVars', $output );
+3
View File
@@ -31,6 +31,9 @@
fade: parseInt( plugin.params.fade )
}
);
var image = $( '.big-leader .backstretch img' );
image.attr( 'alt', plugin.params.title );
}
function _getSource() {