select2-wc-2.6.php
32 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This file belongs to the YIT Plugin Framework. |
| 4 | * |
| 5 | * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) |
| 6 | * that is bundled with this package in the file LICENSE.txt. |
| 7 | * It is also available through the world-wide-web at this URL: |
| 8 | * http://www.gnu.org/licenses/gpl-3.0.txt |
| 9 | * |
| 10 | * @var array $args |
| 11 | * @var string $custom_attributes |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | !defined( 'ABSPATH' ) && exit; // Exit if accessed directly |
| 16 | ?> |
| 17 | |
| 18 | <input |
| 19 | type="hidden" |
| 20 | id="<?php echo $args[ 'id' ] ?>" |
| 21 | class="<?php echo $args[ 'class' ] ?>" |
| 22 | name="<?php echo $args[ 'name' ] ?>" |
| 23 | data-placeholder="<?php echo $args[ 'data-placeholder' ] ?>" |
| 24 | data-allow_clear="<?php echo $args[ 'data-allow_clear' ] ?>" |
| 25 | data-selected="<?php echo is_array( $args[ 'data-selected' ] ) ? esc_attr( json_encode( $args[ 'data-selected' ] ) ) : esc_attr( $args[ 'data-selected' ] ) ?>" |
| 26 | data-multiple="<?php echo $args[ 'data-multiple' ] === true ? 'true' : 'false' ?>" |
| 27 | <?php echo( !empty( $args[ 'data-action' ] ) ? 'data-action="' . $args[ 'data-action' ] . '"' : '' ) ?> |
| 28 | value="<?php echo $args[ 'value' ] ?>" |
| 29 | style="<?php echo $args[ 'style' ] ?>" |
| 30 | <?php echo $custom_attributes ?> |
| 31 | /> |
| 32 |