| @@ -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 | |