PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.2.3
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.2.3
4.2.5 4.2.4 trunk 3.7.10 3.7.11 3.7.12 3.7.13 3.7.14 3.7.2 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8 3.8.1 3.8.10 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.8.9.1 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.5.1 4.0.6 4.0.6.1 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.2 4.2.3
widget-options / includes / widgets / option-tabs / animation.php
widget-options / includes / widgets / option-tabs Last commit date
alignment.php 2 months ago animation.php 2 months ago behavior.php 2 months ago days-dates.php 2 months ago devices.php 2 months ago settings.php 2 months ago state.php 2 months ago styling.php 2 months ago upsell.php 2 months ago visibility.php 2 months ago
animation.php
230 lines
1 <?php
2
3 /**
4 * Settings Widget Options
5 *
6 * @copyright Copyright (c) 2015, Jeffrey Carandang
7 * @since 1.0
8 */
9
10 // Exit if accessed directly
11 if (!defined('ABSPATH')) exit;
12
13 /**
14 * Add Settings Widget Options Tab
15 *
16 * @since 1.0
17 * @return void
18 */
19
20 /**
21 * Called on 'extended_widget_opts_tabs'
22 * create new tab navigation for alignment options
23 */
24 function widgetopts_tab_animation($args)
25 { ?>
26 <li class="extended-widget-opts-tab-animation">
27 <a href="#extended-widget-opts-tab-<?php echo $args['id']; ?>-animation" title="<?php _e('Animation', 'widget-options'); ?>"><span class="dashicons dashicons-admin-customizer"></span> <span class="tabtitle"><?php _e('Animation', 'widget-options'); ?></span></a>
28 </li>
29 <?php
30 }
31 add_action('extended_widget_opts_tabs', 'widgetopts_tab_animation', 10);
32
33 /**
34 * Called on 'extended_widget_opts_tabcontent'
35 * create new tab content options for alignment options
36 */
37 if (!function_exists('widgetopts_tabcontent_animation')) :
38 function widgetopts_tabcontent_animation($args)
39 {
40 global $widget_options;
41
42 $id = '';
43 $classes = '';
44 $logic = '';
45 $selected = 0;
46 $check = '';
47 if (isset($args['params']) && isset($args['params']['class'])) {
48 if (isset($args['params']['class']['id'])) {
49 $id = $args['params']['class']['id'];
50 }
51 if (isset($args['params']['class']['classes'])) {
52 $classes = $args['params']['class']['classes'];
53 }
54 if (isset($args['params']['class']['selected'])) {
55 $selected = $args['params']['class']['selected'];
56 }
57 if (isset($args['params']['class']['logic'])) {
58 $logic = $args['params']['class']['logic'];
59 }
60 if (isset($args['params']['class']['title']) && $args['params']['class']['title'] == '1') {
61 $check = 'checked="checked"';
62 }
63 }
64
65 ?>
66 <div id="extended-widget-opts-tab-<?php echo $args['id']; ?>-animation" class="extended-widget-opts-tabcontent extended-widget-opts-inside-tabcontent extended-widget-opts-tabcontent-animation">
67
68 <div class="extended-widget-opts-settings-tabs extended-widget-opts-inside-tabs">
69 <input type="hidden" id="extended-widget-opts-settings-selectedtab" value="<?php echo $selected; ?>" name="<?php echo $args['namespace']; ?>[extended_widget_opts][class][selected]" />
70 <!-- start tab nav -->
71 <ul class="extended-widget-opts-settings-tabnav-ul" style="display: none;">
72
73
74 <li class="extended-widget-opts-settings-tab-animation">
75 <a href="#extended-widget-opts-settings-tab-<?php echo $args['id']; ?>-animation" title="<?php _e('Animation', 'widget-options'); ?>"><?php _e('Animation', 'widget-options'); ?></a>
76 </li>
77
78
79 <div class="extended-widget-opts-clearfix"></div>
80 </ul><!-- end tab nav -->
81 <div class="extended-widget-opts-clearfix"></div>
82 <!-- start Animation tab demo -->
83 <?php
84 $animation_array = array(
85 'Attention Seekers' => array(
86 'bounce',
87 'flash',
88 'pulse',
89 'rubberBand',
90 'shake',
91 'swing',
92 'tada',
93 'wobble',
94 'jello'
95 ),
96 'Bouncing Entrances' => array(
97 'bounceIn',
98 'bounceInDown',
99 'bounceInLeft',
100 'bounceInRight',
101 'bounceInUp',
102 ),
103
104 'Fading Entrances' => array(
105 'fadeIn',
106 'fadeInDown',
107 'fadeInDownBig',
108 'fadeInLeft',
109 'fadeInLeftBig',
110 'fadeInRight',
111 'fadeInRightBig',
112 'fadeInUp',
113 'fadeInUpBig'
114 ),
115 'Flippers' => array(
116 'flip',
117 'flipInX',
118 'flipInY',
119 'flipOutX',
120 'flipOutY'
121 ),
122 'Lightspeed' => array(
123 'lightSpeedIn',
124 'lightSpeedOut'
125 ),
126
127 'Rotating Entrances' => array(
128 'rotateIn',
129 'rotateInDownLeft',
130 'rotateInDownRight',
131 'rotateInUpLeft',
132 'rotateInUpRight'
133 ),
134 'Sliding Entrances' => array(
135 'slideInUp',
136 'slideInDown',
137 'slideInLeft',
138 'slideInRight'
139 ),
140 'Zoom Entrances' => array(
141 'zoomIn',
142 'zoomInDown',
143 'zoomInLeft',
144 'zoomInRight',
145 'zoomInUp'
146 ),
147 'Specials' => array(
148 'hinge',
149 'rollIn'
150 )
151 ); ?>
152 <!-- start animation tab content -->
153 <div id="extended-widget-opts-settings-tab-<?php echo $args['id']; ?>-animation" class="extended-widget-opts-settings-tabcontent extended-widget-opts-inner-tabcontent">
154 <div class="widget-opts-animation">
155 <div class="extended-widget-opts-demo-feature">
156 <div class="extended-widget-opts-demo-warning">
157 <p class="widgetopts-unlock-features">
158 <span class="dashicons dashicons-lock"></span><br>
159 Unlock all Features<br>
160 <a href="https://widget-options.com/?utm_source=wordpressadmin&amp;utm_medium=widgettabs&amp;utm_campaign=widgetoptsprotab" class="button-primary" target="_blank">Learn More</a>
161 </p>
162 </div>
163 <p>
164 <label for="opts-class-animation-<?php echo $args['id']; ?>"><?php _e('Animation Type', 'widget-options'); ?></label>
165 <br />
166 <select class="widefat" readonly>
167 <option value=""><?php _e('None', 'widget-options'); ?></option>
168 <?php foreach ($animation_array as $group => $anims) { ?>
169 <optgroup label="<?php _e($group, 'widget-options'); ?>">
170 <?php foreach ($anims as $anim => $aname) { ?>
171 <option value="<?php echo $aname; ?>"><?php _e($aname, 'widget-options') ?></option>
172 <?php } ?>
173 </optgroup>
174 <?php } ?>
175 </select>
176 <small><em><?php _e('The type of animation for this event.', 'widget-options'); ?></em></small>
177 </p>
178
179 <p>
180 <label for="opts-class-event-<?php echo $args['id']; ?>"><?php _e('Animation Event', 'widget-options'); ?></label>
181 <br />
182 <select class="widefat" readonly>
183 <option value="enters"><?php _e('Element Enters Screen', 'widget-options'); ?></option>
184 <option value="onScreen"><?php _e('Element In Screen', 'widget-options'); ?></option>
185 <option value="pageLoad"><?php _e('Page Load', 'widget-options'); ?></option>
186 </select>
187 <small><em><?php _e('The event that triggers the animation', 'widget-options'); ?></em></small>
188 </p>
189
190 <p>
191 <label for="opts-class-speed-<?php echo $args['id']; ?>"><?php _e('Animation Speed', 'widget-options'); ?></label>
192 <br />
193 <input type="text" class="widefat" readonly />
194 <small><em><?php _e('How many seconds the incoming animation should lasts.', 'widget-options'); ?></em></small>
195 </p>
196
197 <p>
198 <label for="opts-class-offset-<?php echo $args['id']; ?>"><?php _e('Screen Offset', 'widget-options'); ?></label>
199 <br />
200 <input type="text" readonly />
201 <small><em><?php _e('How many pixels above the bottom of the screen must the widget be before animating.', 'widget-options'); ?></em></small>
202 </p>
203
204 <p>
205 <label for="opts-class-hidden-<?php echo $args['id']; ?>"><?php _e('Hide Before Animation', 'widget-options'); ?></label>
206 <br />
207 <input type="checkbox" value="1" readonly />
208 <label for="opts-class-hidden-<?php echo $args['id']; ?>"><?php _e('Enabled', 'widget-options'); ?></label><br />
209 <small><em><?php _e('Hide widget before animating.', 'widget-options'); ?></em></small>
210 </p>
211
212 <p>
213 <label for="opts-class-delay-<?php echo $args['id']; ?>"><?php _e('Animation Delay', 'widget-options'); ?></label>
214 <br />
215 <input type="text" class="widefat" readonly />
216 <small><em><?php _e('Number of seconds after the event to start the animation.', 'widget-options'); ?></em></small>
217 </p>
218 </div>
219 </div>
220 </div><!-- end animation tab content -->
221 <!-- end Animation tab demo -->
222
223 </div><!-- end .extended-widget-opts-settings-tabs -->
224
225
226 </div>
227 <?php
228 }
229 add_action('extended_widget_opts_tabcontent', 'widgetopts_tabcontent_animation');
230 endif; ?>