PATH:
home
/
lab2454c
/
adenbic.com
/
wp-content
/
plugins
/
yith-woocommerce-compare
/
plugin-fw
/
templates
/
fields
<?php /** * Template for displaying the multi-select field * * @var array $field The field. * @package YITH\PluginFramework\Templates\Fields */ defined( 'ABSPATH' ) || exit; // Exit if accessed directly. list ( $field_id, $class, $name, $selects, $size, $columns, $value ) = yith_plugin_fw_extract( $field, 'id', 'class', 'name', 'selects', 'size', 'columns', 'value' ); if ( empty( $selects ) ) { return; } $selects_count = count( $selects ); $gap = 16; $columns = max( 1, absint( $columns ?? 2 ) ); $default_size = absint( ( 400 - ( $gap * ( $columns - 1 ) ) ) / $columns ); $size = max( 122, absint( $size ?? $default_size ) ); $max_width = $size * $columns + ( $gap * ( $columns - 1 ) ); ?> <div class="yith-plugin-fw-multi-select" id="<?php echo esc_attr( $field_id ); ?>" style="max-width: <?php echo absint( $max_width ); ?>px; grid-template-columns : repeat( auto-fit, <?php echo absint( $size ); ?>px ); gap: <?php echo absint( $gap ); ?>px" > <?php for ( $i = 0; $i < $selects_count; $i ++ ) : ?> <div class="yith-single-select"> <?php $select = $selects[ $i ]; $select['type'] = 'select'; $select['title'] = isset( $select['title'] ) ? $select['title'] : $select['name']; $select['name'] = $name . "[{$select['id']}]"; $select['value'] = isset( $value[ $select['id'] ] ) ? $value[ $select['id'] ] : $select['default']; $select['id'] = $name . '_' . $select['id']; $select['class'] = $class ?> <label for="<?php echo esc_attr( $select['id'] ); ?>"><?php echo esc_html( $select['title'] ); ?></label> <?php yith_plugin_fw_get_field( $select, true, false ); ?> </div> <?php endfor; ?> </div>
[-] buttons.php
[edit]
[-] title.php
[edit]
[-] multi-colorpicker.php
[edit]
[-] colorpicker.php
[edit]
[-] ajax-orders.php
[edit]
[-] onoff.php
[edit]
[-] slider.php
[edit]
[-] checkbox-array.php
[edit]
[-] ajax-posts.php
[edit]
[-] hidden.php
[edit]
[-] sidebars.php
[edit]
[-] image-dimensions.php
[edit]
[-] inline-fields.php
[edit]
[-] datepicker.php
[edit]
[-] textarea-editor.php
[edit]
[-] select-buttons.php
[edit]
[+]
..
[-] simple-text.php
[edit]
[-] upload.php
[edit]
[-] toggle-element-fixed.php
[edit]
[-] email.php
[edit]
[-] icons.php
[edit]
[-] sep.php
[edit]
[-] password.php
[edit]
[-] number.php
[edit]
[-] multi-select.php
[edit]
[-] ajax-terms.php
[edit]
[-] checkbox.php
[edit]
[-] customtabs.php
[edit]
[-] ajax-products.php
[edit]
[-] custom.php
[edit]
[-] select.php
[edit]
[+]
resources
[-] media.php
[edit]
[-] file.php
[edit]
[-] dimensions.php
[edit]
[-] list-table.php
[edit]
[-] textarea-codemirror.php
[edit]
[-] select-images.php
[edit]
[-] textarea.php
[edit]
[-] copy-to-clipboard.php
[edit]
[-] html.php
[edit]
[-] ajax-customers.php
[edit]
[-] date-format.php
[edit]
[-] image-gallery.php
[edit]
[-] preview.php
[edit]
[-] radio.php
[edit]
[-] text-array.php
[edit]
[-] toggle-element.php
[edit]
[-] select-mailchimp.php
[edit]
[-] text-button.php
[edit]
[-] text.php
[edit]
[-] sidebarlist.php
[edit]
[-] country-select.php
[edit]