Easing Slider - Version 2.1

Version Description

  • Added "Customize" panel which allows you to make basic slideshow styling alterations using a new visual editor.
  • Reconfigured preloading functionality to fix a bug.
  • Added title attribute functionality to images.
  • Re-added functionality for script and style registration, making them easier enqueue.
  • Fixed backbone templating issues that would render admin area unusable for some users.
Download this release

Release Info

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

Code changes from version 2.0.1.3 to 2.1

css/admin.css CHANGED
@@ -273,11 +273,11 @@ textarea.success {
273
  }
274
 
275
  /** ===== Settings page ===== */
276
- .settings label > input {
277
  margin-top: 0;
278
  margin-right: 4px;
279
  }
280
- .settings label > span {
281
  margin-right: 20px;
282
  }
283
 
273
  }
274
 
275
  /** ===== Settings page ===== */
276
+ .main-settings label > input {
277
  margin-top: 0;
278
  margin-right: 4px;
279
  }
280
+ .main-settings label > span {
281
  margin-right: 20px;
282
  }
283
 
css/admin.min.css CHANGED
@@ -1 +1 @@
1
- .pull-left{float:left}.pull-right{float:right}.clearfix{*zoom:1}.clearfix::before,.clearfix::after{display:table;content:'';line-height:0}.clearfix::after{clear:both}.column-id{width:2em}.wp-media-buttons .button{padding-left:.4em;margin-right:5px}.wp-media-buttons .button:last-child{margin-right:0}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:16px;height:16px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add-image span.wp-media-buttons-icon{background:url('../../../../wp-admin/images/media-button.png') no-repeat top left}.wp-media-buttons .delete-images span.wp-media-buttons-icon{background:url('../images/trash.png') no-repeat 0 0;margin-top:-1px}.wp-media-buttons .edit-settings span.wp-media-buttons-icon{background:url('../../../../wp-admin/images/menu.png') no-repeat top left;background-position:-336px -40px}.multiple-checkbox{overflow-x:hidden;overflow-y:auto;border:1px solid #dfdfdf;background-color:#fff;width:25%;height:120px;-webkit-border-radius:3px;border-radius:3px}.multiple-checkbox ul{list-style-type:none;width:auto;line-height:1.2;margin:0;padding:0}.multiple-checkbox ul li{margin:0;padding:2px 2px 0 0;line-height:1.2}.multiple-checkbox ul li.odd{background-color:#f9f9f9}.multiple-checkbox ul li input{margin:0 5px}input.error,textarea.error{border-color:#b94a48!important;-webkit-box-shadow:1px 1px 2px rgba(213,147,146,0.3)!important;box-shadow:1px 1px 2px rgba(213,147,146,0.3)!important}input.success,textarea.success{border-color:#468847!important;-webkit-box-shadow:1px 1px 2px rgba(122,186,123,0.3)!important;box-shadow:1px 1px 2px rgba(122,186,123,0.3)!important}.main-panel{position:relative}.main-panel .description{font-size:11px;font-style:italic;display:block;color:#777;padding:5px 0}.divider{padding:0;margin:20px 0;width:100%;height:1px;background:#e6e6e6}.settings-container{float:right;clear:right;width:285px;padding-right:5px}.settings-container .widgets-holder-wrap{margin-top:0}.settings-container .sidebar-content{border-width:0 1px 1px;border-style:none solid solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px;min-height:20px}.settings-container .sidebar-content .divider{margin-bottom:0}.settings-container .sidebar-content .field,.settings-container .sidebar-content .radio{width:100%;margin:1em 0}.settings-container .sidebar-content .field span{font-weight:bold;display:block}.settings-container .sidebar-content .field{float:left}.settings-container .sidebar-content .field input,.settings-container .sidebar-content .field select{width:90%}.settings-container .sidebar-content .field input[type="checkbox"]{width:auto;margin-right:4px}.settings-container .sidebar-content .radio>span{font-weight:bold;float:left}.settings-container .sidebar-content .radio .buttons{float:right}.settings-container .sidebar-content .radio .buttons label{margin-right:10px}.settings-container .sidebar-content .radio .buttons input{margin-top:0;margin-right:2px}.settings-container .dimension-settings .field{width:45%}.settings-container .dimension-settings .field:first-child{margin-right:5%}.thumbnails-container{float:left;clear:left;width:100%;margin:15px -300px 0 0}.thumbnails-container .inner{margin-right:300px}.thumbnails-container .thumbnail{float:left;position:relative}.thumbnails-container .thumbnail .delete-button{position:absolute;top:-15px;right:5px;width:36px;height:36px;z-index:10;background:url(../images/delete_icon.png) no-repeat top left;cursor:pointer;opacity:0;-webkit-transition:opacity .125s ease;-moz-transition:opacity .125s ease;-ms-transition:opacity .125s ease;-o-transition:opacity .125s ease;transition:opacity .125s ease}.thumbnails-container .thumbnail:hover .delete-button{opacity:1}.thumbnails-container .thumbnail img{-moz-box-shadow:0 1px 4px 0 #a5a5a5;-webkit-box-shadow:0 1px 4px 0 #a5a5a5;box-shadow:0 1px 4px 0 #a5a5a5;-webkit-border-radius:2px;border-radius:2px;cursor:pointer;width:150px;height:150px;padding:0;margin:0 20px 20px 0}.media-frame-title,.media-frame-router,.media-frame-content,.media-frame-toolbar{left:0!important}.media-frame-content{padding:0 16px}.media-main{margin-right:283px}.media-main h2{font-weight:200}.media-main input,.media-main textarea{max-width:500px!important}.media-main textarea{height:200px;resize:none}.media-main .embed-link-settings{top:0}.media-main .setting{margin-top:30px!important}.media-main .setting:first-child{margin-top:0!important}.media-main .description{font-size:11px;margin-top:5px}.media-main .thumbnail{position:relative}.media-main .thumbnail .change-image{position:absolute;bottom:10px;right:10px;z-index:9999}.settings label>input{margin-top:0;margin-right:4px}.settings label>span{margin-right:20px}.supports-drag-drop{z-index:1000}
1
+ .pull-left{float:left}.pull-right{float:right}.clearfix{*zoom:1}.clearfix::before,.clearfix::after{display:table;content:'';line-height:0}.clearfix::after{clear:both}.column-id{width:2em}.wp-media-buttons .button{padding-left:.4em;margin-right:5px}.wp-media-buttons .button:last-child{margin-right:0}.wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:16px;height:16px;vertical-align:text-top;margin:0 2px}.wp-media-buttons .add-image span.wp-media-buttons-icon{background:url('../../../../wp-admin/images/media-button.png') no-repeat top left}.wp-media-buttons .delete-images span.wp-media-buttons-icon{background:url('../images/trash.png') no-repeat 0 0;margin-top:-1px}.wp-media-buttons .edit-settings span.wp-media-buttons-icon{background:url('../../../../wp-admin/images/menu.png') no-repeat top left;background-position:-336px -40px}.multiple-checkbox{overflow-x:hidden;overflow-y:auto;border:1px solid #dfdfdf;background-color:#fff;width:25%;height:120px;-webkit-border-radius:3px;border-radius:3px}.multiple-checkbox ul{list-style-type:none;width:auto;line-height:1.2;margin:0;padding:0}.multiple-checkbox ul li{margin:0;padding:2px 2px 0 0;line-height:1.2}.multiple-checkbox ul li.odd{background-color:#f9f9f9}.multiple-checkbox ul li input{margin:0 5px}input.error,textarea.error{border-color:#b94a48!important;-webkit-box-shadow:1px 1px 2px rgba(213,147,146,0.3)!important;box-shadow:1px 1px 2px rgba(213,147,146,0.3)!important}input.success,textarea.success{border-color:#468847!important;-webkit-box-shadow:1px 1px 2px rgba(122,186,123,0.3)!important;box-shadow:1px 1px 2px rgba(122,186,123,0.3)!important}.main-panel{position:relative}.main-panel .description{font-size:11px;font-style:italic;display:block;color:#777;padding:5px 0}.divider{padding:0;margin:20px 0;width:100%;height:1px;background:#e6e6e6}.settings-container{float:right;clear:right;width:285px;padding-right:5px}.settings-container .widgets-holder-wrap{margin-top:0}.settings-container .sidebar-content{border-width:0 1px 1px;border-style:none solid solid;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px;min-height:20px}.settings-container .sidebar-content .divider{margin-bottom:0}.settings-container .sidebar-content .field,.settings-container .sidebar-content .radio{width:100%;margin:1em 0}.settings-container .sidebar-content .field span{font-weight:bold;display:block}.settings-container .sidebar-content .field{float:left}.settings-container .sidebar-content .field input,.settings-container .sidebar-content .field select{width:90%}.settings-container .sidebar-content .field input[type="checkbox"]{width:auto;margin-right:4px}.settings-container .sidebar-content .radio>span{font-weight:bold;float:left}.settings-container .sidebar-content .radio .buttons{float:right}.settings-container .sidebar-content .radio .buttons label{margin-right:10px}.settings-container .sidebar-content .radio .buttons input{margin-top:0;margin-right:2px}.settings-container .dimension-settings .field{width:45%}.settings-container .dimension-settings .field:first-child{margin-right:5%}.thumbnails-container{float:left;clear:left;width:100%;margin:15px -300px 0 0}.thumbnails-container .inner{margin-right:300px}.thumbnails-container .thumbnail{float:left;position:relative}.thumbnails-container .thumbnail .delete-button{position:absolute;top:-15px;right:5px;width:36px;height:36px;z-index:10;background:url(../images/delete_icon.png) no-repeat top left;cursor:pointer;opacity:0;-webkit-transition:opacity .125s ease;-moz-transition:opacity .125s ease;-ms-transition:opacity .125s ease;-o-transition:opacity .125s ease;transition:opacity .125s ease}.thumbnails-container .thumbnail:hover .delete-button{opacity:1}.thumbnails-container .thumbnail img{-moz-box-shadow:0 1px 4px 0 #a5a5a5;-webkit-box-shadow:0 1px 4px 0 #a5a5a5;box-shadow:0 1px 4px 0 #a5a5a5;-webkit-border-radius:2px;border-radius:2px;cursor:pointer;width:150px;height:150px;padding:0;margin:0 20px 20px 0}.media-frame-title,.media-frame-router,.media-frame-content,.media-frame-toolbar{left:0!important}.media-frame-content{padding:0 16px}.media-main{margin-right:283px}.media-main h2{font-weight:200}.media-main input,.media-main textarea{max-width:500px!important}.media-main textarea{height:200px;resize:none}.media-main .embed-link-settings{top:0}.media-main .setting{margin-top:30px!important}.media-main .setting:first-child{margin-top:0!important}.media-main .description{font-size:11px;margin-top:5px}.media-main .thumbnail{position:relative}.media-main .thumbnail .change-image{position:absolute;bottom:10px;right:10px;z-index:9999}.main-settings label>input{margin-top:0;margin-right:4px}.main-settings label>span{margin-right:20px}.supports-drag-drop{z-index:1000}
css/slideshow.css CHANGED
@@ -15,18 +15,21 @@
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;
26
- line-height: 0px !important;
27
  outline: none !important;
28
  }
29
 
 
 
 
 
 
 
30
  .easingsliderlite {
31
  position: relative !important;
32
  }
@@ -36,8 +39,8 @@
36
  width: 100% !important;
37
  height: 100% !important;
38
  position: absolute !important;
39
- top: 0px !important;
40
- left: 0px !important;
41
  z-index: 50 !important;
42
  }
43
 
@@ -65,8 +68,8 @@
65
  .easingsliderlite-slides-container {
66
  overflow: hidden !important;
67
  position: absolute !important;
68
- top: 0px;
69
- left: 0px;
70
  display: block !important;
71
  }
72
 
@@ -130,23 +133,38 @@
130
  }
131
 
