PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / trunk
Floating Button – Easily Create Sticky, Fixed & Floating Buttons vtrunk
trunk 2.0.2 3.0 4.0 4.1.2 4.3 5.0 5.0.1 5.1 5.1.1 5.2 5.3 5.3.1 6.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 All 31 releases
floating-button / admin / settings / 2.vertical.php

2.vertical.php in Floating Button – Easily Create Sticky, Fixed & Floating Buttons trunk, at admin/settings/2.vertical.php

161 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Page Name: 1 Sub Buttons
4 */
5
6 use FloatingButton\Admin\CreateFields;
7
8 defined( 'ABSPATH' ) || exit;
9
10 $data = include( 'options/2.vertical.php' );
11
12 $field = new CreateFields( $options, $data['opt'] );
13
14 $count = ( ! empty( $options['menu_1']['item_type'] ) ) ? count( $options['menu_1']['item_type'] ) : '0';
15 ?>
16 <div class="wpie-items__list" id="wpie-items-list">
17 <?php if ( $count > 0 ) :
18 for ( $i = 0; $i < $count; $i ++ ):
19 $order = $i + 1;
20 $item_order = ! empty( $options['item_order'][ $i ] ) ? 1 : 0;
21 $open = ! empty( $item_order ) ? ' open' : '';
22 $item_parent = $options['menu_1']['item_sub'][ $i ] ?? 0;
23 $item_class = '';
24 if ( absint( $item_parent ) === 1 ) {
25 $item_class = ' shifted-right';
26 }
27 ?>
28 <details
29 class="wpie-item menu-item<?php echo esc_attr( $item_class ); ?>"<?php echo esc_attr( $open ); ?>>
30 <input type="hidden" name="param[item_order][]" class="wpie-item__toggle"
31 value="<?php echo absint( $item_order ); ?>">
32 <input type="hidden" name="param[menu_1][item_sub][]" class="wpie-item__parent"
33 value="<?php echo absint( $item_parent ); ?>">
34 <summary class="wpie-item_heading">
35 <span class="wpie-item_heading_icon"></span>
36 <span class="wpie-item_heading_label"></span>
37 <span class="wpie-item_heading_type"></span>
38 <span class="wpie-icon wpie_icon-copy"></span>
39 <span class="wpie-icon wpie_icon-chevron-expand-y"></span>
40 <span class="wpie-icon wpie_icon-trash"></span>
41 <span class="wpie-item_heading_toogle">
42 <span class="wpie-icon wpie_icon-chevron-down"></span>
43 <span class="wpie-icon wpie_icon-chevron-up "></span>
44 </span>
45 </summary>
46 <div class="wpie-item_content">
47
48 <div class="wpie-tabs-wrapper">
49
50 <div class="wpie-tabs-link">
51 <?php
52 $tab_i = 1;
53 foreach ( $data['tabs'] as $tab ) {
54 $active = $tab_i === 1 ? ' is-active' : '';
55 echo '<a class="wpie-tab__link' . esc_attr( $active ) . '">' . esc_html( ucfirst( $tab ) ) . '</a>';
56 $tab_i ++;
57 }
58 ?>
59 </div>
60
61 <?php
62 $tabs_i = 1;
63 foreach ( $data['args'] as $tabs ) {
64 $active = $tabs_i === 1 ? ' is-active' : '';
65 echo '<div class="wpie-tab-settings' . esc_attr( $active ) . '">';
66 echo '<div class="wpie-fieldset">';
67
68 foreach ( $tabs as $tab ) {
69 echo '<div class="wpie-fields">';
70
71 foreach ( $tab as $option => $optionVal ) {
72 $field->create( 'menu_1-' . $option, $i );
73 }
74 echo '</div>';
75 }
76
77 echo '</div>';
78 echo '</div>';
79
80 $tabs_i ++;
81 }
82 ?>
83 </div>
84 </div>
85 </details>
86 <?php endfor; endif; ?>
87
88 <hr class="wpie-buttons__hr">
89 <div class="wpie-fields">
90 <button class="button button-primary wpie-add-button" type="button" data-template="template-button-1">
91 <?php esc_html_e( 'Add Button', 'floating-button' ); ?>
92 </button>
93 </div>
94
95 </div>
96
97
98 <template id="template-button-1">
99 <details class="wpie-item" open>
100 <input type="hidden" name="param[item_order][]" class="wpie-item__toggle" value="1">
101 <input type="hidden" name="param[menu_1][item_sub][]" class="wpie-item__parent"
102 value="0">
103 <summary class="wpie-item_heading">
104 <span class="wpie-item_heading_icon"></span>
105 <span class="wpie-item_heading_label"></span>
106 <span class="wpie-item_heading_type"></span>
107 <span class="wpie-icon wpie_icon-copy"></span>
108 <span class="wpie-icon wpie_icon-chevron-expand-y"></span>
109 <span class="wpie-icon wpie_icon-trash"></span>
110 <span class="wpie-item_heading_toogle">
111 <span class="wpie-icon wpie_icon-chevron-down"></span>
112 <span class="wpie-icon wpie_icon-chevron-up "></span>
113 </span>
114 </summary>
115 <div class="wpie-item_content">
116
117 <div class="wpie-tabs-wrapper">
118
119 <div class="wpie-tabs-link">
120 <?php
121 $tab_i = 1;
122 foreach ( $data['tabs'] as $tab ) {
123 $active = $tab_i === 1 ? ' is-active' : '';
124 echo '<a class="wpie-tab__link' . esc_attr( $active ) . '">' . esc_html( ucfirst( $tab ) ) . '</a>';
125 $tab_i ++;
126 }
127 ?>
128 </div>
129
130 <?php
131 $tabs_i = 1;
132 foreach ( $data['args'] as $tabs ) {
133 $active = $tabs_i === 1 ? ' is-active' : '';
134 echo '<div class="wpie-tab-settings' . esc_attr( $active ) . '">';
135 echo '<div class="wpie-fieldset">';
136
137 foreach ( $tabs as $tab ) {
138 echo '<div class="wpie-fields">';
139
140 foreach ( $tab as $option => $optionVal ) {
141 $field->create( 'menu_1-' . $option, -1 );
142 }
143 echo '</div>';
144 }
145
146 echo '</div>';
147 echo '</div>';
148
149 $tabs_i ++;
150 }
151 ?>
152 </div>
153
154
155 </div>
156 </details>
157 </template>
158
159 <?php
160
161