PluginProbe
Property Hive / 2.4.0
Property Hive v2.4.0
2.4.0 2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 All 262 releases
← All changes | includes/divi-widgets/property-gallery.php +17 -5 2.2.3 → 2.4.0 View file →
@@ -247,19 +247,31 @@
247 247 echo '<div class="gallery-column">';
248 248
249 249 if ( isset($images[$image_number]) )
250 250 {
251 - $id_text = $image_number == ($max_images - 1) ? 'id="more-images-link"' : '';
252 - $id_text_mobile = $image_number == 1 ? 'id="more-images-link-mobile"' : '';
251 + $id_text = $image_number == ( $max_images - 1 ) ? 'more-images-link' : '';
252 + $id_text_mobile = $image_number == 1 ? 'more-images-link-mobile' : '';
253 253
254 - echo '<a ' . $id_text . ' ' . $id_text_mobile . ' href="' . esc_url($images[$image_number]['url']) . '" data-fancybox="divi-gallery" style="background-image:url(' . esc_url($images[$image_number]['url']) . ')"></a>';
254 + echo '<a';
255 255
256 + if ( $id_text )
257 + {
258 + echo ' id="' . esc_attr( $id_text ) . '"';
259 + }
260 +
261 + if ( $id_text_mobile )
262 + {
263 + echo ' id="' . esc_attr( $id_text_mobile ) . '"';
264 + }
265 +
266 + echo ' href="' . esc_url( $images[$image_number]['url'] ) . '" data-fancybox="divi-gallery" style="background-image:url(' . esc_url( $images[$image_number]['url'] ) . ')"></a>';
267 +
256 268 if ( $image_number == 1 )
257 269 {
258 270 echo '<div class="more-images-container mobile"><div class="more-images"><a href="javascript:;" onclick="openGallery();">';
259 271 printf(
260 272 /* translators: %d: number of images (1, 2, 3 etc) */
261 - __( 'See all %d images', 'propertyhive' ),
273 + esc_html__( 'See all %d images', 'propertyhive' ),
262 274 count($images) + count($images_hidden)
263 275 );
264 276 echo '</a></div></div>';
265 277 }
@@ -267,9 +279,9 @@
267 279 {
268 280 echo '<div class="more-images-container desktop"><div class="more-images"><a href="javascript:;" onclick="openGallery();">';
269 281 printf(
270 282 /* translators: %d: number of images (1, 2, 3 etc) */
271 - __( 'See all %d images', 'propertyhive' ),
283 + esc_html__( 'See all %d images', 'propertyhive' ),
272 284 count($images) + count($images_hidden)
273 285 );
274 286 echo '</a></div></div>';
275 287 }