132
  .easingsliderlite-slide-content .caption.left {
133
- top: 0px !important;
134
- left: 0px !important;
135
  }
136
 
137
  .easingsliderlite-slide-content .caption.right {
138
- top: 0px !important;
139
- right: 0px !important;
140
  }
141
 
142
  .easingsliderlite-slide-content .caption.top {
143
- top: 0px !important;
144
- left: 0px !important;
145
  }
146
 
147
  .easingsliderlite-slide-content .caption.bottom {
148
- bottom: 0px !important;
149
- left: 0px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
151
 
152
  /* ===== Anything below here can be edited. Have fun! ===== */
@@ -155,9 +173,7 @@
155
  top: 46%;
156
  width: 30px;
157
  height: 30px;
158
- background-image: url(../images/slideshow_arrows.png);
159
  background-repeat: no-repeat;
160
- background-position: 0px 0px;
161
  z-index: 30;
162
  cursor: pointer;
163
  opacity: 0; /* Slideshow will set to this 1 when it has loaded */
@@ -168,15 +184,23 @@
168
  transition: opacity 0.25s linear;
169
  }
170
 
 
 
 
 
 
 
 
 
 
 
171
  .easingsliderlite-next.inside {
172
  right: 10px;
173
- background-position: 0px -29px;
174
  }
175
 
176
  .easingsliderlite-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
  .easingsliderlite-prev.inside {
@@ -235,13 +259,13 @@
235
 
236
  .easingsliderlite-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
  .easingsliderlite-pagination.outside.bottom-right {
243
  bottom: -25px;
244
- right: 0px;
245
  padding-top: 20px;
246
  }
247
 
@@ -255,13 +279,13 @@
255
 
256
  .easingsliderlite-pagination.outside.top-left {
257
  top: -25px;
258
- left: 0px;
259
  padding-bottom: 20px;
260
  }
261
 
262
  .easingsliderlite-pagination.outside.top-right {
263
  top: -25px;
264
- right: 0px;
265
  padding-bottom: 20px;
266
  }
267
 
@@ -274,43 +298,22 @@
274
  }
275
 
276
  .easingsliderlite-icon {
277
- width: 14px;
278
- height: 14px;
279
- background-image: url(../images/slideshow_icons.png);
 
 
280
  background-repeat: no-repeat;
281
- background-position: 0px 0px;
282
  display: inline-block;
283
  z-index: 30;
284
  cursor: pointer;
285
  }
286
 
287
  .easingsliderlite-icon:last-child {
288
- margin-right: 0px;
289
  }
290
 
291
  .easingsliderlite-icon.active {
292
- background-position: 0px -14px;
293
- }
294
-
295
- .easingsliderlite-slide-content .caption {
296
- background-color: #000; /** Fallback for rgba unsupported browsers */
297
- background-color: rgba(0, 0, 0, 0.5);
298
- color: #fff;
299
- padding: 20px;
300
- margin: 20px;
301
- }
302
-
303
- .active .easingsliderlite-slide-content .caption {
304
- -webkit-animation-duration: 0.25s;
305
- -moz-animation-duration: 0.25s;
306
- -o-animation-duration: 0.25s;
307
- animation-duration: 0.25s;
308
- -webkit-animation-delay: 0.5s;
309
- -moz-animation-delay: 0.5s;
310
- -o-animation-delay: 0.5s;
311
- animation-delay: 0.5s;
312
- -webkit-animation-fill-mode: both;
313
- -moz-animation-fill-mode: both;
314
- -o-animation-fill-mode: both;
315
- animation-fill-mode: both;
316
  }
15
 
16
  /* ===== Core structural CSS. Don't edit this! ===== */
17
  .easingsliderlite,
18
+ .easingsliderlite div,
19
+ .easingsliderlite a,
20
+ .easingsliderlite img {
21
+ margin: 0 !important;
22
+ padding: 0 !important;
23
+ line-height: 0 !important;
 
 
 
24
  outline: none !important;
25
  }
26
 
27
+ .easingsliderlite div,
28
+ .easingsliderlite a
29
+ .easingsliderlite img {
30
+ border: 0 !important;
31
+ }
32
+
33
  .easingsliderlite {
34
  position: relative !important;
35
  }
39
  width: 100% !important;
40
  height: 100% !important;
41
  position: absolute !important;
42
+ top: 0 !important;
43
+ left: 0 !important;
44
  z-index: 50 !important;
45
  }
46
 
68
  .easingsliderlite-slides-container {
69
  overflow: hidden !important;
70
  position: absolute !important;
71
+ top: 0;
72
+ left: 0;
73
  display: block !important;
74
  }
75
 
133
  }
134
 
135
  .easingsliderlite-slide-content .caption.left {
136
+ top: 0 !important;
137
+ left: 0 !important;
138
  }
139
 
140
  .easingsliderlite-slide-content .caption.right {
141
+ top: 0 !important;
142
+ right: 0 !important;
143
  }
144
 
145
  .easingsliderlite-slide-content .caption.top {
146
+ top: 0 !important;
147
+ left: 0 !important;
148
  }
149
 
150
  .easingsliderlite-slide-content .caption.bottom {
151
+ bottom: 0 !important;
152
+ left: 0 !important;
153
+ }
154
+
155
+ .easingsliderlite-shadow,
156
+ .easingsliderlite-shadow img {
157
+ padding: 0 !important;
158
+ line-height: 0 !important;
159
+ outline: none !important;
160
+ -webkit-box-shadow: none !important;
161
+ -moz-box-shadow: none !important;
162
+ box-shadow: none !important;
163
+ }
164
+
165
+ .easingsliderlite-shadow img {
166
+ margin: 0 !important;
167
+ width: 100%;
168
  }
169
 
170
  /* ===== Anything below here can be edited. Have fun! ===== */
173
  top: 46%;
174
  width: 30px;
175
  height: 30px;
 
176
  background-repeat: no-repeat;
 
177
  z-index: 30;
178
  cursor: pointer;
179
  opacity: 0; /* Slideshow will set to this 1 when it has loaded */
184
  transition: opacity 0.25s linear;
185
  }
186
 
187
+ .easingsliderlite-arrows.easingsliderlite-next {
188
+ background-image: url(../images/slideshow_arrow_next.png);
189
+ background-position: top left;
190
+ }
191
+
192
+ .easingsliderlite-arrows.easingsliderlite-prev {
193
+ background-image: url(../images/slideshow_arrow_prev.png);
194
+ background-position: top right;
195
+ }
196
+
197
  .easingsliderlite-next.inside {
198
  right: 10px;
 
199
  }
200
 
201
  .easingsliderlite-next.outside {
202
  right: -40px;
203
  padding-left: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
 
204
  }
205
 
206
  .easingsliderlite-prev.inside {
259
 
260
  .easingsliderlite-pagination.outside.bottom-left {
261
  bottom: -25px;
262
+ left: 0;
263
  padding-top: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
264
  }
265
 
266
  .easingsliderlite-pagination.outside.bottom-right {
267
  bottom: -25px;
268
+ right: 0;
269
  padding-top: 20px;
270
  }
271
 
279
 
280
  .easingsliderlite-pagination.outside.top-left {
281
  top: -25px;
282
+ left: 0;
283
  padding-bottom: 20px;
284
  }
285
 
286
  .easingsliderlite-pagination.outside.top-right {
287
  top: -25px;
288
+ right: 0;
289
  padding-bottom: 20px;
290
  }
291
 
298
  }
299
 
300
  .easingsliderlite-icon {
301
+ width: 15px;
302
+ height: 15px;
303
+ margin: 0;
304
+ padding: 0;
305
+ background-image: url(../images/slideshow_icon_inactive.png);
306
  background-repeat: no-repeat;
307
+ background-position: 0 0;
308
  display: inline-block;
309
  z-index: 30;
310
  cursor: pointer;
311
  }
312
 
313
  .easingsliderlite-icon:last-child {
314
+ margin-right: 0;
315
  }
316
 
317
  .easingsliderlite-icon.active {
318
+ background-image: url(../images/slideshow_icon_active.png);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  }
css/slideshow.min.css CHANGED
@@ -1 +1,2 @@
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}.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}
 
