diff --git a/inc/shortcodes/class.jumbotron-shortcode.php b/inc/shortcodes/class.jumbotron-shortcode.php index 8f19402..66a3840 100644 --- a/inc/shortcodes/class.jumbotron-shortcode.php +++ b/inc/shortcodes/class.jumbotron-shortcode.php @@ -42,6 +42,7 @@ public function jumbotron_handler( $atts, $content = null ) { 'button' => '', // required. button text. 'link' => '', // required. button link. 'id' => '', // optional ID. + 'alt' => '', // optional alt tag for the image ), $atts ); @@ -158,6 +159,13 @@ public function jumbotron_handler( $atts, $content = null ) { $image = ''; } + // if the image alt tag is set, get it. + if ( ! empty( $jumbotron_atts['alt'] ) ) { + $alt = $jumbotron_atts['alt']; + } else { + $alt = ''; + } + // get the button text. use default prompting if not provided. if ( $jumbotron_atts['button'] ) { $button_text = $jumbotron_atts['button']; @@ -179,7 +187,7 @@ public function jumbotron_handler( $atts, $content = null ) { // build the shortcode output. ob_start(); ?> -