Skip to content

Commit a57e0c1

Browse files
committed
Release new version 2.7.1
= 2.7.1 - 2019/05/23 = * This maintenance upgrade adds support for ALT text on all portfolio images plus compatibility with WordPress 5.2.1 * Tweak - Add ALT text support for item card feature image and default gallery images * Tweak - Test for compatibility with WordPress 5.2.1
1 parent 7c62999 commit a57e0c1

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

includes/frontend/a3-portfolio-template-functions.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,15 @@ function a3_portfolio_card_get_first_thumb_image( $portfolio_id = 0, $gallery =
442442
}
443443

444444
if ( $card_url && $card_url[0] != '' ) {
445+
$alt = get_post_meta( $gallery[0], '_wp_attachment_image_alt', true );
446+
if ( empty( $alt ) ) {
447+
$alt = get_the_title( $portfolio_id );
448+
}
449+
445450
$main_card_image = '<img
446451
class="a3-portfolio-thumb-lazy attachment-a3-portfolio wp-post-image"
447452
src="'.$card_url[0].'"
453+
alt="'.$alt.'"
448454
'.$card_srcset.'
449455
'.$card_sizes.'
450456
/>';
@@ -693,10 +699,16 @@ function a3_portfolio_get_first_large_image( $gallery = array(), $echo = true )
693699
}
694700

695701
if ( $large_url && $large_url[0] != '' ) {
702+
$alt = get_post_meta( $gallery[0], '_wp_attachment_image_alt', true );
703+
if ( empty( $alt ) ) {
704+
$alt = '';
705+
}
706+
696707
$the_caption = get_post_field( 'post_excerpt', $gallery[0] );
697708
$main_large_image = '<img
698709
class="'.$large_image_class.'"
699710
src="'.$_blank.'"
711+
alt="'.$alt.'"
700712
item_id="1"
701713
data-original="'.$large_url[0].'"
702714
data-caption="'.$the_caption.'"

includes/widgets/class-portfolio-recently-viewed-widget.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,16 @@ function show_portfolio_recently_viewed() {
6666
} else {
6767
$thumb_sizes = 'sizes="' . esc_attr( $thumb_sizes ) . '"';
6868
}
69+
70+
$alt = get_post_meta( $portfolio_gallery[0], '_wp_attachment_image_alt', true );
71+
if ( empty( $alt ) ) {
72+
$alt = get_the_title( $portfolio_id );
73+
}
74+
6975
$img = '<img
7076
class="a3_porfolio_thumb_widget_lazy thumbnail"
7177
src="'.$thumb[0].'"
78+
alt="'.$alt.'"
7279
'.$thumb_srcset.'
7380
'.$thumb_sizes.'
7481
/>';

readme.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Contributors: a3rev, nguyencongtuan
44
Tags: a3 Portfolio, Portfolio, Post Portfolio, Showcase, Image Showcase, Image Portfolio, Gallery, Photo Gallery, Image Gallery
55
Requires at least: 4.6
6-
Tested up to: 5.0.3
7-
Stable tag: 2.7.0
6+
Tested up to: 5.2.1
7+
Stable tag: 2.7.1
88
License: GPLv3
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -152,6 +152,11 @@ Automatic installation is the easiest option as WordPress handles the file trans
152152

153153
== Changelog ==
154154

155+
= 2.7.1 - 2019/05/23 =
156+
* This maintenance upgrade adds support for ALT text on all portfolio images plus compatibility with WordPress 5.2.1
157+
* Tweak - Add ALT text support for item card feature image and default gallery images
158+
* Tweak - Test for compatibility with WordPress 5.2.1
159+
155160
= 2.7.0 - 2019/01/12 =
156161
* This upgrade includes 2 new sort features on the Portfolio Category Widget plus 1 bug fix on it.
157162
* Feature - Portfolio Categories widget - Add option to exclude Categories from showing on the frontend
@@ -546,6 +551,9 @@ Automatic installation is the easiest option as WordPress handles the file trans
546551

547552
== Upgrade Notice ==
548553

554+
= 2.7.1 =
555+
This maintenance upgrade adds support for ALT text on all portfolio images plus compatibility with WordPress 5.2.1
556+
549557
= 2.7.0 =
550558
This upgrade includes 2 new sort features on the Portfolio Category Widget plus 1 bug fix on it.
551559

0 commit comments

Comments
 (0)