Easing Slider - Version 2.0.1

Version Description

  • Fixed bugs with 2.0 release. Reverted name from Riva Slider "Lite" back to Easing Slider (transition did not go as hoped, sorry).
  • Fixed CSS rendering issues some users were experiencing.
  • Updated plugin upgrade procedures
Download this release

Release Info

Developer MatthewRuddy
Plugin Icon 128x128 Easing Slider
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

css/slideshow.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- * Riva Slider Dev
3
  * @version 2.0
4
  *
5
  * Slideshow CSS. Advised you don't make changes to this. Instead, add styling changing to your theme's style.css file.
@@ -14,11 +14,12 @@
14
  */
15
 
16
  /* ===== Core structural CSS. Don't edit this! ===== */
17
- .rivasliderlite,
18
- .rivasliderlite-viewport,
19
- .rivasliderlite-slides-container,
20
- .rivasliderlite-slide,
21
- .rivasliderlite-preload {
 
22
  margin: 0px !important;
23
  padding: 0px !important;
24
  border: 0px !important;
@@ -26,11 +27,11 @@
26
  outline: none !important;
27
  }
28
 
29
- .rivasliderlite {
30
  position: relative !important;
31
  }
32
 
33
- .rivasliderlite-preload {
34
  background: url(../images/loading.gif) no-repeat center center #fff !important;
35
  width: 100% !important;
36
  height: 100% !important;
@@ -40,29 +41,29 @@
40
  z-index: 50 !important;
41
  }
42
 
43
- .rivasliderlite-arrows.has-hover {
44
  opacity: 0;
45
  }
46
 
47
- .rivasliderlite:hover .rivasliderlite-arrows.has-hover {
48
  opacity: 1;
49
  }
50
 
51
- .rivasliderlite-pagination.has-hover {
52
  opacity: 0;
53
  }
54
 
55
- .rivasliderlite:hover .rivasliderlite-pagination.has-hover {
56
  opacity: 1;
57
  }
58
 
59
- .rivasliderlite-viewport {
60
  position: relative !important;
61
  overflow: hidden !important;
62
  z-index: 10 !important;
63
  }
64
 
65
- .rivasliderlite-slides-container {
66
  overflow: hidden !important;
67
  position: absolute !important;
68
  top: 0px;
@@ -70,7 +71,7 @@
70
  display: block !important;
71
  }
72
 
73
- .rivasliderlite.use-css3 .rivasliderlite-slides-container {
74
  -webkit-transform: translate3d(0, 0, 0);
75
  -moz-transform: translate3d(0, 0, 0);
76
  -ms-transform: translate3d(0, 0, 0);
@@ -78,7 +79,7 @@
78
  transform: translate3d(0, 0, 0);
79
  }
80
 
81
- .rivasliderlite.use-slide.use-css3 .rivasliderlite-slides-container {
82
  -webkit-transition: -webkit-transform 0.5s ease;
83
  -moz-transition: -moz-transform 0.5s ease;
84
  -ms-transition: -ms-transform 0.5s ease;
@@ -86,7 +87,7 @@
86
  transition: transform 0.5s ease;
87
  }
88
 
89
- .rivasliderlite.use-fade.use-css3 .rivasliderlite-slides-container {
90
  -webkit-transition: none;
91
  -moz-transition: none;
92
  -ms-transition: none;
@@ -94,63 +95,63 @@
94
  transition: none;
95
  }
96
 
97
- .rivasliderlite.use-slide .rivasliderlite-slide {
98
  float: left !important;
99
  position: relative !important;
100
  }
101
 
102
- .rivasliderlite.use-fade .rivasliderlite-slide {
103
  position: absolute !important;
104
  top: 0 !important;
105
  left: 0 !important;
106
  }
107
 
108
- .rivasliderlite.use-fade .rivasliderlite-slide.active {
109
  z-index: 10;
110
  }
111
 
112
- .rivasliderlite-slide {
113
  width: 100%;
114
  }
115
 
116
- .rivasliderlite-slide > a {
117
  display: block !important;
118
  }
119
 
120
- .rivasliderlite-image {
121
  width: 100% !important;
122
  max-width: 100% !important;
123
  display: block !important;
124
  }
125
 
126
- .rivasliderlite-slide-content {
127
  position: absolute !important;
128
  top: 0;
129
  left: 0;
130
  }
131
 
132
- .rivasliderlite-slide-content .caption.left {
133
  top: 0px !important;
134
  left: 0px !important;
135
  }
136
 
137
- .rivasliderlite-slide-content .caption.right {
138
  top: 0px !important;
139
  right: 0px !important;
140
  }
141
 
142
- .rivasliderlite-slide-content .caption.top {
143
  top: 0px !important;
144
  left: 0px !important;
145
  }
146
 
147
- .rivasliderlite-slide-content .caption.bottom {
148
  bottom: 0px !important;
149
  left: 0px !important;
150
  }
151
 
152
  /* ===== Anything below here can be edited. Have fun! ===== */
153
- .rivasliderlite-arrows {
154
  position: absolute;
155
  top: 46%;
156
  width: 30px;
@@ -168,27 +169,27 @@
168
  transition: opacity 0.25s linear;
169
  }
170
 
171
- .rivasliderlite-next.inside {
172
  right: 10px;
173
  background-position: 0px -29px;
174
  }
175
 
176
- .rivasliderlite-next.outside {
177
  right: -40px;
178
  padding-left: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
179
  background-position: 20px -29px;
180
  }
181
 
182
- .rivasliderlite-prev.inside {
183
  left: 10px;
184
  }
185
 
186
- .rivasliderlite-prev.outside {
187
  left: -40px;
188
  padding-right: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
189
  }
190
 
191
- .rivasliderlite-pagination {
192
  position: absolute;
193
  z-index: 30;
194
  opacity: 0; /** Slideshow will set to this 1 when it has loaded */
@@ -199,53 +200,53 @@
199
  transition: opacity 0.25s linear;
200
  }
201
 
202
- .rivasliderlite-pagination.inside.bottom-left {
203
  bottom: 10px;
204
  left: 10px;
205
  }
206
 
207
- .rivasliderlite-pagination.inside.bottom-right {
208
  bottom: 10px;
209
  right: 10px;
210
  }
211
 
212
- .rivasliderlite-pagination.inside.bottom-center {
213
  bottom: 10px;
214
  left: 0;
215
  width: 100%;
216
  text-align: center;
217
  }
218
 
219
- .rivasliderlite-pagination.inside.top-left {
220
  top: 10px;
221
  left: 10px;
222
  }
223
 
224
- .rivasliderlite-pagination.inside.top-right {
225
  top: 10px;
226
  right: 10px;
227
  }
228
 
229
- .rivasliderlite-pagination.inside.top-center {
230
  top: 10px;
231
  left: 0;
232
  width: 100%;
233
  text-align: center;
234
  }
235
 
236
- .rivasliderlite-pagination.outside.bottom-left {
237
  bottom: -25px;
238
  left: 0px;
239
  padding-top: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
240
  }
241
 
242
- .rivasliderlite-pagination.outside.bottom-right {
243
  bottom: -25px;
244
  right: 0px;
245
  padding-top: 20px;
246
  }
247
 
248
- .rivasliderlite-pagination.outside.bottom-center {
249
  bottom: -25px;
250
  left: 0;
251
  width: 100%;
@@ -253,19 +254,19 @@
253
  padding-top: 20px;
254
  }
255
 
256
- .rivasliderlite-pagination.outside.top-left {
257
  top: -25px;
258
  left: 0px;
259
  padding-bottom: 20px;
260
  }
261
 
262
- .rivasliderlite-pagination.outside.top-right {
263
  top: -25px;
264
  right: 0px;
265
  padding-bottom: 20px;
266
  }
267
 
268
- .rivasliderlite-pagination.outside.top-center {
269
  top: -25px;
270
  left: 0;
271
  width: 100%;
@@ -273,7 +274,7 @@
273
  padding-bottom: 20px;
274
  }
275
 
276
- .rivasliderlite-icon {
277
  width: 14px;
278
  height: 14px;
279
  background-image: url(../images/slideshow_icons.png);
@@ -284,15 +285,15 @@
284
  cursor: pointer;
285
  }
286
 
287
- .rivasliderlite-icon:last-child {
288
  margin-right: 0px;
289
  }
290
 
291
- .rivasliderlite-icon.active {
292
  background-position: 0px -14px;
293
  }
294
 
295
- .rivasliderlite-slide-content .caption {
296
  background-color: #000; /** Fallback for rgba unsupported browsers */
297
  background-color: rgba(0, 0, 0, 0.5);
298
  color: #fff;
@@ -300,7 +301,7 @@
300
  margin: 20px;
301
  }
302
 
