| @@ -1,8 +1,20 @@ | ||
| 1 | -<div class="eventpost-search-results"> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Search result | |
| 4 | + * | |
| 5 | + * @package event-post | |
| 6 | + * @version 6.1.2 | |
| 7 | + * @since 5.0.0 | |
| 8 | + */ | |
| 9 | + | |
| 10 | +if ( ! defined( 'ABSPATH' ) ) exit; | |
| 11 | +?> | |
| 12 | + <div class="eventpost-search-results"> | |
| 2 | 13 | <?php if($events->have_posts()): ?> |
| 3 | 14 | <span class="eventpost-search-item-count"> |
| 4 | - <?php printf(_n('%d event found', '%d events found', $events->post_count, 'event-post'), $events->post_count); ?> | |
| 15 | + <?php // translators: %d is the number of events found ?> | |
| 16 | + <?php echo esc_html(sprintf(_n('%d event found', '%d events found', $events->post_count, 'event-post'), $events->post_count)); ?> | |
| 5 | 17 | </span> |
| 6 | 18 | <hr> |
| 7 | 19 | <?php while($events->have_posts()): $events->the_post(); ?> |
| 8 | 20 | <article class="eventpost-search-item"> |
| @@ -15,7 +27,7 @@ | ||
| 15 | 27 | <?php the_excerpt(); ?> |
| 16 | 28 | </article> |
| 17 | 29 | <?php endwhile; ?> |
| 18 | 30 | <?php else: ?> |
| 19 | - <?php _e('Sorry, there is no event matching your request.', 'event-post'); ?> | |
| 31 | + <?php esc_html_e('Sorry, there is no event matching your request.', 'event-post'); ?> | |
| 20 | 32 | <?php endif; ?> |
| 21 | 33 | </div> |