collection-wrapper.view.php
2 months ago
collection.view.php
2 months ago
comments.view.php
2 months ago
items.view.php
2 months ago
pagination-item.view.php
2 months ago
pagination-number.view.php
2 months ago
pagination.view.php
2 months ago
terms.view.php
2 months ago
users.view.php
2 months ago
collection.view.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Collection view |
| 5 | * |
| 6 | * @package kirki |
| 7 | */ |
| 8 | |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; // Exit if accessed directly. |
| 11 | } |
| 12 | |
| 13 | ?> |
| 14 | |
| 15 | <?php |
| 16 | $encoded_data = json_encode( $vars['data'] ); |
| 17 | $attributes = $vars['attributes']; |
| 18 | |
| 19 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 20 | echo '<' . esc_attr( $vars['tag'] ) . ' ' . $attributes . '>'; |
| 21 | echo '<textarea style="display: none" ' . $attributes . '>' . esc_textarea( $encoded_data ) . '</textarea>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 22 | ?> |
| 23 | <?php foreach ( $vars['children'] as $child ) : ?> |
| 24 | <?php |
| 25 | /** |
| 26 | * $child is already rendered HTML and should be echoed directly. |
| 27 | */ |
| 28 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 29 | echo $child; |
| 30 | ?> |
| 31 | <?php endforeach ?> |
| 32 | <?php |
| 33 | echo '</' . esc_attr( $vars['tag'] ) . '>'; |
| 34 |