/var/www/html/wp-content/plugins/yith-woocommerce-compare/plugin-fw/templates/fields/file.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
 * Template for displaying the File field
 *
 * @var array $field The field.
 * @package YITH\PluginFramework\Templates\Fields
 */

defined'ABSPATH' ) || exit; // Exit if accessed directly.

list ( $field_id$class$name$message$custom_attributes$data ) = yith_plugin_fw_extract$field'id''class''name''message''custom_attributes''data' );


$message $message ?? __'Drag or upload a file.''yith-plugin-fw' );

$classes = array(
    
'yith-plugin-fw-file',
    
$class,
);

$classes implode' 'array_filter$classes ) );
?>
<div class="<?php echo esc_attr$classes ); ?>">
    <input
            type="file"
            id="<?php echo esc_attr$field_id ); ?>"
            name="<?php echo esc_attr$name ); ?>"
            class="yith-plugin-fw-file__field"
        <?php yith_plugin_fw_html_attributes_to_string$custom_attributestrue ); ?>
        <?php yith_plugin_fw_html_data_to_string$datatrue ); ?>
    />
    <div class="yith-plugin-fw-file__message">
        <?php echo wp_kses_post$message ); ?>
    </div>

    <div class="yith-plugin-fw-file__preview">
        <svg class="yith-plugin-fw-file__preview__icon" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
            <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"></path>
        </svg>
        <span class="yith-plugin-fw-file__preview__name"></span>
    </div>
</div>