303
- .active .rivasliderlite-slide-content .caption {
304
  -webkit-animation-duration: 0.25s;
305
  -moz-animation-duration: 0.25s;
306
  -o-animation-duration: 0.25s;
1
  /*
2
+ * Easing Slider Dev
3
  * @version 2.0
4
  *
5
  * Slideshow CSS. Advised you don't make changes to this. Instead, add styling changing to your theme's style.css file.
14
  */
15
 
16
  /* ===== Core structural CSS. Don't edit this! ===== */
17
+ .easingsliderlite,
18
+ .easingsliderlite-viewport,
19
+ .easingsliderlite-slides-container,
20
+ .easingsliderlite-slide,
21
+ .easingsliderlite-image,
22
+ .easingsliderlite-preload {
23
  margin: 0px !important;
24
  padding: 0px !important;
25
  border: 0px !important;
27
  outline: none !important;
28
  }
29
 
30
+ .easingsliderlite {
31
  position: relative !important;
32
  }
33
 
34
+ .easingsliderlite-preload {
35
  background: url(../images/loading.gif) no-repeat center center #fff !important;
36
  width: 100% !important;
37
  height: 100% !important;
41
  z-index: 50 !important;
42
  }
43
 
44
+ .easingsliderlite-arrows.has-hover {
45
  opacity: 0;
46
  }
47
 
48
+ .easingsliderlite:hover .easingsliderlite-arrows.has-hover {
49
  opacity: 1;
50
  }
51
 
52
+ .easingsliderlite-pagination.has-hover {
53
  opacity: 0;
54
  }
55
 
56
+ .easingsliderlite:hover .easingsliderlite-pagination.has-hover {
57
  opacity: 1;
58
  }
59
 
60
+ .easingsliderlite-viewport {
61
  position: relative !important;
62
  overflow: hidden !important;
63
  z-index: 10 !important;
64
  }
65
 
66
+ .easingsliderlite-slides-container {
67
  overflow: hidden !important;
68
  position: absolute !important;
69
  top: 0px;
71
  display: block !important;
72
  }
73
 
74
+ .easingsliderlite.use-css3 .easingsliderlite-slides-container {
75
  -webkit-transform: translate3d(0, 0, 0);
76
  -moz-transform: translate3d(0, 0, 0);
77
  -ms-transform: translate3d(0, 0, 0);
79
  transform: translate3d(0, 0, 0);
80
  }
81
 
82
+ .easingsliderlite.use-slide.use-css3 .easingsliderlite-slides-container {
83
  -webkit-transition: -webkit-transform 0.5s ease;
84
  -moz-transition: -moz-transform 0.5s ease;
85
  -ms-transition: -ms-transform 0.5s ease;
87
  transition: transform 0.5s ease;
88
  }
89
 
90
+ .easingsliderlite.use-fade.use-css3 .easingsliderlite-slides-container {
91
  -webkit-transition: none;
92
  -moz-transition: none;
93
  -ms-transition: none;
95
  transition: none;
96
  }
97
 
98
+ .easingsliderlite.use-slide .easingsliderlite-slide {
99
  float: left !important;
100
  position: relative !important;
101
  }
102
 
103
+ .easingsliderlite.use-fade .easingsliderlite-slide {
104
  position: absolute !important;
105
  top: 0 !important;
106
  left: 0 !important;
107
  }
108
 
109
+ .easingsliderlite.use-fade .easingsliderlite-slide.active {
110
  z-index: 10;
111
  }
112
 
113
+ .easingsliderlite-slide {
114
  width: 100%;
115
  }
116
 
117
+ .easingsliderlite-slide > a {
118
  display: block !important;
119
  }
120
 
121
+ .easingsliderlite-image {
122
  width: 100% !important;
123
  max-width: 100% !important;
124
  display: block !important;
125
  }
126
 
127
+ .easingsliderlite-slide-content {
128
  position: absolute !important;
129
  top: 0;
130
  left: 0;
131
  }
132
 
133
+ .easingsliderlite-slide-content .caption.left {
134
  top: 0px !important;
135
  left: 0px !important;
136
  }
137
 
138
+ .easingsliderlite-slide-content .caption.right {
139
  top: 0px !important;
140
  right: 0px !important;
141
  }
142
 
143
+ .easingsliderlite-slide-content .caption.top {
144
  top: 0px !important;
145
  left: 0px !important;
146
  }
147
 
148
+ .easingsliderlite-slide-content .caption.bottom {
149
  bottom: 0px !important;
150
  left: 0px !important;
151
  }
152
 
153
  /* ===== Anything below here can be edited. Have fun! ===== */
154
+ .easingsliderlite-arrows {
155
  position: absolute;
156
  top: 46%;
157
  width: 30px;
169
  transition: opacity 0.25s linear;
170
  }
171
 
172
+ .easingsliderlite-next.inside {
173
  right: 10px;
174
  background-position: 0px -29px;
175
  }
176
 
177
+ .easingsliderlite-next.outside {
178
  right: -40px;
179
  padding-left: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
180
  background-position: 20px -29px;
181
  }
182
 
183
+ .easingsliderlite-prev.inside {
184
  left: 10px;
185
  }
186
 
187
+ .easingsliderlite-prev.outside {
188
  left: -40px;
189
  padding-right: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
190
  }
191
 
192
+ .easingsliderlite-pagination {
193
  position: absolute;
194
  z-index: 30;
195
  opacity: 0; /** Slideshow will set to this 1 when it has loaded */
200
  transition: opacity 0.25s linear;
201
  }
202
 
203
+ .easingsliderlite-pagination.inside.bottom-left {
204
  bottom: 10px;
205
  left: 10px;
206
  }
207
 
208
+ .easingsliderlite-pagination.inside.bottom-right {
209
  bottom: 10px;
210
  right: 10px;
211
  }
212
 
213
+ .easingsliderlite-pagination.inside.bottom-center {
214
  bottom: 10px;
215
  left: 0;
216
  width: 100%;
217
  text-align: center;
218
  }
219
 
220
+ .easingsliderlite-pagination.inside.top-left {
221
  top: 10px;
222
  left: 10px;
223
  }
224
 
225
+ .easingsliderlite-pagination.inside.top-right {
226
  top: 10px;
227
  right: 10px;
228
  }
229
 
230
+ .easingsliderlite-pagination.inside.top-center {
231
  top: 10px;
232
  left: 0;
233
  width: 100%;
234
  text-align: center;
235
  }
236
 
237
+ .easingsliderlite-pagination.outside.bottom-left {
238
  bottom: -25px;
239
  left: 0px;
240
  padding-top: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
241
  }
242
 
243
+ .easingsliderlite-pagination.outside.bottom-right {
244
  bottom: -25px;
245
  right: 0px;
246
  padding-top: 20px;
247
  }
248
 
249
+ .easingsliderlite-pagination.outside.bottom-center {
250
  bottom: -25px;
251
  left: 0;
252
  width: 100%;
254
  padding-top: 20px;
255
  }
256
 
257
+ .easingsliderlite-pagination.outside.top-left {
258
  top: -25px;
259
  left: 0px;
260
  padding-bottom: 20px;
261
  }
262
 
263
+ .easingsliderlite-pagination.outside.top-right {
264
  top: -25px;
265
  right: 0px;
266
  padding-bottom: 20px;
267
  }
268
 
269
+ .easingsliderlite-pagination.outside.top-center {
270
  top: -25px;
271
  left: 0;
272
  width: 100%;
274
  padding-bottom: 20px;
275
  }
276
 
277
+ .easingsliderlite-icon {
278
  width: 14px;
279
  height: 14px;
280
  background-image: url(../images/slideshow_icons.png);
285
  cursor: pointer;
286
  }
287
 
288
+ .easingsliderlite-icon:last-child {
289
  margin-right: 0px;
290
  }
291
 
292
+ .easingsliderlite-icon.active {
293
  background-position: 0px -14px;
294
  }
295
 
296
+ .easingsliderlite-slide-content .caption {
297
  background-color: #000; /** Fallback for rgba unsupported browsers */
298
  background-color: rgba(0, 0, 0, 0.5);
299
  color: #fff;
301
  margin: 20px;
302
  }
303
 
304
+ .active .easingsliderlite-slide-content .caption {
305
  -webkit-animation-duration: 0.25s;
306
  -moz-animation-duration: 0.25s;
307
  -o-animation-duration: 0.25s;
css/slideshow.min.css CHANGED
@@ -1 +1 @@
1
- .rivasliderlite,.rivasliderlite-viewport,.rivasliderlite-slides-container,.rivasliderlite-slide,.rivasliderlite-preload{margin:0!important;padding:0!important;border:0!important;line-height:0!important;outline:none!important}.rivasliderlite{position:relative!important}.rivasliderlite-preload{background:url(../images/loading.gif) no-repeat center center #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.rivasliderlite-arrows.has-hover{opacity:0}.rivasliderlite:hover .rivasliderlite-arrows.has-hover{opacity:1}.rivasliderlite-pagination.has-hover{opacity:0}.rivasliderlite:hover .rivasliderlite-pagination.has-hover{opacity:1}.rivasliderlite-viewport{position:relative!important;overflow:hidden!important;z-index:10!important}.rivasliderlite-slides-container{overflow:hidden!important;position:absolute!important;top:0;left:0;display:block!important}.rivasliderlite.use-css3 .rivasliderlite-slides-container{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.rivasliderlite.use-slide.use-css3 .rivasliderlite-slides-container{-webkit-transition:-webkit-transform .5s ease;-moz-transition:-moz-transform .5s ease;-ms-transition:-ms-transform .5s ease;-o-transition:-o-transform .5s ease;transition:transform .5s ease}.rivasliderlite.use-fade.use-css3 .rivasliderlite-slides-container{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.rivasliderlite.use-slide .rivasliderlite-slide{float:left!important;position:relative!important}.rivasliderlite.use-fade .rivasliderlite-slide{position:absolute!important;top:0!important;left:0!important}.rivasliderlite.use-fade .rivasliderlite-slide.active{z-index:10}.rivasliderlite-slide{width:100%}.rivasliderlite-slide>a{display:block!important}.rivasliderlite-image{width:100%!important;max-width:100%!important;display:block!important}.rivasliderlite-slide-content{position:absolute!important;top:0;left:0}.rivasliderlite-slide-content .caption.left{top:0!important;left:0!important}.rivasliderlite-slide-content .caption.right{top:0!important;right:0!important}.rivasliderlite-slide-content .caption.top{top:0!important;left:0!important}.rivasliderlite-slide-content .caption.bottom{bottom:0!important;left:0!important}.rivasliderlite-arrows{position:absolute;top:46%;width:30px;height:30px;background-image:url(../images/slideshow_arrows.png);background-repeat:no-repeat;background-position:0 0;z-index:30;cursor:pointer;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.rivasliderlite-next.inside{right:10px;background-position:0 -29px}.rivasliderlite-next.outside{right:-40px;padding-left:20px;background-position:20px -29px}.rivasliderlite-prev.inside{left:10px}.rivasliderlite-prev.outside{left:-40px;padding-right:20px}.rivasliderlite-pagination{position:absolute;z-index:30;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.rivasliderlite-pagination.inside.bottom-left{bottom:10px;left:10px}.rivasliderlite-pagination.inside.bottom-right{bottom:10px;right:10px}.rivasliderlite-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.rivasliderlite-pagination.inside.top-left{top:10px;left:10px}.rivasliderlite-pagination.inside.top-right{top:10px;right:10px}.rivasliderlite-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.rivasliderlite-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.rivasliderlite-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.rivasliderlite-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.rivasliderlite-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.rivasliderlite-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.rivasliderlite-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.rivasliderlite-icon{width:14px;height:14px;background-image:url(../images/slideshow_icons.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;z-index:30;cursor:pointer}.rivasliderlite-icon:last-child{margin-right:0}.rivasliderlite-icon.active{background-position:0 -14px}.rivasliderlite-slide-content .caption{background-color:#000;background-color:rgba(0,0,0,0.5);color:#fff;padding:20px;margin:20px}.active .rivasliderlite-slide-content .caption{-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;-o-animation-delay:.5s;animation-delay:.5s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}
1
+ .easingsliderlite,.easingsliderlite-viewport,.easingsliderlite-slides-container,.easingsliderlite-slide,.easingsliderlite-image,.easingsliderlite-preload{margin:0!important;padding:0!important;border:0!important;line-height:0!important;outline:none!important}.easingsliderlite{position:relative!important}.easingsliderlite-preload{background:url(../images/loading.gif) no-repeat center center #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:50!important}.easingsliderlite-arrows.has-hover{opacity:0}.easingsliderlite:hover .easingsliderlite-arrows.has-hover{opacity:1}.easingsliderlite-pagination.has-hover{opacity:0}.easingsliderlite:hover .easingsliderlite-pagination.has-hover{opacity:1}.easingsliderlite-viewport{position:relative!important;overflow:hidden!important;z-index:10!important}.easingsliderlite-slides-container{overflow:hidden!important;position:absolute!important;top:0;left:0;display:block!important}.easingsliderlite.use-css3 .easingsliderlite-slides-container{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.easingsliderlite.use-slide.use-css3 .easingsliderlite-slides-container{-webkit-transition:-webkit-transform .5s ease;-moz-transition:-moz-transform .5s ease;-ms-transition:-ms-transform .5s ease;-o-transition:-o-transform .5s ease;transition:transform .5s ease}.easingsliderlite.use-fade.use-css3 .easingsliderlite-slides-container{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.easingsliderlite.use-slide .easingsliderlite-slide{float:left!important;position:relative!important}.easingsliderlite.use-fade .easingsliderlite-slide{position:absolute!important;top:0!important;left:0!important}.easingsliderlite.use-fade .easingsliderlite-slide.active{z-index:10}.easingsliderlite-slide{width:100%}.easingsliderlite-slide>a{display:block!important}.easingsliderlite-image{width:100%!important;max-width:100%!important;display:block!important}.easingsliderlite-slide-content{position:absolute!important;top:0;left:0}.easingsliderlite-slide-content .caption.left{top:0!important;left:0!important}.easingsliderlite-slide-content .caption.right{top:0!important;right:0!important}.easingsliderlite-slide-content .caption.top{top:0!important;left:0!important}.easingsliderlite-slide-content .caption.bottom{bottom:0!important;left:0!important}.easingsliderlite-arrows{position:absolute;top:46%;width:30px;height:30px;background-image:url(../images/slideshow_arrows.png);background-repeat:no-repeat;background-position:0 0;z-index:30;cursor:pointer;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.easingsliderlite-next.inside{right:10px;background-position:0 -29px}.easingsliderlite-next.outside{right:-40px;padding-left:20px;background-position:20px -29px}.easingsliderlite-prev.inside{left:10px}.easingsliderlite-prev.outside{left:-40px;padding-right:20px}.easingsliderlite-pagination{position:absolute;z-index:30;opacity:0;-webkit-transition:opacity .25s linear;-moz-transition:opacity .25s linear;-ms-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.easingsliderlite-pagination.inside.bottom-left{bottom:10px;left:10px}.easingsliderlite-pagination.inside.bottom-right{bottom:10px;right:10px}.easingsliderlite-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.easingsliderlite-pagination.inside.top-left{top:10px;left:10px}.easingsliderlite-pagination.inside.top-right{top:10px;right:10px}.easingsliderlite-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.easingsliderlite-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.easingsliderlite-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.easingsliderlite-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.easingsliderlite-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.easingsliderlite-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.easingsliderlite-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.easingsliderlite-icon{width:14px;height:14px;background-image:url(../images/slideshow_icons.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;z-index:30;cursor:pointer}.easingsliderlite-icon:last-child{margin-right:0}.easingsliderlite-icon.active{background-position:0 -14px}.easingsliderlite-slide-content .caption{background-color:#000;background-color:rgba(0,0,0,0.5);color:#fff;padding:20px;margin:20px}.active .easingsliderlite-slide-content .caption{-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:.5s;-moz-animation-delay:.5s;-o-animation-delay:.5s;animation-delay:.5s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}
rivasliderlite.php → easingsliderlite.php RENAMED
@@ -1,12 +1,12 @@
1
  <?php
2
 
3
  /*
4
- Plugin Name: Riva Slider "Lite"
5
- Plugin URI: http://rivaslider.com/
6
- Version: 2.0
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
- Description: An easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
10
  License: GNU General Public License v2.0 or later
11
  License URI: http://www.opensource.org/licenses/gpl-license.php
12
 
@@ -27,11 +27,11 @@
27
  */
28
 
29
  /** Load all of the necessary class files for the plugin */
30
- spl_autoload_register( 'RivaSliderLite::autoload' );
31
 
32
  /** Let's go! */
33
- if ( class_exists( 'RivaSliderLite' ) )
34
- RivaSliderLite::get_instance();
35
 
36
  /**
37
  * Main plugin class
@@ -39,7 +39,7 @@ if ( class_exists( 'RivaSliderLite' ) )
39
  * @author Matthew Ruddy
40
  * @since 2.0
41
  */
42
- class RivaSliderLite {
43
 
44
  /**
45
  * Class instance
@@ -60,7 +60,7 @@ class RivaSliderLite {
60
  *
61
  * @since 2.0
62
  */
63
- public static $version = '2.0';
64
 
65
  /**
66
  * Arrays of admin messages
@@ -70,11 +70,11 @@ class RivaSliderLite {
70
  public $admin_messages = array();
71
 
72
  /**
73
- * Flag for indicating that we are on a RivaSliderLite plugin page
74
  *
75
  * @since 2.0
76
  */
77
- private $is_rivasliderlite_page = false;
78
 
79
  /**
80
  * PSR-0 compliant autoloader to load classes as needed.
@@ -83,10 +83,10 @@ class RivaSliderLite {
83
  */
84
  public static function autoload( $classname ) {
85
 
86
- if ( 'RSL' !== substr( $classname, 0, 3 ) )
87
  return;
88
 
89
- $filename = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . str_replace( 'RSL_', '', $classname ) . '.php';
90
  require $filename;
91
 
92
  }
@@ -121,22 +121,22 @@ class RivaSliderLite {
121
  private function __construct() {
122
 
123
  /** Load plugin textdomain for language capabilities */
124
- load_plugin_textdomain( 'rivasliderlite', false, dirname( plugin_basename( self::get_file() ) ) . '/languages' );
125
 
126
  /** Activation and deactivation hooks. Static methods are used to avoid activation/uninstallation scoping errors. */
127
  if ( is_multisite() ) {
128
  register_activation_hook( __FILE__, array( __CLASS__, 'do_network_activation' ) );
129
- register_deactivation_hook( __FILE__, array( __CLASS__, 'do_network_uninstall' ) );
130
- //register_uninstall_hook( __FILE__, array( __CLASS__, 'do_network_uninstall' ) );
131
  }
132
  else {
133
  register_activation_hook( __FILE__, array( __CLASS__, 'do_activation' ) );
134
- register_deactivation_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
135
- //register_uninstall_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
136
  }
137
 
138
  /** Plugin shortcodes */
 
139
  add_shortcode( 'rivasliderlite', array( $this, 'do_shortcode' ) );
 
140
 
141
  /** Plugin actions */
142
  add_action( 'init', array( $this, 'register_all_styles' ) );
@@ -148,26 +148,26 @@ class RivaSliderLite {
148
  add_action( 'wp_before_admin_bar_render', array( $this, 'add_admin_bar_links' ) );
149
 
150
  /** Do plugin upgrades */
151
- add_action( 'admin_init', array( 'RSL_Upgrade', 'do_upgrades' ) );
152
 
153
  /** Register our custom widget */
154
- add_action( 'widgets_init', create_function( '', 'register_widget( "RSL_Widget" );' ) );
155
 
156
  /** Some hooks for our own custom actions */
157
- add_action( 'rivasliderlite_edit_slideshow_actions', array( $this, 'do_slideshow_actions' ) );
158
- add_action( 'rivasliderlite_edit_settings_actions', array( $this, 'do_settings_actions' ) );
159
 
160
  /** Get plugin settings */
161
- $settings = get_option( 'rivasliderlite_settings' );
162
 
163
  /** Load slideshow scripts & styles in the header if set to do so */
164
  if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'header' )
165
- add_action( 'wp_enqueue_scripts', array( 'RSL_Slideshow', 'enqueue_styles' ) );
166
  if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'header' )
167
- add_action( 'wp_enqueue_scripts', array( 'RSL_Slideshow', 'enqueue_scripts' ) );
168
 
169
  /** Initialization hook for adding external functionality */
170
- do_action_ref_array( 'rivasliderlite', array( $this ) );
171
 
172
  }
173
 
@@ -229,7 +229,7 @@ class RivaSliderLite {
229
  }
230
 
231
  /** Trigger hooks */
232
- do_action_ref_array( 'rivasliderlite_network_activate', array( $this ) );
233
 
234
  }
235
 
@@ -251,7 +251,7 @@ class RivaSliderLite {
251
  }
252
 
253
  /** Trigger hooks */
254
- do_action_ref_array( 'rivasliderlite_network_uninstall', array( $this ) );
255
 
256
  }
257
 
@@ -267,23 +267,23 @@ class RivaSliderLite {
267
  return;
268
 
269
  /** Add "wp_options" table options */
270
- add_option( 'rivasliderlite_version', self::$version );
271
- add_option( 'rivasliderlite_slideshow', $this->defaults() );
272
- add_option( 'rivasliderlite_settings',
273
  array(
274
  'resizing' => true,
275
  'load_styles' => 'header',
276
  'load_scripts' => 'header'
277
  )
278
  );
279
- add_option( 'rivasliderlite_easingslider_upgrade', 0 );
280
- add_option( 'rivasliderlite_disable_welcome_panel', 0 );
281
 
282
  /** Add user capabilities */
283
  $this->manage_capabilities( 'add' );
284
 
285
  /** Trigger hooks */
286
- do_action_ref_array( 'rivasliderlite_activate', array( $this ) );
287
 
288
  }
289
 
@@ -295,17 +295,17 @@ class RivaSliderLite {
295
  public function uninstall() {
296
 
297
  /** Delete "wp_options" table options */
298
- delete_option( 'rivasliderlite_version' );
299
- delete_option( 'rivasliderlite_slideshow' );
300
- delete_option( 'rivasliderlite_settings' );
301
- delete_option( 'rivasliderlite_easingslider_upgrade' );
302
- delete_option( 'rivasliderlite_disable_welcome_panel' );
303
 
304
  /** Remove user capabilities */
305
  $this->manage_capabilities( 'remove' );
306
 
307
  /** Trigger hooks */
308
- do_action_ref_array( 'rivasliderlite_uninstall', array( $this ) );
309
 
310
  }
311
 
@@ -319,7 +319,7 @@ class RivaSliderLite {
319
  global $wp_version;
320
  if ( version_compare( $wp_version, '3.5', '<' ) ) {
321
  deactivate_plugins( plugin_basename( __FILE__ ) );
322
- wp_die( __( sprintf( 'Sorry, but your version of WordPress, <strong>%s</strong>, is not supported. The plugin has been deactivated. <a href="%s">Return to the Dashboard.</a>', $wp_version, admin_url() ), 'rivasliderlite' ) );
323
  return false;
324
  }
325
  return true;
@@ -360,7 +360,7 @@ class RivaSliderLite {
360
  public function defaults() {
361
 
362
  /** Get the current user to be assigned as the slideshow author */
363
- $author = __( 'Unknown', 'rivasliderlite' );
364
  if ( function_exists( 'wp_get_current_user' ) )
365
  $author = wp_get_current_user()->user_login;
366
 
@@ -372,7 +372,7 @@ class RivaSliderLite {
372
  $object->transitions = (object) array( 'effect' => 'slide', 'duration' => 500 );
373
  $object->navigation = (object) array( 'arrows' => true, 'arrows_hover' => false, 'arrows_position' => 'inside', 'pagination' => true, 'pagination_hover' => false, 'pagination_position' => 'inside', 'pagination_location' => 'bottom-center' );
374
  $object->playback = (object) array( 'enabled' => true, 'pause' => 4000 );
375
- return apply_filters( 'rivasliderlite_slideshow_defaults', $object );
376
 
377
  }
378
 
@@ -383,10 +383,10 @@ class RivaSliderLite {
383
  */
384
  public function capabilities() {
385
  $capabilities = array(
386
- 'rivasliderlite_edit_slideshow',
387
- 'rivasliderlite_edit_settings'
388
  );
389
- $capabilities = apply_filters( 'rivasliderlite_capabilities', $capabilities );
390
  return $capabilities;
391
  }
392
 
@@ -402,7 +402,7 @@ class RivaSliderLite {
402
  /** Get the capabilities */
403
  $capabilities = $this->capabilities();
404
 
405
- /** Add capability for each applicable user roel */
406
  foreach ( $wp_roles->roles as $role => $info ) {
407
  $user_role = get_role( $role );
408
  foreach ( $capabilities as $capability ) {
@@ -444,38 +444,38 @@ class RivaSliderLite {
444
 
445
  /** Hook suffixs for admin menus */
446
  $suffixes = array();
447
- $pages = array( 'rivasliderlite_edit_slideshow', 'rivasliderlite_edit_settings' );
448
 
449
  /** Toplevel menu */
450
  $hook_suffixes[] = add_menu_page(
451
- __( 'Slideshow', 'rivasliderlite' ),
452
- __( 'Slideshow', 'rivasliderlite' ),
453
- 'rivasliderlite_edit_slideshow',
454
- 'rivasliderlite_edit_slideshow',
455
  null
456
  );
457
 
458
  /** Submenus */
459
  $hook_suffixes[] = add_submenu_page(
460
- 'rivasliderlite_edit_slideshow',
461
- __( 'Edit Slideshow', 'rivasliderlite' ),
462
- __( 'Edit Slideshow', 'rivasliderlite' ),
463
- 'rivasliderlite_edit_slideshow',
464
- 'rivasliderlite_edit_slideshow',
465
  array( $this, 'edit_slideshow_view' )
466
  );
467
  $hook_suffixes[] = add_submenu_page(
468
- 'rivasliderlite_edit_slideshow',
469
- __( 'Edit Settings', 'rivasliderlite' ),
470
- __( 'Settings', 'rivasliderlite' ),
471
- 'rivasliderlite_edit_settings',
472
- 'rivasliderlite_edit_settings',
473
  array( $this, 'edit_settings_view' )
474
  );
475
 
476
  /** Set flag if we are on one of our own plugin pages */
477
  if ( isset( $_GET['page'] ) && in_array( $_GET['page'], $pages ) )
478
- $this->is_rivasliderlite_page = true;
479
 
480
  /** Load our scripts and styles for our plugin menus */
481
  foreach ( $hook_suffixes as $hook_suffix ) {
@@ -499,8 +499,8 @@ class RivaSliderLite {
499
  $wp_admin_bar->add_menu(
500
  array(
501
  'id' => 'slideshows-top_menu',
502
- 'title' => __( 'Slideshow', 'rivasliderlite' ),
503
- 'href' => admin_url( "admin.php?page=rivasliderlite_edit_slideshow" )
504
  )
505
  );
506
 
@@ -509,16 +509,16 @@ class RivaSliderLite {
509
  array(
510
  'parent' => 'slideshows-top_menu',
511
  'id' => 'edit-slideshow-sub_menu',
512
- 'title' => __( 'Edit Slideshow', 'rivasliderlite' ),
513
- 'href' => admin_url( "admin.php?page=rivasliderlite_edit_slideshow" )
514
  )
515
  );
516
  $wp_admin_bar->add_menu(
517
  array(
518
  'parent' => 'slideshows-top_menu',
519
  'id' => 'edit-settings-sub_menu',
520
- 'title' => __( 'Settings', 'rivasliderlite' ),
521
- 'href' => admin_url( "admin.php?page=rivasliderlite_edit_settings" )
522
  )
523
  );
524
 
@@ -546,12 +546,12 @@ class RivaSliderLite {
546
  </style>
547
  <script type="text/javascript">
548
  function insertSlideshow() {
549
- send_to_editor( '[rivasliderlite]' );
550
  tb_close();
551
  return false;
552
  }
553
  </script>
554
- <a onClick="insertSlideshow();" class="button insert-slideshow" data-editor="<?php echo esc_attr( $editor_id ); ?>" title="<?php _e( 'Add a slideshow', 'rivasliderlite' ); ?>"><?php echo $img . __( 'Add Slideshow', 'rivasliderlite' ); ?></a>
555
  <?php
556
  }
557
 
@@ -562,7 +562,7 @@ class RivaSliderLite {
562
  */
563
  public function queue_message( $text, $type ) {
564
  $message = "<div class='message $type'><p>$text</p></div>";
565
- add_action( 'rivasliderlite_admin_messages', create_function( '', 'echo "'. $message .'";' ) );
566
  }
567
 
568
  /**
@@ -571,7 +571,7 @@ class RivaSliderLite {
571
  * @since 2.0
572
  */
573
  public function security_check( $action, $page ) {
574
- if ( check_admin_referer( "rivasliderlite-{$action}_{$page}", "rivasliderlite-{$action}_{$page}" ) )
575
  return true;
576
  return false;
577
  }
@@ -594,8 +594,8 @@ class RivaSliderLite {
594
  */
595
  public function do_actions() {
596
 
597
- /** Bail if we aren't on a RivaSliderLite page */
598
- if ( !$this->is_rivasliderlite_page )
599
  return;
600
 
601
  /** Do admin actions */
@@ -612,19 +612,19 @@ class RivaSliderLite {
612
 
613
  /** Disable welcome panel if it is dismissed */
614
  if ( isset( $_GET['disable_welcome_panel'] ) )
615
- update_option( 'rivasliderlite_disable_welcome_panel', filter_var( $_GET['disable_welcome_panel'], FILTER_VALIDATE_BOOLEAN ) );
616
 
617
  /** Save or update a slideshow. Whichever is appropriate. */
618
  if ( isset( $_POST['save'] ) ) {
619
 
620
  /** Security check. Page is hardcoded to prevent errors when adding a new slidesow) */
621
- if ( !$this->security_check( 'save', 'rivasliderlite_edit_slideshow' ) ) {
622
- wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'rivasliderlite' ) );
623
  exit();
624
  }
625
 
626
  /** Updates the slideshow */
627
- $slideshow = update_option( 'rivasliderlite_slideshow',
628
  (object) array(
629
  'author' => stripslashes_deep( $_POST['author'] ),
630
  'slides' => json_decode( stripslashes_deep( $_POST['slides'] ) ), /** Slides are stored as JSON string and need to be decoded before being saved. */
@@ -637,7 +637,7 @@ class RivaSliderLite {
637
  );
638
 
639
  /** Return success message */
640
- return $this->queue_message( __( 'Slideshow has been <strong>saved</strong> successfully.', 'rivasliderlite' ), 'updated' );
641
 
642
  }
643
 
@@ -653,6 +653,12 @@ class RivaSliderLite {
653
  /** Removes old legacy Easing Slider settings */
654
  if ( isset( $_POST['easingslider'] ) ) {
655
 
 
 
 
 
 
 
656
  /** Horrific amount of options. God I was bad back then! */
657
  $options = array(
658
  'sImg1', 'sImg2', 'sImg3', 'sImg4', 'sImg5', 'sImg6', 'sImg7', 'sImg8', 'sImg9', 'sImg10',
@@ -667,7 +673,25 @@ class RivaSliderLite {
667
  delete_option( $option );
668
 
669
  /** Queue message */
670
- return $this->queue_message( __( 'Easing Slider settings have been permanently deleted!', 'rivasliderlite' ), 'updated' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
 
672
  }
673
 
@@ -676,7 +700,7 @@ class RivaSliderLite {
676
 
677
  /** Security check */
678
  if ( !$this->security_check( 'save', $page ) ) {
679
- wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'rivasliderlite' ) );
680
  exit();
681
  }
682
 
@@ -684,10 +708,10 @@ class RivaSliderLite {
684
  $settings = $this->validate( $_POST['settings'] );
685
 
686
  /** Update database option and get response */
687
- $response = update_option( 'rivasliderlite_settings', stripslashes_deep( $settings ) );
688
 
689
  /** Show update message */
690
- return $this->queue_message( __( 'Settings have been <strong>saved</strong> successfully.', 'rivasliderlite' ), 'updated' );
691
 
692
  }
693
 
@@ -729,15 +753,6 @@ class RivaSliderLite {
729
  return stripslashes_deep( $values );
730
 
731
  }
732
-
733
- /**
734
- * Validates all of the objects within given values
735
- *
736
- * @since 2.0
737
- */
738
- public function validate_all() {
739
-
740
- }
741
 
742
  /**
743
  * Executes a shortcode handler
@@ -747,13 +762,13 @@ class RivaSliderLite {
747
  public function do_shortcode() {
748
 
749
  /** Get the slideshow */
750
- $slideshow = RSL_Slideshow::get_instance()->display_slideshow();
751
 
752
  /** Display the slideshow (or error message if it doesn't exist) */
753
  if ( is_wp_error( $slideshow ) )
754
  return $slideshow->get_error_message();
755
  else
756
- return $slideshow;
757
 
758
  }
759
 
@@ -765,7 +780,7 @@ class RivaSliderLite {
765
  public function register_all_styles() {
766
 
767
  /** Get the extension */
768
- $ext = ( apply_filters( 'rivasliderlite_style_debug', __return_false() ) === true ) ? '.css' : '.min.css';
769
 
770
  /** Register styles */
771
  wp_register_style( 'rsd-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'admin'. $ext ), false, self::$version );
@@ -781,7 +796,7 @@ class RivaSliderLite {
781
  public function register_all_scripts() {
782
 
783
  /** Get the extension */
784
- $ext = ( apply_filters( 'rivasliderlite_script_debug', __return_false() ) ) ? '.js' : '.min.js';
785
 
786
  /** Register scripts */
787
  wp_register_script( 'rsd-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'admin'. $ext ), array( 'jquery', 'jquery-ui-sortable', 'backbone' ), self::$version, true);
@@ -800,7 +815,7 @@ class RivaSliderLite {
800
  wp_enqueue_style( 'rsd-admin' );
801
 
802
  /** Load your custom admin styles here */
803
- do_action( 'rivasliderlite_enqueue_admin_styles' );
804
 
805
  }
806
 
@@ -818,10 +833,10 @@ class RivaSliderLite {
818
  wp_enqueue_script( 'rsd-admin' );
819
 
820
  /** Print Localized variables */
821
- wp_localize_script( 'rsd-admin', 'rivasliderlite', $this->localizations() );
822
 
823
  /** Load your custom admin scripts here */
824
- do_action( 'rivasliderlite_enqueue_admin_scripts' );
825
 
826
  }
827
 
@@ -833,13 +848,13 @@ class RivaSliderLite {
833
  public function localizations() {
834
  return array(
835
  'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( self::get_file() ) ) .'/',
836
- 'delete_image' => __( 'Are you sure you wish to delete this image? This cannot be reversed.', 'rivasliderlite' ),
837
- 'delete_images' => __( 'Are you sure you wish to delete all of this slideshows images? This cannot be reversed.', 'rivasliderlite' ),
838
  'media_upload' => array(
839
- 'title' => __( 'Add Images to Slideshow', 'rivasliderlite' ),
840
- 'button' => __( 'Insert into slideshow', 'rivasliderlite' ),
841
- 'change' => __( 'Use this image', 'rivasliderlite' ),
842
- 'discard_changes' => __( 'Are you sure you wish to discard changes?', 'rivasliderlite' )
843
  )
844
  );
845
  }
@@ -851,8 +866,8 @@ class RivaSliderLite {
851
  */
852
  public function print_backbone_templates() {
853
 
854
- /** Bail if not a RivaSliderLite page */
855
- if ( !$this->is_rivasliderlite_page )
856
  return;
857
 
858
  /** Slide template */
@@ -902,13 +917,18 @@ class RivaSliderLite {
902
  * @author Matthew Ruddy
903
  * @since 2.0
904
  */
 
 
 
 
 
905
  if ( !function_exists( 'rivasliderlite' ) ) {
906
  function rivasliderlite() {
907
- echo RSL_Slideshow::get_instance()->display_slideshow();
908
  }
909
  }
910
  if ( !function_exists( 'easing_slider' ) ) {
911
  function easing_slider() {
912
- echo RSL_Slideshow::get_instance()->display_slideshow();
913
  }
914
  }
1
  <?php
2
 
3
  /*
4
+ Plugin Name: Easing Slider "Lite"
5
+ Plugin URI: http://easingslider.com/
6
+ Version: 2.0.1
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
+ Description: Easing Slider "Lite" is an easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
10
  License: GNU General Public License v2.0 or later
11
  License URI: http://www.opensource.org/licenses/gpl-license.php
12
 
27
  */
28
 
29
  /** Load all of the necessary class files for the plugin */
30
+ spl_autoload_register( 'EasingSliderLite::autoload' );
31
 
32
  /** Let's go! */
33
+ if ( class_exists( 'EasingSliderLite' ) )
34
+ EasingSliderLite::get_instance();
35
 
36
  /**
37
  * Main plugin class
39
  * @author Matthew Ruddy
40
  * @since 2.0
41
  */
42
+ class EasingSliderLite {
43
 
44
  /**
45
  * Class instance
60
  *
61
  * @since 2.0
62
  */
63
+ public static $version = '2.0.1';
64
 
65
  /**
66
  * Arrays of admin messages
70
  public $admin_messages = array();
71
 
72
  /**
73
+ * Flag for indicating that we are on a EasingSliderLite plugin page
74
  *
75
  * @since 2.0
76
  */
77
+ private $is_easingsliderlite_page = false;
78
 
79
  /**
80
  * PSR-0 compliant autoloader to load classes as needed.
83
  */
84
  public static function autoload( $classname ) {
85
 
86
+ if ( 'ESL' !== substr( $classname, 0, 3 ) )
87
  return;
88
 
89
+ $filename = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . str_replace( 'ESL_', '', $classname ) . '.php';
90
  require $filename;
91
 
92
  }
121
  private function __construct() {
122
 
123
  /** Load plugin textdomain for language capabilities */
124
+ load_plugin_textdomain( 'easingsliderlite', false, dirname( plugin_basename( self::get_file() ) ) . '/languages' );
125
 
126
  /** Activation and deactivation hooks. Static methods are used to avoid activation/uninstallation scoping errors. */
127
  if ( is_multisite() ) {
128
  register_activation_hook( __FILE__, array( __CLASS__, 'do_network_activation' ) );
129
+ register_uninstall_hook( __FILE__, array( __CLASS__, 'do_network_uninstall' ) );
 
130
  }
131
  else {
132
  register_activation_hook( __FILE__, array( __CLASS__, 'do_activation' ) );
133
+ register_uninstall_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
 
134
  }
135
 
136
  /** Plugin shortcodes */
137
+ add_shortcode( 'easingsliderlite', array( $this, 'do_shortcode' ) );
138
  add_shortcode( 'rivasliderlite', array( $this, 'do_shortcode' ) );
139
+ add_shortcode( 'easingslider', array( $this, 'do_shortcode' ) );
140
 
141
  /** Plugin actions */
142
  add_action( 'init', array( $this, 'register_all_styles' ) );
148
  add_action( 'wp_before_admin_bar_render', array( $this, 'add_admin_bar_links' ) );
149
 
150
  /** Do plugin upgrades */
151
+ add_action( 'admin_init', array( 'ESL_Upgrade', 'do_upgrades' ) );
152
 
153
  /** Register our custom widget */
154
+ add_action( 'widgets_init', create_function( '', 'register_widget( "ESL_Widget" );' ) );
155
 
156
  /** Some hooks for our own custom actions */
157
+ add_action( 'easingsliderlite_edit_slideshow_actions', array( $this, 'do_slideshow_actions' ) );
158
+ add_action( 'easingsliderlite_edit_settings_actions', array( $this, 'do_settings_actions' ) );
159
 
160
  /** Get plugin settings */
161
+ $settings = get_option( 'easingsliderlite_settings' );
162
 
163
  /** Load slideshow scripts & styles in the header if set to do so */
164
  if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'header' )
165
+ add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_styles' ) );
166
  if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'header' )
167
+ add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_scripts' ) );
168
 
169
  /** Initialization hook for adding external functionality */
170
+ do_action_ref_array( 'easingsliderlite', array( $this ) );
171
 
172
  }
173
 
229
  }
230
 
231
  /** Trigger hooks */
232
+ do_action_ref_array( 'easingsliderlite_network_activate', array( $this ) );
233
 
234
  }
235
 
251
  }
252
 
253
  /** Trigger hooks */
254
+ do_action_ref_array( 'easingsliderlite_network_uninstall', array( $this ) );
255
 
256
  }
257
 
267
  return;
268
 
269
  /** Add "wp_options" table options */
270
+ add_option( 'easingsliderlite_version', self::$version );
271
+ add_option( 'easingsliderlite_slideshow', $this->defaults() );
272
+ add_option( 'easingsliderlite_settings',
273
  array(
274
  'resizing' => true,
275
  'load_styles' => 'header',
276
  'load_scripts' => 'header'
277
  )
278
  );
279
+ add_option( 'easingsliderlite_major_upgrade', 0 );
280
+ add_option( 'easingsliderlite_disable_welcome_panel', 0 );
281
 
282
  /** Add user capabilities */
283
  $this->manage_capabilities( 'add' );
284
 
285
  /** Trigger hooks */
286
+ do_action_ref_array( 'easingsliderlite_activate', array( $this ) );
287
 
288
  }
289
 
295
  public function uninstall() {
296
 
297
  /** Delete "wp_options" table options */
298
+ delete_option( 'easingsliderlite_version' );
299
+ delete_option( 'easingsliderlite_slideshow' );
300
+ delete_option( 'easingsliderlite_settings' );
301
+ delete_option( 'easingsliderlite_major_upgrade' );
302
+ delete_option( 'easingsliderlite_disable_welcome_panel' );
303
 
304
  /** Remove user capabilities */
305
  $this->manage_capabilities( 'remove' );
306
 
307
  /** Trigger hooks */
308
+ do_action_ref_array( 'easingsliderlite_uninstall', array( $this ) );
309
 
310
  }
311
 
319
  global $wp_version;
320
  if ( version_compare( $wp_version, '3.5', '<' ) ) {
321
  deactivate_plugins( plugin_basename( __FILE__ ) );
322
+ wp_die( __( sprintf( 'Sorry, but your version of WordPress, <strong>%s</strong>, is not supported. The plugin has been deactivated. <a href="%s">Return to the Dashboard.</a>', $wp_version, admin_url() ), 'easingsliderlite' ) );
323
  return false;
324
  }
325
  return true;
360
  public function defaults() {
361
 
362
  /** Get the current user to be assigned as the slideshow author */
363
+ $author = __( 'Unknown', 'easingsliderlite' );
364
  if ( function_exists( 'wp_get_current_user' ) )
365
  $author = wp_get_current_user()->user_login;
366
 
372
  $object->transitions = (object) array( 'effect' => 'slide', 'duration' => 500 );
373
  $object->navigation = (object) array( 'arrows' => true, 'arrows_hover' => false, 'arrows_position' => 'inside', 'pagination' => true, 'pagination_hover' => false, 'pagination_position' => 'inside', 'pagination_location' => 'bottom-center' );
374
  $object->playback = (object) array( 'enabled' => true, 'pause' => 4000 );
375
+ return apply_filters( 'easingsliderlite_slideshow_defaults', $object );
376
 
377
  }
378
 
383
  */
384
  public function capabilities() {
385
  $capabilities = array(
386
+ 'easingsliderlite_edit_slideshow',
387
+ 'easingsliderlite_edit_settings'
388
  );
389
+ $capabilities = apply_filters( 'easingsliderlite_capabilities', $capabilities );
390
  return $capabilities;
391
  }
392
 
402
  /** Get the capabilities */
403
  $capabilities = $this->capabilities();
404
 
405
+ /** Add capability for each applicable user role */
406
  foreach ( $wp_roles->roles as $role => $info ) {
407
  $user_role = get_role( $role );
408
  foreach ( $capabilities as $capability ) {
444
 
445
  /** Hook suffixs for admin menus */
446
  $suffixes = array();
447
+ $pages = array( 'easingsliderlite_edit_slideshow', 'easingsliderlite_edit_settings' );
448
 
449
  /** Toplevel menu */
450
  $hook_suffixes[] = add_menu_page(
451
+ __( 'Slideshow', 'easingsliderlite' ),
452
+ __( 'Slideshow', 'easingsliderlite' ),
453
+ 'easingsliderlite_edit_slideshow',
454
+ 'easingsliderlite_edit_slideshow',
455
  null
456
  );
457
 
458
  /** Submenus */
459
  $hook_suffixes[] = add_submenu_page(
460
+ 'easingsliderlite_edit_slideshow',
461
+ __( 'Edit Slideshow', 'easingsliderlite' ),
462
+ __( 'Edit Slideshow', 'easingsliderlite' ),
463
+ 'easingsliderlite_edit_slideshow',
464
+ 'easingsliderlite_edit_slideshow',
465
  array( $this, 'edit_slideshow_view' )
466
  );
467
  $hook_suffixes[] = add_submenu_page(
468
+ 'easingsliderlite_edit_slideshow',
469
+ __( 'Edit Settings', 'easingsliderlite' ),
470
+ __( 'Settings', 'easingsliderlite' ),
471
+ 'easingsliderlite_edit_settings',
472
+ 'easingsliderlite_edit_settings',
473
  array( $this, 'edit_settings_view' )
474
  );
475
 
476
  /** Set flag if we are on one of our own plugin pages */
477
  if ( isset( $_GET['page'] ) && in_array( $_GET['page'], $pages ) )
478
+ $this->is_easingsliderlite_page = true;
479
 
480
  /** Load our scripts and styles for our plugin menus */
481
  foreach ( $hook_suffixes as $hook_suffix ) {
499
  $wp_admin_bar->add_menu(
500
  array(
501
  'id' => 'slideshows-top_menu',
502
+ 'title' => __( 'Slideshow', 'easingsliderlite' ),
503
+ 'href' => admin_url( "admin.php?page=easingsliderlite_edit_slideshow" )
504
  )
505
  );
506
 
509
  array(
510
  'parent' => 'slideshows-top_menu',
511
  'id' => 'edit-slideshow-sub_menu',
512
+ 'title' => __( 'Edit Slideshow', 'easingsliderlite' ),
513
+ 'href' => admin_url( "admin.php?page=easingsliderlite_edit_slideshow" )
514
  )
515
  );
516
  $wp_admin_bar->add_menu(
517
  array(
518
  'parent' => 'slideshows-top_menu',
519
  'id' => 'edit-settings-sub_menu',
520
+ 'title' => __( 'Settings', 'easingsliderlite' ),
521
+ 'href' => admin_url( "admin.php?page=easingsliderlite_edit_settings" )
522
  )
523
  );
524
 
546
  </style>
547
  <script type="text/javascript">
548
  function insertSlideshow() {
549
+ send_to_editor( '[easingsliderlite]' );
550
  tb_close();
551
  return false;
552
  }
553
  </script>
554
+ <a onClick="insertSlideshow();" class="button insert-slideshow" data-editor="<?php echo esc_attr( $editor_id ); ?>" title="<?php _e( 'Add a slideshow', 'easingsliderlite' ); ?>"><?php echo $img . __( 'Add Slideshow', 'easingsliderlite' ); ?></a>
555
  <?php
556
  }
557
 
562
  */
563
  public function queue_message( $text, $type ) {
564
  $message = "<div class='message $type'><p>$text</p></div>";
565
+ add_action( 'easingsliderlite_admin_messages', create_function( '', 'echo "'. $message .'";' ) );
566
  }
567
 
568
  /**
571
  * @since 2.0
572
  */
573
  public function security_check( $action, $page ) {
574
+ if ( check_admin_referer( "easingsliderlite-{$action}_{$page}", "easingsliderlite-{$action}_{$page}" ) )
575
  return true;
576
  return false;
577
  }
594
  */
595
  public function do_actions() {
596
 
597
+ /** Bail if we aren't on a EasingSliderLite page */
598
+ if ( !$this->is_easingsliderlite_page )
599
  return;
600
 
601
  /** Do admin actions */
612
 
613
  /** Disable welcome panel if it is dismissed */
614
  if ( isset( $_GET['disable_welcome_panel'] ) )
615
+ update_option( 'easingsliderlite_disable_welcome_panel', filter_var( $_GET['disable_welcome_panel'], FILTER_VALIDATE_BOOLEAN ) );
616
 
617
  /** Save or update a slideshow. Whichever is appropriate. */
618
  if ( isset( $_POST['save'] ) ) {
619
 
620
  /** Security check. Page is hardcoded to prevent errors when adding a new slidesow) */
621
+ if ( !$this->security_check( 'save', 'easingsliderlite_edit_slideshow' ) ) {
622
+ wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'easingsliderlite' ) );
623
  exit();
624
  }
625
 
626
  /** Updates the slideshow */
627
+ $slideshow = update_option( 'easingsliderlite_slideshow',
628
  (object) array(
629
  'author' => stripslashes_deep( $_POST['author'] ),
630
  'slides' => json_decode( stripslashes_deep( $_POST['slides'] ) ), /** Slides are stored as JSON string and need to be decoded before being saved. */
637
  );
638
 
639
  /** Return success message */
640
+ return $this->queue_message( __( 'Slideshow has been <strong>saved</strong> successfully.', 'easingsliderlite' ), 'updated' );
641
 
642
  }
643
 
653
  /** Removes old legacy Easing Slider settings */
654
  if ( isset( $_POST['easingslider'] ) ) {
655
 
656
+ /** Security check */
657
+ if ( !$this->security_check( 'easingslider', $page ) ) {
658
+ wp_die( __( 'Security check has failed. Action has been prevented. Please try again.', 'easingsliderlite' ) );
659
+ exit();
660
+ }
661
+
662
  /** Horrific amount of options. God I was bad back then! */
663
  $options = array(
664
  'sImg1', 'sImg2', 'sImg3', 'sImg4', 'sImg5', 'sImg6', 'sImg7', 'sImg8', 'sImg9', 'sImg10',
673
  delete_option( $option );
674
 
675
  /** Queue message */
676
+ return $this->queue_message( __( 'Easing Slider settings have been permanently deleted!', 'easingsliderlite' ), 'updated' );
677
+
678
+ }
679
+
680
+ /** Reset plugin */
681
+ if ( isset( $_POST['reset'] ) ) {
682
+
683
+ /** Security check */
684
+ if ( !$this->security_check( 'reset', $page ) ) {
685
+ wp_die( __( 'Security check has failed. Reset has been prevented. Please try again.', 'easingsliderlite' ) );
686
+ exit();
687
+ }
688
+
689
+ /** Do reset */
690
+ $this->uninstall();
691
+ $this->activate();
692
+
693
+ /** Queue message */
694
+ return $this->queue_message( __( 'Plugin has been reset successfully.', 'easingsliderlite' ), 'updated' );
695
 
696
  }
697
 
700
 
701
  /** Security check */
702
  if ( !$this->security_check( 'save', $page ) ) {
703
+ wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'easingsliderlite' ) );
704
  exit();
705
  }
706
 
708
  $settings = $this->validate( $_POST['settings'] );
709
 
710
  /** Update database option and get response */
711
+ $response = update_option( 'easingsliderlite_settings', stripslashes_deep( $settings ) );
712
 
713
  /** Show update message */
714
+ return $this->queue_message( __( 'Settings have been <strong>saved</strong> successfully.', 'easingsliderlite' ), 'updated' );
715
 
716
  }
717
 
753
  return stripslashes_deep( $values );
754
 
755
  }
 
 
 
 
 
 
 
 
 
756
 
757
  /**
758
  * Executes a shortcode handler
762
  public function do_shortcode() {
763
 
764
  /** Get the slideshow */
765
+ $slideshow = ESL_Slideshow::get_instance()->display_slideshow();
766
 
767
  /** Display the slideshow (or error message if it doesn't exist) */
768
  if ( is_wp_error( $slideshow ) )
769
  return $slideshow->get_error_message();
770
  else
771
+ return trim( $slideshow );
772
 
773
  }
774
 
780
  public function register_all_styles() {
781
 
782
  /** Get the extension */
783
+ $ext = ( apply_filters( 'easingsliderlite_style_debug', __return_false() ) === true ) ? '.css' : '.min.css';
784
 
785
  /** Register styles */
786
  wp_register_style( 'rsd-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'admin'. $ext ), false, self::$version );
796
  public function register_all_scripts() {
797
 
798
  /** Get the extension */
799
+ $ext = ( apply_filters( 'easingsliderlite_script_debug', __return_false() ) ) ? '.js' : '.min.js';
800
 
801
  /** Register scripts */
802
  wp_register_script( 'rsd-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'admin'. $ext ), array( 'jquery', 'jquery-ui-sortable', 'backbone' ), self::$version, true);
815
  wp_enqueue_style( 'rsd-admin' );
816
 
817
  /** Load your custom admin styles here */
818
+ do_action( 'easingsliderlite_enqueue_admin_styles' );
819
 
820
  }
821
 
833
  wp_enqueue_script( 'rsd-admin' );
834
 
835
  /** Print Localized variables */
836
+ wp_localize_script( 'rsd-admin', 'easingsliderlite', $this->localizations() );
837
 
838
  /** Load your custom admin scripts here */
839
+ do_action( 'easingsliderlite_enqueue_admin_scripts' );
840
 
841
  }
842
 
848
  public function localizations() {
849
  return array(
850
  'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( self::get_file() ) ) .'/',
851
+ 'delete_image' => __( 'Are you sure you wish to delete this image? This cannot be reversed.', 'easingsliderlite' ),
852
+ 'delete_images' => __( 'Are you sure you wish to delete all of this slideshows images? This cannot be reversed.', 'easingsliderlite' ),
853
  'media_upload' => array(
854
+ 'title' => __( 'Add Images to Slideshow', 'easingsliderlite' ),
855
+ 'button' => __( 'Insert into slideshow', 'easingsliderlite' ),
856
+ 'change' => __( 'Use this image', 'easingsliderlite' ),
857
+ 'discard_changes' => __( 'Are you sure you wish to discard changes?', 'easingsliderlite' )
858
  )
859
  );
860
  }
866
  */
867
  public function print_backbone_templates() {
868
 
869
+ /** Bail if not a EasingSliderLite page */
870
+ if ( !$this->is_easingsliderlite_page )
871
  return;
872
 
873
  /** Slide template */
917
  * @author Matthew Ruddy
918
  * @since 2.0
919
  */
920
+ if ( !function_exists( 'easingsliderlite' ) ) {
921
+ function easingsliderlite() {
922
+ echo ESL_Slideshow::get_instance()->display_slideshow();
923
+ }
924
+ }
925
  if ( !function_exists( 'rivasliderlite' ) ) {
926
  function rivasliderlite() {
927
+ echo ESL_Slideshow::get_instance()->display_slideshow();
928
  }
929
  }
930
  if ( !function_exists( 'easing_slider' ) ) {
931
  function easing_slider() {
932
+ echo ESL_Slideshow::get_instance()->display_slideshow();
933
  }
934
  }
includes/Resize.php CHANGED
@@ -6,8 +6,8 @@
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
- add_action( 'delete_attachment', array( 'RSL_Resize', 'destroy' ) );
10
- class RSL_Resize {
11
 
12
  /**
13
  * Main resizing function
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
+ add_action( 'delete_attachment', array( 'ESL_Resize', 'destroy' ) );
10
+ class ESL_Resize {
11
 
12
  /**
13
  * Main resizing function
includes/Slideshow.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
- class RSL_Slideshow {
10
 
11
  /**
12
  * Class instance
@@ -39,7 +39,7 @@ class RSL_Slideshow {
39
  wp_enqueue_style( 'rsd-slideshow' );
40
 
41
  /** Trigger actions */
42
- do_action( 'rivasliderlite_enqueue_styles' );
43
 
44
  }
45
 
@@ -51,7 +51,7 @@ class RSL_Slideshow {
51
  public static function enqueue_scripts() {
52
 
53
  /** Get plugin settings */
54
- $settings = get_option( 'rivasliderlite_settings' );
55
 
56
  /** Load jQuery */
57
  wp_enqueue_script( 'jquery' );
@@ -60,7 +60,7 @@ class RSL_Slideshow {
60
  wp_enqueue_script( 'rsd-slideshow' );
61
 
62
  /** Trigger actions */
63
- do_action( 'rivasliderlite_enqueue_scripts' );
64
 
65
  }
66
 
@@ -73,7 +73,7 @@ class RSL_Slideshow {
73
 
74
  /** Display the slideshow */
75
  ob_start();
76
- require dirname( RivaSliderLite::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'slideshow.php';
77
  return ob_get_clean();
78
 
79
  }
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
+ class ESL_Slideshow {
10
 
11
  /**
12
  * Class instance
39
  wp_enqueue_style( 'rsd-slideshow' );
40
 
41
  /** Trigger actions */
42
+ do_action( 'easingsliderlite_enqueue_styles' );
43
 
44
  }
45
 
51
  public static function enqueue_scripts() {
52
 
53
  /** Get plugin settings */
54
+ $settings = get_option( 'easingsliderlite_settings' );
55
 
56
  /** Load jQuery */
57
  wp_enqueue_script( 'jquery' );
60
  wp_enqueue_script( 'rsd-slideshow' );
61
 
62
  /** Trigger actions */
63
+ do_action( 'easingsliderlite_enqueue_scripts' );
64
 
65
  }
66
 
73
 
74
  /** Display the slideshow */
75
  ob_start();
76
+ require dirname( EasingSliderLite::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'slideshow.php';
77
  return ob_get_clean();
78
 
79
  }
includes/Upgrade.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
- class RSL_Upgrade {
10
 
11
  /**
12
  * Upgrade from Easing Slider
@@ -16,33 +16,68 @@ class RSL_Upgrade {
16
  public static final function do_upgrades() {
17
 
18
  /** Get current plugin version */
19
- $version = get_option( 'rivasliderlite_version' );
20
 
21
  /** Let the upgrades begin! */
22
- if ( self::should_do_easingslider_upgrade() )
23
- self::easingslider_upgrade();
24
-
25
- /** Custom hooks */
26
- do_action( 'rivasliderlite_upgrades', RivaSliderLite::$version, $version );
27
 
28
  /** Bail if we are already up to date */
29
- if ( $version == RivaSliderLite::$version )
30
  return;
31
 
 
 
 
 
 
 
 
32
  /** Update plugin version */
33
- update_option( 'rivasliderlite_version', RivaSliderLite::$version );
34
 
35
  }
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  /**
38
  * Checks if we should do an Easing Slider upgrade procedure
39
  *
40
  * @since 2.0
41
  */
42
- public static final function should_do_easingslider_upgrade() {
43
 
44
  if ( get_option( 'easingslider_version' ) !== false || get_option( 'activation' ) !== false ) {
45
- if ( !!get_option( 'rivasliderlite_easingslider_upgrade' ) === false )
46
  return true;
47
  }
48
  return false;
@@ -50,21 +85,22 @@ class RSL_Upgrade {
50
  }
51
 
52
  /**
53
- * Upgrade settings from Easing Slider
54
  *
55
  * @since 2.0
56
  */
57
- public static final function easingslider_upgrade() {
58
 
59
  /** Fire plugin activation (won't have been fired by upgrade) */
60
- RivaSliderLite::get_instance()->activate();
61
 
62
  /** Get current slideshow settings */
63
- $slideshow = RivaSliderLite::get_instance()->defaults();
64
 
65
  /** Transfer the settings */
66
  $slideshow->dimensions->width = get_option( 'width' );
67
  $slideshow->dimensions->height = get_option( 'height' );
 
68
  $slideshow->transitions->effect = ( get_option( 'transition' ) == 'fade' ) ? 'fade' : 'slide';
69
  $slideshow->transitions->duration = get_option( 'transpeed' );
70
  $slideshow->navigation->arrows = ( get_option( 'buttons' ) == '' ) ? 'false' : 'true';
@@ -81,7 +117,7 @@ class RSL_Upgrade {
81
  continue;
82
 
83
  /** Resize the image and get its thumbnail */
84
- $resize = RSL_Resize::resize( $image, 150, 150, true );
85
  $sizes = (object) array(
86
  'thumbnail' => (object) array(
87
  'url' => $resize['url']
@@ -102,10 +138,15 @@ class RSL_Upgrade {
102
  }
103
 
104
  /** Update the slideshow settings */
105
- update_option( 'rivasliderlite_slideshow', $slideshow );
 
 
 
 
 
106
 
107
  /** Flag upgrade */
108
- update_option( 'rivasliderlite_easingslider_upgrade', 1 );
109
 
110
  }
111
  }
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
+ class ESL_Upgrade {
10
 
11
  /**
12
  * Upgrade from Easing Slider
16
  public static final function do_upgrades() {
17
 
18
  /** Get current plugin version */
19
+ $version = get_option( 'easingsliderlite_version' );
20
 
21
  /** Let the upgrades begin! */
22
+ if ( self::should_do_major_upgrade() )
23
+ self::do_major_upgrade();
 
 
 
24
 
25
  /** Bail if we are already up to date */
26
+ if ( $version == EasingSliderLite::$version )
27
  return;
28
 
29
+ /** Do 2.0 to 2.0.1 upgrade */
30
+ if ( get_option( 'rivasliderlite_version') )
31
+ self::do_201_upgrade();
32
+
33
+ /** Custom hooks */
34
+ do_action( 'easingsliderlite_upgrades', EasingSliderLite::$version, $version );
35
+
36
  /** Update plugin version */
37
+ update_option( 'easingsliderlite_version', EasingSliderLite::$version );
38
 
39
  }
40
 
41
+ /**
42
+ * Do 2.0.1 upgrades
43
+ *
44
+ * @since 2.0.1
45
+ */
46
+ public static final function do_201_upgrade() {
47
+
48
+ global $wp_roles;
49
+
50
+ /** Transfer old options for plugin name revert */
51
+ update_option( 'easingsliderlite_version', get_option( 'rivasliderlite_version' ) );
52
+ update_option( 'easingsliderlite_slideshow', get_option( 'rivasliderlite_slideshow' ) );
53
+ update_option( 'easingsliderlite_settings', get_option( 'rivasliderlite_settings' ) );
54
+ update_option( 'easingsliderlite_major_upgrade', get_option( 'rivasliderlite_easingslider_upgrade' ) );
55
+ update_option( 'easingsliderlite_disable_welcome_panel', get_option( 'rivasliderlite_disable_welcome_panel' ) );
56
+ delete_option( 'rivasliderlite_version' );
57
+ delete_option( 'rivasliderlite_slideshow' );
58
+ delete_option( 'rivasliderlite_settings' );
59
+ delete_option( 'rivasliderlite_easingslider_upgrade' );
60
+ delete_option( 'rivasliderlite_disable_welcome_panel' );
61
+
62
+ /** Remove old permissions and add new ones */
63
+ foreach ( $wp_roles->roles as $role => $info ) {
64
+ $user_role = get_role( $role );
65
+ EasingSliderLite::get_instance()->remove_capability( 'rivasliderlite_edit_slideshow', $user_role );
66
+ EasingSliderLite::get_instance()->remove_capability( 'rivasliderlite_edit_settings', $user_role );
67
+ }
68
+ EasingSliderLite::get_instance()->manage_capabilities( 'add' );
69
+ }
70
+
71
+
72
  /**
73
  * Checks if we should do an Easing Slider upgrade procedure
74
  *
75
  * @since 2.0
76
  */
77
+ public static final function should_do_major_upgrade() {
78
 
79
  if ( get_option( 'easingslider_version' ) !== false || get_option( 'activation' ) !== false ) {
80
+ if ( get_option( 'easingsliderlite_major_upgrade' ) === false )
81
  return true;
82
  }
83
  return false;
85
  }
86
 
87
  /**
88
+ * Upgrade settings from the old Easing Slider plugin
89
  *
90
  * @since 2.0
91
  */
92
+ public static final function do_major_upgrade() {
93
 
94
  /** Fire plugin activation (won't have been fired by upgrade) */
95
+ EasingSliderLite::get_instance()->activate();
96
 
97
  /** Get current slideshow settings */
98
+ $slideshow = EasingSliderLite::get_instance()->defaults();
99
 
100
  /** Transfer the settings */
101
  $slideshow->dimensions->width = get_option( 'width' );
102
  $slideshow->dimensions->height = get_option( 'height' );
103
+ $slideshow->dimensions->responsive = false;
104
  $slideshow->transitions->effect = ( get_option( 'transition' ) == 'fade' ) ? 'fade' : 'slide';
105
  $slideshow->transitions->duration = get_option( 'transpeed' );
106
  $slideshow->navigation->arrows = ( get_option( 'buttons' ) == '' ) ? 'false' : 'true';
117
  continue;
118
 
119
  /** Resize the image and get its thumbnail */
120
+ $resize = ESL_Resize::resize( $image, 150, 150, true );
121
  $sizes = (object) array(
122
  'thumbnail' => (object) array(
123
  'url' => $resize['url']
138
  }
139
 
140
  /** Update the slideshow settings */
141
+ update_option( 'easingsliderlite_slideshow', $slideshow );
142
+
143
+ /** Make some settings changes */
144
+ $settings = get_option( 'easingsliderlite_settings' );
145
+ $settings['resizing'] = false;
146
+ update_option( 'easingsliderlite_settings', $settings );
147
 
148
  /** Flag upgrade */
149
+ update_option( 'easingsliderlite_major_upgrade', 1 );
150
 
151
  }
152
  }
includes/Widget.php CHANGED
@@ -6,7 +6,7 @@
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
- class RSL_Widget extends WP_Widget {
10
 
11
  /**
12
  * Constructor
@@ -15,9 +15,9 @@ class RSL_Widget extends WP_Widget {
15
  */
16
  public function __construct() {
17
  parent::__construct(
18
- 'rivasliderlite_widget',
19
- __( 'Slideshow', 'rivasliderlite' ),
20
- array( 'description' => __( 'Display a slideshow using a widget', 'rivasliderlite' ) )
21
  );
22
  }
23
 
@@ -40,7 +40,7 @@ class RSL_Widget extends WP_Widget {
40
  echo $before_title . $title . $after_title;
41
 
42
  /** Display slideshow */
43
- echo RSL_Slideshow::get_instance()->display_slideshow();
44
 
45
  /** Display widget footer */
46
  echo $after_widget;
@@ -68,7 +68,7 @@ class RSL_Widget extends WP_Widget {
68
 
69
  ?>
70
  <p>
71
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'rivasliderlite' ); ?></label>
72
  <input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" class="widefat" value="<?php if ( isset( $instance['title'] ) ) echo esc_attr( $instance['title'] ); ?>">
73
  </p>
74
  <?php
6
  * @author Matthew Ruddy
7
  * @since 2.0
8
  */
9
+ class ESL_Widget extends WP_Widget {
10
 
11
  /**
12
  * Constructor
15
  */
16
  public function __construct() {
17
  parent::__construct(
18
+ 'easingsliderlite_widget',
19
+ __( 'Slideshow', 'easingsliderlite' ),
20
+ array( 'description' => __( 'Display a slideshow using a widget', 'easingsliderlite' ) )
21
  );
22
  }
23
 
40
  echo $before_title . $title . $after_title;
41
 
42
  /** Display slideshow */
43
+ echo ESL_Slideshow::get_instance()->display_slideshow();
44
 
45
  /** Display widget footer */
46
  echo $after_widget;
68
 
69
  ?>
70
  <p>
71
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'easingsliderlite' ); ?></label>
72
  <input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" class="widefat" value="<?php if ( isset( $instance['title'] ) ) echo esc_attr( $instance['title'] ); ?>">
73
  </p>
74
  <?php
js/admin.js CHANGED
@@ -145,7 +145,7 @@
145
  event.preventDefault();
146
 
147
  /** Remove all of the thumbnails */
148
- if ( confirm( rivasliderlite.delete_images) )
149
  self.removeThumbs.call(self, event);
150
 
151
  });
@@ -166,7 +166,7 @@
166
  event.preventDefault();
167
 
168
  /** Confirm before deleting the image */
169
- if ( confirm( rivasliderlite.delete_image ) )
170
  self.collection.remove(self.collection.get($(this).parent().attr('data-id')));
171
 
172
  });
@@ -315,7 +315,7 @@
315
  if ( current === original )
316
  this.close(event);
317
  else {
318
- if ( confirm( rivasliderlite.media_upload.discard_changes ) ) {
319
  this.model.set(this.origAttributes);
320
  this.close();
321
  }
@@ -381,8 +381,8 @@
381
  fileFrame: null,
382
 
383
  frameProperties: {
384
- title: rivasliderlite.media_upload.title,
385
- button: rivasliderlite.media_upload.button,
386
  multiple: true
387
  },
388
 
@@ -439,8 +439,8 @@
439
  window.ChangeImageView = AddImageView.extend({
440
 
441
  frameProperties: {
442
- title: rivasliderlite.media_upload.title,
443
- button: rivasliderlite.media_upload.change,
444
  multiple: false
445
  },
446
 
@@ -538,13 +538,13 @@
538
 
539
  /** Delete slideshow warnings */
540
  $('.trash a').on('click', function(event) {
541
- if ( !confirm( rivasliderlite.delete_slideshow ) )
542
  return false;
543
  });
544
  $('#doaction, #doaction2').on('click', function(event) {
545
  var id = event.target.id.replace('do', '');
546
  if ( $('#'+ id).val() == 'delete' )
547
- if ( !confirm( rivasliderlite.delete_slideshows ) )
548
  return false;
549
  });
550
 
@@ -565,6 +565,12 @@
565
  });
566
  }, 5000);
567
 
 
 
 
 
 
 
568
  /** Get slides and bail if they can't be found */
569
  if ( $('#slideshow-images').length == 0 )
570
  return;
145
  event.preventDefault();
146
 
147
  /** Remove all of the thumbnails */
148
+ if ( confirm( easingsliderlite.delete_images) )
149
  self.removeThumbs.call(self, event);
150
 
151
  });
166
  event.preventDefault();
167
 
168
  /** Confirm before deleting the image */
169
+ if ( confirm( easingsliderlite.delete_image ) )
170
  self.collection.remove(self.collection.get($(this).parent().attr('data-id')));
171
 
172
  });
315
  if ( current === original )
316
  this.close(event);
317
  else {
318
+ if ( confirm( easingsliderlite.media_upload.discard_changes ) ) {
319
  this.model.set(this.origAttributes);
320
  this.close();
321
  }
381
  fileFrame: null,
382
 
383
  frameProperties: {
384
+ title: easingsliderlite.media_upload.title,
385
+ button: easingsliderlite.media_upload.button,
386
  multiple: true
387
  },
388
 
439
  window.ChangeImageView = AddImageView.extend({
440
 
441
  frameProperties: {
442
+ title: easingsliderlite.media_upload.title,
443
+ button: easingsliderlite.media_upload.change,
444
  multiple: false
445
  },
446
 
538
 
539
  /** Delete slideshow warnings */
540
  $('.trash a').on('click', function(event) {
541
+ if ( !confirm( easingsliderlite.delete_slideshow ) )
542
  return false;
543
  });
544
  $('#doaction, #doaction2').on('click', function(event) {
545
  var id = event.target.id.replace('do', '');
546
  if ( $('#'+ id).val() == 'delete' )
547
+ if ( !confirm( easingsliderlite.delete_slideshows ) )
548
  return false;
549
  });
550
 
565
  });
566
  }, 5000);
567
 
568
+ /** Show warning prompts */
569
+ $('.warn').on('click', function() {
570
+ if ( !confirm('Are you sure you want to do this? This cannot be reversed.' ) )
571
+ return false;
572
+ });
573
+
574
  /** Get slides and bail if they can't be found */
575
  if ( $('#slideshow-images').length == 0 )
576
  return;
js/admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(function(a){window.TemplateLoader={get:function(b){if(!this.templates){this.templates={}}var c=this.templates[b];if(!c){c=a(b).html();c=_.template(c);this.templates[b]=c}return c}};window.Slide=Backbone.Model.extend({defaults:{url:null,sizes:null,alt:null,title:null,link:null,linkTarget:"_blank",},});window.SlideCollection=Backbone.Collection.extend({model:Slide,primary:0,initialize:function(){var b=this;this.on("add",this.addModel,this);this.on("remove",this.removeModel,this);this.on("reset",this.resetData,this);this.on("change",this.resetData,this);setTimeout(function(){_.each(b.models,function(c){b.primary++})})},addModel:function(b){this.primary++;b.set({id:this.primary},{silent:true});this.reset(this.models,{silent:true});this.resetData()},removeModel:function(){var b=this;this.resetIDs();this.reset(this.models,{silent:true});this.resetData()},resetData:function(){a("#slideshow-images").val(JSON.stringify(this))},resetIDs:function(){var b=this;this.primary=0;_.each(this.models,function(c){b.primary++;c.set({id:b.primary},{silent:true})});return this},});window.SlideView=Backbone.View.extend({$container:a(".thumbnails-container .inner"),initialize:function(){var b=this;this.template=TemplateLoader.get("#tmpl-slide");this.collection.on("add",this.addThumb,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.collection.on("change:url",this.render,this);a(".delete-images").on("click",function(c){c.preventDefault();if(confirm(rivasliderlite.delete_images)){b.removeThumbs.call(b,c)}});a(".add-image").on("click",function(c){c.preventDefault();addImageView.render()});a(document).on("click",".delete-button",function(c){c.preventDefault();if(confirm(rivasliderlite.delete_image)){b.collection.remove(b.collection.get(a(this).parent().attr("data-id")))}});a(document).on("click",".thumbnails-container img",function(c){c.preventDefault();var e=a(this).parent().attr("data-id"),d=new EditSlideView({model:b.collection.get(e)});a(d.render().el).appendTo("body").focus()})},addThumb:function(b){this.$container.append(this.template(b.toJSON()))},removeThumbs:function(b){b.preventDefault();this.$container.empty();this.collection.reset();this.collection.primary=0},render:function(){var b=this;this.$container.empty();_.each(this.collection.models,function(c){b.$container.append(b.template(c.toJSON()))});return this}});window.EditSlideView=Backbone.View.extend({attributes:{tabindex:0},changeImageView:null,events:{change:"change","click .media-modal-backdrop, .media-modal-close":"discardChanges","click .change-image":"changeImage","click .media-modal-save":"close","click .media-menu-item":"toggleTab",keydown:"keyDown"},initialize:function(){this.origAttributes=_.clone(this.model.attributes);this.template=TemplateLoader.get("#tmpl-edit-slide");this.model.on("change:url",this.resetThumbnail,this)},toggleTab:function(b){b.preventDefault();var c=b.target.dataset.tab;a(".media-menu-item").removeClass("active");a(b.target).addClass("active");a(".media-tab",this.$el).each(function(){if(this.id===c){a(this).show()}else{a(this).hide()}})},close:function(b){b.preventDefault();this.remove();if(this.changeImageView){this.changeImageView.remove()}},change:function(b){var c=b.target,d={};d[c.id]=c.value;this.model.set(d)},discardChanges:function(c){c.preventDefault();var d=JSON.stringify(this.model.attributes),b=JSON.stringify(this.origAttributes);if(d===b){this.close(c)}else{if(confirm(rivasliderlite.media_upload.discard_changes)){this.model.set(this.origAttributes);this.close()}}},resetThumbnail:function(b,e){var d=b.get("sizes"),c=d.large||d.medium||d.thumbnail;this.$(".slide-thumbnail").attr("src",c.url)},changeImage:function(c){c.preventDefault();var b=this;if(this.changeImageView===null){this.changeImageView=new ChangeImageView({id:this.model.get("id"),model:this.model})}this.changeImageView.render();a(".media-modal-backdrop").first().hide();this.changeImageView.fileFrame.on("close",function(){a(".media-modal-backdrop").first().show();b.$el.focus()})},keyDown:function(b){if(b.keyCode===27){b.preventDefault();this.discardChanges(b);return}},render:function(){a(this.el).html(this.template(this.model.toJSON()));return this},});window.AddImageView=Backbone.View.extend({fileFrame:null,frameProperties:{title:rivasliderlite.media_upload.title,button:rivasliderlite.media_upload.button,multiple:true},modelAttributes:["url","sizes","alt","title"],initialize:function(){if(this.fileFrame){return}this.fileFrame=wp.media.frames.fileFrame=new wp.media({title:this.frameProperties.title,button:{text:this.frameProperties.button},multiple:this.frameProperties.multiple});this.fileFrame.on("select",this.onSelect,this)},onSelect:function(){var c=this.fileFrame.state().get("selection"),b=this;_.each(c.models,function(e){var f={};for(var d in b.modelAttributes){f[b.modelAttributes[d]]=e.get(b.modelAttributes[d])}b.collection.add([f])})},render:function(){this.fileFrame.open()}});window.ChangeImageView=AddImageView.extend({frameProperties:{title:rivasliderlite.media_upload.title,button:rivasliderlite.media_upload.change,multiple:false},onSelect:function(){var c=this.fileFrame.state().get("selection"),d=c.models[0],e={};
2
- for(var b in this.modelAttributes){e[this.modelAttributes[b]]=d.get(this.modelAttributes[b])}this.model.set(e)},remove:function(){AddImageView.prototype.remove.apply(this,arguments);this.fileFrame.modal.$el.remove();this.fileFrame.uploader.$browser.remove()},});wp.media.view.Attachment.Details.prototype.template=wp.media.template("image-details");a(".sidebar-name").on("click",function(){var c=a(this).parent(),b=c.find(".sidebar-content");if(!c.hasClass("exclude")){a(".sidebar-name").each(function(){var d=a(this).parent();if(!d.hasClass("exclude")&&!d.hasClass("closed")){d.find(".sidebar-content").slideUp(200,function(){d.addClass("closed")})}})}if(c.hasClass("closed")){b.slideDown(200,function(){c.removeClass("closed")})}else{b.slideUp(200,function(){c.addClass("closed")})}});a(".thumbnails-container").sortable({items:".thumbnail",containment:"parent",tolerance:"pointer",stop:function(d,e){var b=[],f=[];a(this).find(".thumbnail").each(function(){b.push(a(this).attr("data-id"))});for(var c=0;c<b.length;c++){f.push(slideCollection.get(b[c]))}slideCollection.reset(f).resetIDs().resetData()}});a(".trash a").on("click",function(b){if(!confirm(rivasliderlite.delete_slideshow)){return false}});a("#doaction, #doaction2").on("click",function(b){var c=b.target.id.replace("do","");if(a("#"+c).val()=="delete"){if(!confirm(rivasliderlite.delete_slideshows)){return false}}});a(".multiple-checkbox .select-all").on("click",function(b){if(a(this).hasClass("checked")){a(this).removeClass("checked").parents("ul").find("input").removeAttr("checked")}else{a(this).addClass("checked").parents("ul").find("input").attr("checked","checked")}});setTimeout(function(){a(".message").not(".permanent").each(function(){a(this).fadeOut(400,function(){a(this).remove()})})},5000);if(a("#slideshow-images").length==0){return}window.slideCollection=new SlideCollection(JSON.parse(a("#slideshow-images").val()));window.slideView=new SlideView({collection:slideCollection});window.addImageView=new AddImageView({collection:slideCollection})})(jQuery);
1
+ "use strict";(function(a){window.TemplateLoader={get:function(b){if(!this.templates){this.templates={}}var c=this.templates[b];if(!c){c=a(b).html();c=_.template(c);this.templates[b]=c}return c}};window.Slide=Backbone.Model.extend({defaults:{url:null,sizes:null,alt:null,title:null,link:null,linkTarget:"_blank",},});window.SlideCollection=Backbone.Collection.extend({model:Slide,primary:0,initialize:function(){var b=this;this.on("add",this.addModel,this);this.on("remove",this.removeModel,this);this.on("reset",this.resetData,this);this.on("change",this.resetData,this);setTimeout(function(){_.each(b.models,function(c){b.primary++})})},addModel:function(b){this.primary++;b.set({id:this.primary},{silent:true});this.reset(this.models,{silent:true});this.resetData()},removeModel:function(){var b=this;this.resetIDs();this.reset(this.models,{silent:true});this.resetData()},resetData:function(){a("#slideshow-images").val(JSON.stringify(this))},resetIDs:function(){var b=this;this.primary=0;_.each(this.models,function(c){b.primary++;c.set({id:b.primary},{silent:true})});return this},});window.SlideView=Backbone.View.extend({$container:a(".thumbnails-container .inner"),initialize:function(){var b=this;this.template=TemplateLoader.get("#tmpl-slide");this.collection.on("add",this.addThumb,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.collection.on("change:url",this.render,this);a(".delete-images").on("click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_images)){b.removeThumbs.call(b,c)}});a(".add-image").on("click",function(c){c.preventDefault();addImageView.render()});a(document).on("click",".delete-button",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_image)){b.collection.remove(b.collection.get(a(this).parent().attr("data-id")))}});a(document).on("click",".thumbnails-container img",function(c){c.preventDefault();var e=a(this).parent().attr("data-id"),d=new EditSlideView({model:b.collection.get(e)});a(d.render().el).appendTo("body").focus()})},addThumb:function(b){this.$container.append(this.template(b.toJSON()))},removeThumbs:function(b){b.preventDefault();this.$container.empty();this.collection.reset();this.collection.primary=0},render:function(){var b=this;this.$container.empty();_.each(this.collection.models,function(c){b.$container.append(b.template(c.toJSON()))});return this}});window.EditSlideView=Backbone.View.extend({attributes:{tabindex:0},changeImageView:null,events:{change:"change","click .media-modal-backdrop, .media-modal-close":"discardChanges","click .change-image":"changeImage","click .media-modal-save":"close","click .media-menu-item":"toggleTab",keydown:"keyDown"},initialize:function(){this.origAttributes=_.clone(this.model.attributes);this.template=TemplateLoader.get("#tmpl-edit-slide");this.model.on("change:url",this.resetThumbnail,this)},toggleTab:function(b){b.preventDefault();var c=b.target.dataset.tab;a(".media-menu-item").removeClass("active");a(b.target).addClass("active");a(".media-tab",this.$el).each(function(){if(this.id===c){a(this).show()}else{a(this).hide()}})},close:function(b){b.preventDefault();this.remove();if(this.changeImageView){this.changeImageView.remove()}},change:function(b){var c=b.target,d={};d[c.id]=c.value;this.model.set(d)},discardChanges:function(c){c.preventDefault();var d=JSON.stringify(this.model.attributes),b=JSON.stringify(this.origAttributes);if(d===b){this.close(c)}else{if(confirm(easingsliderlite.media_upload.discard_changes)){this.model.set(this.origAttributes);this.close()}}},resetThumbnail:function(b,e){var d=b.get("sizes"),c=d.large||d.medium||d.thumbnail;this.$(".slide-thumbnail").attr("src",c.url)},changeImage:function(c){c.preventDefault();var b=this;if(this.changeImageView===null){this.changeImageView=new ChangeImageView({id:this.model.get("id"),model:this.model})}this.changeImageView.render();a(".media-modal-backdrop").first().hide();this.changeImageView.fileFrame.on("close",function(){a(".media-modal-backdrop").first().show();b.$el.focus()})},keyDown:function(b){if(b.keyCode===27){b.preventDefault();this.discardChanges(b);return}},render:function(){a(this.el).html(this.template(this.model.toJSON()));return this},});window.AddImageView=Backbone.View.extend({fileFrame:null,frameProperties:{title:easingsliderlite.media_upload.title,button:easingsliderlite.media_upload.button,multiple:true},modelAttributes:["url","sizes","alt","title"],initialize:function(){if(this.fileFrame){return}this.fileFrame=wp.media.frames.fileFrame=new wp.media({title:this.frameProperties.title,button:{text:this.frameProperties.button},multiple:this.frameProperties.multiple});this.fileFrame.on("select",this.onSelect,this)},onSelect:function(){var c=this.fileFrame.state().get("selection"),b=this;_.each(c.models,function(e){var f={};for(var d in b.modelAttributes){f[b.modelAttributes[d]]=e.get(b.modelAttributes[d])}b.collection.add([f])})},render:function(){this.fileFrame.open()}});window.ChangeImageView=AddImageView.extend({frameProperties:{title:easingsliderlite.media_upload.title,button:easingsliderlite.media_upload.change,multiple:false},onSelect:function(){var c=this.fileFrame.state().get("selection"),d=c.models[0],e={};
2
+ for(var b in this.modelAttributes){e[this.modelAttributes[b]]=d.get(this.modelAttributes[b])}this.model.set(e)},remove:function(){AddImageView.prototype.remove.apply(this,arguments);this.fileFrame.modal.$el.remove();this.fileFrame.uploader.$browser.remove()},});wp.media.view.Attachment.Details.prototype.template=wp.media.template("image-details");a(".sidebar-name").on("click",function(){var c=a(this).parent(),b=c.find(".sidebar-content");if(!c.hasClass("exclude")){a(".sidebar-name").each(function(){var d=a(this).parent();if(!d.hasClass("exclude")&&!d.hasClass("closed")){d.find(".sidebar-content").slideUp(200,function(){d.addClass("closed")})}})}if(c.hasClass("closed")){b.slideDown(200,function(){c.removeClass("closed")})}else{b.slideUp(200,function(){c.addClass("closed")})}});a(".thumbnails-container").sortable({items:".thumbnail",containment:"parent",tolerance:"pointer",stop:function(d,e){var b=[],f=[];a(this).find(".thumbnail").each(function(){b.push(a(this).attr("data-id"))});for(var c=0;c<b.length;c++){f.push(slideCollection.get(b[c]))}slideCollection.reset(f).resetIDs().resetData()}});a(".trash a").on("click",function(b){if(!confirm(easingsliderlite.delete_slideshow)){return false}});a("#doaction, #doaction2").on("click",function(b){var c=b.target.id.replace("do","");if(a("#"+c).val()=="delete"){if(!confirm(easingsliderlite.delete_slideshows)){return false}}});a(".multiple-checkbox .select-all").on("click",function(b){if(a(this).hasClass("checked")){a(this).removeClass("checked").parents("ul").find("input").removeAttr("checked")}else{a(this).addClass("checked").parents("ul").find("input").attr("checked","checked")}});setTimeout(function(){a(".message").not(".permanent").each(function(){a(this).fadeOut(400,function(){a(this).remove()})})},5000);a(".warn").on("click",function(){if(!confirm("Are you sure you want to do this? This cannot be reversed.")){return false}});if(a("#slideshow-images").length==0){return}window.slideCollection=new SlideCollection(JSON.parse(a("#slideshow-images").val()));window.slideView=new SlideView({collection:slideCollection});window.addImageView=new AddImageView({collection:slideCollection})})(jQuery);
js/slideshow.js CHANGED
@@ -1,7 +1,7 @@
1
  ;(function($) {
2
 
3
  /** Main plugin object */
4
- $.RivaSliderLite = function(el) {
5
 
6
  /** Core variables */
7
  var base = this,
@@ -10,13 +10,13 @@
10
  /** Cache the slideshow elements */
11
  base.el = el;
12
  base.$el = $(base.el);
13
- base.$viewport = base.$el.find('.rivasliderlite-viewport');
14
- base.$container = base.$viewport.find('.rivasliderlite-slides-container');
15
- base.$slides = base.$container.find('.rivasliderlite-slide');
16
- base.$images = base.$slides.find('.rivasliderlite-image');
17
 
18
  /** Get the plugin options */
19
- base.options = o = $.extend({}, $.RivaSliderLite.defaults, JSON.parse(base.$el.attr('data-options')));
20
 
21
  /** State variables */
22
  base.current = 0;
@@ -26,7 +26,7 @@
26
  base.height = o.dimensions.height;
27
 
28
  /** Store our data for external use */
29
- base.$el.data('rivasliderlite', base);
30
 
31
  /**
32
  * Constructor
@@ -50,7 +50,7 @@
50
 
51
  /** Detect touch support and set device click/touch event */
52
  base.supportsTouch = ( 'ontouchstart' in document.documentElement && o.general.enableTouch ) ? true : false;
53
- base.clickEvent = ( base.supportsTouch ) ? 'touchstart.rivasliderlite' : 'click.rivasliderlite';
54
 
55
  /** Setup navigation elements */
56
  if ( o.navigation.arrows )
@@ -108,7 +108,7 @@
108
  base.$el.addClass('is-responsive');
109
 
110
  /** Resize slideshow on window resize */
111
- $(window).on('resize.rivasliderlite', function(event) {
112
 
113
  /** Queue custom resize end event */
114
  clearTimeout(base.resizeEnd);
@@ -152,7 +152,7 @@
152
  });
153
 
154
  /** Trigger a resize now */
155
- $(window).trigger('resize.rivasliderlite');
156
 
157
  };
158
 
@@ -165,8 +165,8 @@
165
  base._setupArrows = function() {
166
 
167
  /** Get and display the navigation */
168
- var $next = $('.rivasliderlite-next'),
169
- $prev = $('.rivasliderlite-prev'),
170
  $arrows = $().add($next).add($prev);
171
 
172
  /** Bind click events */
@@ -202,7 +202,7 @@
202
  base._setupPagination = function() {
203
 
204
  /** Get & display the navigation */
205
- var $pagination = $('.rivasliderlite-pagination'),
206
  $icons = $pagination.children('div');
207
 
208
  /** Bind click events */
@@ -250,7 +250,7 @@
250
  $.get(src, function() {
251
  index++;
252
  if ( base.count == index ) {
253
- base.$el.find('.rivasliderlite-preload').animate({ 'opacity': 0 }, { duration: 200, complete: function() {
254
  $(this).remove();
255
  base.$el.trigger('load');
256
  }});
@@ -554,7 +554,7 @@
554
  };
555
 
556
  /** Quick a dirty hack for allowing users to override plugin methods with their own */
557
- base = $.extend({}, base, $.RivaSliderLite.extensions);
558
 
559
  /** Initialize the plugin */
560
  base.initialize();
@@ -567,7 +567,7 @@
567
  * @author Matthew Ruddy
568
  * @since 2.0
569
  */
570
- $.RivaSliderLite.defaults = {
571
  general: {
572
  enableCSS3: true,
573
  },
@@ -601,18 +601,18 @@
601
  * @author Matthew Ruddy
602
  * @since 2.0
603
  */
604
- $.RivaSliderLite.extensions = {};
605
 
606
  /** Initiates the plugin on each element */
607
- $.fn.RivaSliderLite = function() {
608
  return this.each(function() {
609
- new $.RivaSliderLite(this);
610
  });
611
  };
612
 
613
  /** Let's go! */
614
  $(document).ready(function() {
615
- $('.rivasliderlite').RivaSliderLite();
616
  });
617
 
618
  })(jQuery);
1
  ;(function($) {
2
 
3
  /** Main plugin object */
4
+ $.EasingSliderLite = function(el) {
5
 
6
  /** Core variables */
7
  var base = this,
10
  /** Cache the slideshow elements */
11
  base.el = el;
12
  base.$el = $(base.el);
13
+ base.$viewport = base.$el.find('.easingsliderlite-viewport');
14
+ base.$container = base.$viewport.find('.easingsliderlite-slides-container');
15
+ base.$slides = base.$container.find('.easingsliderlite-slide');
16
+ base.$images = base.$slides.find('.easingsliderlite-image');
17
 
18
  /** Get the plugin options */
19
+ base.options = o = $.extend({}, $.EasingSliderLite.defaults, JSON.parse(base.$el.attr('data-options')));
20
 
21
  /** State variables */
22
  base.current = 0;
26
  base.height = o.dimensions.height;
27
 
28
  /** Store our data for external use */
29
+ base.$el.data('easingsliderlite', base);
30
 
31
  /**
32
  * Constructor
50
 
51
  /** Detect touch support and set device click/touch event */
52
  base.supportsTouch = ( 'ontouchstart' in document.documentElement && o.general.enableTouch ) ? true : false;
53
+ base.clickEvent = ( base.supportsTouch ) ? 'touchstart.easingsliderlite' : 'click.easingsliderlite';
54
 
55
  /** Setup navigation elements */
56
  if ( o.navigation.arrows )
108
  base.$el.addClass('is-responsive');
109
 
110
  /** Resize slideshow on window resize */
111
+ $(window).on('resize.easingsliderlite', function(event) {
112
 
113
  /** Queue custom resize end event */
114
  clearTimeout(base.resizeEnd);
152
  });
153
 
154
  /** Trigger a resize now */
155
+ $(window).trigger('resize.easingsliderlite');
156
 
157
  };
158
 
165
  base._setupArrows = function() {
166
 
167
  /** Get and display the navigation */
168
+ var $next = $('.easingsliderlite-next'),
169
+ $prev = $('.easingsliderlite-prev'),
170
  $arrows = $().add($next).add($prev);
171
 
172
  /** Bind click events */
202
  base._setupPagination = function() {
203
 
204
  /** Get & display the navigation */
205
+ var $pagination = $('.easingsliderlite-pagination'),
206
  $icons = $pagination.children('div');
207
 
208
  /** Bind click events */
250
  $.get(src, function() {
251
  index++;
252
  if ( base.count == index ) {
253
+ base.$el.find('.easingsliderlite-preload').animate({ 'opacity': 0 }, { duration: 200, complete: function() {
254
  $(this).remove();
255
  base.$el.trigger('load');
256
  }});
554
  };
555
 
556
  /** Quick a dirty hack for allowing users to override plugin methods with their own */
557
+ base = $.extend({}, base, $.EasingSliderLite.extensions);
558
 
559
  /** Initialize the plugin */
560
  base.initialize();
567
  * @author Matthew Ruddy
568
  * @since 2.0
569
  */
570
+ $.EasingSliderLite.defaults = {
571
  general: {
572
  enableCSS3: true,
573
  },
601
  * @author Matthew Ruddy
602
  * @since 2.0
603
  */
604
+ $.EasingSliderLite.extensions = {};
605
 
606
  /** Initiates the plugin on each element */
607
+ $.fn.EasingSliderLite = function() {
608
  return this.each(function() {
609
+ new $.EasingSliderLite(this);
610
  });
611
  };
612
 
613
  /** Let's go! */
614
  $(document).ready(function() {
615
+ $('.easingsliderlite').EasingSliderLite();
616
  });
617
 
618
  })(jQuery);
js/slideshow.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(a){a.RivaSliderLite=function(b){var c=this,d;c.el=b;c.$el=a(c.el);c.$viewport=c.$el.find(".rivasliderlite-viewport");c.$container=c.$viewport.find(".rivasliderlite-slides-container");c.$slides=c.$container.find(".rivasliderlite-slide");c.$images=c.$slides.find(".rivasliderlite-image");c.options=d=a.extend({},a.RivaSliderLite.defaults,JSON.parse(c.$el.attr("data-options")));c.current=0;c.previous=0;c.count=c.$slides.length;c.width=d.dimensions.width;c.height=d.dimensions.height;c.$el.data("rivasliderlite",c);c.initialize=function(){c.$container.css({display:""});c.useCSS3=(d.general.enableCSS3)?c._supportsCSS3():false;if(c.useCSS3){c.$el.addClass("use-css3")}if(d.dimensions.responsive){c._setupResponsive()}c.supportsTouch=("ontouchstart" in document.documentElement&&d.general.enableTouch)?true:false;c.clickEvent=(c.supportsTouch)?"touchstart.rivasliderlite":"click.rivasliderlite";if(d.navigation.arrows){c._setupArrows()}if(d.navigation.pagination){c._setupPagination()}c.$slides.eq(c.current).addClass("active");c.$el.on("beforetransition",function(){c.$slides.removeClass("active").eq(c.current).addClass("active")});if(d.playback.enabled){c.$el.one("load",c.startPlayback)}c._preload();c.$el.trigger("initialize",c)};c._supportsCSS3=function(){var f=document.createElement("div"),g=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var e in g){if(typeof f.style[g[e]]!=="undefined"){c.vendorPrefix=g[e].replace("Perspective","").toLowerCase();return true}}return false};c._setupResponsive=function(){c.$el.addClass("is-responsive");a(window).on("resize.rivasliderlite",function(h){clearTimeout(c.resizeEnd);c.resizeEnd=setTimeout(function(){a(window).trigger("resizeend");delete c.resizeEnd},50);var g=c.$viewport.outerWidth(),e=c.$viewport.outerHeight();if(g===c.width){return}c.width=g;c.height=e;if(c.useCSS3&&d.transitions.effect=="slide"){var f={};f["-"+c.vendorPrefix+"-transition-duration"]="0ms";f["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.current*c.width)+"px, 0, 0)";c.$container.css(f);a(window).one("resizeend",function(){f["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration+"ms";c.$container.css(f)})}c.$slides.css({width:g+"px",height:e+"px"})});a(window).trigger("resize.rivasliderlite")};c._setupArrows=function(){var e=a(".rivasliderlite-next"),f=a(".rivasliderlite-prev"),g=a().add(e).add(f);e.on(c.clickEvent,function(h){c.nextSlide();return false});f.on(c.clickEvent,function(h){c.prevSlide();return false});if(d.navigation.arrows_hover){g.addClass("has-hover")}else{c.$el.one("load",function(){g.css({opacity:1})})}c.$el.trigger("setuparrows",c)};c._setupPagination=function(){var e=a(".rivasliderlite-pagination"),f=e.children("div");f.on(c.clickEvent,function(g){c.goToSlide(a(this).index());return false});f.eq(c.current).addClass("active");c.$el.on("beforetransition",function(){f.removeClass("active").eq(c.current).addClass("active")});if(d.navigation.pagination_hover){e.addClass("has-hover")}else{c.$el.one("load",function(){e.css({opacity:1})})}c.$el.trigger("setuppagination",c)};c._preload=function(){var e=0;c.$images.each(function(){var g=a(this),f=g.attr("src");a.get(f,function(){e++;if(c.count==e){c.$el.find(".rivasliderlite-preload").animate({opacity:0},{duration:200,complete:function(){a(this).remove();c.$el.trigger("load")}})}})});return"test"};c._transition=function(){c._beforeTransition();clearTimeout(c.afterTransition);c.afterTransition=setTimeout(function(){c._afterTransition();delete c.afterTransition},d.transitions.duration);if(d.transitions.effect=="slide"){if(c.useCSS3){var e={};e["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration;e["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.width*c.current)+"px, 0, 0)";c.$container.css(e)}else{c.$container.animate({left:"-"+(c.width*c.current)},d.transitions.duration)}}else{if(d.transitions.effect=="fade"){if(c.current===c.previous){return}c.order=(c.order)?c.order+1:1;c.$el.off("aftertransition._transition").one("aftertransition._transition",function(){c.$slides.each(function(f){var g=(f===c.current)?{"z-index":""}:{opacity:0,display:"none","z-index":""};a(this).css(g)});delete c.order;delete c.animationClear});c.$slides.eq(c.current).css({opacity:"0",display:"block","z-index":c.order}).animate({opacity:"1"},d.transitions.duration)}else{c.$el.trigger("transition",c,d.transitions.effect)}}};c._beforeTransition=function(){if(d.playback.enabled){clearTimeout(c.playbackTimer)}c.$el.trigger("beforetransition",c)};c._afterTransition=function(){if(d.playback.enabled){c.startPlayback({silent:true})}c.$el.trigger("aftertransition",c)};c.startPlayback=function(e){e=a.extend({},{silent:false},e);if(!d.playback.enabled){d.playback.enabled=true}c.runtime=new Date();c.pauseTime=d.playback.pause;c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("startplayback",c)}};c.endPlayback=function(e){e=a.extend({},{silent:false},e);if(d.playback.enabled){d.playback.enabled=false
2
- }clearTimeout(c.playbackTimer);if(!e.silent){c.$el.trigger("endplayback",c)}};c.pausePlayback=function(e){e=a.extend({},{silent:false},e);clearTimeout(c.playbackTimer);c.runtime=Math.ceil(new Date()-c.runtime);if(!e.silent){c.$el.trigger("pauseplayback",c)}};c.resumePlayback=function(e){e=a.extend({},{silent:false},e);c.pauseTime=Math.ceil(c.pauseTime-c.runtime);c.runtime=new Date();c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("resumeplayback",c)}};c.nextSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==(c.count-1))?0:(c.current+1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("nextslide",c)}};c.prevSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==0)?(c.count-1):(c.current-1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("prevslide",c)}};c.goToSlide=function(e,f){f=a.extend({},{silent:false},f);if(c.$slides.eq(e).length==0){return}c.previous=c.current;c.current=e;c._transition(c.current,c.previous,true);if(!f.silent){c.$el.trigger("gotoslide",c,e)}};c=a.extend({},c,a.RivaSliderLite.extensions);c.initialize()};a.RivaSliderLite.defaults={general:{enableCSS3:true,},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-left",},dimensions:{width:500,height:200,responsive:true,},transitions:{effect:"slide",duration:500,},playback:{enabled:false,pause:1000}};a.RivaSliderLite.extensions={};a.fn.RivaSliderLite=function(){return this.each(function(){new a.RivaSliderLite(this)})};a(document).ready(function(){a(".rivasliderlite").RivaSliderLite()})})(jQuery);
1
+ (function(a){a.EasingSliderLite=function(b){var c=this,d;c.el=b;c.$el=a(c.el);c.$viewport=c.$el.find(".easingsliderlite-viewport");c.$container=c.$viewport.find(".easingsliderlite-slides-container");c.$slides=c.$container.find(".easingsliderlite-slide");c.$images=c.$slides.find(".easingsliderlite-image");c.options=d=a.extend({},a.EasingSliderLite.defaults,JSON.parse(c.$el.attr("data-options")));c.current=0;c.previous=0;c.count=c.$slides.length;c.width=d.dimensions.width;c.height=d.dimensions.height;c.$el.data("easingsliderlite",c);c.initialize=function(){c.$container.css({display:""});c.useCSS3=(d.general.enableCSS3)?c._supportsCSS3():false;if(c.useCSS3){c.$el.addClass("use-css3")}if(d.dimensions.responsive){c._setupResponsive()}c.supportsTouch=("ontouchstart" in document.documentElement&&d.general.enableTouch)?true:false;c.clickEvent=(c.supportsTouch)?"touchstart.easingsliderlite":"click.easingsliderlite";if(d.navigation.arrows){c._setupArrows()}if(d.navigation.pagination){c._setupPagination()}c.$slides.eq(c.current).addClass("active");c.$el.on("beforetransition",function(){c.$slides.removeClass("active").eq(c.current).addClass("active")});if(d.playback.enabled){c.$el.one("load",c.startPlayback)}c._preload();c.$el.trigger("initialize",c)};c._supportsCSS3=function(){var f=document.createElement("div"),g=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var e in g){if(typeof f.style[g[e]]!=="undefined"){c.vendorPrefix=g[e].replace("Perspective","").toLowerCase();return true}}return false};c._setupResponsive=function(){c.$el.addClass("is-responsive");a(window).on("resize.easingsliderlite",function(h){clearTimeout(c.resizeEnd);c.resizeEnd=setTimeout(function(){a(window).trigger("resizeend");delete c.resizeEnd},50);var g=c.$viewport.outerWidth(),e=c.$viewport.outerHeight();if(g===c.width){return}c.width=g;c.height=e;if(c.useCSS3&&d.transitions.effect=="slide"){var f={};f["-"+c.vendorPrefix+"-transition-duration"]="0ms";f["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.current*c.width)+"px, 0, 0)";c.$container.css(f);a(window).one("resizeend",function(){f["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration+"ms";c.$container.css(f)})}c.$slides.css({width:g+"px",height:e+"px"})});a(window).trigger("resize.easingsliderlite")};c._setupArrows=function(){var e=a(".easingsliderlite-next"),f=a(".easingsliderlite-prev"),g=a().add(e).add(f);e.on(c.clickEvent,function(h){c.nextSlide();return false});f.on(c.clickEvent,function(h){c.prevSlide();return false});if(d.navigation.arrows_hover){g.addClass("has-hover")}else{c.$el.one("load",function(){g.css({opacity:1})})}c.$el.trigger("setuparrows",c)};c._setupPagination=function(){var e=a(".easingsliderlite-pagination"),f=e.children("div");f.on(c.clickEvent,function(g){c.goToSlide(a(this).index());return false});f.eq(c.current).addClass("active");c.$el.on("beforetransition",function(){f.removeClass("active").eq(c.current).addClass("active")});if(d.navigation.pagination_hover){e.addClass("has-hover")}else{c.$el.one("load",function(){e.css({opacity:1})})}c.$el.trigger("setuppagination",c)};c._preload=function(){var e=0;c.$images.each(function(){var g=a(this),f=g.attr("src");a.get(f,function(){e++;if(c.count==e){c.$el.find(".easingsliderlite-preload").animate({opacity:0},{duration:200,complete:function(){a(this).remove();c.$el.trigger("load")}})}})});return"test"};c._transition=function(){c._beforeTransition();clearTimeout(c.afterTransition);c.afterTransition=setTimeout(function(){c._afterTransition();delete c.afterTransition},d.transitions.duration);if(d.transitions.effect=="slide"){if(c.useCSS3){var e={};e["-"+c.vendorPrefix+"-transition-duration"]=d.transitions.duration;e["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.width*c.current)+"px, 0, 0)";c.$container.css(e)}else{c.$container.animate({left:"-"+(c.width*c.current)},d.transitions.duration)}}else{if(d.transitions.effect=="fade"){if(c.current===c.previous){return}c.order=(c.order)?c.order+1:1;c.$el.off("aftertransition._transition").one("aftertransition._transition",function(){c.$slides.each(function(f){var g=(f===c.current)?{"z-index":""}:{opacity:0,display:"none","z-index":""};a(this).css(g)});delete c.order;delete c.animationClear});c.$slides.eq(c.current).css({opacity:"0",display:"block","z-index":c.order}).animate({opacity:"1"},d.transitions.duration)}else{c.$el.trigger("transition",c,d.transitions.effect)}}};c._beforeTransition=function(){if(d.playback.enabled){clearTimeout(c.playbackTimer)}c.$el.trigger("beforetransition",c)};c._afterTransition=function(){if(d.playback.enabled){c.startPlayback({silent:true})}c.$el.trigger("aftertransition",c)};c.startPlayback=function(e){e=a.extend({},{silent:false},e);if(!d.playback.enabled){d.playback.enabled=true}c.runtime=new Date();c.pauseTime=d.playback.pause;c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("startplayback",c)}};c.endPlayback=function(e){e=a.extend({},{silent:false},e);if(d.playback.enabled){d.playback.enabled=false
2
+ }clearTimeout(c.playbackTimer);if(!e.silent){c.$el.trigger("endplayback",c)}};c.pausePlayback=function(e){e=a.extend({},{silent:false},e);clearTimeout(c.playbackTimer);c.runtime=Math.ceil(new Date()-c.runtime);if(!e.silent){c.$el.trigger("pauseplayback",c)}};c.resumePlayback=function(e){e=a.extend({},{silent:false},e);c.pauseTime=Math.ceil(c.pauseTime-c.runtime);c.runtime=new Date();c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("resumeplayback",c)}};c.nextSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==(c.count-1))?0:(c.current+1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("nextslide",c)}};c.prevSlide=function(e){e=a.extend({},{silent:false},e);c.previous=c.current;c.current=(c.current==0)?(c.count-1):(c.current-1);c._transition(c.current,c.previous);if(!e.silent){c.$el.trigger("prevslide",c)}};c.goToSlide=function(e,f){f=a.extend({},{silent:false},f);if(c.$slides.eq(e).length==0){return}c.previous=c.current;c.current=e;c._transition(c.current,c.previous,true);if(!f.silent){c.$el.trigger("gotoslide",c,e)}};c=a.extend({},c,a.EasingSliderLite.extensions);c.initialize()};a.EasingSliderLite.defaults={general:{enableCSS3:true,},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-left",},dimensions:{width:500,height:200,responsive:true,},transitions:{effect:"slide",duration:500,},playback:{enabled:false,pause:1000}};a.EasingSliderLite.extensions={};a.fn.EasingSliderLite=function(){return this.each(function(){new a.EasingSliderLite(this)})};a(document).ready(function(){a(".easingsliderlite").EasingSliderLite()})})(jQuery);
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
- === Riva Slider "Lite" ===
2
  Homepage: http://rivaslider.com
3
  Contributors: MatthewRuddy
4
  Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
  Requires at least: 3.5
6
  Tested up to: 3.5.1
7
- Stable tag: 2.0
8
 
9
- Riva Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
10
 
11
  == Description ==
12
 
13
- Riva Slider "Lite" is an extremely easy to use slideshow plugin for WordPress. It is built to be lightweight and simple, with absolutely no bloat. It comes with many great features, some of which include:
14
 
15
  * Fully responsive & mobile ready
16
  * Lightweight, weighing just 16kb minified including styling
@@ -22,7 +22,7 @@ Riva Slider "Lite" is an extremely easy to use slideshow plugin for WordPress. I
22
  * Developer friendly with built-in Javascript events
23
  * Lots of actions & filters for custom functionality
24
 
25
- Throughly tested on iPhone, iPad and multiple Android devices, Riva Slider "Lite" is the perfect solution for mobile slideshows. We've used CSS3 transitions to ensure ultra smooth transitions on all devices. The codebase is also extremely light (just 16kb), which is perfect for those concerned about page loading times.
26
 
27
  We've also integrated the new WordPress Media Library workflow to provide a better media management experience. Bulk uploading images to your slideshow is now easy, requiring just a few clicks.
28
 
@@ -37,16 +37,21 @@ To display the slideshow, you can use any of the following methods.
37
 
38
  Simply insert the shortcode below into the post/page to display the slideshow:
39
 
40
- `[rivasliderlite]`
41
 
42
  **Function in template files (via php):**
43
 
44
  To insert the slideshow into your theme, add the following code to the appropriate theme file:
45
 
46
- `<?php if ( function_exists( "rivasliderlite" ) ) { rivasliderlite(); } ?>`
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
50
  = 2.0 =
51
  * Too many updates to count. Completely revamped plugin from a clean slate. Hope you enjoy using it as much as I did creating it!
52
 
@@ -55,7 +60,7 @@ To insert the slideshow into your theme, add the following code to the appropria
55
  * Added: Notification for forthcoming major update.
56
 
57
  = 1.2 =
58
- * Changed: Adverts from Premium Slider to Riva Slider Pro.
59
  * Changed: When activated, plugin will now default to 'Custom Images'
60
  * Prepared plugin for major update (coming soon).
61
 
1
+ === Easing Slider "Lite" ===
2
  Homepage: http://rivaslider.com
3
  Contributors: MatthewRuddy
4
  Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
  Requires at least: 3.5
6
  Tested up to: 3.5.1
7
+ Stable tag: 2.0.1
8
 
9
+ Easing Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
10
 
11
  == Description ==
12
 
13
+ Easing Slider "Lite" is an extremely easy to use slideshow plugin for WordPress. It is built to be lightweight and simple, with absolutely no bloat. It comes with many great features, some of which include:
14
 
15
  * Fully responsive & mobile ready
16
  * Lightweight, weighing just 16kb minified including styling
22
  * Developer friendly with built-in Javascript events
23
  * Lots of actions & filters for custom functionality
24
 
25
+ Throughly tested on iPhone, iPad and multiple Android devices, Easing Slider "Lite" is the perfect solution for mobile slideshows. We've used CSS3 transitions to ensure ultra smooth transitions on all devices. The codebase is also extremely light (just 16kb), which is perfect for those concerned about page loading times.
26
 
27
  We've also integrated the new WordPress Media Library workflow to provide a better media management experience. Bulk uploading images to your slideshow is now easy, requiring just a few clicks.
28
 
37
 
38
  Simply insert the shortcode below into the post/page to display the slideshow:
39
 
40
+ `[easingsliderlite]`
41
 
42
  **Function in template files (via php):**
43
 
44
  To insert the slideshow into your theme, add the following code to the appropriate theme file:
45
 
46
+ `<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>`
47
 
48
  == Changelog ==
49
 
50
+ = 2.0.1 =
51
+ * Fixed bugs with 2.0 release. Reverted name from Riva Slider "Lite" back to Easing Slider (transition did not go as hoped, sorry).
52
+ * Fixed CSS rendering issues some users were experiencing.
53
+ * Updated plugin upgrade procedures
54
+
55
  = 2.0 =
56
  * Too many updates to count. Completely revamped plugin from a clean slate. Hope you enjoy using it as much as I did creating it!
57
 
60
  * Added: Notification for forthcoming major update.
61
 
62
  = 1.2 =
63
+ * Changed: Adverts from Premium Slider to Easing Slider Pro.
64
  * Changed: When activated, plugin will now default to 'Custom Images'
65
  * Prepared plugin for major update (coming soon).
66
 
templates/editsettings.php CHANGED
@@ -1,65 +1,67 @@
1
  <?php
2
  /** Get the plugin settings */
3
- $settings = $s = get_option( 'rivasliderlite_settings' );
4
  ?>
5
  <div class="wrap">
6
  <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
7
- <h2><?php _e( 'Edit Settings', 'rivasliderlite' ); ?></h2>
8
- <form name="post" action="admin.php?page=rivasliderlite_edit_settings" method="post">
9
  <?php
10
- /** Security nonce field */
11
- wp_nonce_field( "rivasliderlite-save_{$_GET['page']}", "rivasliderlite-save_{$_GET['page']}", false );
 
 
12
  ?>
13
  <div class="main-panel">
14
  <div class="messages-container">
15
- <?php do_action( 'rivasliderlite_admin_messages' ); ?>
16
  </div>
17
 
18
- <h3><?php _e( 'General Settings', 'rivasliderlite' ); ?></h3>
19
  <table class="form-table settings">
20
  <tbody>
21
  <tr valign="top">
22
- <th scope="row"><label for="resizing"><?php _e( 'Image Resizing', 'rivasliderlite' ); ?></label></th>
23
  <td>
24
  <label for="resizing_true">
25
- <input type="radio" name="settings[resizing]" id="resizing_true" value="true" <?php checked( $s['resizing'], true ); ?>><span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
26
  </label>
27
  <label for="resizing_false">
28
- <input type="radio" name="settings[resizing]" id="resizing_false" value="false" <?php checked( $s['resizing'], false ); ?>><span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
29
  </label>
30
- <p class="description"><?php _e( 'Enable or disable the plugins image resizing functionality. Disable this if you do not want the slide images to be resized.', 'rivasliderlite' ); ?></p>
31
  </td>
32
  </tr>
33
 
34
  <tr valign="top">
35
- <th scope="row"><label for="load_scripts"><?php _e( 'Output JS', 'rivasliderlite' ); ?></label></th>
36
  <td>
37
  <label for="load_scripts_header">
38
- <input type="radio" name="settings[load_scripts]" id="load_scripts_header" value="header" <?php checked( $s['load_scripts'], 'header' ); ?>><span><?php _e( 'Header', 'rivasliderlite' ); ?></span>
39
  </label>
40
  <label for="load_scripts_footer">
41
- <input type="radio" name="settings[load_scripts]" id="load_scripts_footer" value="footer" <?php checked( $s['load_scripts'], 'footer' ); ?>><span><?php _e( 'Footer', 'rivasliderlite' ); ?></span>
42
  </label>
43
  <label for="load_scripts_off">
44
- <input type="radio" name="settings[load_scripts]" id="load_scripts_off" value="false" <?php checked( $s['load_scripts'], false ); ?>><span><?php _e( 'Off', 'rivasliderlite' ); ?></span>
45
  </label>
46
- <p class="description"><?php _e( 'Settings for Javascript output. Scripts loaded in the "Footer" are only when they are needed. This decreases page loading times but is prone to errors.', 'rivasliderlite' ); ?></p>
47
  </td>
48
  </tr>
49
 
50
  <tr valign="top">
51
- <th scope="row"><label for="load_styles"><?php _e( 'Output CSS', 'rivasliderlite' ); ?></label></th>
52
  <td>
53
  <label for="load_styles_header">
54
- <input type="radio" name="settings[load_styles]" id="load_styles_header" value="header" <?php checked( $s['load_styles'], 'header' ); ?>><span><?php _e( 'Header', 'rivasliderlite' ); ?></span>
55
  </label>
56
  <label for="load_styles_footer">
57
- <input type="radio" name="settings[load_styles]" id="load_styles_footer" value="footer" <?php checked( $s['load_styles'], 'footer' ); ?>><span><?php _e( 'Footer', 'rivasliderlite' ); ?></span>
58
  </label>
59
  <label for="load_styles_off">
60
- <input type="radio" name="settings[load_styles]" id="load_styles_off" value="false" <?php checked( $s['load_styles'], false ); ?>><span><?php _e( 'Off', 'rivasliderlite' ); ?></span>
61
  </label>
62
- <p class="description"><?php _e( 'Settings for CSS output. Styles loaded in the "Footer" will invalidate the HTML, but will prevent them from loading when not needed.', 'rivasliderlite' ); ?></p>
63
  </td>
64
  </tr>
65
  </tbody>
@@ -68,14 +70,14 @@
68
  <?php if ( get_option( 'easingslider_version' ) ) : ?>
69
  <div class="divider"></div>
70
 
71
- <h3><?php _e( 'Legacy Settings', 'rivasliderlite' ); ?></h3>
72
  <table class="form-table settings">
73
  <tbody>
74
  <tr valign="top">
75
- <th scope="row"><label for="load_scripts"><?php _e( 'Easing Slider', 'rivasliderlite' ); ?></label></th>
76
  <td>
77
- <input type="submit" name="easingslider" class="button button-secondary" value="<?php _e( 'Remove Easing Slider Settings', 'rivasliderlite' ); ?>">
78
- <p class="description"><?php _e( 'Clicking this button will permanently delete your Easing Slider settings from the database. Only do this if you are sure you will not be using it again.', 'rivasliderlite' ); ?></p>
79
  </td>
80
  </tr>
81
  </tbody>
@@ -84,27 +86,42 @@
84
 
85
  <div class="divider"></div>
86
 
87
- <h3><?php _e( 'Installation Settings', 'rivasliderlite' ); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  <table class="form-table">
89
  <tbody>
90
  <tr valign="top">
91
- <th scope="row"><?php _e( 'PHP Version', 'rivasliderlite' ); ?></th>
92
  <td><?php echo phpversion(); ?></td>
93
  </tr>
94
 
95
  <tr valign="top">
96
- <th scope="row"><?php _e( 'MySQL Version', 'rivasliderlite' ); ?></th>
97
  <td><?php echo mysql_get_server_info(); ?></td>
98
  </tr>
99
 
100
  <tr valign="top">
101
- <th scope="row"><?php _e( 'WordPress Version', 'rivasliderlite' ); ?></th>
102
  <td><?php global $wp_version; echo $wp_version; ?></td>
103
  </tr>
104
 
105
  <tr valign="top">
106
- <th scope="row"><?php _e( 'Plugin Version', 'rivasliderlite' ); ?></th>
107
- <td><?php echo RivaSliderLite::$version; ?></td>
108
  </tr>
109
  </tbody>
110
  </table>
@@ -112,7 +129,7 @@
112
  <div class="divider"></div>
113
 
114
  <p class="submit">
115
- <input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Settings', 'rivasliderlite' ); ?>">
116
  </p>
117
  </div>
118
  </form>
1
  <?php
2
  /** Get the plugin settings */
3
+ $settings = $s = get_option( 'easingsliderlite_settings' );
4
  ?>
5
  <div class="wrap">
6
  <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
7
+ <h2><?php _e( 'Edit Settings', 'easingsliderlite' ); ?></h2>
8
+ <form name="post" action="admin.php?page=easingsliderlite_edit_settings" method="post">
9
  <?php
10
+ /** Security nonce fields */
11
+ wp_nonce_field( "easingsliderlite-save_{$_GET['page']}", "easingsliderlite-save_{$_GET['page']}", false );
12
+ wp_nonce_field( "easingsliderlite-reset_{$_GET['page']}", "easingsliderlite-reset_{$_GET['page']}", false );
13
+ wp_nonce_field( "easingsliderlite-easingslider_{$_GET['page']}", "easingsliderlite-easingslider_{$_GET['page']}", false );
14
  ?>
15
  <div class="main-panel">
16
  <div class="messages-container">
17
+ <?php do_action( 'easingsliderlite_admin_messages' ); ?>
18
  </div>
19
 
20
+ <h3><?php _e( 'General Settings', 'easingsliderlite' ); ?></h3>
21
  <table class="form-table settings">
22
  <tbody>
23
  <tr valign="top">
24
+ <th scope="row"><label for="resizing"><?php _e( 'Image Resizing', 'easingsliderlite' ); ?></label></th>
25
  <td>
26
  <label for="resizing_true">
27
+ <input type="radio" name="settings[resizing]" id="resizing_true" value="true" <?php checked( $s['resizing'], true ); ?>><span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
28
  </label>
29
  <label for="resizing_false">
30
+ <input type="radio" name="settings[resizing]" id="resizing_false" value="false" <?php checked( $s['resizing'], false ); ?>><span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
31
  </label>
32
+ <p class="description"><?php _e( 'Enable or disable the plugins image resizing functionality. Disable this if you do not want the slide images to be resized.', 'easingsliderlite' ); ?></p>
33
  </td>
34
  </tr>
35
 
36
  <tr valign="top">
37
+ <th scope="row"><label for="load_scripts"><?php _e( 'Output JS', 'easingsliderlite' ); ?></label></th>
38
  <td>
39
  <label for="load_scripts_header">
40
+ <input type="radio" name="settings[load_scripts]" id="load_scripts_header" value="header" <?php checked( $s['load_scripts'], 'header' ); ?>><span><?php _e( 'Header', 'easingsliderlite' ); ?></span>
41
  </label>
42
  <label for="load_scripts_footer">
43
+ <input type="radio" name="settings[load_scripts]" id="load_scripts_footer" value="footer" <?php checked( $s['load_scripts'], 'footer' ); ?>><span><?php _e( 'Footer', 'easingsliderlite' ); ?></span>
44
  </label>
45
  <label for="load_scripts_off">
46
+ <input type="radio" name="settings[load_scripts]" id="load_scripts_off" value="false" <?php checked( $s['load_scripts'], false ); ?>><span><?php _e( 'Off', 'easingsliderlite' ); ?></span>
47
  </label>
48
+ <p class="description"><?php _e( 'Settings for Javascript output. Scripts loaded in the "Footer" are only when they are needed. This decreases page loading times but is prone to errors.', 'easingsliderlite' ); ?></p>
49
  </td>
50
  </tr>
51
 
52
  <tr valign="top">
53
+ <th scope="row"><label for="load_styles"><?php _e( 'Output CSS', 'easingsliderlite' ); ?></label></th>
54
  <td>
55
  <label for="load_styles_header">
56
+ <input type="radio" name="settings[load_styles]" id="load_styles_header" value="header" <?php checked( $s['load_styles'], 'header' ); ?>><span><?php _e( 'Header', 'easingsliderlite' ); ?></span>
57
  </label>
58
  <label for="load_styles_footer">
59
+ <input type="radio" name="settings[load_styles]" id="load_styles_footer" value="footer" <?php checked( $s['load_styles'], 'footer' ); ?>><span><?php _e( 'Footer', 'easingsliderlite' ); ?></span>
60
  </label>
61
  <label for="load_styles_off">
62
+ <input type="radio" name="settings[load_styles]" id="load_styles_off" value="false" <?php checked( $s['load_styles'], false ); ?>><span><?php _e( 'Off', 'easingsliderlite' ); ?></span>
63
  </label>
64
+ <p class="description"><?php _e( 'Settings for CSS output. Styles loaded in the "Footer" will invalidate the HTML, but will prevent them from loading when not needed.', 'easingsliderlite' ); ?></p>
65
  </td>
66
  </tr>
67
  </tbody>
70
  <?php if ( get_option( 'easingslider_version' ) ) : ?>
71
  <div class="divider"></div>
72
 
73
+ <h3><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></h3>
74
  <table class="form-table settings">
75
  <tbody>
76
  <tr valign="top">
77
+ <th scope="row"><label for="load_scripts"><?php _e( 'Old Settings', 'easingsliderlite' ); ?></label></th>
78
  <td>
79
+ <input type="submit" name="easingslider" class="button button-secondary warn" value="<?php _e( 'Remove v1.x Old Settings', 'easingsliderlite' ); ?>">
80
+ <p class="description"><?php _e( 'Clicking this button will permanently delete your Easing Slider old settings v1.x versions. Only do this if you are sure you will not be downgrading the plugin.', 'easingsliderlite' ); ?></p>
81
  </td>
82
  </tr>
83
  </tbody>
86
 
87
  <div class="divider"></div>
88
 
89
+ <h3><?php _e( 'Reset Plugin', 'easingsliderlite' ); ?></h3>
90
+ <table class="form-table settings">
91
+ <tbody>
92
+ <tr valign="top">
93
+ <th scope="row"><label for="reset"><?php _e( 'Plugin Settings', 'easingsliderlite' ); ?></label></th>
94
+ <td>
95
+ <input type="submit" name="reset" class="button button-secondary warn" value="<?php _e( 'Reset Plugin', 'easingsliderlite' ); ?>">
96
+ <p class="description"><?php _e( 'Click this button to reset the plugin to its default settings. This cannot be reversed, so be sure before you do this!', 'easingsliderlite' ); ?></p>
97
+ </td>
98
+ </tr>
99
+ </tbody>
100
+ </table>
101
+
102
+ <div class="divider"></div>
103
+
104
+ <h3><?php _e( 'Installation Settings', 'easingsliderlite' ); ?></h3>
105
  <table class="form-table">
106
  <tbody>
107
  <tr valign="top">
108
+ <th scope="row"><?php _e( 'PHP Version', 'easingsliderlite' ); ?></th>
109
  <td><?php echo phpversion(); ?></td>
110
  </tr>
111
 
112
  <tr valign="top">
113
+ <th scope="row"><?php _e( 'MySQL Version', 'easingsliderlite' ); ?></th>
114
  <td><?php echo mysql_get_server_info(); ?></td>
115
  </tr>
116
 
117
  <tr valign="top">
118
+ <th scope="row"><?php _e( 'WordPress Version', 'easingsliderlite' ); ?></th>
119
  <td><?php global $wp_version; echo $wp_version; ?></td>
120
  </tr>
121
 
122
  <tr valign="top">
123
+ <th scope="row"><?php _e( 'Plugin Version', 'easingsliderlite' ); ?></th>
124
+ <td><?php echo EasingSliderLite::$version; ?></td>
125
  </tr>
126
  </tbody>
127
  </table>
129
  <div class="divider"></div>
130
 
131
  <p class="submit">
132
+ <input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Settings', 'easingsliderlite' ); ?>">
133
  </p>
134
  </div>
135
  </form>
templates/editslideshow-media-details.php CHANGED
@@ -1,9 +1,9 @@
1
  <!-- Backbone template -->
2
  <h3>
3
- <?php _e( 'Image Details', 'rivasliderlite' ); ?>
4
  <span class="settings-save-status">
5
  <span class="spinner"></span>
6
- <span class="saved"><?php esc_html_e( 'Saved.', 'rivasliderlite' ); ?></span>
7
  </span>
8
  </h3>
9
 
1
  <!-- Backbone template -->
2
  <h3>
3
+ <?php _e( 'Image Details', 'easingsliderlite' ); ?>
4
  <span class="settings-save-status">
5
  <span class="spinner"></span>
6
+ <span class="saved"><?php esc_html_e( 'Saved.', 'easingsliderlite' ); ?></span>
7
  </span>
8
  </h3>
9
 
templates/editslideshow-sidebar.php CHANGED
@@ -2,238 +2,238 @@
2
  <div class="widgets-holder-wrap exclude">
3
  <div class="sidebar-name">
4
  <div class="sidebar-name-arrow"></div>
5
- <h3><?php _e( 'Manage Slides', 'rivasliderlite' ); ?></h3>
6
  </div>
7
  <div class="sidebar-content widgets-sortables clearfix">
8
  <div class="hide-if-no-js manage-slides-buttons wp-media-buttons" style="margin-top: 1em;">
9
- <a href="#" id="add-image" class="button button-secondary add-image" data-editor="content" title="<?php _e( 'Add Images', 'rivasliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Add Images', 'rivasliderlite' ); ?></a>
10
- <a href="#" id="delete-images" class="button button-secondary delete-images" title="<?php _e( 'Delete Images', 'rivasliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Delete Images', 'rivasliderlite' ); ?></a>
11
- <?php do_action( 'rivasliderlite_manage_slides_buttons', $s ); ?>
12
  </div>
13
  <div class="field">
14
  <label for="randomize">
15
  <input type="hidden" name="general[randomize]" value="">
16
- <input type="checkbox" id="randomize" name="general[randomize]" value="true" <?php checked( $s->general->randomize, true ); ?>><span style="display: inline;"><?php _e( 'Randomize the slideshow order.', 'rivasliderlite' ); ?></span>
17
  </label>
18
  </div>
19
- <?php do_action( 'rivasliderlite_manage_slides_metabox', $s ); ?>
20
  </div>
21
  </div>
22
 
23
  <!-- Dimensions -->
24
- <div class="widgets-holder-wrap" <?php if ( (bool) apply_filters( 'rivasliderlite_hide_dimensions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
25
  <div class="sidebar-name">
26
  <div class="sidebar-name-arrow"></div>
27
- <h3><?php _e( 'Dimensions', 'rivasliderlite' ); ?></h3>
28
  </div>
29
  <div class="sidebar-content widgets-sortables clearfix">
30
  <div class="dimension-settings">
31
  <div class="field">
32
  <label for="width">
33
- <span><?php _e( 'Width:', 'rivasliderlite' ); ?></span>
34
  <input type="number" name="dimensions[width]" id="width" value="<?php echo esc_attr( $s->dimensions->width ); ?>">
35
  </label>
36
  </div>
37
  <div class="field">
38
  <label for="height">
39
- <span><?php _e( 'Height:', 'rivasliderlite' ); ?></span>
40
  <input type="number" name="dimensions[height]" id="height" value="<?php echo esc_attr( $s->dimensions->height ); ?>">
41
  </label>
42
  </div>
43
- <p class="description"><?php _e( 'Slideshow "width" and "height" values (in pixels).', 'rivasliderlite' ); ?></p>
44
  </div>
45
  <div class="divider"></div>
46
  <div>
47
  <div class="field">
48
  <label for="responsive">
49
  <input type="hidden" name="dimensions[responsive]" value="">
50
- <input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $s->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this slideshow responsive.', 'rivasliderlite' ); ?></span>
51
  </label>
52
  </div>
53
- <p class="description"><?php _e( 'Check this option to make this slideshow responsive. If enabled, the "width" and "height" values above will act as maximums.', 'rivasliderlite' ); ?></p>
54
  </div>
55
- <?php do_action( 'rivasliderlite_dimensions_metabox', $s ); ?>
56
  </div>
57
  </div>
58
 
59
  <!-- Transitions -->
60
- <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_transitions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
61
  <div class="sidebar-name">
62
  <div class="sidebar-name-arrow"></div>
63
- <h3><?php _e( 'Transitions', 'rivasliderlite' ); ?></h3>
64
  </div>
65
  <div class="sidebar-content widgets-sortables clearfix" style="display: none;">
66
  <div>
67
  <div class="field">
68
  <label for="effect">
69
- <span><?php _e( 'Effect:', 'rivasliderlite' ); ?></span>
70
  <select name="transitions[effect]" id="effect">
71
- <option value="slide" <?php selected( $s->transitions->effect, 'slide' ); ?>><?php _e( 'Slide', 'rivasliderlite' ); ?></option>
72
- <option value="fade" <?php selected( $s->transitions->effect, 'fade' ); ?>><?php _e( 'Fade', 'rivasliderlite' ); ?></option>
73
  </select>
74
  </label>
75
  </div>
76
- <p class="description"><?php _e( 'Choose the transition effect you would like to use.', 'rivasliderlite' ); ?></p>
77
  </div>
78
  <div class="divider"></div>
79
  <div>
80
  <div class="field">
81
  <label for="duration">
82
- <span><?php _e( 'Duration:', 'rivasliderlite' ); ?></span>
83
  <input type="number" name="transitions[duration]" id="duration" value="<?php echo esc_attr( $s->transitions->duration ); ?>">
84
  </label>
85
  </div>
86
- <p class="description"><?php _e( 'Sets the duration (in milliseconds) for the slideshow transition.', 'rivasliderlite' ); ?></p>
87
  </div>
88
- <?php do_action( 'rivasliderlite_transitions_metabox', $s ); ?>
89
  </div>
90
  </div>
91
 
92
  <!-- Next & Previous Arrows -->
93
- <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_arrows_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
94
  <div class="sidebar-name">
95
  <div class="sidebar-name-arrow"></div>
96
- <h3><?php _e( 'Next & Previous Arrows', 'rivasliderlite' ); ?></h3>
97
  </div>
98
  <div class="sidebar-content widgets-sortables" style="display: none;">
99
  <div>
100
  <div class="radio clearfix">
101
- <span><?php _e( 'Arrows:', 'rivasliderlite' ); ?></span>
102
  <div class="buttons">
103
  <label for="arrows-enable"><input type="radio" name="navigation[arrows]" id="arrows-enable" value="true" <?php checked( $s->navigation->arrows, true ); ?>>
104
- <span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
105
  </label>
106
  <label for="arrows-disable"><input type="radio" name="navigation[arrows]" id="arrows-disable" value="false" <?php checked( $s->navigation->arrows, false ); ?>>
107
- <span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
108
  </label>
109
  </div>
110
  </div>
111
- <p class="description"><?php _e( 'Toggles the next and previous slide arrows.', 'rivasliderlite' ); ?></p>
112
  </div>
113
  <div class="divider"></div>
114
  <div>
115
  <div class="radio clearfix">
116
- <span><?php _e( 'On Hover:', 'rivasliderlite' ); ?></span>
117
  <div class="buttons">
118
  <label for="arrows-hover-true"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-true" value="true" <?php checked( $s->navigation->arrows_hover, true ); ?>>
119
- <span><?php _e( 'True', 'rivasliderlite' ); ?></span>
120
  </label>
121
  <label for="arrows-hover-false"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-false" value="false" <?php checked( $s->navigation->arrows_hover, false ); ?>>
122
- <span><?php _e( 'False', 'rivasliderlite' ); ?></span>
123
  </label>
124
  </div>
125
  </div>
126
- <p class="description"><?php _e( 'Set to "True" to only show the arrows when the user hovers over the slideshow.', 'rivasliderlite' ); ?></p>
127
  </div>
128
  <div class="divider"></div>
129
  <div>
130
  <div class="field">
131
  <label for="arrows_position">
132
- <span><?php _e( 'Position:', 'rivasliderlite' ); ?></span>
133
  <select name="navigation[arrows_position]" id="arrows_position">
134
- <option value="inside" <?php selected( $s->navigation->arrows_position, 'inside' ); ?>><?php _e( 'Inside', 'rivasliderlite' ); ?></option>
135
- <option value="outside" <?php selected( $s->navigation->arrows_position, 'outside' ); ?>><?php _e( 'Outside', 'rivasliderlite' ); ?></option>
136
  </select>
137
  </label>
138
  </div>
139
- <p class="description"><?php _e( 'Select a position for the arrows.', 'rivasliderlite' ); ?></p>
140
  </div>
141
- <?php do_action( 'rivasliderlite_arrows_metabox', $s ); ?>
142
  </div>
143
  </div>
144
 
145
  <!-- Pagination Icons -->
146
- <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_pagination_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
147
  <div class="sidebar-name">
148
  <div class="sidebar-name-arrow"></div>
149
- <h3><?php _e( 'Pagination Icons', 'rivasliderlite' ); ?></h3>
150
  </div>
151
  <div class="sidebar-content widgets-sortables" style="display: none;">
152
  <div>
153
  <div class="radio clearfix">
154
- <span><?php _e( 'Pagination:', 'rivasliderlite' ); ?></span>
155
  <div class="buttons">
156
  <label for="pagination-enable"><input type="radio" name="navigation[pagination]" id="pagination-enable" value="true" <?php checked( $s->navigation->pagination, true ); ?>>
157
- <span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
158
  </label>
159
  <label for="pagination-disable"><input type="radio" name="navigation[pagination]" id="pagination-disable" value="false" <?php checked( $s->navigation->pagination, false ); ?>>
160
- <span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
161
  </label>
162
  </div>
163
  </div>
164
- <p class="description"><?php _e( 'Enable/Disable the Pagination Icons. Each icon represents a slide in their respective order.', 'rivasliderlite' ); ?></p>
165
  </div>
166
  <div class="divider"></div>
167
  <div>
168
  <div class="radio clearfix">
169
- <span><?php _e( 'On Hover:', 'rivasliderlite' ); ?></span>
170
  <div class="buttons">
171
  <label for="pagination-hover-true"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-true" value="true" <?php checked( $s->navigation->pagination_hover, true ); ?>>
172
- <span><?php _e( 'True', 'rivasliderlite' ); ?></span>
173
  </label>
174
  <label for="pagination-hover-false"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-false" value="false" <?php checked( $s->navigation->pagination_hover, false ); ?>>
175
- <span><?php _e( 'False', 'rivasliderlite' ); ?></span>
176
  </label>
177
  </div>
178
  </div>
179
- <p class="description"><?php _e( 'Set to "True" to only show the pagination when the user hovers over the slideshow.', 'rivasliderlite' ); ?></p>
180
  </div>
181
  <div class="divider"></div>
182
  <div>
183
  <div class="field">
184
  <label for="pagination_position">
185
- <span><?php _e( 'Position:', 'rivasliderlite' ); ?></span>
186
  <select name="navigation[pagination_position]" id="pagination_position" style="width: 45%; float: left;">
187
- <option value="inside" <?php selected( $s->navigation->pagination_position, 'inside' ); ?>><?php _e( 'Inside', 'rivasliderlite' ); ?></option>
188
- <option value="outside" <?php selected( $s->navigation->pagination_position, 'outside' ); ?>><?php _e( 'Outside', 'rivasliderlite' ); ?></option>
189
  </select>
190
  <select name="navigation[pagination_location]" id="pagination_location" style="width: 45%; float: left; margin-left: 10px;">
191
- <option value="top-left" <?php selected( $s->navigation->pagination_location, 'top-left' ); ?>><?php _e( 'Top Left', 'rivasliderlite' ); ?></option>
192
- <option value="top-right" <?php selected( $s->navigation->pagination_location, 'top-right' ); ?>><?php _e( 'Top Right', 'rivasliderlite' ); ?></option>
193
- <option value="top-center" <?php selected( $s->navigation->pagination_location, 'top-center' ); ?>><?php _e( 'Top Center', 'rivasliderlite' ); ?></option>
194
- <option value="bottom-left" <?php selected( $s->navigation->pagination_location, 'bottom-left' ); ?>><?php _e( 'Bottom Left', 'rivasliderlite' ); ?></option>
195
- <option value="bottom-right" <?php selected( $s->navigation->pagination_location, 'bottom-right' ); ?>><?php _e( 'Bottom Right', 'rivasliderlite' ); ?></option>
196
- <option value="bottom-center" <?php selected( $s->navigation->pagination_location, 'bottom-center' ); ?>><?php _e( 'Bottom Center', 'rivasliderlite' ); ?></option>
197
  </select>
198
  </label>
199
  </div>
200
- <p class="description"><?php _e( 'Select a position for the pagination icons.', 'rivasliderlite' ); ?></p>
201
  </div>
202
- <?php do_action( 'rivasliderlite_pagination_metabox', $s ); ?>
203
  </div>
204
  </div>
205
 
206
  <!-- Playback -->
207
- <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'rivasliderlite_hide_playback_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
208
  <div class="sidebar-name">
209
  <div class="sidebar-name-arrow"></div>
210
- <h3><?php _e( 'Automatic Playback', 'rivasliderlite' ); ?></h3>
211
  </div>
212
  <div class="sidebar-content widgets-sortables" style="display: none;">
213
  <div>
214
  <div class="radio clearfix">
215
- <span><?php _e( 'Playback:', 'rivasliderlite' ); ?></span>
216
  <div class="buttons">
217
  <label for="playback-enable"><input type="radio" name="playback[enabled]" id="playback-enable" value="true" <?php checked( $s->playback->enabled, true ); ?>>
218
- <span><?php _e( 'Enable', 'rivasliderlite' ); ?></span>
219
  </label>
220
  <label for="playback-disable"><input type="radio" name="playback[enabled]" id="playback-disable" value="false" <?php checked( $s->playback->enabled, false ); ?>>
221
- <span><?php _e( 'Disable', 'rivasliderlite' ); ?></span>
222
  </label>
223
  </div>
224
  </div>
225
- <p class="description"><?php _e( 'Enable/Disable slideshow automatic playback.', 'rivasliderlite' ); ?></p>
226
  </div>
227
  <div class="divider"></div>
228
  <div>
229
  <div class="field">
230
  <label for="playback_pause">
231
- <span><?php _e( 'Pause Duration:', 'rivasliderlite' ); ?></span>
232
  <input type="number" name="playback[pause]" id="playback_pause" value="<?php echo esc_attr( $s->playback->pause ); ?>">
233
  </label>
234
  </div>
235
- <p class="description"><?php _e( 'Sets the duration (in milliseconds) for the pause between slide transitions.', 'rivasliderlite' ); ?></p>
236
  </div>
237
- <?php do_action( 'rivasliderlite_playback_metabox', $s ); ?>
238
  </div>
239
  </div>
2
  <div class="widgets-holder-wrap exclude">
3
  <div class="sidebar-name">
4
  <div class="sidebar-name-arrow"></div>
5
+ <h3><?php _e( 'Manage Slides', 'easingsliderlite' ); ?></h3>
6
  </div>
7
  <div class="sidebar-content widgets-sortables clearfix">
8
  <div class="hide-if-no-js manage-slides-buttons wp-media-buttons" style="margin-top: 1em;">
9
+ <a href="#" id="add-image" class="button button-secondary add-image" data-editor="content" title="<?php _e( 'Add Images', 'easingsliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Add Images', 'easingsliderlite' ); ?></a>
10
+ <a href="#" id="delete-images" class="button button-secondary delete-images" title="<?php _e( 'Delete Images', 'easingsliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Delete Images', 'easingsliderlite' ); ?></a>
11
+ <?php do_action( 'easingsliderlite_manage_slides_buttons', $s ); ?>
12
  </div>
13
  <div class="field">
14
  <label for="randomize">
15
  <input type="hidden" name="general[randomize]" value="">
16
+ <input type="checkbox" id="randomize" name="general[randomize]" value="true" <?php checked( $s->general->randomize, true ); ?>><span style="display: inline;"><?php _e( 'Randomize the slideshow order.', 'easingsliderlite' ); ?></span>
17
  </label>
18
  </div>
19
+ <?php do_action( 'easingsliderlite_manage_slides_metabox', $s ); ?>
20
  </div>
21
  </div>
22
 
23
  <!-- Dimensions -->
24
+ <div class="widgets-holder-wrap" <?php if ( (bool) apply_filters( 'easingsliderlite_hide_dimensions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
25
  <div class="sidebar-name">
26
  <div class="sidebar-name-arrow"></div>
27
+ <h3><?php _e( 'Dimensions', 'easingsliderlite' ); ?></h3>
28
  </div>
29
  <div class="sidebar-content widgets-sortables clearfix">
30
  <div class="dimension-settings">
31
  <div class="field">
32
  <label for="width">
33
+ <span><?php _e( 'Width:', 'easingsliderlite' ); ?></span>
34
  <input type="number" name="dimensions[width]" id="width" value="<?php echo esc_attr( $s->dimensions->width ); ?>">
35
  </label>
36
  </div>
37
  <div class="field">
38
  <label for="height">
39
+ <span><?php _e( 'Height:', 'easingsliderlite' ); ?></span>
40
  <input type="number" name="dimensions[height]" id="height" value="<?php echo esc_attr( $s->dimensions->height ); ?>">
41
  </label>
42
  </div>
43
+ <p class="description"><?php _e( 'Slideshow "width" and "height" values (in pixels).', 'easingsliderlite' ); ?></p>
44
  </div>
45
  <div class="divider"></div>
46
  <div>
47
  <div class="field">
48
  <label for="responsive">
49
  <input type="hidden" name="dimensions[responsive]" value="">
50
+ <input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $s->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this slideshow responsive.', 'easingsliderlite' ); ?></span>
51
  </label>
52
  </div>
53
+ <p class="description"><?php _e( 'Check this option to make this slideshow responsive. If enabled, the "width" and "height" values above will act as maximums.', 'easingsliderlite' ); ?></p>
54
  </div>
55
+ <?php do_action( 'easingsliderlite_dimensions_metabox', $s ); ?>
56
  </div>
57
  </div>
58
 
59
  <!-- Transitions -->
60
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_transitions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
61
  <div class="sidebar-name">
62
  <div class="sidebar-name-arrow"></div>
63
+ <h3><?php _e( 'Transitions', 'easingsliderlite' ); ?></h3>
64
  </div>
65
  <div class="sidebar-content widgets-sortables clearfix" style="display: none;">
66
  <div>
67
  <div class="field">
68
  <label for="effect">
69
+ <span><?php _e( 'Effect:', 'easingsliderlite' ); ?></span>
70
  <select name="transitions[effect]" id="effect">
71
+ <option value="slide" <?php selected( $s->transitions->effect, 'slide' ); ?>><?php _e( 'Slide', 'easingsliderlite' ); ?></option>
72
+ <option value="fade" <?php selected( $s->transitions->effect, 'fade' ); ?>><?php _e( 'Fade', 'easingsliderlite' ); ?></option>
73
  </select>
74
  </label>
75
  </div>
76
+ <p class="description"><?php _e( 'Choose the transition effect you would like to use.', 'easingsliderlite' ); ?></p>
77
  </div>
78
  <div class="divider"></div>
79
  <div>
80
  <div class="field">
81
  <label for="duration">
82
+ <span><?php _e( 'Duration:', 'easingsliderlite' ); ?></span>
83
  <input type="number" name="transitions[duration]" id="duration" value="<?php echo esc_attr( $s->transitions->duration ); ?>">
84
  </label>
85
  </div>
86
+ <p class="description"><?php _e( 'Sets the duration (in milliseconds) for the slideshow transition.', 'easingsliderlite' ); ?></p>
87
  </div>
88
+ <?php do_action( 'easingsliderlite_transitions_metabox', $s ); ?>
89
  </div>
90
  </div>
91
 
92
  <!-- Next & Previous Arrows -->
93
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_arrows_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
94
  <div class="sidebar-name">
95
  <div class="sidebar-name-arrow"></div>
96
+ <h3><?php _e( 'Next & Previous Arrows', 'easingsliderlite' ); ?></h3>
97
  </div>
98
  <div class="sidebar-content widgets-sortables" style="display: none;">
99
  <div>
100
  <div class="radio clearfix">
101
+ <span><?php _e( 'Arrows:', 'easingsliderlite' ); ?></span>
102
  <div class="buttons">
103
  <label for="arrows-enable"><input type="radio" name="navigation[arrows]" id="arrows-enable" value="true" <?php checked( $s->navigation->arrows, true ); ?>>
104
+ <span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
105
  </label>
106
  <label for="arrows-disable"><input type="radio" name="navigation[arrows]" id="arrows-disable" value="false" <?php checked( $s->navigation->arrows, false ); ?>>
107
+ <span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
108
  </label>
109
  </div>
110
  </div>
111
+ <p class="description"><?php _e( 'Toggles the next and previous slide arrows.', 'easingsliderlite' ); ?></p>
112
  </div>
113
  <div class="divider"></div>
114
  <div>
115
  <div class="radio clearfix">
116
+ <span><?php _e( 'On Hover:', 'easingsliderlite' ); ?></span>
117
  <div class="buttons">
118
  <label for="arrows-hover-true"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-true" value="true" <?php checked( $s->navigation->arrows_hover, true ); ?>>
119
+ <span><?php _e( 'True', 'easingsliderlite' ); ?></span>
120
  </label>
121
  <label for="arrows-hover-false"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-false" value="false" <?php checked( $s->navigation->arrows_hover, false ); ?>>
122
+ <span><?php _e( 'False', 'easingsliderlite' ); ?></span>
123
  </label>
124
  </div>
125
  </div>
126
+ <p class="description"><?php _e( 'Set to "True" to only show the arrows when the user hovers over the slideshow.', 'easingsliderlite' ); ?></p>
127
  </div>
128
  <div class="divider"></div>
129
  <div>
130
  <div class="field">
131
  <label for="arrows_position">
132
+ <span><?php _e( 'Position:', 'easingsliderlite' ); ?></span>
133
  <select name="navigation[arrows_position]" id="arrows_position">
134
+ <option value="inside" <?php selected( $s->navigation->arrows_position, 'inside' ); ?>><?php _e( 'Inside', 'easingsliderlite' ); ?></option>
135
+ <option value="outside" <?php selected( $s->navigation->arrows_position, 'outside' ); ?>><?php _e( 'Outside', 'easingsliderlite' ); ?></option>
136
  </select>
137
  </label>
138
  </div>
139
+ <p class="description"><?php _e( 'Select a position for the arrows.', 'easingsliderlite' ); ?></p>
140
  </div>
141
+ <?php do_action( 'easingsliderlite_arrows_metabox', $s ); ?>
142
  </div>
143
  </div>
144
 
145
  <!-- Pagination Icons -->
146
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_pagination_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
147
  <div class="sidebar-name">
148
  <div class="sidebar-name-arrow"></div>
149
+ <h3><?php _e( 'Pagination Icons', 'easingsliderlite' ); ?></h3>
150
  </div>
151
  <div class="sidebar-content widgets-sortables" style="display: none;">
152
  <div>
153
  <div class="radio clearfix">
154
+ <span><?php _e( 'Pagination:', 'easingsliderlite' ); ?></span>
155
  <div class="buttons">
156
  <label for="pagination-enable"><input type="radio" name="navigation[pagination]" id="pagination-enable" value="true" <?php checked( $s->navigation->pagination, true ); ?>>
157
+ <span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
158
  </label>
159
  <label for="pagination-disable"><input type="radio" name="navigation[pagination]" id="pagination-disable" value="false" <?php checked( $s->navigation->pagination, false ); ?>>
160
+ <span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
161
  </label>
162
  </div>
163
  </div>
164
+ <p class="description"><?php _e( 'Enable/Disable the Pagination Icons. Each icon represents a slide in their respective order.', 'easingsliderlite' ); ?></p>
165
  </div>
166
  <div class="divider"></div>
167
  <div>
168
  <div class="radio clearfix">
169
+ <span><?php _e( 'On Hover:', 'easingsliderlite' ); ?></span>
170
  <div class="buttons">
171
  <label for="pagination-hover-true"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-true" value="true" <?php checked( $s->navigation->pagination_hover, true ); ?>>
172
+ <span><?php _e( 'True', 'easingsliderlite' ); ?></span>
173
  </label>
174
  <label for="pagination-hover-false"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-false" value="false" <?php checked( $s->navigation->pagination_hover, false ); ?>>
175
+ <span><?php _e( 'False', 'easingsliderlite' ); ?></span>
176
  </label>
177
  </div>
178
  </div>
179
+ <p class="description"><?php _e( 'Set to "True" to only show the pagination when the user hovers over the slideshow.', 'easingsliderlite' ); ?></p>
180
  </div>
181
  <div class="divider"></div>
182
  <div>
183
  <div class="field">
184
  <label for="pagination_position">
185
+ <span><?php _e( 'Position:', 'easingsliderlite' ); ?></span>
186
  <select name="navigation[pagination_position]" id="pagination_position" style="width: 45%; float: left;">
187
+ <option value="inside" <?php selected( $s->navigation->pagination_position, 'inside' ); ?>><?php _e( 'Inside', 'easingsliderlite' ); ?></option>
188
+ <option value="outside" <?php selected( $s->navigation->pagination_position, 'outside' ); ?>><?php _e( 'Outside', 'easingsliderlite' ); ?></option>
189
  </select>
190
  <select name="navigation[pagination_location]" id="pagination_location" style="width: 45%; float: left; margin-left: 10px;">
191
+ <option value="top-left" <?php selected( $s->navigation->pagination_location, 'top-left' ); ?>><?php _e( 'Top Left', 'easingsliderlite' ); ?></option>
192
+ <option value="top-right" <?php selected( $s->navigation->pagination_location, 'top-right' ); ?>><?php _e( 'Top Right', 'easingsliderlite' ); ?></option>
193
+ <option value="top-center" <?php selected( $s->navigation->pagination_location, 'top-center' ); ?>><?php _e( 'Top Center', 'easingsliderlite' ); ?></option>
194
+ <option value="bottom-left" <?php selected( $s->navigation->pagination_location, 'bottom-left' ); ?>><?php _e( 'Bottom Left', 'easingsliderlite' ); ?></option>
195
+ <option value="bottom-right" <?php selected( $s->navigation->pagination_location, 'bottom-right' ); ?>><?php _e( 'Bottom Right', 'easingsliderlite' ); ?></option>
196
+ <option value="bottom-center" <?php selected( $s->navigation->pagination_location, 'bottom-center' ); ?>><?php _e( 'Bottom Center', 'easingsliderlite' ); ?></option>
197
  </select>
198
  </label>
199
  </div>
200
+ <p class="description"><?php _e( 'Select a position for the pagination icons.', 'easingsliderlite' ); ?></p>
201
  </div>
202
+ <?php do_action( 'easingsliderlite_pagination_metabox', $s ); ?>
203
  </div>
204
  </div>
205
 
206
  <!-- Playback -->
207
+ <div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_playback_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
208
  <div class="sidebar-name">
209
  <div class="sidebar-name-arrow"></div>
210
+ <h3><?php _e( 'Automatic Playback', 'easingsliderlite' ); ?></h3>
211
  </div>
212
  <div class="sidebar-content widgets-sortables" style="display: none;">
213
  <div>
214
  <div class="radio clearfix">
215
+ <span><?php _e( 'Playback:', 'easingsliderlite' ); ?></span>
216
  <div class="buttons">
217
  <label for="playback-enable"><input type="radio" name="playback[enabled]" id="playback-enable" value="true" <?php checked( $s->playback->enabled, true ); ?>>
218
+ <span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
219
  </label>
220
  <label for="playback-disable"><input type="radio" name="playback[enabled]" id="playback-disable" value="false" <?php checked( $s->playback->enabled, false ); ?>>
221
+ <span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
222
  </label>
223
  </div>
224
  </div>
225
+ <p class="description"><?php _e( 'Enable/Disable slideshow automatic playback.', 'easingsliderlite' ); ?></p>
226
  </div>
227
  <div class="divider"></div>
228
  <div>
229
  <div class="field">
230
  <label for="playback_pause">
231
+ <span><?php _e( 'Pause Duration:', 'easingsliderlite' ); ?></span>
232
  <input type="number" name="playback[pause]" id="playback_pause" value="<?php echo esc_attr( $s->playback->pause ); ?>">
233
  </label>
234
  </div>
235
+ <p class="description"><?php _e( 'Sets the duration (in milliseconds) for the pause between slide transitions.', 'easingsliderlite' ); ?></p>
236
  </div>
237
+ <?php do_action( 'easingsliderlite_playback_metabox', $s ); ?>
238
  </div>
239
  </div>
templates/editslideshow-slide.php CHANGED
@@ -4,7 +4,7 @@
4
  <div class="media-modal-content">
5
  <div class="media-frame wp-core-ui">
6
  <div class="media-frame-title">
7
- <h1><?php _e( 'Edit a Slide: #<%= id %>', 'rivasliderlite' ); ?></h1>
8
  </div>
9
 
10
  <div class="media-frame-router" style="height: 0;"></div>
@@ -20,25 +20,25 @@
20
  </div>
21
 
22
  <label for="link" class="setting">
23
- <span><?php _e( 'Link URL', 'rivasliderlite' ); ?></span>
24
  <input type="text" id="link" value="<%= link %>">
25
  <select id="linkTarget" style="margin-top: 5px;">
26
- <option value="_self" <% ( '_self' == linkTarget ) ? print('selected="selected"'): ''; %>><?php _e( 'Open link same tab/window', 'rivasliderlite' ); ?></option>
27
- <option value="_blank" <% ( '_blank' == linkTarget ) ? print('selected="selected"'): ''; %>><?php _e( 'Open link in new tab/window', 'rivasliderlite' ); ?></option>
28
  </select>
29
- <p class="description"><?php _e( 'Enter a URL to link this slide to another page.', 'rivasliderlite' ); ?></p>
30
  </label>
31
 
32
  <label for="title" class="setting">
33
- <span><?php _e( 'Title', 'rivasliderlite' ); ?></span>
34
  <input type="text" id="title" value="<%= title %>">
35
- <p class="description"><?php _e( 'Enter a value for the image "title" attribute.'. 'rivasliderlite' ); ?></p>
36
  </label>
37
 
38
  <label for="alt" class="setting">
39
- <span><?php _e( 'Alt Text', 'rivasliderlite' ); ?></span>
40
  <input type="text" id="alt" value="<%= alt %>">
41
- <p class="description"><?php _e( 'Enter a value for the image "alt" text attribute.'. 'rivasliderlite' ); ?></p>
42
  </label>
43
  </div>
44
  </div>
@@ -47,7 +47,7 @@
47
  <div class="media-frame-toolbar">
48
  <div class="media-toolbar">
49
  <div class="media-toolbar-primary">
50
- <a href="#" class="button media-button button-primary button-large media-button-select media-modal-save"><?php _e( 'Apply Changes', 'rivasliderlite' ); ?></a>
51
  </div>
52
  </div>
53
  </div>
4
  <div class="media-modal-content">
5
  <div class="media-frame wp-core-ui">
6
  <div class="media-frame-title">
7
+ <h1><?php _e( 'Edit a Slide: #<%= id %>', 'easingsliderlite' ); ?></h1>
8
  </div>
9
 
10
  <div class="media-frame-router" style="height: 0;"></div>
20
  </div>
21
 
22
  <label for="link" class="setting">
23
+ <span><?php _e( 'Link URL', 'easingsliderlite' ); ?></span>
24
  <input type="text" id="link" value="<%= link %>">
25
  <select id="linkTarget" style="margin-top: 5px;">
26
+ <option value="_self" <% ( '_self' == linkTarget ) ? print('selected="selected"'): ''; %>><?php _e( 'Open link same tab/window', 'easingsliderlite' ); ?></option>
27
+ <option value="_blank" <% ( '_blank' == linkTarget ) ? print('selected="selected"'): ''; %>><?php _e( 'Open link in new tab/window', 'easingsliderlite' ); ?></option>
28
  </select>
29
+ <p class="description"><?php _e( 'Enter a URL to link this slide to another page.', 'easingsliderlite' ); ?></p>
30
  </label>
31
 
32
  <label for="title" class="setting">
33
+ <span><?php _e( 'Title', 'easingsliderlite' ); ?></span>
34
  <input type="text" id="title" value="<%= title %>">
35
+ <p class="description"><?php _e( 'Enter a value for the image "title" attribute.'. 'easingsliderlite' ); ?></p>
36
  </label>
37
 
38
  <label for="alt" class="setting">
39
+ <span><?php _e( 'Alt Text', 'easingsliderlite' ); ?></span>
40
  <input type="text" id="alt" value="<%= alt %>">
41
+ <p class="description"><?php _e( 'Enter a value for the image "alt" text attribute.'. 'easingsliderlite' ); ?></p>
42
  </label>
43
  </div>
44
  </div>
47
  <div class="media-frame-toolbar">
48
  <div class="media-toolbar">
49
  <div class="media-toolbar-primary">
50
+ <a href="#" class="button media-button button-primary button-large media-button-select media-modal-save"><?php _e( 'Apply Changes', 'easingsliderlite' ); ?></a>
51
  </div>
52
  </div>
53
  </div>
templates/editslideshow-welcome.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /** Display the panel */
4
- if ( get_option( 'rivasliderlite_disable_welcome_panel' ) == false ) :
5
 
6
  /** URL references */
7
  $links = array(
@@ -12,31 +12,31 @@ if ( get_option( 'rivasliderlite_disable_welcome_panel' ) == false ) :
12
  );
13
 
14
  ?>
15
- <div id="rivasliderlite-welcome-message" class="welcome-panel">
16
- <a href="admin.php?page=rivasliderlite_edit_slideshow&amp;disable_welcome_panel=true" class="welcome-panel-close"><?php _e( 'Dismiss', 'rivasliderlite' ); ?></a>
17
  <div class="welcome-panel-content">
18
- <h3><?php _e( 'Welcome to Riva Slider "Lite"', 'rivasliderlite' ); ?></h3>
19
  <p class="about-description">
20
  <?php
21
- if ( get_option( 'rivasliderlite_easingslider_upgrade' ) )
22
- _e( 'Thanks for upgrading to Riva Slider "Lite". Here are some links to get you clued up on the new plugin.', 'rivasliderlite' );
23
  else
24
- _e( 'Thanks for installing Riva Slider "Lite". Here are some links to help get you started.', 'rivasliderlite' );
25
  ?>
26
  </p>
27
 
28
  <div class="welcome-panel-column-container">
29
  <div class="welcome-panel-column">
30
- <h4><?php _e( 'Get Started', 'rivasliderlite' ); ?></h4>
31
- <a class="button button-primary button-hero" href="<?php echo $links['get-started']; ?>"><?php _e( 'View the Documentation', 'rivasliderlite' ); ?></a>
32
  </div>
33
 
34
  <div class="welcome-panel-column">
35
- <h4><?php _e( 'Need some help?', 'rivasliderlite' ); ?></h4>
36
  <ul>
37
- <li><a href='<?php echo $links['display-slideshow']; ?>'><?php _e( 'Displaying a Slideshow', 'rivasliderlite' ); ?></a></li>
38
- <li><a href='<?php echo $links['faqs']; ?>'><?php _e( 'Frequently Asked Questions', 'rivasliderlite' ); ?></a></li>
39
- <li><a href='<?php echo $links['support-forums']; ?>'><?php _e( 'Support Forums', 'rivasliderlite' ); ?></a></li>
40
  </ul>
41
  </div>
42
  </div>
1
  <?php
2
 
3
  /** Display the panel */
4
+ if ( get_option( 'easingsliderlite_disable_welcome_panel' ) == false ) :
5
 
6
  /** URL references */
7
  $links = array(
12
  );
13
 
14
  ?>
15
+ <div id="easingsliderlite-welcome-message" class="welcome-panel">
16
+ <a href="admin.php?page=easingsliderlite_edit_slideshow&amp;disable_welcome_panel=true" class="welcome-panel-close"><?php _e( 'Dismiss', 'easingsliderlite' ); ?></a>
17
  <div class="welcome-panel-content">
18
+ <h3><?php _e( 'Welcome to Easing Slider "Lite"', 'easingsliderlite' ); ?></h3>
19
  <p class="about-description">
20
  <?php
21
+ if ( get_option( 'easingsliderlite_major_upgrade' ) )
22
+ _e( 'Thanks for upgrading to Easing Slider "Lite". Here are some links to get you clued up on the new plugin.', 'easingsliderlite' );
23
  else
24
+ _e( 'Thanks for installing Easing Slider "Lite". Here are some links to help get you started.', 'easingsliderlite' );
25
  ?>
26
  </p>
27
 
28
  <div class="welcome-panel-column-container">
29
  <div class="welcome-panel-column">
30
+ <h4><?php _e( 'Get Started', 'easingsliderlite' ); ?></h4>
31
+ <a class="button button-primary button-hero" href="<?php echo $links['get-started']; ?>"><?php _e( 'View the Documentation', 'easingsliderlite' ); ?></a>
32
  </div>
33
 
34
  <div class="welcome-panel-column">
35
+ <h4><?php _e( 'Need some help?', 'easingsliderlite' ); ?></h4>
36
  <ul>
37
+ <li><a href='<?php echo $links['display-slideshow']; ?>'><?php _e( 'Displaying a Slideshow', 'easingsliderlite' ); ?></a></li>
38
+ <li><a href='<?php echo $links['faqs']; ?>'><?php _e( 'Frequently Asked Questions', 'easingsliderlite' ); ?></a></li>
39
+ <li><a href='<?php echo $links['support-forums']; ?>'><?php _e( 'Support Forums', 'easingsliderlite' ); ?></a></li>
40
  </ul>
41
  </div>
42
  </div>
templates/editslideshow.php CHANGED
@@ -1,23 +1,23 @@
1
  <?php
2
  /** Get the slideshow */
3
- $slideshow = $s = RivaSliderLite::get_instance()->validate( get_option( 'rivasliderlite_slideshow' ) );
4
  ?>
5
  <div class="wrap">
6
- <form name="post" action="admin.php?page=rivasliderlite_edit_slideshow" method="post">
7
  <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
8
- <h2><?php _e( 'Edit Slideshow', 'rivasliderlite' ); ?></h2>
9
  <?php
10
 
11
  /** Display welcome message */
12
  require 'editslideshow-welcome.php';
13
 
14
  /** Security nonce field */
15
- wp_nonce_field( "rivasliderlite-save_rivasliderlite_edit_slideshow", "rivasliderlite-save_rivasliderlite_edit_slideshow", false );
16
 
17
  ?>
18
  <div class="main-panel">
19
  <div class="messages-container">
20
- <?php do_action( 'rivasliderlite_admin_messages' ); ?>
21
  </div>
22
 
23
  <div class="clearfix">
@@ -39,7 +39,7 @@
39
 
40
  <input type="hidden" name="author" value="<?php echo esc_attr( $s->author ); ?>">
41
  <input type="hidden" name="slides" id="slideshow-images" value="">
42
- <input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Slideshow', 'rivasliderlite' ); ?>">
43
  <?php /** This ensures that the slide's JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?>
44
  <script type="text/javascript">document.getElementById('slideshow-images').value = '<?php echo json_encode( $s->slides ); ?>';</script>
45
  </div>
1
  <?php
2
  /** Get the slideshow */
3
+ $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
4
  ?>
5
  <div class="wrap">
6
+ <form name="post" action="admin.php?page=easingsliderlite_edit_slideshow" method="post">
7
  <div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
8
+ <h2><?php _e( 'Edit Slideshow', 'easingsliderlite' ); ?></h2>
9
  <?php
10
 
11
  /** Display welcome message */
12
  require 'editslideshow-welcome.php';
13
 
14
  /** Security nonce field */
15
+ wp_nonce_field( "easingsliderlite-save_easingsliderlite_edit_slideshow", "easingsliderlite-save_easingsliderlite_edit_slideshow", false );
16
 
17
  ?>
18
  <div class="main-panel">
19
  <div class="messages-container">
20
+ <?php do_action( 'easingsliderlite_admin_messages' ); ?>
21
  </div>
22
 
23
  <div class="clearfix">
39
 
40
  <input type="hidden" name="author" value="<?php echo esc_attr( $s->author ); ?>">
41
  <input type="hidden" name="slides" id="slideshow-images" value="">
42
+ <input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Slideshow', 'easingsliderlite' ); ?>">
43
  <?php /** This ensures that the slide's JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?>
44
  <script type="text/javascript">document.getElementById('slideshow-images').value = '<?php echo json_encode( $s->slides ); ?>';</script>
45
  </div>
templates/slideshow.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /** Get the slideshow */
4
- $slideshow = $s = RivaSliderLite::get_instance()->validate( get_option( 'rivasliderlite_slideshow' ) );
5
 
6
  /** Return WordPress error if slideshow doesn't exist */
7
  if ( $s === false )
8
- return printf( __( 'The slideshow does not appear to exist. Oh dear! Please try contacting support.', 'rivasliderlite' ), $id );
9
 
10
  /** Get plugin settings */
11
- $settings = get_option( 'rivasliderlite_settings' );
12
 
13
  /** Load slideshow scripts and styles in foooter (if set to do so) */
14
  if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'footer' )
@@ -18,8 +18,8 @@
18
 
19
  /** Bail if there are no slides to display */
20
  if ( count( $slideshow->slides ) == 0 ) {
21
- if ( current_user_can( 'rivasliderlite_edit_slideshow' ) )
22
- _e( '<p>This slideshow contains no slides. Uh oh!', 'rivasliderlite' );
23
  return;
24
  }
25
 
@@ -28,7 +28,7 @@
28
  $slideshow_styles = "max-width: {$s->dimensions->width}px; max-height: {$s->dimensions->height}px";
29
  else
30
  $slideshow_styles = "width: {$s->dimensions->width}px; height: {$s->dimensions->height}px";
31
- $slideshow_styles = apply_filters( 'rivasliderlite_slideshow_styles', $slideshow_styles, $s );
32
  $slideshow_options = json_encode(
33
  array(
34
  'dimensions' => $s->dimensions,
@@ -41,21 +41,21 @@
41
  /** Dynamically calculcated viewport height */
42
  $viewport_height = ( 100 * ( $s->dimensions->height / $s->dimensions->width ) );
43
  $viewport_styles = "padding-top: {$viewport_height}% !important;";
44
- $viewport_styles = apply_filters( 'rivasliderlite_viewport_styles', $viewport_styles, $s );
45
 
46
  /** Slide container styles */
47
  $container_width = ( $s->transitions->effect == 'slide' ) ? ( 100 * ( count( $s->slides )+2 ) ) : '100';
48
  $container_styles = "display: none; width: {$container_width}%;";
49
- $container_styles = apply_filters( 'rivasliderlite_container_styles', $container_styles, $s );
50
 
51
  /** Add viewport height when using 'fade' transition */
52
  if ( $s->transitions->effect == 'fade' )
53
  $container_styles .= " padding-top: {$viewport_height}% !important;";
54
 
55
  ?>
56
- <div class="rivasliderlite use-<?php echo $s->transitions->effect; ?>" data-options="<?php echo esc_attr( $slideshow_options ); ?>" style="<?php echo esc_attr( $slideshow_styles ); ?>">
57
- <div class="rivasliderlite-viewport" style="<?php echo esc_attr( $viewport_styles ); ?>">
58
- <div class="rivasliderlite-slides-container" style="<?php echo esc_attr( $container_styles ); ?>">
59
  <?php
60
  /** Randomize the slides if set to do so */
61
  if ( $s->general->randomize )
@@ -70,21 +70,21 @@
70
  $slide_styles .= " display: none; opacity: 0;";
71
 
72
  /** Apply filter for custom styles */
73
- $slide_styles = apply_filters( 'rivasliderlite_slide_styles', $slide_styles, $slide, $s );
74
 
75
  /** Resized image */
76
  if ( $settings['resizing'] )
77
- $image = RSL_Resize::resize( $slide->url, $s->dimensions->width, $s->dimensions->height, true, true );
78
  else
79
  $image = array( 'url' => $slide->url, 'width' => $s->dimensions->width, 'height' => $s->dimensions->height );
80
 
81
  ?>
82
- <div class="rivasliderlite-slide" style="<?php echo $slide_styles; ?>">
83
  <?php if ( !empty( $slide->link ) ) { ?><a href="<?php echo esc_attr( $slide->link ); ?>" target="<?php echo esc_attr( $slide->linkTarget ); ?>"><?php } ?>
84
- <img src="<?php echo esc_attr( $image['url'] ); ?>" class="rivasliderlite-image" alt="<?php echo esc_attr( $slide->alt ); ?>" />
85
  <?php if ( !empty( $slide->link ) ) { ?></a><?php } ?>
86
  <?php if ( !empty( $slide->content ) ) { ?>
87
- <div class="rivasliderlite-slide-content">
88
  <?php echo do_shortcode( html_entity_decode( $slide->content ) ) ?>
89
  </div>
90
  <?php } ?>
@@ -93,25 +93,25 @@
93
  </div>
94
  </div>
95
 
96
- <div class="rivasliderlite-preload"></div>
97
 
98
- <?php if ( $s->navigation->arrows && !has_action( 'rivasliderlite_arrows' ) ) : ?>
99
- <div class="rivasliderlite-arrows rivasliderlite-next <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
100
- <div class="rivasliderlite-arrows rivasliderlite-prev <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
101
- <?php else : do_action( 'rivasliderlite_arrows', $s ); endif; ?>
102
 
103
- <?php if ( $s->navigation->pagination && !has_action( 'rivasliderlite_pagination' ) ) : ?>
104
- <div class="rivasliderlite-pagination <?php echo esc_attr( $s->navigation->pagination_position ) .' '. esc_attr( $s->navigation->pagination_location ); ?>">
105
  <?php foreach ( $s->slides as $index => $slide ) : ?>
106
- <div class="rivasliderlite-icon"></div>
107
  <?php endforeach; ?>
108
  </div>
109
- <?php else : do_action( 'rivasliderlite_pagination', $s ); endif; ?>
110
 
111
  <?php /** Edit slideshow link, don't remove this! Won't show if user isn't logged in or doesn't have permission to edit slideshows */ ?>
112
- <?php if ( current_user_can( 'rivasliderlite_edit_slideshow' ) && apply_filters( 'rivasliderlite_edit_slideshow_icon', __return_true() ) ) : ?>
113
- <a href="<?php echo admin_url( "admin.php?page=rivasliderlite_edit_slideshow" ); ?>" style="position: absolute; top: -15px; left: -15px; z-index: 50;">
114
- <img src="<?php echo plugins_url( dirname( plugin_basename( RivaSliderLite::get_file() ) ) ) . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'edit_icon.png'; ?>" style="box-shadow: none; border-radius: none;" />
115
  </a>
116
  <?php endif; ?>
117
  </div>
1
  <?php
2
 
3
  /** Get the slideshow */
4
+ $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
6
  /** Return WordPress error if slideshow doesn't exist */
7
  if ( $s === false )
8
+ return printf( __( 'The slideshow does not appear to exist. Oh dear! Please try contacting support.', 'easingsliderlite' ), $id );
9
 
10
  /** Get plugin settings */
11
+ $settings = get_option( 'easingsliderlite_settings' );
12
 
13
  /** Load slideshow scripts and styles in foooter (if set to do so) */
14
  if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'footer' )
18
 
19
  /** Bail if there are no slides to display */
20
  if ( count( $slideshow->slides ) == 0 ) {
21
+ if ( current_user_can( 'easingsliderlite_edit_slideshow' ) )
22
+ _e( '<p>This slideshow contains no slides. Uh oh!', 'easingsliderlite' );
23
  return;
24
  }
25
 
28
  $slideshow_styles = "max-width: {$s->dimensions->width}px; max-height: {$s->dimensions->height}px";
29
  else
30
  $slideshow_styles = "width: {$s->dimensions->width}px; height: {$s->dimensions->height}px";
31
+ $slideshow_styles = apply_filters( 'easingsliderlite_slideshow_styles', $slideshow_styles, $s );
32
  $slideshow_options = json_encode(
33
  array(
34
  'dimensions' => $s->dimensions,
41
  /** Dynamically calculcated viewport height */
42
  $viewport_height = ( 100 * ( $s->dimensions->height / $s->dimensions->width ) );
43
  $viewport_styles = "padding-top: {$viewport_height}% !important;";
44
+ $viewport_styles = apply_filters( 'easingsliderlite_viewport_styles', $viewport_styles, $s );
45
 
46
  /** Slide container styles */
47
  $container_width = ( $s->transitions->effect == 'slide' ) ? ( 100 * ( count( $s->slides )+2 ) ) : '100';
48
  $container_styles = "display: none; width: {$container_width}%;";
49
+ $container_styles = apply_filters( 'easingsliderlite_container_styles', $container_styles, $s );
50
 
51
  /** Add viewport height when using 'fade' transition */
52
  if ( $s->transitions->effect == 'fade' )
53
  $container_styles .= " padding-top: {$viewport_height}% !important;";
54
 
55
  ?>
56
+ <div class="easingsliderlite use-<?php echo $s->transitions->effect; ?>" data-options="<?php echo esc_attr( $slideshow_options ); ?>" style="<?php echo esc_attr( $slideshow_styles ); ?>">
57
+ <div class="easingsliderlite-viewport" style="<?php echo esc_attr( $viewport_styles ); ?>">
58
+ <div class="easingsliderlite-slides-container" style="<?php echo esc_attr( $container_styles ); ?>">
59
  <?php
60
  /** Randomize the slides if set to do so */
61
  if ( $s->general->randomize )
70
  $slide_styles .= " display: none; opacity: 0;";
71
 
72
  /** Apply filter for custom styles */
73
+ $slide_styles = apply_filters( 'easingsliderlite_slide_styles', $slide_styles, $slide, $s );
74
 
75
  /** Resized image */
76
  if ( $settings['resizing'] )
77
+ $image = ESL_Resize::resize( $slide->url, $s->dimensions->width, $s->dimensions->height, true, true );
78
  else
79
  $image = array( 'url' => $slide->url, 'width' => $s->dimensions->width, 'height' => $s->dimensions->height );
80
 
81
  ?>
82
+ <div class="easingsliderlite-slide" style="<?php echo $slide_styles; ?>">
83
  <?php if ( !empty( $slide->link ) ) { ?><a href="<?php echo esc_attr( $slide->link ); ?>" target="<?php echo esc_attr( $slide->linkTarget ); ?>"><?php } ?>
84
+ <img src="<?php echo esc_attr( $image['url'] ); ?>" class="easingsliderlite-image" alt="<?php echo esc_attr( $slide->alt ); ?>" />
85
  <?php if ( !empty( $slide->link ) ) { ?></a><?php } ?>
86
  <?php if ( !empty( $slide->content ) ) { ?>
87
+ <div class="easingsliderlite-slide-content">
88
  <?php echo do_shortcode( html_entity_decode( $slide->content ) ) ?>
89
  </div>
90
  <?php } ?>
93
  </div>
94
  </div>
95
 
96
+ <div class="easingsliderlite-preload"></div>
97
 
98
+ <?php if ( $s->navigation->arrows && !has_action( 'easingsliderlite_arrows' ) ) : ?>
99
+ <div class="easingsliderlite-arrows easingsliderlite-next <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
100
+ <div class="easingsliderlite-arrows easingsliderlite-prev <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
101
+ <?php else : do_action( 'easingsliderlite_arrows', $s ); endif; ?>
102
 
103
+ <?php if ( $s->navigation->pagination && !has_action( 'easingsliderlite_pagination' ) ) : ?>
104
+ <div class="easingsliderlite-pagination <?php echo esc_attr( $s->navigation->pagination_position ) .' '. esc_attr( $s->navigation->pagination_location ); ?>">
105
  <?php foreach ( $s->slides as $index => $slide ) : ?>
106
+ <div class="easingsliderlite-icon"></div>
107
  <?php endforeach; ?>
108
  </div>
109
+ <?php else : do_action( 'easingsliderlite_pagination', $s ); endif; ?>
110
 
111
  <?php /** Edit slideshow link, don't remove this! Won't show if user isn't logged in or doesn't have permission to edit slideshows */ ?>
112
+ <?php if ( current_user_can( 'easingsliderlite_edit_slideshow' ) && apply_filters( 'easingsliderlite_edit_slideshow_icon', __return_true() ) ) : ?>
113
+ <a href="<?php echo admin_url( "admin.php?page=easingsliderlite_edit_slideshow" ); ?>" style="position: absolute; top: -15px; left: -15px; z-index: 50;">
114
+ <img src="<?php echo plugins_url( dirname( plugin_basename( EasingSliderLite::get_file() ) ) ) . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'edit_icon.png'; ?>" style="box-shadow: none; border-radius: none;" />
115
  </a>
116
  <?php endif; ?>
117
  </div>