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