Version Description
Download this release
Release Info
Developer | eleopard |
Plugin | Animate It! |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- edsanimate.php +38 -14
- readme.txt +6 -2
edsanimate.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Animate It!
|
4 |
* Plugin URI: http://www.eleopard.in
|
5 |
* Description: It will allow user to add CSS Animations
|
6 |
-
* Version: 1.4.
|
7 |
* Author: eLEOPARD Design Studios
|
8 |
* Author URI: http://www.eleopard.in
|
9 |
* License: GNU General Public License version 2 or later; see LICENSE.txt
|
@@ -59,12 +59,17 @@ function set_edsanimate_options(){
|
|
59 |
add_option('enable_on_tab'
|
60 |
,'1'
|
61 |
,'Animation should work on tablets or not.');
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
function unset_edsanimate_options(){
|
65 |
delete_option('scroll_offset');
|
66 |
delete_option('enable_on_phone');
|
67 |
delete_option('enable_on_tab');
|
|
|
68 |
}
|
69 |
|
70 |
function admin_edsanimate_options(){
|
@@ -87,9 +92,9 @@ function update_edsanimate_options(){
|
|
87 |
update_option('scroll_offset', $_REQUEST['scroll_offset']);
|
88 |
update_option('enable_on_phone', $_REQUEST['enable_on_phone']);
|
89 |
update_option('enable_on_tab', $_REQUEST['enable_on_tab']);
|
90 |
-
|
91 |
$ok=true;
|
92 |
}
|
|
|
93 |
|
94 |
|
95 |
if($ok){?>
|
@@ -112,7 +117,7 @@ function print_edsanimate_form(){
|
|
112 |
<form method="post">
|
113 |
<table cellspacing="10" cellpadding="10">
|
114 |
<tr>
|
115 |
-
<td>
|
116 |
<label for="scroll_offset">Scroll Offset (in percentage):</label>
|
117 |
</td>
|
118 |
<td colspan="2">
|
@@ -121,7 +126,7 @@ function print_edsanimate_form(){
|
|
121 |
|
122 |
</tr>
|
123 |
<tr>
|
124 |
-
<td>
|
125 |
<label for="enable_on_phone">Enable on Smartphones:</label>
|
126 |
</td>
|
127 |
<td>
|
@@ -130,12 +135,12 @@ function print_edsanimate_form(){
|
|
130 |
<option value="1" <?php echo (get_option('enable_on_phone')=='1')?'selected="selected"':'';?>>Yes</option>
|
131 |
</select>
|
132 |
</td>
|
133 |
-
<td>
|
134 |
<p style="font-size:11px;"><i>(Animation should work on Smartphones or not)</i>
|
135 |
</td>
|
136 |
</tr>
|
137 |
<tr>
|
138 |
-
<td>
|
139 |
<label for="enable_on_tab">Enable on Tablets:</label>
|
140 |
</td>
|
141 |
<td>
|
@@ -144,10 +149,21 @@ function print_edsanimate_form(){
|
|
144 |
<option value="1" <?php echo (get_option('enable_on_tab')=='1')?'selected="selected"':'';?>>Yes</option>
|
145 |
</select>
|
146 |
</td>
|
147 |
-
<td>
|
148 |
<p style="font-size:11px;"><i>(Animation should work on Tablets or not)</i>
|
149 |
</td>
|
150 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
<tr>
|
152 |
<td colspan="3">
|
153 |
<input type="submit" name="submit" value="Submit" />
|
@@ -181,14 +197,22 @@ function add_eds_script_and_css()
|
|
181 |
|
182 |
if($enable):
|
183 |
wp_register_style( 'animate-css',plugins_url( '/assets/css/animate.css', __FILE__ ));
|
|
|
|
|
|
|
|
|
184 |
wp_register_script( 'viewpointcheck-script',plugins_url( '/assets/js/viewportchecker.js', __FILE__ ),array('jquery'));
|
185 |
wp_register_script( 'edsanimate-script', plugins_url( '/assets/js/edsanimate.js', __FILE__ ),array('viewpointcheck-script') );
|
186 |
$offset = array( 'offset' => get_option('scroll_offset'));
|
187 |
-
wp_localize_script( 'edsanimate-script', 'scroll_offset', $offset);
|
188 |
-
wp_enqueue_style( 'animate-css' );
|
189 |
-
wp_enqueue_script( 'viewpointcheck-script');
|
190 |
-
wp_enqueue_script( 'edsanimate-script');
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
endif;
|
193 |
}
|
194 |
|
@@ -222,7 +246,7 @@ function edsanimate_handler( $attributes, $content = null ) {
|
|
222 |
|
223 |
if($animation == '')
|
224 |
{
|
225 |
-
return $content;
|
226 |
}
|
227 |
|
228 |
$classString .= " " . $animation;
|
@@ -230,10 +254,10 @@ function edsanimate_handler( $attributes, $content = null ) {
|
|
230 |
if(strcasecmp($infinite_animation, 'yes')==0)
|
231 |
$classString .= " infinite";
|
232 |
|
233 |
-
if($delay!= '' && is_int((int)$delay) && $delay>=0
|
234 |
$classString .= " delay" . $delay;
|
235 |
|
236 |
-
if($duration!= '' && is_int((int)$duration) && $duration>=0
|
237 |
$classString .= " duration" . $duration;
|
238 |
|
239 |
if(strcasecmp($animate_on, 'scroll')==0)
|
3 |
* Plugin Name: Animate It!
|
4 |
* Plugin URI: http://www.eleopard.in
|
5 |
* Description: It will allow user to add CSS Animations
|
6 |
+
* Version: 1.4.2
|
7 |
* Author: eLEOPARD Design Studios
|
8 |
* Author URI: http://www.eleopard.in
|
9 |
* License: GNU General Public License version 2 or later; see LICENSE.txt
|
59 |
add_option('enable_on_tab'
|
60 |
,'1'
|
61 |
,'Animation should work on tablets or not.');
|
62 |
+
|
63 |
+
add_option('custom_css'
|
64 |
+
,''
|
65 |
+
,'Custom CSS classes for additional functionality.');
|
66 |
}
|
67 |
|
68 |
function unset_edsanimate_options(){
|
69 |
delete_option('scroll_offset');
|
70 |
delete_option('enable_on_phone');
|
71 |
delete_option('enable_on_tab');
|
72 |
+
delete_option('custom_css');
|
73 |
}
|
74 |
|
75 |
function admin_edsanimate_options(){
|
92 |
update_option('scroll_offset', $_REQUEST['scroll_offset']);
|
93 |
update_option('enable_on_phone', $_REQUEST['enable_on_phone']);
|
94 |
update_option('enable_on_tab', $_REQUEST['enable_on_tab']);
|
|
|
95 |
$ok=true;
|
96 |
}
|
97 |
+
update_option('custom_css', esc_textarea(isset($_REQUEST['custom_css'])?$_REQUEST['custom_css']:''));
|
98 |
|
99 |
|
100 |
if($ok){?>
|
117 |
<form method="post">
|
118 |
<table cellspacing="10" cellpadding="10">
|
119 |
<tr>
|
120 |
+
<td style="vertical-align: top;">
|
121 |
<label for="scroll_offset">Scroll Offset (in percentage):</label>
|
122 |
</td>
|
123 |
<td colspan="2">
|
126 |
|
127 |
</tr>
|
128 |
<tr>
|
129 |
+
<td style="vertical-align: top;">
|
130 |
<label for="enable_on_phone">Enable on Smartphones:</label>
|
131 |
</td>
|
132 |
<td>
|
135 |
<option value="1" <?php echo (get_option('enable_on_phone')=='1')?'selected="selected"':'';?>>Yes</option>
|
136 |
</select>
|
137 |
</td>
|
138 |
+
<td style="vertical-align: top;">
|
139 |
<p style="font-size:11px;"><i>(Animation should work on Smartphones or not)</i>
|
140 |
</td>
|
141 |
</tr>
|
142 |
<tr>
|
143 |
+
<td style="vertical-align: top;">
|
144 |
<label for="enable_on_tab">Enable on Tablets:</label>
|
145 |
</td>
|
146 |
<td>
|
149 |
<option value="1" <?php echo (get_option('enable_on_tab')=='1')?'selected="selected"':'';?>>Yes</option>
|
150 |
</select>
|
151 |
</td>
|
152 |
+
<td style="vertical-align: top;">
|
153 |
<p style="font-size:11px;"><i>(Animation should work on Tablets or not)</i>
|
154 |
</td>
|
155 |
</tr>
|
156 |
+
<tr>
|
157 |
+
<td style="vertical-align: top;">
|
158 |
+
<label for="custom_css">Custom CSS:</label>
|
159 |
+
</td>
|
160 |
+
<td>
|
161 |
+
<textarea name="custom_css" id="custom_css" cols="25" rows="10"><?php echo get_option('custom_css');?></textarea>
|
162 |
+
</td>
|
163 |
+
<td style="vertical-align: top;">
|
164 |
+
<p style="font-size:11px;"><i>(Add custom CSS classes)</i>
|
165 |
+
</td>
|
166 |
+
</tr>
|
167 |
<tr>
|
168 |
<td colspan="3">
|
169 |
<input type="submit" name="submit" value="Submit" />
|
197 |
|
198 |
if($enable):
|
199 |
wp_register_style( 'animate-css',plugins_url( '/assets/css/animate.css', __FILE__ ));
|
200 |
+
|
201 |
+
//Custom CSS//
|
202 |
+
$custom_css = get_option('custom_css');
|
203 |
+
|
204 |
wp_register_script( 'viewpointcheck-script',plugins_url( '/assets/js/viewportchecker.js', __FILE__ ),array('jquery'));
|
205 |
wp_register_script( 'edsanimate-script', plugins_url( '/assets/js/edsanimate.js', __FILE__ ),array('viewpointcheck-script') );
|
206 |
$offset = array( 'offset' => get_option('scroll_offset'));
|
207 |
+
wp_localize_script( 'edsanimate-script', 'scroll_offset', $offset);
|
|
|
|
|
|
|
208 |
|
209 |
+
//Enqueuing style sheets
|
210 |
+
wp_enqueue_style( 'animate-css' );
|
211 |
+
wp_add_inline_style( 'animate-css', $custom_css );
|
212 |
+
|
213 |
+
//Enqueuing javascripts
|
214 |
+
wp_enqueue_script( 'viewpointcheck-script');
|
215 |
+
wp_enqueue_script( 'edsanimate-script');
|
216 |
endif;
|
217 |
}
|
218 |
|
246 |
|
247 |
if($animation == '')
|
248 |
{
|
249 |
+
return do_shortcode($content);
|
250 |
}
|
251 |
|
252 |
$classString .= " " . $animation;
|
254 |
if(strcasecmp($infinite_animation, 'yes')==0)
|
255 |
$classString .= " infinite";
|
256 |
|
257 |
+
if($delay!= '' && is_int((int)$delay) && $delay>=0)
|
258 |
$classString .= " delay" . $delay;
|
259 |
|
260 |
+
if($duration!= '' && is_int((int)$duration) && $duration>=0)
|
261 |
$classString .= " duration" . $duration;
|
262 |
|
263 |
if(strcasecmp($animate_on, 'scroll')==0)
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Animate It! ===
|
2 |
Contributors: eleopard
|
3 |
Tags: css3 animation, animate.css, jquery, on scroll animation, delay animation
|
4 |
-
Requires at least: 3.
|
5 |
Tested up to: 4.1.1
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GNU General Public License version 2 or later
|
8 |
License URI: http://www.gnu.org/copyleft/gpl.html
|
9 |
|
@@ -28,6 +28,7 @@ Some of the Key features Include:
|
|
28 |
* Allow user to add animation duration
|
29 |
* Allow user to apply animation infinitely
|
30 |
* Options to enable or disable animations on Smartphones and Tablets.
|
|
|
31 |
* Allow users to apply animation on WordPress Widgets. Use <a href="http://downloads.eleopard.in/class-generator-wordpress/" target="_blank">Class Generator</a> to generate the required animation classes.
|
32 |
|
33 |
All the CSS3 animations are from [Animate.css](http://daneden.github.io/animate.css/ "Animate.css")
|
@@ -65,6 +66,9 @@ Percentage scroll offset can be set from Settings-> Animate It! menu in the admi
|
|
65 |
|
66 |
== Changelog ==
|
67 |
|
|
|
|
|
|
|
68 |
= Version 1.4.1 =
|
69 |
* Resolved bug related to nested shortcodes.
|
70 |
|
1 |
=== Animate It! ===
|
2 |
Contributors: eleopard
|
3 |
Tags: css3 animation, animate.css, jquery, on scroll animation, delay animation
|
4 |
+
Requires at least: 3.3
|
5 |
Tested up to: 4.1.1
|
6 |
+
Stable tag: 1.4.2
|
7 |
License: GNU General Public License version 2 or later
|
8 |
License URI: http://www.gnu.org/copyleft/gpl.html
|
9 |
|
28 |
* Allow user to add animation duration
|
29 |
* Allow user to apply animation infinitely
|
30 |
* Options to enable or disable animations on Smartphones and Tablets.
|
31 |
+
* Feature to add custom CSS class for additional delay, duration etc.
|
32 |
* Allow users to apply animation on WordPress Widgets. Use <a href="http://downloads.eleopard.in/class-generator-wordpress/" target="_blank">Class Generator</a> to generate the required animation classes.
|
33 |
|
34 |
All the CSS3 animations are from [Animate.css](http://daneden.github.io/animate.css/ "Animate.css")
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= Version 1.4.2 =
|
70 |
+
* New Feature that will allow user to add custom CSS for additional delay, duration etc.
|
71 |
+
|
72 |
= Version 1.4.1 =
|
73 |
* Resolved bug related to nested shortcodes.
|
74 |
|