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 +25 -5 2.2.2 → 2.4.0 View file →
@@ -247,23 +247,43 @@
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 - printf( __( 'See all %d images', 'propertyhive' ), count($images) + count($images_hidden) );
271 + printf(
272 + /* translators: %d: number of images (1, 2, 3 etc) */
273 + esc_html__( 'See all %d images', 'propertyhive' ),
274 + count($images) + count($images_hidden)
275 + );
260 276 echo '</a></div></div>';
261 277 }
262 278 if ( $image_number == ($max_images - 1) )
263 279 {
264 280 echo '<div class="more-images-container desktop"><div class="more-images"><a href="javascript:;" onclick="openGallery();">';
265 - printf( __( 'See all %d images', 'propertyhive' ), count($images) + count($images_hidden) );
281 + printf(
282 + /* translators: %d: number of images (1, 2, 3 etc) */
283 + esc_html__( 'See all %d images', 'propertyhive' ),
284 + count($images) + count($images_hidden)
285 + );
266 286 echo '</a></div></div>';
267 287 }
268 288 }
269 289