PluginProbe
Weather Effect / trunk
Weather Effect vtrunk
1.6.1 1.1.9 1.2.0 1.2.10 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 All 90 releases
weather-effect / settings / rainy-settings.php

rainy-settings.php in Weather Effect trunk, at settings/rainy-settings.php

278 lines 9.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
2 <!--rain Falls Settings -->
3 <div id="rain_weather_effect" class="tab-content">
4 <div id="rain_effect_sh">
5 <p class="wep-section-heading"><?php esc_html_e( 'Rain Effect Settings', 'weather-effect' ); ?></p>
6 <div>
7 <div class="checkbox">
8 <label>
9 <?php
10 if ( isset( $weather_effect_settings['umbrella'] ) ) {
11 $umbrella = $weather_effect_settings['umbrella'];
12 } else {
13 $umbrella = '';
14 }
15 ?>
16 <input type="checkbox" id="umbrella" name="umbrella" value="umbrella"
17 <?php
18 if ( $umbrella == 'umbrella' ) {
19 echo 'checked';}
20 ?>
21 >
22 <span class="cr"><i class="cr-icon fa fa-check"></i></span>
23 <?php esc_html_e( '1. Rainy Umbrella', 'weather-effect' ); ?>
24 </label>
25 </div>
26 <div class="rain_umbrella_sh">
27 <div>
28 <label class="lower_label"> <?php esc_html_e( 'Select Rain Falling Umbrella', 'weather-effect' ); ?></label>
29 <?php
30 if ( isset( $weather_effect_settings['rain_umbrella'] ) ) {
31 $rain_umbrella = $weather_effect_settings['rain_umbrella'];
32 } else {
33 $rain_umbrella = 'umbrella1';
34 }
35 ?>
36 <select id="rain_umbrella" name="rain_umbrella" class="form-control">
37 <option value="umbrella1"
38 <?php
39 if ( $rain_umbrella == 'umbrella1' ) {
40 echo 'selected="selected"';}
41 ?>
42 > <?php esc_html_e( 'Umbrella 1', 'weather-effect' ); ?></option>
43 </select>
44 </div>
45 </div>
46 </div>
47 <div>
48 <div class="checkbox">
49 <label>
50 <?php
51 if ( isset( $weather_effect_settings['drop'] ) ) {
52 $drop = $weather_effect_settings['drop'];
53 } else {
54 $drop = '';
55 }
56 ?>
57 <input type="checkbox" id="drop" name="drop" value="drop"
58 <?php
59 if ( $drop == 'drop' ) {
60 echo 'checked';}
61 ?>
62 >
63 <span class="cr"><i class="cr-icon fa fa-check"></i></span>
64 <?php esc_html_e( '2. Rainy Drops', 'weather-effect' ); ?>
65 </label>
66 </div>
67 <div class="rain_drops_sh">
68 <label class="lower_label"> <?php esc_html_e( 'Select Rain Falling Drops', 'weather-effect' ); ?></label>
69 <?php
70 if ( isset( $weather_effect_settings['rain_drops'] ) ) {
71 $rain_drops = $weather_effect_settings['rain_drops'];
72 } else {
73 $rain_drops = 'drops1';
74 }
75 ?>
76 <select id="rain_drops" name="rain_drops" class="form-control">
77 <option value="drops1"
78 <?php
79 if ( $rain_drops == 'drops1' ) {
80 echo 'selected="selected"';}
81 ?>
82 > <?php esc_html_e( 'Drops 1', 'weather-effect' ); ?></option>
83 </select>
84 </div>
85 </div>
86 <div>
87 <div class="checkbox">
88 <label>
89 <?php
90 if ( isset( $weather_effect_settings['cloud'] ) ) {
91 $cloud = $weather_effect_settings['cloud'];
92 } else {
93 $cloud = '';
94 }
95 ?>
96 <input type="checkbox" id="cloud" name="cloud" value="cloud"
97 <?php
98 if ( $cloud == 'cloud' ) {
99 echo 'checked';}
100 ?>
101 >
102 <span class="cr"><i class="cr-icon fa fa-check"></i></span>
103 <?php esc_html_e( '3. Rainy Cloud', 'weather-effect' ); ?>
104 </label>
105 </div>
106 <div class="rain_cloud_sh">
107 <label class="lower_label"> <?php esc_html_e( 'Select Rain Falling Cloud', 'weather-effect' ); ?></label>
108 <?php
109 if ( isset( $weather_effect_settings['rain_cloud'] ) ) {
110 $rain_cloud = $weather_effect_settings['rain_cloud'];
111 } else {
112 $rain_cloud = 'cloud1';
113 }
114 ?>
115 <select id="rain_cloud" name="rain_cloud" class="form-control">
116 <option value="cloud1"
117 <?php
118 if ( $rain_cloud == 'cloud1' ) {
119 echo 'selected="selected"';}
120 ?>
121 > <?php esc_html_e( 'Cloud 1', 'weather-effect' ); ?></option>
122 </select>
123 </div>
124 </div>
125
126 <div class="row">
127 <div class="col-md-6">
128 <div class="row">
129 <label class="bg_lower_label"><?php esc_html_e( '2. Minimum Fall Size On page', 'weather-effect' ); ?></label>
130 <?php
131 if ( isset( $weather_effect_settings['rain_min_size_leaf'] ) ) {
132 $rain_min_size_leaf = $weather_effect_settings['rain_min_size_leaf'];
133 } else {
134 $rain_min_size_leaf = 20;
135 }
136 ?>
137 <p class="range-slider padding_settings">
138 <input id="rain_min_size_leaf" name="rain_min_size_leaf" class="range-slider__range" type="range" value="<?php echo esc_attr( $rain_min_size_leaf ); ?>" min="1" step="1" max="30">
139 <span class="range-slider__value">0</span>
140 </p>
141 </div>
142 <div class="row">
143 <label class="bg_lower_label"><?php esc_html_e( '3. Maximum Fall Size On page', 'weather-effect' ); ?></label>
144 <?php
145 if ( isset( $weather_effect_settings['rain_max_size_leaf'] ) ) {
146 $rain_max_size_leaf = $weather_effect_settings['rain_max_size_leaf'];
147 } else {
148 $rain_max_size_leaf = 50;
149 }
150 ?>
151 <p class="range-slider padding_settings">
152 <input id="rain_max_size_leaf" name="rain_max_size_leaf" class="range-slider__range" type="range" value="<?php echo esc_attr( $rain_max_size_leaf ); ?>" min="10" step="1" max="200">
153 <span class="range-slider__value">0</span>
154 </p>
155 </div>
156 </div>
157 <div class="col-md-6">
158 <div class="row">
159 <label class="bg_lower_label"><?php esc_html_e( '4. Falls On page', 'weather-effect' ); ?></label>
160 <?php
161 if ( isset( $weather_effect_settings['rain_flakes_leaf'] ) ) {
162 $rain_flakes_leaf = $weather_effect_settings['rain_flakes_leaf'];
163 } else {
164 $rain_flakes_leaf = 5;
165 }
166 ?>
167 <p class="range-slider padding_settings">
168 <input id="rain_flakes_leaf" name="rain_flakes_leaf" class="range-slider__range" type="range" value="<?php echo esc_attr( $rain_flakes_leaf ); ?>" min="1" step="1" max="100">
169 <span class="range-slider__value">0</span>
170 </p>
171 </div>
172 <div class="row">
173 <label class="bg_lower_label"><?php esc_html_e( '5. Falls Speed On page', 'weather-effect' ); ?></label>
174 <?php
175 if ( isset( $weather_effect_settings['rain_speed'] ) ) {
176 $rain_speed = $weather_effect_settings['rain_speed'];
177 } else {
178 $rain_speed = 5;
179 }
180 ?>
181 <p class="range-slider padding_settings">
182 <input id="rain_speed" name="rain_speed" class="range-slider__range" type="range" value="<?php echo esc_attr( $rain_speed ); ?>" min="1" step="1" max="10">
183 <span class="range-slider__value">0</span>
184 </p>
185 </div>
186 </div>
187 </div>
188 </div>
189 </div>
190 <!-- rain Falls Settings End -->
191 <script>
192 <?php if ( $weather_occasion == 'rainy_check' ) { ?>
193 jQuery(document).ready(function(){
194 <?php if ( $umbrella == 'umbrella' ) { ?>
195 snowFall.snow(document.body, {
196 image : "<?php echo esc_url( plugin_dir_url( __FILE__ ) . '../assets/images/rain/' . $rain_umbrella . '.png' ); ?>",
197 minSize: <?php echo esc_js( $rain_min_size_leaf ); ?>,
198 maxSize: <?php echo esc_js( $rain_max_size_leaf ); ?>,
199 flakeCount: <?php echo esc_js( $rain_flakes_leaf ); ?>,
200 maxSpeed: <?php echo esc_js( $rain_speed ); ?>
201 });
202 <?php } ?>
203 <?php if ( $drop == 'drop' ) { ?>
204 snowFall.snow(document.body, {
205 image : "<?php echo esc_url( plugin_dir_url( __FILE__ ) . '../assets/images/rain/' . $rain_drops . '.png' ); ?>",
206 minSize: <?php echo esc_js( $rain_min_size_leaf ); ?>,
207 maxSize: <?php echo esc_js( $rain_max_size_leaf ); ?>,
208 flakeCount: <?php echo esc_js( $rain_flakes_leaf ); ?>,
209 maxSpeed: <?php echo esc_js( $rain_speed ); ?>
210 });
211 <?php } ?>
212 <?php if ( $cloud == 'cloud' ) { ?>
213 snowFall.snow(document.body, {
214 image : "<?php echo esc_url( plugin_dir_url( __FILE__ ) . '../assets/images/rain/' . $rain_cloud . '.png' ); ?>",
215 minSize: <?php echo esc_js( $rain_min_size_leaf ); ?>,
216 maxSize: <?php echo esc_js( $rain_max_size_leaf ); ?>,
217 flakeCount: <?php echo esc_js( $rain_flakes_leaf ); ?>,
218 maxSpeed: <?php echo esc_js( $rain_speed ); ?>
219 });
220 <?php } ?>
221 });
222 <?php } ?>
223
224 var umbrella = jQuery('input[name="umbrella"]:checked').val();
225 if(jQuery('#umbrella').is(":checked")) {
226 jQuery('.rain_umbrella_sh').show();
227 } else {
228 jQuery('.rain_umbrella_sh').hide();
229 }
230
231 jQuery(document).ready(function() {
232 jQuery('input[name="umbrella"]').change(function(){
233 var umbrella = jQuery('input[name="umbrella"]:checked').val();
234 if(jQuery(this).is(":checked")) {
235 jQuery('.rain_umbrella_sh').show();
236 }else{
237 jQuery('.rain_umbrella_sh').hide();
238 }
239 });
240 });
241
242 var drop = jQuery('input[name="drop"]:checked').val();
243 if(jQuery('#drop').is(":checked")) {
244 jQuery('.rain_drops_sh').show();
245 }else{
246 jQuery('.rain_drops_sh').hide();
247 }
248
249 jQuery(document).ready(function() {
250 jQuery('input[name="drop"]').change(function(){
251 var drop = jQuery('input[name="drop"]:checked').val();
252 if(jQuery(this).is(":checked")) {
253 jQuery('.rain_drops_sh').show();
254 }else{
255 jQuery('.rain_drops_sh').hide();
256 }
257 });
258 });
259
260 var cloud = jQuery('input[name="cloud"]:checked').val();
261 if(jQuery('#cloud').is(":checked")) {
262 jQuery('.rain_cloud_sh').show();
263 }else{
264 jQuery('.rain_cloud_sh').hide();
265 }
266
267 jQuery(document).ready(function() {
268 jQuery('input[name="cloud"]').change(function(){
269 var cloud = jQuery('input[name="cloud"]:checked').val();
270 if(jQuery(this).is(":checked")) {
271 jQuery('.rain_cloud_sh').show();
272 }else{
273 jQuery('.rain_cloud_sh').hide();
274 }
275 });
276 });
277 </script>
278