PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Wishlist / 3.0.17
YITH WooCommerce Wishlist v3.0.17
trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.10.0 3.11.0 3.12.0 3.13.0 3.14.0 3.15.0 3.16.0 3.17.0 3.18.0 3.19.0 3.2.0 3.20.0 3.21.0 3.22.0 3.23.0 3.24.0 3.25.0 3.26.0 3.27.0 3.28.0 3.29.0 3.3.0 3.30.0 3.31.0 3.32.0 3.33.0 3.34.0 3.35.0 3.36.0 3.37.0 3.38.0 3.4.0 3.5.0 3.6.0 3.7.0 3.8.0 3.9.0 4.0.0 4.0.1 4.1.0 4.10.0 4.10.1 4.10.2 4.11.0 4.12.0 4.13.0 4.14.0 4.15.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.8.0 4.9.0
yith-woocommerce-wishlist / plugin-fw / templates / fields / toggle-element-fixed.php
yith-woocommerce-wishlist / plugin-fw / templates / fields Last commit date
resources 7 years ago ajax-customers.php 6 years ago ajax-posts.php 7 years ago ajax-products.php 8 years ago ajax-terms.php 7 years ago buttons.php 8 years ago checkbox-array.php 6 years ago checkbox.php 8 years ago colorpicker.php 5 years ago country-select.php 6 years ago custom.php 7 years ago customtabs.php 8 years ago date-format.php 6 years ago datepicker.php 6 years ago dimensions.php 5 years ago hidden.php 8 years ago html.php 8 years ago icons.php 8 years ago image-gallery.php 8 years ago inline-fields.php 5 years ago list-table.php 6 years ago multi-colorpicker.php 6 years ago multi-select.php 6 years ago number.php 8 years ago onoff.php 6 years ago password.php 6 years ago preview.php 8 years ago radio.php 5 years ago select-buttons.php 6 years ago select-images.php 6 years ago select-mailchimp.php 8 years ago select.php 5 years ago sep.php 8 years ago sidebarlist.php 8 years ago sidebars.php 8 years ago simple-text.php 8 years ago slider.php 8 years ago text-array.php 8 years ago text-button.php 8 years ago text.php 6 years ago textarea-codemirror.php 8 years ago textarea-editor.php 5 years ago textarea.php 6 years ago title.php 6 years ago toggle-element-fixed.php 5 years ago toggle-element.php 5 years ago upload.php 6 years ago
toggle-element-fixed.php
77 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 $defaults = array(
7 'id' => '',
8 'name' => '',
9 'class' => '',
10 'custom_attributes' => '',
11 'elements' => [],
12 'onoff_field' => true,
13 'save_single_options' => false,
14
15 );
16 $field = wp_parse_args( $field, $defaults );
17
18 extract( $field );
19
20 empty( $name ) && $name = $id;
21 $value = get_option( $name, [] );
22 ?>
23 <div class="yith-toggle_fixed_wrapper" id="<?php echo $id ?>" >
24 <div class="yith-toggle-elements">
25 <div id="<?php echo $id; ?>" class="yith-toggle-row fixed <?php echo ! empty( $subtitle ) ? 'with-subtitle' : ''; ?> <?php echo $class; ?>" <?php echo $custom_attributes; ?>>
26 <div class="yith-toggle-title">
27 <h3>
28 <span class="title"><?php echo $title ?></span>
29 <?php if ( ! empty( $subtitle ) ): ?>
30 <span class="subtitle"><?php echo $subtitle; ?></span>
31 <?php endif; ?>
32 </h3>
33 <span class="yith-toggle"><span class="yith-icon yith-icon-arrow_right ui-sortable-handle"></span></span>
34 <?php
35 // add on off field if needed
36 if( ! empty( $onoff_field ) ) : ?>
37 <span class="yith-toggle-onoff">
38 <?php yith_plugin_fw_get_field( [
39 'type' => 'onoff',
40 'name' => "{$name}[enabled]",
41 'id' => "{$id}_enabled",
42 'value' => isset( $value['enabled'] ) ? $value['enabled'] : 'no',
43 ], true );
44 ?>
45 </span>
46 <?php endif; ?>
47 </div>
48 <div class="yith-toggle-content">
49 <?php foreach ( $elements as $element ):
50 // build correct name and id
51 $field_id = $element['id'];
52 $element['name'] = false === $save_single_options ? "{$name}[{$field_id}]" : $field_id;
53 $element['id'] = "{$id}_{$field_id}";
54 // get value
55 $element['value'] = '';
56 if( false === $save_single_options ){
57 $element['value'] = isset( $value[ $field_id ] ) ? $value[ $field_id ] : ( isset( $element['default'] ) ? $element['default'] : '' );
58 }
59
60 else {
61 $element['value'] = get_option( $field_id, $element['default'] );
62 }
63 ?>
64 <div class="yith-toggle-content-row <?php echo $element['type'] ?>">
65 <label for="<?php echo $element['id']; ?>"><?php echo $element['title']; ?></label>
66 <div class="yith-plugin-fw-option-with-description">
67 <?php yith_plugin_fw_get_field( $element, true ); ?>
68 <span class="description"><?php echo ! empty( $element['desc'] ) ? $element['desc'] : ''; ?></span>
69 </div>
70 </div>
71 <?php endforeach;
72 ?>
73 </div>
74 </div>
75 </div>
76 </div>
77