1
+ .easingsliderlite,.easingsliderlite div,.easingsliderlite a,.easingsliderlite img{margin:0!important;padding:0!important;line-height:0!important;outline:none!important}.easingsliderlite div,.easingsliderlite a .easingsliderlite img{border:0!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}.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-shadow,.easingsliderlite-shadow img{padding:0!important;line-height:0!important;outline:none!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important}.easingsliderlite-shadow img{margin:0!important;width:100%}.easingsliderlite-arrows{position:absolute;top:46%;width:30px;height:30px;background-repeat:no-repeat;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-arrows.easingsliderlite-next{background-image:url(../images/slideshow_arrow_next.png);background-position:top left}.easingsliderlite-arrows.easingsliderlite-prev{background-image:url(../images/slideshow_arrow_prev.png);background-position:top right}.easingsliderlite-next.inside{right:10px}.easingsliderlite-next.outside{right:-40px;padding-left:20px}.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:15px;height:15px;margin:0;padding:0;background-image:url(../images/slideshow_icon_inactive.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;z-index:30;cursor:pointer}
2
+ .easingsliderlite-icon:last-child{margin-right:0}.easingsliderlite-icon.active{background-image:url(../images/slideshow_icon_active.png)}
easingsliderlite.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Easing Slider "Lite"
5
  Plugin URI: http://easingslider.com/
6
- Version: 2.0.1.3
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.
@@ -60,7 +60,7 @@ class EasingSliderLite {
60
  *
61
  * @since 2.0
62
  */
63
- public static $version = '2.0.1.3';
64
 
65
  /**
66
  * Our array of Easing Slider "Lite" admin pages. These are used to conditionally load scripts
@@ -146,6 +146,8 @@ class EasingSliderLite {
146
  add_shortcode( 'easingslider', array( $this, 'do_shortcode' ) );
147
 
148
  /** Plugin actions */
 
 
149
  add_action( 'admin_menu', array( $this, 'add_menus' ) );
150
  add_action( 'admin_menu', array( $this, 'do_actions' ) );
151
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
@@ -162,16 +164,19 @@ class EasingSliderLite {
162
 
163
  /** Some hooks for our own custom actions */
164
  add_action( 'easingsliderlite_edit_slideshow_actions', array( $this, 'do_slideshow_actions' ) );
 
165
  add_action( 'easingsliderlite_edit_settings_actions', array( $this, 'do_settings_actions' ) );
166
 
167
  /** Get plugin settings */
168
  $settings = get_option( 'easingsliderlite_settings' );
169
 
170
  /** Load slideshow scripts & styles in the header if set to do so */
171
- if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'header' )
172
- add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_styles' ) );
173
  if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'header' )
174
  add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_scripts' ) );
 
 
 
 
175
 
176
  /** Initialization hook for adding external functionality */
177
  do_action_ref_array( 'easingsliderlite', array( $this ) );
@@ -275,7 +280,8 @@ class EasingSliderLite {
275
 
276
  /** Add "wp_options" table options */
277
  add_option( 'easingsliderlite_version', self::$version );
278
- add_option( 'easingsliderlite_slideshow', $this->defaults() );
 
279
  add_option( 'easingsliderlite_settings',
280
  array(
281
  'resizing' => false,
@@ -304,6 +310,7 @@ class EasingSliderLite {
304
  /** Delete "wp_options" table options */
305
  delete_option( 'easingsliderlite_version' );
306
  delete_option( 'easingsliderlite_slideshow' );
 
307
  delete_option( 'easingsliderlite_settings' );
308
  delete_option( 'easingsliderlite_major_upgrade' );
309
  delete_option( 'easingsliderlite_disable_welcome_panel' );
@@ -364,7 +371,7 @@ class EasingSliderLite {
364
  *
365
  * @since 2.0
366
  */
367
- public function defaults() {
368
 
369
  /** Get the current user to be assigned as the slideshow author */
370
  $author = __( 'Unknown', 'easingsliderlite' );
@@ -383,6 +390,40 @@ class EasingSliderLite {
383
 
384
  }
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  /**
387
  * Returns the plugin capabilities
388
  *
@@ -391,6 +432,7 @@ class EasingSliderLite {
391
  public function capabilities() {
392
  $capabilities = array(
393
  'easingsliderlite_edit_slideshow',
 
394
  'easingsliderlite_edit_settings'
395
  );
396
  $capabilities = apply_filters( 'easingsliderlite_capabilities', $capabilities );
@@ -450,7 +492,7 @@ class EasingSliderLite {
450
  public function add_menus() {
451
 
452
  /** Hook suffixs for admin menus */
453
- $pages = array( 'easingsliderlite_edit_slideshow', 'easingsliderlite_edit_settings' );
454
 
455
  /** Toplevel menu */
456
  $this->whitelist[] = add_menu_page(
@@ -470,6 +512,14 @@ class EasingSliderLite {
470
  'easingsliderlite_edit_slideshow',
471
  array( $this, 'edit_slideshow_view' )
472
  );
 
 
 
 
 
 
 
 
473
  $this->whitelist[] = add_submenu_page(
474
  'easingsliderlite_edit_slideshow',
475
  __( 'Edit Settings', 'easingsliderlite' ),
@@ -513,6 +563,14 @@ class 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',
@@ -644,7 +702,7 @@ class EasingSliderLite {
644
  }
645
 
646
  /** Updates the slideshow */
647
- $slideshow = update_option( 'easingsliderlite_slideshow',
648
  (object) array(
649
  'author' => stripslashes_deep( $_POST['author'] ),
650
  'slides' => json_decode( stripslashes_deep( $_POST['slides'] ) ), /** Slides are stored as JSON string and need to be decoded before being saved. */
@@ -663,6 +721,36 @@ class EasingSliderLite {
663
 
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  /**
667
  * Settings page actions
668
  *
@@ -748,7 +836,7 @@ class EasingSliderLite {
748
  $settings = $this->validate( $_POST['settings'] );
749
 
750
  /** Update database option and get response */
751
- $response = update_option( 'easingsliderlite_settings', stripslashes_deep( $settings ) );
752
 
753
  /** Show update message */
754
  return $this->queue_message( __( 'Settings have been <strong>saved</strong> successfully.', 'easingsliderlite' ), 'updated' );
@@ -812,6 +900,39 @@ class EasingSliderLite {
812
 
813
  }
814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  /**
816
  * Loads admin stylesheets
817
  *
@@ -823,13 +944,8 @@ class EasingSliderLite {
823
  if ( !in_array( $hook, $this->whitelist ) )
824
  return;
825
 
826
- /** Get the extension */
827
- $ext = ( apply_filters( 'easingsliderlite_style_debug', __return_false() ) === true ) ? '.css' : '.min.css';
828
-
829
  /** Load styles */
830
- wp_enqueue_style( 'esl-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'admin'. $ext ), false, self::$version );
831
-
832
- /** Load your custom admin styles here */
833
  do_action( 'easingsliderlite_enqueue_admin_styles' );
834
 
835
  }
@@ -845,17 +961,12 @@ class EasingSliderLite {
845
  if ( !in_array( $hook, $this->whitelist ) )
846
  return;
847
 
848
- /** Get the extension */
849
- $ext = ( apply_filters( 'easingsliderlite_script_debug', __return_false() ) ) ? '.js' : '.min.js';
850
-
851
- /** Load scripts */
852
- wp_enqueue_media();
853
- wp_enqueue_script( 'esl-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 );
854
-
855
  /** Print Localized variables */
856
  wp_localize_script( 'esl-admin', 'easingsliderlite', $this->localizations() );
857
 
858
- /** Load your custom admin scripts here */
 
 
859
  do_action( 'easingsliderlite_enqueue_admin_scripts' );
860
 
861
  }
@@ -892,7 +1003,7 @@ class EasingSliderLite {
892
  return;
893
 
894
  /** Slide template */
895
- echo '<script type="text/html" id="tmpl-slide"><div class="thumbnail" data-id="<%= id %>"><a href="#" class="delete-button"></a><img src="<%= sizes.thumbnail.url %>" alt="<%= alt %>" /></div></script>';
896
 
897
  /** Slide editor template */
898
  echo '<script type="text/html" id="tmpl-edit-slide">';
@@ -917,6 +1028,18 @@ class EasingSliderLite {
917
  require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow.php';
918
 
919
  }
 
 
 
 
 
 
 
 
 
 
 
 
920
 
921
  /**
922
  * Edit settings view
3
  /*
4
  Plugin Name: Easing Slider "Lite"
5
  Plugin URI: http://easingslider.com/
6
+ Version: 2.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.
60
  *
61
  * @since 2.0
62
  */
63
+ public static $version = '2.1';
64
 
65
  /**
66
  * Our array of Easing Slider "Lite" admin pages. These are used to conditionally load scripts
146
  add_shortcode( 'easingslider', array( $this, 'do_shortcode' ) );
147
 
148
  /** Plugin actions */
149
+ add_action( 'init', array( $this, 'register_all_styles' ) );
150
+ add_action( 'init', array( $this, 'register_all_scripts' ) );
151
  add_action( 'admin_menu', array( $this, 'add_menus' ) );
152
  add_action( 'admin_menu', array( $this, 'do_actions' ) );
153
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
164
 
165
  /** Some hooks for our own custom actions */
166
  add_action( 'easingsliderlite_edit_slideshow_actions', array( $this, 'do_slideshow_actions' ) );
167
+ add_action( 'easingsliderlite_customizer_actions', array( $this, 'do_customizer_actions' ) );
168
  add_action( 'easingsliderlite_edit_settings_actions', array( $this, 'do_settings_actions' ) );
169
 
170
  /** Get plugin settings */
171
  $settings = get_option( 'easingsliderlite_settings' );
172
 
173
  /** Load slideshow scripts & styles in the header if set to do so */
 
 
174
  if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'header' )
175
  add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_scripts' ) );
176
+ if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'header' ) {
177
+ add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_styles' ) );
178
+ add_action( 'wp_head', array( 'ESL_Slideshow', 'print_custom_styles') );
179
+ }
180
 
181
  /** Initialization hook for adding external functionality */
182
  do_action_ref_array( 'easingsliderlite', array( $this ) );
280
 
281
  /** Add "wp_options" table options */
282
  add_option( 'easingsliderlite_version', self::$version );
283
+ add_option( 'easingsliderlite_slideshow', $this->slideshow_defaults() );
284
+ add_option( 'easingsliderlite_customizations', json_encode( $this->customization_defaults() ) );
285
  add_option( 'easingsliderlite_settings',
286
  array(
287
  'resizing' => false,
310
  /** Delete "wp_options" table options */
311
  delete_option( 'easingsliderlite_version' );
312
  delete_option( 'easingsliderlite_slideshow' );
313
+ delete_option( 'easingsliderlite_customizations' );
314
  delete_option( 'easingsliderlite_settings' );
315
  delete_option( 'easingsliderlite_major_upgrade' );
316
  delete_option( 'easingsliderlite_disable_welcome_panel' );
371
  *
372
  * @since 2.0
373
  */
374
+ public function slideshow_defaults() {
375
 
376
  /** Get the current user to be assigned as the slideshow author */
377
  $author = __( 'Unknown', 'easingsliderlite' );
390
 
391
  }
392
 
393
+ /**
394
+ * Get custom styling default options
395
+ *
396
+ * @since 2.1
397
+ */
398
+ public function customization_defaults() {
399
+
400
+ $object = (object) array(
401
+ 'arrows' => (object) array(
402
+ 'next' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_arrow_next.png' ) ),
403
+ 'prev' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_arrow_prev.png' ) ),
404
+ 'width' => 30,
405
+ 'height' => 30
406
+ ),
407
+ 'pagination' => (object) array(
408
+ 'inactive' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_icon_inactive.png' ) ),
409
+ 'active' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_icon_active.png' ) ),
410
+ 'width' => 15,
411
+ 'height' => 15
412
+ ),
413
+ 'border' => (object) array(
414
+ 'color' => '#000',
415
+ 'width' => 0,
416
+ 'radius' => 0
417
+ ),
418
+ 'shadow' => (object) array(
419
+ 'enable' => false,
420
+ 'image' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_shadow.png' ) )
421
+ )
422
+ );
423
+ return apply_filters( 'easingsliderlite_customizer_defaults', $object );
424
+
425
+ }
426
+
427
  /**
428
  * Returns the plugin capabilities
429
  *
432
  public function capabilities() {
433
  $capabilities = array(
434
  'easingsliderlite_edit_slideshow',
435
+ 'easingsliderlite_can_customize',
436
  'easingsliderlite_edit_settings'
437
  );
438
  $capabilities = apply_filters( 'easingsliderlite_capabilities', $capabilities );
492
  public function add_menus() {
493
 
494
  /** Hook suffixs for admin menus */
495
+ $pages = array( 'easingsliderlite_edit_slideshow', 'easingsliderlite_customizer', 'easingsliderlite_edit_settings' );
496
 
497
  /** Toplevel menu */
498
  $this->whitelist[] = add_menu_page(
512
  'easingsliderlite_edit_slideshow',
513
  array( $this, 'edit_slideshow_view' )
514
  );
515
+ $this->whitelist[] = add_submenu_page(
516
+ 'easingsliderlite_edit_slideshow',
517
+ __( 'Customizer', 'easingsliderlite' ),
518
+ __( 'Customize', 'easingsliderlite' ),
519
+ 'easingsliderlite_can_customize',
520
+ 'easingsliderlite_customizer',
521
+ array( $this, 'customizer_view' )
522
+ );
523
  $this->whitelist[] = add_submenu_page(
524
  'easingsliderlite_edit_slideshow',
525
  __( 'Edit Settings', 'easingsliderlite' ),
563
  'href' => admin_url( "admin.php?page=easingsliderlite_edit_slideshow" )
564
  )
565
  );
566
+ $wp_admin_bar->add_menu(
567
+ array(
568
+ 'parent' => 'slideshows-top_menu',
569
+ 'id' => 'customizer-sub_menu',
570
+ 'title' => __( 'Customize', 'easingsliderlite' ),
571
+ 'href' => admin_url( "admin.php?page=easingsliderlite_customizer" )
572
+ )
573
+ );
574
  $wp_admin_bar->add_menu(
575
  array(
576
  'parent' => 'slideshows-top_menu',
702
  }
703
 
704
  /** Updates the slideshow */
705
+ update_option( 'easingsliderlite_slideshow',
706
  (object) array(
707
  'author' => stripslashes_deep( $_POST['author'] ),
708
  'slides' => json_decode( stripslashes_deep( $_POST['slides'] ) ), /** Slides are stored as JSON string and need to be decoded before being saved. */
721
 
722
  }
723
 
724
+ /**
725
+ * Customization page actions
726
+ *
727
+ * @since 2.1
728
+ */
729
+ public function do_customizer_actions( $page ) {
730
+
731
+ /** Save customizations */
732
+ if ( isset( $_POST['save'] ) ) {
733
+
734
+ /** Security check */
735
+ if ( !$this->security_check( 'save', $page ) ) {
736
+ wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'easingsliderlite' ) );
737
+ exit();
738
+ }
739
+
740
+ /** Save the customizations */
741
+ update_option( 'easingsliderlite_customizations',
742
+ json_encode( EasingSliderLite::get_instance()->validate( (object) array(
743
+ 'arrows' => (object) $_POST['arrows'],
744
+ 'pagination' => (object) $_POST['pagination'],
745
+ 'border' => (object) $_POST['border'],
746
+ 'shadow' => (object) $_POST['shadow']
747
+ ) ) )
748
+ );
749
+
750
+ }
751
+
752
+ }
753
+
754
  /**
755
  * Settings page actions
756
  *
836
  $settings = $this->validate( $_POST['settings'] );
837
 
838
  /** Update database option and get response */
839
+ update_option( 'easingsliderlite_settings', stripslashes_deep( $settings ) );
840
 
841
  /** Show update message */
842
  return $this->queue_message( __( 'Settings have been <strong>saved</strong> successfully.', 'easingsliderlite' ), 'updated' );
900
 
901
  }
902
 
903
+ /**
904
+ * Register all admin stylesheets
905
+ *
906
+ * @since 2.1
907
+ */
908
+ public function register_all_styles() {
909
+
910
+ /** Get the extension */
911
+ $ext = ( apply_filters( 'easingsliderlite_debug_styles', __return_false() ) === true ) ? '.css' : '.min.css';
912
+
913
+ /** Register styles */
914
+ wp_register_style( 'esl-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'admin'. $ext ), false, self::$version );
915
+ wp_register_style( 'esl-slideshow', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, self::$version );
916
+
917
+ }
918
+
919
+ /**
920
+ * Register all admin scripts
921
+ *
922
+ * @since 2.1
923
+ */
924
+ public function register_all_scripts() {
925
+
926
+ /** Get the extension */
927
+ $ext = ( apply_filters( 'easingsliderlite_debug_scripts', __return_false() ) ) ? '.js' : '.min.js';
928
+
929
+ /** Register scripts */
930
+ wp_register_script( 'esl-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 );
931
+ wp_register_script( 'esl-customizer', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'customizer'. $ext ), array( 'jquery', 'backbone' ), self::$version );
932
+ wp_register_script( 'esl-slideshow', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, self::$version );
933
+
934
+ }
935
+
936
  /**
937
  * Loads admin stylesheets
938
  *
944
  if ( !in_array( $hook, $this->whitelist ) )
945
  return;
946
 
 
 
 
947
  /** Load styles */
948
+ wp_enqueue_style( 'esl-admin' );
 
 
949
  do_action( 'easingsliderlite_enqueue_admin_styles' );
950
 
951
  }
961
  if ( !in_array( $hook, $this->whitelist ) )
962
  return;
963
 
 
 
 
 
 
 
 
964
  /** Print Localized variables */
965
  wp_localize_script( 'esl-admin', 'easingsliderlite', $this->localizations() );
966
 
967
+ /** Load scripts */
968
+ wp_enqueue_media();
969
+ wp_enqueue_script( 'esl-admin' );
970
  do_action( 'easingsliderlite_enqueue_admin_scripts' );
971
 
972
  }
1003
  return;
1004
 
1005
  /** Slide template */
1006
+ echo '<script type="text/html" id="tmpl-slide"><div class="thumbnail" data-id="{{ data.id }}"><a href="#" class="delete-button"></a><img src="{{ data.sizes.thumbnail.url }}" alt="{{ data.alt }}" /></div></script>';
1007
 
1008
  /** Slide editor template */
1009
  echo '<script type="text/html" id="tmpl-edit-slide">';
1028
  require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow.php';
1029
 
1030
  }
1031
+
1032
+ /**
1033
+ * Customizer view
1034
+ *
1035
+ * @since 2.1
1036
+ */
1037
+ public function customizer_view() {
1038
+
1039
+ /** Load the customizer view template */
1040
+ require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'customizer.php';
1041
+
1042
+ }
1043
 
1044
  /**
1045
  * Edit settings view
images/slideshow_arrow_next.png ADDED
Binary file
images/slideshow_arrow_prev.png ADDED
Binary file
images/slideshow_arrows.png DELETED
Binary file
images/slideshow_icon_active.png ADDED
Binary file
images/slideshow_icon_inactive.png ADDED
Binary file
images/slideshow_icons.png DELETED
Binary file
images/slideshow_shadow.png ADDED
Binary file
includes/Slideshow.php CHANGED
@@ -35,14 +35,9 @@ class ESL_Slideshow {
35
  */
36
  public static function enqueue_styles() {
37
 
38
- /** Get the extension */
39
- $ext = ( apply_filters( 'easingsliderlite_style_debug', __return_false() ) === true ) ? '.css' : '.min.css';
40
-
41
  /** Load styling */
42
- wp_enqueue_style( 'esl-slideshow', plugins_url( dirname( plugin_basename( EasingSliderLite::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, EasingSliderLite::$version );
43
-
44
- /** Trigger actions */
45
- do_action( 'easingsliderlite_enqueue_styles' );
46
 
47
  }
48
 
@@ -53,19 +48,90 @@ class ESL_Slideshow {
53
  */
54
  public static function enqueue_scripts() {
55
 
56
- /** Get the extension */
57
- $ext = ( apply_filters( 'easingsliderlite_script_debug', __return_false() ) === true ) ? '.js' : '.min.js';
58
-
59
- /** Get plugin settings */
60
- $settings = get_option( 'easingsliderlite_settings' );
61
-
62
  /** Load scripts */
63
  wp_enqueue_script( 'jquery' );
64
- wp_enqueue_script( 'esl-slideshow', plugins_url( dirname( plugin_basename( EasingSliderLite::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, EasingSliderLite::$version );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
- /** Trigger actions */
67
- do_action( 'easingsliderlite_enqueue_scripts' );
 
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
  /**
35
  */
36
  public static function enqueue_styles() {
37
 
 
 
 
38
  /** Load styling */
39
+ wp_enqueue_style( 'esl-slideshow' );
40
+ do_action( 'easingsliderlite_enqueue_slideshow_styles' );
 
 
41
 
42
  }
43
 
48
  */
49
  public static function enqueue_scripts() {
50
 
 
 
 
 
 
 
51
  /** Load scripts */
52
  wp_enqueue_script( 'jquery' );
53
+ wp_enqueue_script( 'esl-slideshow' );
54
+ do_action( 'easingsliderlite_enqueue_slideshow_scripts' );
55
+
56
+ }
57
+
58
+ /**
59
+ * Prints the slideshow custom styling
60
+ *
61
+ * @since 2.1
62
+ */
63
+ public static function print_custom_styles() {
64
+
65
+ /** Get the customizations & defaults */
66
+ $customizations = $c = json_decode( get_option( 'easingsliderlite_customizations' ) );
67
+ $defaults = EasingSliderLite::get_instance()->customization_defaults();
68
 
69
+ /** Bail if there are no customizations */
70
+ if ( $defaults == $c )
71
+ return;
72
 
73
+ /** Print the styling. Long selectors here ensure styles take preference over CSS files. */
74
+ ob_start();
75
+ ?>
76
+ <style type="text/css">
77
+ .easingsliderlite {
78
+ <?php if ( $defaults->border->color != $c->border->color ) echo "border-color: {$c->border->color};"; ?>
79
+ <?php if ( $defaults->border->width != $c->border->width ) echo "border-width: {$c->border->width}px; border-style: solid;"; ?>
80
+ <?php if ( $defaults->border->radius != $c->border->radius ) echo "-webkit-border-radius: {$c->border->radius}px; -moz-border-radius: {$c->border->radius}px; border-radius: {$c->border->radius}px;"; ?>
81
+ }
82
+ .easingsliderlite .easingsliderlite-arrows.easingsliderlite-next,
83
+ .easingsliderlite .easingsliderlite-arrows.easingsliderlite-prev {
84
+ <?php if ( $defaults->arrows->width != $c->arrows->width ) echo "width: {$c->arrows->width}px;"; ?>
85
+ <?php if ( $defaults->arrows->height != $c->arrows->height ) { $margin_top = ( $c->arrows->height / 2 ); echo "height: {$c->arrows->height}px; margin-top: -{$margin_top}px;"; } ?>
86
+ }
87
+ .easingsliderlite .easingsliderlite-arrows.easingsliderlite-next {
88
+ <?php if ( $defaults->arrows->next != $c->arrows->next ) echo "background-image: url({$c->arrows->next});"; ?>
89
+ }
90
+ .easingsliderlite .easingsliderlite-arrows.easingsliderlite-prev {
91
+ <?php if ( $defaults->arrows->prev != $c->arrows->prev ) echo "background-image: url({$c->arrows->prev});"; ?>
92
+ }
93
+ .easingsliderlite .easingsliderlite-pagination .easingsliderlite-icon {
94
+ <?php if ( $defaults->pagination->width != $c->pagination->width ) echo "width: {$c->pagination->width}px;"; ?>
95
+ <?php if ( $defaults->pagination->height != $c->pagination->height ) echo "height: {$c->pagination->height}px;"; ?>
96
+ }
97
+ .easingsliderlite .easingsliderlite-pagination .easingsliderlite-icon.inactive {
98
+ <?php if ( $defaults->pagination->inactive != $c->pagination->inactive ) echo "background-image: url({$c->pagination->inactive});"; ?>
99
+ }
100
+ .easingsliderlite .easingsliderlite-pagination .easingsliderlite-icon.active {
101
+ <?php if ( $defaults->pagination->active != $c->pagination->active ) echo "background-image: url({$c->pagination->active});"; ?>
102
+ }
103
+ </style>
104
+ <?php
105
+ print preg_replace( '/\s+/', ' ', ob_get_clean() );
106
+
107
+ }
108
+
109
+ /**
110
+ * Returns the users current browser
111
+ *
112
+ * @since 2.1
113
+ */
114
+ public function detect_browser() {
115
+ $browser = esc_attr( $_SERVER[ 'HTTP_USER_AGENT' ] );
116
+ if ( preg_match( '/MSIE 7/i', $browser ) )
117
+ return "is-ie7";
118
+ elseif ( preg_match( '/MSIE 8/i', $browser ) )
119
+ return "is-ie8";
120
+ elseif ( preg_match( '/MSIE 9/i', $browser ) )
121
+ return "is-ie9";
122
+ elseif ( preg_match( '/Firefox/i', $browser ) )
123
+ return "is-firefox";
124
+ elseif ( preg_match( '/Safari/i', $browser ) )
125
+ return "is-safari";
126
+ elseif ( preg_match( '/Chrome/i', $browser ) )
127
+ return "is-chrome";
128
+ elseif ( preg_match( '/Flock/i', $browser ) )
129
+ return "is-flock";
130
+ elseif ( preg_match( '/Opera/i', $browser ) )
131
+ return "is-opera";
132
+ elseif ( preg_match( '/Netscape/i', $browser ) )
133
+ return "is-netscape";
134
+ return;
135
  }
136
 
137
  /**
includes/Upgrade.php CHANGED
@@ -32,6 +32,10 @@ class ESL_Upgrade {
32
  if ( get_option( 'rivasliderlite_version' ) && ( version_compare( $version, '2.0.1', '=' ) ) )
33
  self::do_201_cleanup();
34
 
 
 
 
 
35
  /** Custom hooks */
36
  do_action( 'easingsliderlite_upgrades', EasingSliderLite::$version, $version );
37
 
@@ -52,8 +56,8 @@ class ESL_Upgrade {
52
  /** Fire plugin activation (won't have been fired by upgrade) */
53
  EasingSliderLite::get_instance()->activate();
54
 
55
- /** Get current slideshow settings */
56
- $slideshow = EasingSliderLite::get_instance()->defaults();
57
 
58
  /** Transfer the settings */
59
  $slideshow->dimensions->width = get_option( 'width' );
@@ -149,4 +153,22 @@ class ESL_Upgrade {
149
  delete_option( 'rivasliderlite_disable_welcome_panel' );
150
  }
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
32
  if ( get_option( 'rivasliderlite_version' ) && ( version_compare( $version, '2.0.1', '=' ) ) )
33
  self::do_201_cleanup();
34
 
35
+ /** Upgrade to v2.1 */
36
+ if ( version_compare( $version, '2.1', '<' ) )
37
+ self::do_210_upgrade();
38
+
39
  /** Custom hooks */
40
  do_action( 'easingsliderlite_upgrades', EasingSliderLite::$version, $version );
41
 
56
  /** Fire plugin activation (won't have been fired by upgrade) */
57
  EasingSliderLite::get_instance()->activate();
58
 
59
+ /** Get default slideshow settings */
60
+ $slideshow = EasingSliderLite::get_instance()->slideshow_defaults();
61
 
62
  /** Transfer the settings */
63
  $slideshow->dimensions->width = get_option( 'width' );
153
  delete_option( 'rivasliderlite_disable_welcome_panel' );
154
  }
155
 
156
+ /**
157
+ * Does 2.1 plugin upgrade
158
+ *
159
+ * @since 2.1
160
+ */
161
+ public static final function do_210_upgrade() {
162
+
163
+ global $wp_roles;
164
+
165
+ /** Add the customizations database option */
166
+ add_option( 'easingsliderlite_customizations', json_encode( EasingSliderLite::get_instance()->customization_defaults() ) );
167
+
168
+ /** Add the customization panel capability */
169
+ foreach ( $wp_roles->roles as $role => $info )
170
+ EasingSliderLite::get_instance()->add_capability( 'easingsliderlite_can_customize', get_role( $role ) );
171
+
172
+ }
173
+
174
  }
js/admin.js CHANGED
@@ -1,27 +1,5 @@
1
  ;(function($) {
2
 
3
- /** Backbone pre-compiled template loader */
4
- window.TemplateLoader = {
5
-
6
- get: function(selector) {
7
-
8
- if ( !this.templates )
9
- this.templates = {};
10
-
11
- /** Load and cache the template */
12
- var template = this.templates[selector];
13
- if ( !template ) {
14
- template = $(selector).html();
15
- template = _.template(template);
16
- this.templates[selector] = template;
17
- }
18
-
19
- return template;
20
-
21
- }
22
-
23
- }
24
-
25
  /** Our slide model */
26
  window.Slide = Backbone.Model.extend({
27
 
@@ -120,17 +98,16 @@
120
  });
121
 
122
  /** Our slides view */
123
- window.SlideView = Backbone.View.extend({
124
 
125
  $container: $('.thumbnails-container .inner'),
126
 
 
 
127
  initialize: function() {
128
 
129
  var self = this;
130
 
131
- /** Get our slide template */
132
- this.template = TemplateLoader.get('#tmpl-slide');
133
-
134
  /** Bind events */
135
  this.collection.on('add', this.addThumb, this);
136
  this.collection.on('remove', this.render, this);
@@ -228,7 +205,7 @@
228
  });
229
 
230
  /** Edit slide view */
231
- window.EditSlideView = Backbone.View.extend({
232
 
233
  attributes: {
234
  'tabindex': 0
@@ -236,6 +213,8 @@
236
 
237
  changeImageView: null,
238
 
 
 
239
  events: {
240
  'change': 'change',
241
  'click .media-modal-backdrop, .media-modal-close': 'discardChanges',
@@ -251,9 +230,6 @@
251
  /** Clone original attributes as a window is opened (for restoration if changes are discarded) */
252
  this.origAttributes = _.clone(this.model.attributes);
253
 
254
- /** Set the slide editor template */
255
- this.template = TemplateLoader.get('#tmpl-edit-slide');
256
-
257
  /** Reset thumbnail on image URL change */
258
  this.model.on('change:url', this.resetThumbnail, this);
259
 
1
  ;(function($) {
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /** Our slide model */
4
  window.Slide = Backbone.Model.extend({
5
 
98
  });
99
 
100
  /** Our slides view */
101
+ window.SlideView = wp.media.View.extend({
102
 
103
  $container: $('.thumbnails-container .inner'),
104
 
105
+ template: wp.media.template('slide'),
106
+
107
  initialize: function() {
108
 
109
  var self = this;
110
 
 
 
 
111
  /** Bind events */
112
  this.collection.on('add', this.addThumb, this);
113
  this.collection.on('remove', this.render, this);
205
  });
206
 
207
  /** Edit slide view */
208
+ window.EditSlideView = wp.media.View.extend({
209
 
210
  attributes: {
211
  'tabindex': 0
213
 
214
  changeImageView: null,
215
 
216
+ template: wp.media.template('edit-slide'),
217
+
218
  events: {
219
  'change': 'change',
220
  'click .media-modal-backdrop, .media-modal-close': 'discardChanges',
230
  /** Clone original attributes as a window is opened (for restoration if changes are discarded) */
231
  this.origAttributes = _.clone(this.model.attributes);
232
 
 
 
 
233
  /** Reset thumbnail on image URL change */
234
  this.model.on('change:url', this.resetThumbnail, this);
235
 
js/admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (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").bind("click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_images)){b.removeThumbs.call(b,c)}});a(".add-image").bind("click",function(c){c.preventDefault();addImageView.render()});a(document).delegate(".delete-button","click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_image)){b.collection.remove(b.collection.get(a(this).parent().attr("data-id")))}});a(document).delegate(".thumbnails-container img","click",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").bind("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()}});setTimeout(function(){a(".message").not(".permanent").each(function(){a(this).fadeOut(400,function(){a(this).remove()})})},5000);a(".warn").bind("click",function(){if(!confirm(easingsliderlite.warn)){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);
1
+ (function(a){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=wp.media.View.extend({$container:a(".thumbnails-container .inner"),template:wp.media.template("slide"),initialize:function(){var b=this;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").bind("click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_images)){b.removeThumbs.call(b,c)}});a(".add-image").bind("click",function(c){c.preventDefault();addImageView.render()});a(document).delegate(".delete-button","click",function(c){c.preventDefault();if(confirm(easingsliderlite.delete_image)){b.collection.remove(b.collection.get(a(this).parent().attr("data-id")))}});a(document).delegate(".thumbnails-container img","click",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=wp.media.View.extend({attributes:{tabindex:0},changeImageView:null,template:wp.media.template("edit-slide"),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.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").bind("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()}});setTimeout(function(){a(".message").not(".permanent").each(function(){a(this).fadeOut(400,function(){a(this).remove()})})},5000);a(".warn").bind("click",function(){if(!confirm(easingsliderlite.warn)){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/customizer.js ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function($) {
2
+
3
+ /** Customizations Model */
4
+ window.Customizations = Backbone.Model.extend({
5
+
6
+ initialize: function() {
7
+ this.on('change', function() {
8
+ $('#customizations').val(JSON.stringify(this.attributes));
9
+ }, this);
10
+ }
11
+
12
+ });
13
+
14
+ /** Customize View */
15
+ window.CustomizeView = Backbone.View.extend({
16
+
17
+ events: {
18
+ 'change': 'change'
19
+ },
20
+
21
+ initialize: function() {
22
+
23
+ var self = this,
24
+ $items = {};
25
+
26
+ /** Set the element */
27
+ this.$el = this.options.$el;
28
+
29
+ /** Title click functionality */
30
+ $('.customize-section-title').bind('click', function() {
31
+
32
+ var $parent = $(this).parent();
33
+ if ( !$parent.hasClass('open') ) {
34
+ $('.customize-section').removeClass('open');
35
+ $parent.addClass('open');
36
+ }
37
+ else
38
+ $('.customize-section').removeClass('open');
39
+
40
+ });
41
+
42
+ /** Collapse function */
43
+ $('.collapse-sidebar').bind('click', function() {
44
+
45
+ /** Collapse/expand overlay */
46
+ var $overlay = $('.wp-full-overlay');
47
+ if ( $overlay.hasClass('expanded') )
48
+ $overlay.removeClass('expanded').addClass('collapsed');
49
+ else
50
+ $overlay.removeClass('collapsed').addClass('expanded');
51
+
52
+ });
53
+
54
+ /** Inititiate color pickers */
55
+ $('.color-picker-hex').each(function() {
56
+ $(this).wpColorPicker({
57
+ change: function(e) {
58
+ self.change(e);
59
+ },
60
+ defaultColor: $(this).attr('data-default')
61
+ });
62
+ });
63
+
64
+ },
65
+
66
+ validate: function(changes, selector) {
67
+
68
+ /** Loops through each change and validates */
69
+ for ( var prop in changes ) {
70
+
71
+ /** Background images */
72
+ if ( prop == 'background-image' )
73
+ changes[prop] = 'url('+ changes[prop] +')';
74
+
75
+ /** Slideshow border width */
76
+ if ( prop == 'border-width' ) {
77
+ changes['border-style'] = 'solid';
78
+ $('.easingsliderlite-shadow').css({ 'margin-left': changes[prop] +'px' });
79
+ }
80
+
81
+ /** Arrows height */
82
+ if ( prop == 'height' && selector == '.easingsliderlite-arrows' )
83
+ changes['margin-top'] = '-'+ Math.floor( changes[prop] / 2 ) +'px';
84
+
85
+ /** Enables/Disables the shadow */
86
+ if ( prop == 'shadow-enable' ) {
87
+
88
+ /** Display the shadow container */
89
+ changes['display'] = ( changes[prop] == 'true' ) ? 'block' : 'none';
90
+
91
+ /** Append the image element if needed */
92
+ if ( $('img', selector).length == 0 )
93
+ $(selector).append('<img src="'+ $('input[data-property="shadow-image"]').val() +'" alt="" />');
94
+
95
+ /** Remove false CSS property */
96
+ delete changes[prop];
97
+
98
+ }
99
+
100
+ /** Changes the shadow image */
101
+ if ( prop == 'shadow-image' ) {
102
+
103
+ /** Change shadow image */
104
+ $(selector).html('<img src="'+ changes[prop] +'" alt="" />');
105
+
106
+ /** Remove false CSS property */
107
+ delete changes[prop];
108
+
109
+ }
110
+
111
+ /** Apply "px" to end of pixel-based values */
112
+ if ( prop == 'width' || prop == 'height' || prop == 'border-width' || prop == 'border-radius' )
113
+ changes[prop] = changes[prop] +'px';
114
+
115
+ }
116
+
117
+ return changes;
118
+
119
+ },
120
+
121
+ change: function(e) {
122
+
123
+ /** Hack, but it works */
124
+ var split = e.target.name.split('['),
125
+ parent = split[0],
126
+ child = split[1].replace(']', ''),
127
+ values = this.model.get(parent),
128
+ attributes = {},
129
+ changes = {};
130
+
131
+ /** Set model attributes (had to manually trigger "change" event as it wasn't firing, unsure why) */
132
+ values[child] = e.target.value;
133
+ attributes[parent] = values;
134
+ this.model.set(attributes).trigger('change');
135
+
136
+ /** Set our CSS changes */
137
+ changes[e.target.dataset.property] = e.target.value;
138
+
139
+ /** Reflect changes on slideshow */
140
+ $(e.target.dataset.selector).css(this.validate(changes, e.target.dataset.selector));
141
+
142
+ },
143
+
144
+ render: function() {
145
+
146
+ /** Show the view */
147
+ this.$el.find('.wp-full-overlay').animate({ 'opacity': 1 }, { duration: 200 });
148
+
149
+ }
150
+
151
+ });
152
+
153
+ /** Let's go! */
154
+ $(document).ready(function() {
155
+ window.customizeView = new CustomizeView({
156
+ $el: $('#customize-container'),
157
+ model: new Customizations(JSON.parse($('#customizations').val()))
158
+ }).render();
159
+ });
160
+
161
+ })(jQuery);
js/customizer.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(a){window.Customizations=Backbone.Model.extend({initialize:function(){this.on("change",function(){a("#customizations").val(JSON.stringify(this.attributes))},this)}});window.CustomizeView=Backbone.View.extend({events:{change:"change"},initialize:function(){var b=this,c={};this.$el=this.options.$el;a(".customize-section-title").bind("click",function(){var d=a(this).parent();if(!d.hasClass("open")){a(".customize-section").removeClass("open");d.addClass("open")}else{a(".customize-section").removeClass("open")}});a(".collapse-sidebar").bind("click",function(){var d=a(".wp-full-overlay");if(d.hasClass("expanded")){d.removeClass("expanded").addClass("collapsed")}else{d.removeClass("collapsed").addClass("expanded")}});a(".color-picker-hex").each(function(){a(this).wpColorPicker({change:function(d){b.change(d)},defaultColor:a(this).attr("data-default")})})},validate:function(c,b){for(var d in c){if(d=="background-image"){c[d]="url("+c[d]+")"}if(d=="border-width"){c["border-style"]="solid";a(".easingsliderlite-shadow").css({"margin-left":c[d]+"px"})}if(d=="height"&&b==".easingsliderlite-arrows"){c["margin-top"]="-"+Math.floor(c[d]/2)+"px"}if(d=="shadow-enable"){c.display=(c[d]=="true")?"block":"none";if(a("img",b).length==0){a(b).append('<img src="'+a('input[data-property="shadow-image"]').val()+'" alt="" />')}delete c[d]}if(d=="shadow-image"){a(b).html('<img src="'+c[d]+'" alt="" />');delete c[d]}if(d=="width"||d=="height"||d=="border-width"||d=="border-radius"){c[d]=c[d]+"px"}}return c},change:function(h){var d=h.target.name.split("["),g=d[0],i=d[1].replace("]",""),c=this.model.get(g),b={},f={};c[i]=h.target.value;b[g]=c;this.model.set(b).trigger("change");f[h.target.dataset.property]=h.target.value;a(h.target.dataset.selector).css(this.validate(f,h.target.dataset.selector))},render:function(){this.$el.find(".wp-full-overlay").animate({opacity:1},{duration:200})}});a(document).ready(function(){window.customizeView=new CustomizeView({$el:a("#customize-container"),model:new Customizations(JSON.parse(a("#customizations").val()))}).render()})})(jQuery);
js/slideshow.js CHANGED
@@ -212,9 +212,9 @@
212
  });
213
 
214
  /** Set current icon now & on slide change */
215
- $icons.eq(base.current).addClass('active');
216
  base.$el.bind('beforetransition', function() {
217
- $icons.removeClass('active').eq(base.current).addClass('active');
218
  });
219
 
220
  /** Visibility & hover styling */
@@ -241,22 +241,22 @@
241
 
242
  /** Loop through and preload each slide image */
243
  var index = 0;
244
- base.$images.each(function() {
245
-
246
- var $self = $(this),
247
- src = $self.attr('src');
248
-
249
- /** Preload this image and trigger action on last image */
250
- $('<img />').attr('src', src).load(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
- }});
257
- }
258
- });
259
-
260
  });
261
 
262
  };
@@ -315,7 +315,7 @@
315
  base.order = ( base.order ) ? base.order+1 : 1;
316
 
317
  /** Do some CSS resetting after all fade transitions have occurred */
318
- base.$el.off('aftertransition._transition').one('aftertransition._transition', function() {
319
 
320
  /** Resets CSS for each slide after fade transition has ended */
321
  base.$slides.each(function(index) {
212
  });
213
 
214
  /** Set current icon now & on slide change */
215
+ $icons.eq(base.current).addClass('active').removeClass('inactive');
216
  base.$el.bind('beforetransition', function() {
217
+ $icons.removeClass('active').addClass('inactive').eq(base.current).addClass('active').removeClass('inactive');
218
  });
219
 
220
  /** Visibility & hover styling */
241
 
242
  /** Loop through and preload each slide image */
243
  var index = 0;
244
+ base.$images.one('load', function() {
245
+
246
+ /** Increment load count */
247
+ index++;
248
+
249
+ /** Fade out the preloader if we've loaded the last image */
250
+ if ( base.count == index ) {
251
+ base.$el.find('.easingsliderlite-preload').animate({ 'opacity': 0 }, { duration: 200, complete: function() {
252
+ $(this).remove();
253
+ base.$el.trigger('load');
254
+ }});
255
+ }
256
+
257
+ }).each(function() {
258
+ if ( this.complete )
259
+ $(this).trigger('load');
260
  });
261
 
262
  };
315
  base.order = ( base.order ) ? base.order+1 : 1;
316
 
317
  /** Do some CSS resetting after all fade transitions have occurred */
318
+ base.$el.unbind('aftertransition._transition').one('aftertransition._transition', function() {
319
 
320
  /** Resets CSS for each slide after fade transition has ended */
321
  base.$slides.each(function(index) {
js/slideshow.min.js CHANGED
@@ -1,2 +1,2 @@
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,a.parseJSON(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.bind("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).bind("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.bind(c.clickEvent,function(h){c.nextSlide();return false});f.bind(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.bind(c.clickEvent,function(g){c.goToSlide(a(this).index());return false});f.eq(c.current).addClass("active");c.$el.bind("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("<img />").attr("src",f).load(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")}})}})})};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);
2
- if(d.playback.enabled){d.playback.enabled=false}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);
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,a.parseJSON(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.bind("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).bind("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.bind(c.clickEvent,function(h){c.nextSlide();return false});f.bind(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.bind(c.clickEvent,function(g){c.goToSlide(a(this).index());return false});f.eq(c.current).addClass("active").removeClass("inactive");c.$el.bind("beforetransition",function(){f.removeClass("active").addClass("inactive").eq(c.current).addClass("active").removeClass("inactive")});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.one("load",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")}})}}).each(function(){if(this.complete){a(this).trigger("load")}})};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.unbind("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)
2
+ }};c.endPlayback=function(e){e=a.extend({},{silent:false},e);if(d.playback.enabled){d.playback.enabled=false}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,10 +1,10 @@
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.3
8
 
9
  Easing Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
10
 
@@ -18,10 +18,12 @@ Easing Slider "Lite" is an extremely easy to use slideshow plugin for WordPress.
18
  * CSS3 transitions for ultra smooth playback
19
  * Navigation arrows & pagination
20
  * Preloading functionality on page load
21
- * Easy to modify 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.
@@ -43,17 +45,27 @@ To insert the slideshow into your theme, add the following code to the appropria
43
 
44
  `<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>`
45
 
46
- = Upgrading from v1.x to v2.x =
47
- If you are upgrading from v1.0+ of Easing Slider to v2.0+, you'll need to import your slideshow settings manually after the upgrade process. You can do this by clicking the button titled <strong>"Import my Easing Slider v1.x settings"</strong> in the <strong>"Edit Slideshows"</strong> admin menu. Have a look at the screencast below for more information.
48
-
49
- http://cl.ly/1V0V411I1V09
50
-
51
  == Frequently Asked Questions ==
52
 
53
- = I'm having issues upgrading from v1.x to v2.x. My settings weren't imported. Please help! =
 
54
  Don't sweat! Simply navigate to the <strong>"Edit Slideshow"</strong> admin panel and click the <strong>"Import my Easing Slider v1.x settings"</strong> button. That's it! If you run into any trouble, don't hesitate to open a support topic, or have a look at the screencast below.
55
 
56
- http://cl.ly/1V0V411I1V09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  == Screenshots ==
59
 
@@ -61,9 +73,17 @@ http://cl.ly/1V0V411I1V09
61
  2. "Edit Slideshow" panel. Set your various slideshow settings here.
62
  3. "Settings" panel. Options for script & style loading, and image resizing features.
63
  4. The slideshow, in all its glory! Nice and clean, but easy to re-style if needed.
 
64
 
65
  == Changelog ==
66
 
 
 
 
 
 
 
 
67
  = 2.0.1.3 =
68
  * Made some alterations to give a better success rate when upgrading from v1.x.
69
  * Added options to manually import v1.x options, instead of automatically (which often failed and caused major problems).
1
  === Easing Slider "Lite" ===
2
+ Homepage: http://easingslider.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.1
8
 
9
  Easing Slider "Lite" is an easy to use slideshow plugin. Simple and lightweight, built with native WordPress functionality.
10
 
18
  * CSS3 transitions for ultra smooth playback
19
  * Navigation arrows & pagination
20
  * Preloading functionality on page load
21
+ * A visual editor for customizing basic styling
22
  * Developer friendly with built-in Javascript events
23
  * Lots of actions & filters for custom functionality
24
 
25
+ <a href="http://easingslider.com/">Looking for more features? Get the full "Pro" version here.</a>
26
+
27
  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.
28
 
29
  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.
45
 
46
  `<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>`
47
 
 
 
 
 
 
48
  == Frequently Asked Questions ==
49
 
50
+ = I've upgraded from v1.x and my slides have disappeared. =
51
+
52
  Don't sweat! Simply navigate to the <strong>"Edit Slideshow"</strong> admin panel and click the <strong>"Import my Easing Slider v1.x settings"</strong> button. That's it! If you run into any trouble, don't hesitate to open a support topic, or have a look at the screencast below.
53
 
54
+ <a href="http://cl.ly/1V0V411I1V09">Upgrading from v1.x</a>
55
+
56
+ = My slideshow continually loads. What's wrong? =
57
+
58
+ This can often be caused by a jQuery conflict. Many plugins don't load jQuery correctly and as a result break the plugins that do.
59
+
60
+ Firstly, disable all of the other plugins you have activated (or as many as you can). If the issue persists, with just Easing Slider "Lite" active, it is more than likely a conflict with the theme.
61
+
62
+ If the slideshow works when it is the only plugin active, you're experiencing a plugin conflict. Carefully enable each plugin, one-by-one, checking the slideshow each time. Keep doing this until you activate the plugin that breaks the slideshow.
63
+
64
+ After you've taken these two steps, make a support topic and we will get back to you as soon as you can. Otherwise, feel free to contact the developer(s) of the conflict plugin/theme also. They should also be able to provide you with assistance.
65
+
66
+ = How do I edit a slide's settings? =
67
+
68
+ This is easy. When viewing the <strong>"Edit Slideshow"</strong> Easing Slider "Lite" admin panel, you should be able to see your slideshow images. To edit the settings of an individual slide, simply click it and its settings will appear in a modal window. Simple!
69
 
70
  == Screenshots ==
71
 
73
  2. "Edit Slideshow" panel. Set your various slideshow settings here.
74
  3. "Settings" panel. Options for script & style loading, and image resizing features.
75
  4. The slideshow, in all its glory! Nice and clean, but easy to re-style if needed.
76
+ 5. Simply click a slide to edit its individual settings. This is the panel you will see.
77
 
78
  == Changelog ==
79
 
80
+ = 2.1 =
81
+ * Added "Customize" panel which allows you to make basic slideshow styling alterations using a new visual editor.
82
+ * Reconfigured preloading functionality to fix a bug.
83
+ * Added title attribute functionality to images.
84
+ * Re-added functionality for script and style registration, making them easier enqueue.
85
+ * Fixed backbone templating issues that would render admin area unusable for some users.
86
+
87
  = 2.0.1.3 =
88
  * Made some alterations to give a better success rate when upgrading from v1.x.
89
  * Added options to manually import v1.x options, instead of automatically (which often failed and caused major problems).
templates/customizer.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** Get the slideshow */
4
+ $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
+
6
+ /** Get current customization settings */
7
+ $customizations = $c = json_decode( get_option( 'easingsliderlite_customizations' ) );
8
+
9
+ /** Load required extra scripts and styling */
10
+ wp_enqueue_script( 'customize-controls' );
11
+ wp_enqueue_style( 'customize-controls' );
12
+ wp_enqueue_script( 'wp-color-picker' );
13
+ wp_enqueue_style( 'wp-color-picker' );
14
+ wp_enqueue_script( 'esl-customizer' );
15
+ ESL_Slideshow::enqueue_styles();
16
+ ESL_Slideshow::print_custom_styles();
17
+ ESL_Slideshow::enqueue_scripts();
18
+
19
+ /** Prevent slideshow from showing edit icon */
20
+ add_filter( 'easingsliderlite_edit_slideshow_icon', '__return_false' );
21
+
22
+ ?>
23
+ <div id="customize-container" class="customize-container" style="display: block; background: url(../../../../wp-admin/images/wpspin_light.gif) no-repeat center center #fff;">
24
+ <div class="wp-full-overlay expanded" style="opacity: 0;">
25
+ <form id="customize-controls" action="admin.php?page=<?php echo esc_attr( $_GET['page'] ); ?>" method="post" class="wrap wp-full-overlay-sidebar" style="z-index: 9999;">
26
+ <?php
27
+ /** Security nonce field */
28
+ wp_nonce_field( "easingsliderlite-save_{$_GET['page']}", "easingsliderlite-save_{$_GET['page']}", false );
29
+ ?>
30
+
31
+ <div id="customize-header-actions" class="wp-full-overlay-header">
32
+ <input type="submit" name="save" id="save" class="button button-primary save" value="<?php _e( 'Save', 'easingsliderlite' ); ?>">
33
+ <span class="spinner"></span>
34
+ <a class="back button" href="admin.php?page=easingsliderlite_edit_slideshow"><?php _e( 'Close', 'easingsliderlite' ); ?></a>
35
+ </div>
36
+
37
+ <div class="wp-full-overlay-sidebar-content" tabindex="-1">
38
+ <div id="customize-info" class="customize-section">
39
+ <div class="customize-section-title" aria-label="Theme Customizer Options" tabindex="0">
40
+ <span class="preview-notice"><?php _e( 'You are customizing <strong class="theme-name">Easing Slider "Lite"</strong>', 'easingsliderlite' ); ?></span>
41
+ </div>
42
+ </div>
43
+ <div id="customize-theme-controls">
44
+ <ul>
45
+ <li class="control-section customize-section">
46
+ <h3 class="customize-section-title" tabindex="0" title=""><?php _e( 'Next & Previous Arrows', 'easingsliderlite' ); ?></h3>
47
+ <ul class="customize-section-content">
48
+ <li class="customize-control customize-control-text">
49
+ <label>
50
+ <span class="customize-control-title"><?php _e( '"Next" Arrow Image', 'easingsliderlite' ); ?></span>
51
+ <input type="text" name="arrows[next]" data-selector=".easingsliderlite-next" data-property="background-image" value="<?php echo esc_attr( $c->arrows->next ); ?>">
52
+ </label>
53
+ </li>
54
+ <li class="customize-control customize-control-text">
55
+ <label>
56
+ <span class="customize-control-title"><?php _e( '"Previous" Arrow Image', 'easingsliderlite' ); ?></span>
57
+ <input type="text" name="arrows[prev]" data-selector=".easingsliderlite-prev" data-property="background-image" value="<?php echo esc_attr( $c->arrows->prev ); ?>">
58
+ </label>
59
+ </li>
60
+ <li class="customize-control customize-control-text">
61
+ <label>
62
+ <span class="customize-control-title"><?php _e( 'Width', 'easingsliderlite' ); ?></span>
63
+ <input type="number" min="0" step="1" name="arrows[width]" style="width: 90%" data-selector=".easingsliderlite-arrows" data-property="width" value="<?php echo esc_attr( $c->arrows->width ); ?>"> px
64
+ </label>
65
+ </li>
66
+ <li class="customize-control customize-control-text">
67
+ <label>
68
+ <span class="customize-control-title"><?php _e( 'Height', 'easingsliderlite' ); ?></span>
69
+ <input type="number" min="0" step="1" name="arrows[height]" style="width: 90%" data-selector=".easingsliderlite-arrows" data-property="height" value="<?php echo esc_attr( $c->arrows->height ); ?>"> px
70
+ </label>
71
+ </li>
72
+ </ul>
73
+ </li>
74
+
75
+ <li class="control-section customize-section">
76
+ <h3 class="customize-section-title" tabindex="0" title=""><?php _e( 'Pagination Icons', 'easingsliderlite' ); ?></h3>
77
+ <ul class="customize-section-content">
78
+ <li class="customize-control customize-control-text">
79
+ <label>
80
+ <span class="customize-control-title"><?php _e( '"Inactive" Image', 'easingsliderlite' ); ?></span>
81
+ <input type="text" name="pagination[inactive]" data-selector=".easingsliderlite-icon.inactive" data-property="background-image" value="<?php echo esc_attr( $c->pagination->inactive ); ?>">
82
+ </label>
83
+ </li>
84
+ <li class="customize-control customize-control-text">
85
+ <label>
86
+ <span class="customize-control-title"><?php _e( '"Active" Image', 'easingsliderlite' ); ?></span>
87
+ <input type="text" name="pagination[active]" data-selector=".easingsliderlite-icon.active" data-property="background-image" value="<?php echo esc_attr( $c->pagination->active ); ?>">
88
+ </label>
89
+ </li>
90
+ <li class="customize-control customize-control-text">
91
+ <label>
92
+ <span class="customize-control-title"><?php _e( 'Icon Width', 'easingsliderlite' ); ?></span>
93
+ <input type="number" min="0" step="1" name="pagination[width]" style="width: 90%" data-selector=".easingsliderlite-icon" data-property="width" value="<?php echo esc_attr( $c->pagination->width ); ?>"> px
94
+ </label>
95
+ </li>
96
+ <li class="customize-control customize-control-text">
97
+ <label>
98
+ <span class="customize-control-title"><?php _e( 'Icon Height', 'easingsliderlite' ); ?></span>
99
+ <input type="number" min="0" step="1" name="pagination[height]" style="width: 90%" data-selector=".easingsliderlite-icon" data-property="height" value="<?php echo esc_attr( $c->pagination->height ); ?>"> px
100
+ </label>
101
+ </li>
102
+ </ul>
103
+ </li>
104
+
105
+ <li class="control-section customize-section">
106
+ <h3 class="customize-section-title" tabindex="0" title=""><?php _e( 'Border', 'easingsliderlite' ); ?></h3>
107
+ <ul class="customize-section-content">
108
+ <li class="customize-control customize-control-text">
109
+ <label>
110
+ <span class="customize-control-title"><?php _e( 'Color', 'easingsliderlite' ); ?></span>
111
+ <input type="text" name="border[color]" class="color-picker-hex" data-selector=".easingsliderlite" data-property="border-color" data-default="#000" value="<?php echo esc_attr( $c->border->color ); ?>">
112
+ </label>
113
+ </li>
114
+ <li class="customize-control customize-control-text">
115
+ <label>
116
+ <span class="customize-control-title"><?php _e( 'Width', 'easingsliderlite' ); ?></span>
117
+ <input type="number" min="0" step="1" name="border[width]" style="width: 90%" data-selector=".easingsliderlite" data-property="border-width" value="<?php echo esc_attr( $c->border->width ); ?>"> px
118
+ </label>
119
+ </li>
120
+ <li class="customize-control customize-control-text">
121
+ <label>
122
+ <span class="customize-control-title"><?php _e( 'Radius', 'easingsliderlite' ); ?></span>
123
+ <input type="number" min="0" step="1" name="border[radius]" style="width: 90%" data-selector=".easingsliderlite" data-property="border-radius" value="<?php echo esc_attr( $c->border->radius ); ?>"> px
124
+ </label>
125
+ </li>
126
+ </ul>
127
+ </li>
128
+
129
+ <?php if ( !apply_filters( 'easingsliderlite_disable_shadow', __return_false() ) ) : ?>
130
+ <li class="control-section customize-section">
131
+ <h3 class="customize-section-title" tabindex="0" title=""><?php _e( 'Drop Shadow', 'easingsliderlite' ); ?></h3>
132
+ <ul class="customize-section-content">
133
+ <li class="customize-control customize-control-text">
134
+ <label>
135
+ <span class="customize-control-title"><?php _e( 'Display a Drop Shadow', 'easingsliderlite' ); ?></span>
136
+ <label for="shadow-enable-true"><input type="radio" name="shadow[enable]" id="shadow-enable-true" data-selector=".easingsliderlite-shadow" data-property="shadow-enable" value="true" style="margin: 0 3px 0 0;" <?php checked( $c->shadow->enable, true ); ?>><?php _e( 'True', 'easingsliderlite' ); ?></label>
137
+ <label for="shadow-enable-false"><input type="radio" name="shadow[enable]" id="shadow-enable-false" data-selector=".easingsliderlite-shadow" data-property="shadow-enable" value="false" style="margin: 0 3px 0 20px;" <?php checked( $c->shadow->enable, false ); ?>><?php _e( 'False', 'easingsliderlite' ); ?></label>
138
+ </label>
139
+ </li>
140
+ <li class="customize-control customize-control-text">
141
+ <label>
142
+ <span class="customize-control-title"><?php _e( 'Shadow Image', 'easingsliderlite' ); ?></span>
143
+ <input type="text" name="shadow[image]" data-selector=".easingsliderlite-shadow" data-property="shadow-image" value="<?php echo esc_attr( $c->shadow->image ); ?>">
144
+ </label>
145
+ </li>
146
+ </ul>
147
+ </li>
148
+ <?php endif; ?>
149
+ </ul>
150
+ </div>
151
+ </div>
152
+
153
+ <div id="customize-footer-actions" class="wp-full-overlay-footer">
154
+ <a href="#" class="collapse-sidebar button-secondary" title="<?php _e( 'Collapse Sidebar', 'easingsliderlite' ); ?>">
155
+ <span class="collapse-sidebar-arrow"></span>
156
+ <span class="collapse-sidebar-label"><?php _e( 'Collapse', 'easingsliderlite' ); ?></span>
157
+ </a>
158
+ </div>
159
+
160
+ <input type="hidden" name="customizations" id="customizations" value="">
161
+ <?php /** This ensures that the JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?>
162
+ <script type="text/javascript">document.getElementById('customizations').value = '<?php echo json_encode( $customizations ); ?>';</script>
163
+ </form>
164
+
165
+ <div id="customize-preview" class="wp-full-overlay-main" style="position: relative;">
166
+ <div style="position: absolute; top: 0; left: 0; margin: 45px; width: 100%; height: 100%;">
167
+ <script type="text/javascript">
168
+ /** Disable automatic playback */
169
+ jQuery(document).ready(function($) {
170
+ setTimeout(function() {
171
+ $('.easingsliderlite').data('easingsliderlite').endPlayback();
172
+ }, 1000);
173
+ });
174
+ </script>
175
+ <?php
176
+ /** Display the slideshow */
177
+ echo ESL_Slideshow::get_instance()->display_slideshow();
178
+ ?>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
templates/editsettings.php CHANGED
@@ -19,7 +19,7 @@
19
  </div>
20
 
21
  <h3><?php _e( 'General Settings', 'easingsliderlite' ); ?></h3>
22
- <table class="form-table settings">
23
  <tbody>
24
  <tr valign="top">
25
  <th scope="row"><label for="resizing"><?php _e( 'Image Resizing', 'easingsliderlite' ); ?></label></th>
@@ -72,7 +72,7 @@
72
  <div class="divider"></div>
73
 
74
  <h3><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></h3>
75
- <table class="form-table settings">
76
  <tbody>
77
  <tr valign="top">
78
  <th scope="row"><label for="load_scripts"><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></label></th>
@@ -89,7 +89,7 @@
89
  <div class="divider"></div>
90
 
91
  <h3><?php _e( 'Reset Plugin', 'easingsliderlite' ); ?></h3>
92
- <table class="form-table settings">
93
  <tbody>
94
  <tr valign="top">
95
  <th scope="row"><label for="reset"><?php _e( 'Plugin Settings', 'easingsliderlite' ); ?></label></th>
@@ -104,7 +104,7 @@
104
  <div class="divider"></div>
105
 
106
  <h3><?php _e( 'Installation Settings', 'easingsliderlite' ); ?></h3>
107
- <table class="form-table">
108
  <tbody>
109
  <tr valign="top">
110
  <th scope="row"><?php _e( 'PHP Version', 'easingsliderlite' ); ?></th>
19
  </div>
20
 
21
  <h3><?php _e( 'General Settings', 'easingsliderlite' ); ?></h3>
22
+ <table class="form-table main-settings">
23
  <tbody>
24
  <tr valign="top">
25
  <th scope="row"><label for="resizing"><?php _e( 'Image Resizing', 'easingsliderlite' ); ?></label></th>
72
  <div class="divider"></div>
73
 
74
  <h3><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></h3>
75
+ <table class="form-table main-settings">
76
  <tbody>
77
  <tr valign="top">
78
  <th scope="row"><label for="load_scripts"><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></label></th>
89
  <div class="divider"></div>
90
 
91
  <h3><?php _e( 'Reset Plugin', 'easingsliderlite' ); ?></h3>
92
+ <table class="form-table main-settings">
93
  <tbody>
94
  <tr valign="top">
95
  <th scope="row"><label for="reset"><?php _e( 'Plugin Settings', 'easingsliderlite' ); ?></label></th>
104
  <div class="divider"></div>
105
 
106
  <h3><?php _e( 'Installation Settings', 'easingsliderlite' ); ?></h3>
107
+ <table class="form-table main-settings">
108
  <tbody>
109
  <tr valign="top">
110
  <th scope="row"><?php _e( 'PHP Version', 'easingsliderlite' ); ?></th>
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 %>', 'easingsliderlite' ); ?></h1>
8
  </div>
9
 
10
  <div class="media-frame-router" style="height: 0;"></div>
@@ -14,30 +14,30 @@
14
  <div id="general" class="media-tab">
15
  <div class="embed-link-settings" style="top: 0;">
16
  <div class="thumbnail">
17
- <% var size = sizes.large || sizes.medium || sizes.thumbnail || url; %>
18
- <img src="<%= size.url %>" class="slide-thumbnail" alt="<%= alt %>" />
19
  <a href="#" id="change-image" class="button button-primary button-large change-image" data-editor="content" title="Change Image"><span class="wp-media-buttons-icon"></span> Change Image</a>
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>
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: #{{ data.id }}', 'easingsliderlite' ); ?></h1>
8
  </div>
9
 
10
  <div class="media-frame-router" style="height: 0;"></div>
14
  <div id="general" class="media-tab">
15
  <div class="embed-link-settings" style="top: 0;">
16
  <div class="thumbnail">
17
+ <# var size = data.sizes.large || data.sizes.medium || data.sizes.thumbnail || data.url; #>
18
+ <img src="{{ data.url }}" class="slide-thumbnail" alt="{{ data.alt }}" />
19
  <a href="#" id="change-image" class="button button-primary button-large change-image" data-editor="content" title="Change Image"><span class="wp-media-buttons-icon"></span> Change Image</a>
20
  </div>
21
 
22
  <label for="link" class="setting">
23
  <span><?php _e( 'Link URL', 'easingsliderlite' ); ?></span>
24
+ <input type="text" id="link" value="{{ data.link }}">
25
  <select id="linkTarget" style="margin-top: 5px;">
26
+ <option value="_self" <# ( '_self' == data.linkTarget ) ? print('selected="selected"'): ''; #>><?php _e( 'Open link same tab/window', 'easingsliderlite' ); ?></option>
27
+ <option value="_blank" <# ( '_blank' == data.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="{{ data.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="{{ data.alt }}">
41
  <p class="description"><?php _e( 'Enter a value for the image "alt" text attribute.', 'easingsliderlite' ); ?></p>
42
  </label>
43
  </div>
templates/slideshow.php CHANGED
@@ -3,6 +3,9 @@
3
  /** Get the slideshow */
4
  $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
 
 
 
6
  /** Bail if we failed to retrieve the slideshow */
7
  if ( $s === false ) {
8
  if ( current_user_can( 'easingsliderlite_edit_slideshow' ) )
@@ -21,10 +24,12 @@
21
  $settings = get_option( 'easingsliderlite_settings' );
22
 
23
  /** Load slideshow scripts and styles in foooter (if set to do so) */
24
- if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'footer' )
25
- add_action( 'wp_footer', array( 'ESL_Slideshow', 'enqueue_styles' ) );
26
  if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'footer' )
27
  add_action( 'wp_footer', array( 'ESL_Slideshow', 'enqueue_scripts' ) );
 
 
 
 
28
 
29
  /** Inline slideshow styles */
30
  if ( $s->dimensions->responsive )
@@ -56,7 +61,7 @@
56
  $container_styles .= " padding-top: {$viewport_height}% !important;";
57
 
58
  ?>
59
- <div class="easingsliderlite use-<?php echo $s->transitions->effect; ?>" data-options="<?php echo esc_attr( $slideshow_options ); ?>" style="<?php echo esc_attr( $slideshow_styles ); ?>">
60
  <div class="easingsliderlite-viewport" style="<?php echo esc_attr( $viewport_styles ); ?>">
61
  <div class="easingsliderlite-slides-container" style="<?php echo esc_attr( $container_styles ); ?>">
62
  <?php
@@ -84,7 +89,7 @@
84
  ?>
85
  <div class="easingsliderlite-slide" style="<?php echo $slide_styles; ?>">
86
  <?php if ( !empty( $slide->link ) ) { ?><a href="<?php echo esc_attr( $slide->link ); ?>" target="<?php echo esc_attr( $slide->linkTarget ); ?>"><?php } ?>
87
- <img src="<?php echo esc_attr( $image['url'] ); ?>" class="easingsliderlite-image" alt="<?php echo esc_attr( $slide->alt ); ?>" />
88
  <?php if ( !empty( $slide->link ) ) { ?></a><?php } ?>
89
  <?php if ( !empty( $slide->content ) ) { ?>
90
  <div class="easingsliderlite-slide-content">
@@ -101,15 +106,15 @@
101
  <?php if ( $s->navigation->arrows && !has_action( 'easingsliderlite_arrows' ) ) : ?>
102
  <div class="easingsliderlite-arrows easingsliderlite-next <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
103
  <div class="easingsliderlite-arrows easingsliderlite-prev <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
104
- <?php else : do_action( 'easingsliderlite_arrows', $s ); endif; ?>
105
 
106
  <?php if ( $s->navigation->pagination && !has_action( 'easingsliderlite_pagination' ) ) : ?>
107
  <div class="easingsliderlite-pagination <?php echo esc_attr( $s->navigation->pagination_position ) .' '. esc_attr( $s->navigation->pagination_location ); ?>">
108
  <?php foreach ( $s->slides as $index => $slide ) : ?>
109
- <div class="easingsliderlite-icon"></div>
110
  <?php endforeach; ?>
111
  </div>
112
- <?php else : do_action( 'easingsliderlite_pagination', $s ); endif; ?>
113
 
114
  <?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 */ ?>
115
  <?php if ( current_user_can( 'easingsliderlite_edit_slideshow' ) && apply_filters( 'easingsliderlite_edit_slideshow_icon', __return_true() ) ) : ?>
@@ -117,4 +122,26 @@
117
  <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;" />
118
  </a>
119
  <?php endif; ?>
120
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /** Get the slideshow */
4
  $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
6
+ /** Get customizations */
7
+ $customizations = $c = json_decode( get_option( 'easingsliderlite_customizations' ) );
8
+
9
  /** Bail if we failed to retrieve the slideshow */
10
  if ( $s === false ) {
11
  if ( current_user_can( 'easingsliderlite_edit_slideshow' ) )
24
  $settings = get_option( 'easingsliderlite_settings' );
25
 
26
  /** Load slideshow scripts and styles in foooter (if set to do so) */
 
 
27
  if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'footer' )
28
  add_action( 'wp_footer', array( 'ESL_Slideshow', 'enqueue_scripts' ) );
29
+ if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'footer' ) {
30
+ add_action( 'wp_footer', array( 'ESL_Slideshow', 'enqueue_styles' ) );
31
+ add_action( 'wp_footer', array( 'ESL_Slideshow', 'print_custom_styles') );
32
+ }
33
 
34
  /** Inline slideshow styles */
35
  if ( $s->dimensions->responsive )
61
  $container_styles .= " padding-top: {$viewport_height}% !important;";
62
 
63
  ?>
64
+ <div class="easingsliderlite <?php echo ESL_Slideshow::detect_browser(); ?> use-<?php echo $s->transitions->effect; ?>" data-options="<?php echo esc_attr( $slideshow_options ); ?>" style="<?php echo esc_attr( $slideshow_styles ); ?>">
65
  <div class="easingsliderlite-viewport" style="<?php echo esc_attr( $viewport_styles ); ?>">
66
  <div class="easingsliderlite-slides-container" style="<?php echo esc_attr( $container_styles ); ?>">
67
  <?php
89
  ?>
90
  <div class="easingsliderlite-slide" style="<?php echo $slide_styles; ?>">
91
  <?php if ( !empty( $slide->link ) ) { ?><a href="<?php echo esc_attr( $slide->link ); ?>" target="<?php echo esc_attr( $slide->linkTarget ); ?>"><?php } ?>
92
+ <img src="<?php echo esc_attr( $image['url'] ); ?>" class="easingsliderlite-image" alt="<?php echo esc_attr( $slide->alt ); ?>" title="<?php echo esc_attr( $slide->title ); ?>" />
93
  <?php if ( !empty( $slide->link ) ) { ?></a><?php } ?>
94
  <?php if ( !empty( $slide->content ) ) { ?>
95
  <div class="easingsliderlite-slide-content">
106
  <?php if ( $s->navigation->arrows && !has_action( 'easingsliderlite_arrows' ) ) : ?>
107
  <div class="easingsliderlite-arrows easingsliderlite-next <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
108
  <div class="easingsliderlite-arrows easingsliderlite-prev <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
109
+ <?php else : do_action( 'easingsliderlite_arrows', $s, $c ); endif; ?>
110
 
111
  <?php if ( $s->navigation->pagination && !has_action( 'easingsliderlite_pagination' ) ) : ?>
112
  <div class="easingsliderlite-pagination <?php echo esc_attr( $s->navigation->pagination_position ) .' '. esc_attr( $s->navigation->pagination_location ); ?>">
113
  <?php foreach ( $s->slides as $index => $slide ) : ?>
114
+ <div class="easingsliderlite-icon inactive"></div>
115
  <?php endforeach; ?>
116
  </div>
117
+ <?php else : do_action( 'easingsliderlite_pagination', $s, $c ); endif; ?>
118
 
119
  <?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 */ ?>
120
  <?php if ( current_user_can( 'easingsliderlite_edit_slideshow' ) && apply_filters( 'easingsliderlite_edit_slideshow_icon', __return_true() ) ) : ?>
122
  <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;" />
123
  </a>
124
  <?php endif; ?>
125
+ </div>
126
+
127
+ <?php
128
+ /** Display the slideshow shadow */
129
+ if ( !apply_filters( 'easingsliderlite_disable_shadow', __return_false() ) ) :
130
+
131
+ /** Get the inline styling */
132
+ $styles = ( $c->shadow->enable ) ? 'display: block; ' : 'display: none; ';
133
+ $styles .= ( $s->dimensions->responsive ) ? "max-width: {$s->dimensions->width}px; " : "width: {$s->dimensions->width}px ";
134
+ $styles .= ( $c->border->width !== 0 ) ? "margin-left: {$c->border->width}px;" : '';
135
+
136
+ /** Print the shadow */
137
+ if ( !has_action( 'easingsliderlite_shadow' ) ) :
138
+ echo "<div class='easingsliderlite-shadow' style='{$styles}'>";
139
+ if ( $c->shadow->enable )
140
+ echo "<img src='{$c->shadow->image}' alt='' />";
141
+ echo "</div>";
142
+ else :
143
+ do_action( 'easingsliderlite_shadow', $s, $c );
144
+ endif;
145
+
146
+ endif;
147
+ ?>