Version Description
- Users can now have unlimited sliders (no longer limited to one).
- New admin interface makes managing your sliders easier and quicker, and provides users with enhanced media management.
- Under the hood, the plugin has been completely rebuilt to be faster, more extensible and future proof.
Download this release
Release Info
Developer | MatthewRuddy |
Plugin | Easing Slider |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.4.3 to 2.2
- backbone/edit-slide.php +88 -0
- backbone/slide.php +49 -0
- css/admin.css +0 -324
- css/admin.min.css +0 -1
- css/customizer.css +12 -0
- css/customizer.min.css +1 -0
- css/easingslider.css +599 -0
- css/easingslider.min.css +1 -0
- css/editor-pages.css +325 -0
- css/editor-pages.min.css +1 -0
- css/extensions-page.css +33 -0
- css/extensions-page.min.css +1 -0
- css/settings-page.css +30 -0
- css/settings-page.min.css +1 -0
- css/slideshow.css +0 -298
- css/slideshow.min.css +0 -1
- css/welcome-pages.css +44 -0
- css/welcome-pages.min.css +1 -0
- easing-slider.php +462 -0
- easingsliderlite.php +0 -1077
- images/banner-easingsliderpro.png +0 -0
- images/banner-rocketgalleries.png +0 -0
- images/delete_icon.png +0 -0
- images/delete_icon@2x.png +0 -0
- images/easingslider-badge.jpg +0 -0
- images/edit_icon.png +0 -0
- images/edit_icon@2x.png +0 -0
- images/function-screenshot.jpg +0 -0
- images/interface-screenshot.jpg +0 -0
- images/list-screenshot.jpg +0 -0
- images/loading.gif +0 -0
- images/menu_icon.png +0 -0
- images/menu_icon_2x.png +0 -0
- images/menu_icon_single.png +0 -0
- images/menu_icon_single_grey.png +0 -0
- images/{slideshow_arrow_next.png → nav-arrow-next.png} +0 -0
- images/{slideshow_arrow_prev.png → nav-arrow-prev.png} +0 -0
- images/{slideshow_icon_active.png → nav-icon-active.png} +0 -0
- images/{slideshow_icon_inactive.png → nav-icon-inactive.png} +0 -0
- images/{slideshow_shadow.png → shadow.png} +0 -0
- images/shortcode-screenshot.jpg +0 -0
- images/trash.png +0 -0
- images/trash@2x.png +0 -0
- images/welcome-screenshot.jpg +0 -0
- images/widget-screenshot.jpg +0 -0
- includes/Legacy.php +0 -259
- includes/Resize.php +0 -181
- includes/Slideshow.php +0 -151
- includes/Upgrade.php +0 -141
- includes/Widget.php +0 -78
- includes/class-es-customizations.php +242 -0
- includes/class-es-customizer-legacy.php +253 -0
- includes/class-es-customizer-notice.php +86 -0
- includes/class-es-customizer.php +220 -0
- includes/class-es-editor-pages.php +406 -0
- includes/class-es-extensions-page.php +167 -0
- includes/class-es-image-resizer.php +238 -0
- includes/class-es-legacy.php +640 -0
- includes/class-es-menu.php +109 -0
- includes/class-es-migrations.php +66 -0
- includes/class-es-settings-page.php +204 -0
- includes/class-es-shortcode.php +169 -0
- includes/class-es-slider.php +717 -0
- includes/class-es-sliders-list-table.php +392 -0
- includes/class-es-update-manager.php +372 -0
- includes/class-es-welcome-pages.php +204 -0
- includes/class-es-widget.php +120 -0
- includes/helpers.php +187 -0
- js/admin.js +0 -541
- js/admin.min.js +0 -1
- js/customizer.js +182 -144
- js/customizer.min.js +1 -1
- js/editor-pages.js +1142 -0
- js/editor-pages.min.js +1 -0
- js/jquery.easingslider.js +459 -0
- js/jquery.easingslider.min.js +1 -0
- js/slideshow.js +0 -633
- js/slideshow.min.js +0 -2
- languages/easing-slider.pot +1070 -0
- languages/easingsliderlite-ar.mo +0 -0
- languages/easingsliderlite.pot +0 -660
- partials/customizer.php +161 -0
- partials/discover-extensions.php +22 -0
- partials/edit-settings.php +40 -0
- partials/edit-settings_general.php +86 -0
- partials/edit-settings_licenses.php +12 -0
- partials/edit-slider.php +73 -0
- partials/edit-slider_sidebar.php +342 -0
- partials/list-sliders.php +35 -0
- partials/welcome.php +18 -0
- partials/welcome_about.php +48 -0
- partials/welcome_credits.php +28 -0
- partials/welcome_getting-started.php +64 -0
- readme.txt +30 -29
- templates/customizer.php +0 -182
- templates/editsettings.php +0 -124
- templates/editslideshow-media-details.php +0 -45
- templates/editslideshow-sidebar.php +0 -253
- templates/editslideshow-slide.php +0 -57
- templates/editslideshow-thumbnail.php +0 -6
- templates/editslideshow-welcome.php +0 -49
- templates/editslideshow.php +0 -67
- templates/slideshow.php +0 -146
backbone/edit-slide.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/html" id="tmpl-easingslider-edit-slide">
|
2 |
+
<div class="attachment-media-view {{ data.model.orientation }}">
|
3 |
+
<div class="thumbnail thumbnail-{{ data.type }}">
|
4 |
+
<# if ( 'image' == data.model.type ) { #>
|
5 |
+
<# if ( data.attachment ) { #>
|
6 |
+
<img class="details-image" src="{{ data.attachment.url }}" draggable="false" />
|
7 |
+
|
8 |
+
<# if ( window.imageEdit ) { #>
|
9 |
+
<div class="actions">
|
10 |
+
<input type="button" class="edit-attachment button" value="<?php _e( 'Edit Original' ); ?>" />
|
11 |
+
<input type="button" class="replace-attachment button" value="<?php _e( 'Replace' ); ?>" />
|
12 |
+
</div>
|
13 |
+
<# } #>
|
14 |
+
<# } else { #>
|
15 |
+
<img class="details-image" src="{{ data.model.url }}" draggable="false" />
|
16 |
+
<# } #>
|
17 |
+
<# } #>
|
18 |
+
|
19 |
+
<?php
|
20 |
+
/**
|
21 |
+
* This is for our extensions and their custom slide preview
|
22 |
+
*/
|
23 |
+
do_action( 'easingslider_print_edit_slide_preview' );
|
24 |
+
?>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
|
28 |
+
<div class="attachment-info">
|
29 |
+
<# if ( 'image' == data.model.type ) { #>
|
30 |
+
<div class="settings">
|
31 |
+
<h3><?php _e( 'Link Settings', 'easingslider' ); ?></h3>
|
32 |
+
|
33 |
+
<label class="setting link-to">
|
34 |
+
<span class="name"><?php _e( 'Link To', 'easingslider' ); ?></span>
|
35 |
+
<select data-setting="link">
|
36 |
+
<option value="none">
|
37 |
+
<?php _e( 'None', 'easingslider' ); ?>
|
38 |
+
</option>
|
39 |
+
<option value="custom">
|
40 |
+
<?php _e( 'Custom URL', 'easingslider' ); ?>
|
41 |
+
</option>
|
42 |
+
<# if ( data.attachment ) { #>
|
43 |
+
<option value="file">
|
44 |
+
<?php _e( 'Media File', 'easingslider' ); ?>
|
45 |
+
</option>
|
46 |
+
<option value="post">
|
47 |
+
<?php _e( 'Attachment Page', 'easingslider' ); ?>
|
48 |
+
</option>
|
49 |
+
<# } else { #>
|
50 |
+
<option value="file">
|
51 |
+
<?php _e( 'Image URL', 'easingslider' ); ?>
|
52 |
+
</option>
|
53 |
+
<# } #>
|
54 |
+
</select>
|
55 |
+
<input type="text" class="link-to-custom" data-setting="linkUrl" />
|
56 |
+
</label>
|
57 |
+
|
58 |
+
<?php
|
59 |
+
/**
|
60 |
+
* This is for our extensions to add their own link settings
|
61 |
+
*/
|
62 |
+
do_action( 'easingslider_print_link_to_settings' );
|
63 |
+
?>
|
64 |
+
</div>
|
65 |
+
|
66 |
+
<div class="settings">
|
67 |
+
<h3><?php _e( 'Image Settings', 'easingslider' ); ?></h3>
|
68 |
+
|
69 |
+
<label class="setting title">
|
70 |
+
<span class="name"><?php _e( 'Title Attribute', 'easingslider' ); ?></span>
|
71 |
+
<input type="text" data-setting="title" />
|
72 |
+
</label>
|
73 |
+
|
74 |
+
<label class="setting alt-text">
|
75 |
+
<span class="name"><?php _e( 'Alternative Text', 'easingslider' ); ?></span>
|
76 |
+
<input type="text" data-setting="alt" />
|
77 |
+
</label>
|
78 |
+
</div>
|
79 |
+
<# } #>
|
80 |
+
|
81 |
+
<?php
|
82 |
+
/**
|
83 |
+
* This is for our extensions and their custom slide settings
|
84 |
+
*/
|
85 |
+
do_action( 'easingslider_print_edit_slide_settings' );
|
86 |
+
?>
|
87 |
+
</div>
|
88 |
+
</script>
|
backbone/slide.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/html" id="tmpl-easingslider-slide">
|
2 |
+
<div class="attachment-preview js--select-attachment">
|
3 |
+
<div class="toolbar">
|
4 |
+
<i class="dashicons dashicons-edit edit"></i>
|
5 |
+
<i class="dashicons dashicons-no-alt remove"></i>
|
6 |
+
</div>
|
7 |
+
|
8 |
+
<div class="thumbnail">
|
9 |
+
<# if ( 'image' === data.model.type ) { #>
|
10 |
+
<div class="centered">
|
11 |
+
<# if ( data.attachment && data.attachment.sizes ) { #>
|
12 |
+
<# var image = data.attachment.sizes.thumbnail || data.attachment.sizes.medium || data.attachment.sizes.large || data.attachment.sizes.full #>
|
13 |
+
<img src="{{ image.url }}" draggable="false" alt="" />
|
14 |
+
<# } else { #>
|
15 |
+
<img src="{{ data.model.url }}" draggable="false" alt="" />
|
16 |
+
<# } #>
|
17 |
+
</div>
|
18 |
+
<# } else if ( data.attachment ) { #>
|
19 |
+
<div class="centered">
|
20 |
+
<# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #>
|
21 |
+
<img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" />
|
22 |
+
<# } else { #>
|
23 |
+
<img src="{{ data.attachment.icon }}" class="icon" draggable="false" />
|
24 |
+
<# } #>
|
25 |
+
</div>
|
26 |
+
<div class="filename">
|
27 |
+
<div>{{ data.attachment.filename }}</div>
|
28 |
+
</div>
|
29 |
+
<# } #>
|
30 |
+
|
31 |
+
<?php
|
32 |
+
/**
|
33 |
+
* This is for our extensions and their custom thumbnails
|
34 |
+
*/
|
35 |
+
do_action( 'easingslider_print_thumbnail' );
|
36 |
+
?>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<a class="check" href="#" title="<?php esc_attr_e('Deselect'); ?>" tabindex="-1"><div class="media-modal-icon"></div></a>
|
41 |
+
|
42 |
+
<?php
|
43 |
+
/**
|
44 |
+
* This hidden attribute is kept in-sync with our model data.
|
45 |
+
* Everytime a change is made to the model, it's data is dumped here so we can fetch it with PHP.
|
46 |
+
*/
|
47 |
+
?>
|
48 |
+
<input type="hidden" name="slides[]" value="{{ JSON.stringify(data.model) }}" />
|
49 |
+
</script>
|
css/admin.css
DELETED
@@ -1,324 +0,0 @@
|
|
1 |
-
/** ===== Floats & clearfix ===== */
|
2 |
-
.pull-left {
|
3 |
-
float: left;
|
4 |
-
}
|
5 |
-
.pull-right {
|
6 |
-
float: right;
|
7 |
-
}
|
8 |
-
.clearfix {
|
9 |
-
*zoom: 1;
|
10 |
-
}
|
11 |
-
.clearfix::before, .clearfix::after {
|
12 |
-
display: table;
|
13 |
-
content: '';
|
14 |
-
line-height: 0;
|
15 |
-
}
|
16 |
-
.clearfix::after {
|
17 |
-
clear: both;
|
18 |
-
}
|
19 |
-
|
20 |
-
/** ===== Slideshow List ===== */
|
21 |
-
.column-id {
|
22 |
-
width: 2em;
|
23 |
-
}
|
24 |
-
|
25 |
-
/** ===== Media Buttons ===== */
|
26 |
-
.wp-media-buttons .button {
|
27 |
-
padding-left: .4em;
|
28 |
-
margin-right: 5px;
|
29 |
-
}
|
30 |
-
.wp-media-buttons .button:last-child {
|
31 |
-
margin-right: 0;
|
32 |
-
}
|
33 |
-
.wp-media-buttons span.wp-media-buttons-icon {
|
34 |
-
display: inline-block;
|
35 |
-
width: 16px;
|
36 |
-
height: 16px;
|
37 |
-
vertical-align: text-top;
|
38 |
-
margin: 0 2px;
|
39 |
-
}
|
40 |
-
.wp-media-buttons .add-image span.wp-media-buttons-icon {
|
41 |
-
background: url('../../../../wp-admin/images/media-button.png') no-repeat top left;
|
42 |
-
}
|
43 |
-
.wp-media-buttons .delete-images span.wp-media-buttons-icon {
|
44 |
-
background: url('../images/trash.png') no-repeat 0 0;
|
45 |
-
margin-top: -1px;
|
46 |
-
}
|
47 |
-
.wp-media-buttons .edit-settings span.wp-media-buttons-icon {
|
48 |
-
background: url('../../../../wp-admin/images/menu.png') no-repeat top left;
|
49 |
-
background-position: -336px -40px;
|
50 |
-
}
|
51 |
-
|
52 |
-
/** ===== Multiple Checkboxes ===== */
|
53 |
-
.multiple-checkbox {
|
54 |
-
overflow-x: hidden;
|
55 |
-
overflow-y: auto;
|
56 |
-
border: 1px solid #dfdfdf;
|
57 |
-
background-color: #fff;
|
58 |
-
width: 25%;
|
59 |
-
height: 120px;
|
60 |
-
-webkit-border-radius: 3px;
|
61 |
-
border-radius: 3px;
|
62 |
-
}
|
63 |
-
.multiple-checkbox ul {
|
64 |
-
list-style-type: none;
|
65 |
-
width: auto;
|
66 |
-
line-height: 1.2;
|
67 |
-
margin: 0;
|
68 |
-
padding: 0;
|
69 |
-
}
|
70 |
-
.multiple-checkbox ul li {
|
71 |
-
margin: 0;
|
72 |
-
padding: 2px 2px 0 0;
|
73 |
-
line-height: 1.2;
|
74 |
-
}
|
75 |
-
.multiple-checkbox ul li.odd {
|
76 |
-
background-color: #f9f9f9;
|
77 |
-
}
|
78 |
-
.multiple-checkbox ul li input {
|
79 |
-
margin: 0 5px;
|
80 |
-
}
|
81 |
-
|
82 |
-
/** ===== Input helpers ===== */
|
83 |
-
input.error,
|
84 |
-
textarea.error {
|
85 |
-
border-color: #b94a48 !important;
|
86 |
-
-webkit-box-shadow: 1px 1px 2px rgba(213, 147, 146, 0.3) !important;
|
87 |
-
box-shadow: 1px 1px 2px rgba(213, 147, 146, 0.3) !important;
|
88 |
-
}
|
89 |
-
|
90 |
-
input.success,
|
91 |
-
textarea.success {
|
92 |
-
border-color: #468847 !important;
|
93 |
-
-webkit-box-shadow: 1px 1px 2px rgba(122, 186, 123, 0.3) !important;
|
94 |
-
box-shadow: 1px 1px 2px rgba(122, 186, 123, 0.3) !important;
|
95 |
-
}
|
96 |
-
|
97 |
-
/** ===== Main Admin panel ===== */
|
98 |
-
.main-panel {
|
99 |
-
position: relative;
|
100 |
-
}
|
101 |
-
.main-panel .description {
|
102 |
-
font-size: 11px;
|
103 |
-
font-style: italic;
|
104 |
-
display: block;
|
105 |
-
color: #777;
|
106 |
-
padding: 5px 0px;
|
107 |
-
}
|
108 |
-
|
109 |
-
/** ===== Divider ===== */
|
110 |
-
.divider {
|
111 |
-
padding: 0;
|
112 |
-
margin: 20px 0;
|
113 |
-
width: 100%;
|
114 |
-
height: 1px;
|
115 |
-
background: #e6e6e6;
|
116 |
-
}
|
117 |
-
|
118 |
-
/** ===== Settings container ===== */
|
119 |
-
.settings-container {
|
120 |
-
float: right;
|
121 |
-
clear: right;
|
122 |
-
width: 285px;
|
123 |
-
padding-right: 5px;
|
124 |
-
}
|
125 |
-
.settings-container .widgets-holder-wrap {
|
126 |
-
margin-top: 0;
|
127 |
-
}
|
128 |
-
.settings-container .sidebar-content {
|
129 |
-
border-width: 0 1px 1px;
|
130 |
-
border-style: none solid solid;
|
131 |
-
-webkit-border-bottom-right-radius: 3px;
|
132 |
-
-webkit-border-bottom-left-radius: 3px;
|
133 |
-
border-bottom-right-radius: 3px;
|
134 |
-
border-bottom-left-radius: 3px;
|
135 |
-
padding: 10px;
|
136 |
-
min-height: 20px;
|
137 |
-
}
|
138 |
-
.settings-container .sidebar-content .divider {
|
139 |
-
margin-bottom: 0;
|
140 |
-
}
|
141 |
-
.settings-container .sidebar-content .field,
|
142 |
-
.settings-container .sidebar-content .radio {
|
143 |
-
width: 100%;
|
144 |
-
margin: 1em 0;
|
145 |
-
}
|
146 |
-
.settings-container .sidebar-content .field span {
|
147 |
-
font-weight: bold;
|
148 |
-
display: block;
|
149 |
-
}
|
150 |
-
.settings-container .sidebar-content .field {
|
151 |
-
float: left;
|
152 |
-
}
|
153 |
-
.settings-container .sidebar-content .field input,
|
154 |
-
.settings-container .sidebar-content .field select {
|
155 |
-
width: 90%;
|
156 |
-
}
|
157 |
-
.settings-container .sidebar-content .field input[type="checkbox"] {
|
158 |
-
width: auto;
|
159 |
-
margin-right: 4px;
|
160 |
-
}
|
161 |
-
.settings-container .sidebar-content .radio > span {
|
162 |
-
font-weight: bold;
|
163 |
-
float: left;
|
164 |
-
}
|
165 |
-
.settings-container .sidebar-content .radio .buttons {
|
166 |
-
float: right;
|
167 |
-
}
|
168 |
-
.settings-container .sidebar-content .radio .buttons label {
|
169 |
-
margin-right: 10px;
|
170 |
-
}
|
171 |
-
.settings-container .sidebar-content .radio .buttons input {
|
172 |
-
margin-top: 0;
|
173 |
-
margin-right: 2px;
|
174 |
-
}
|
175 |
-
.settings-container .dimension-settings .field {
|
176 |
-
width: 45%;
|
177 |
-
}
|
178 |
-
.settings-container .dimension-settings .field:first-child {
|
179 |
-
margin-right: 5%;
|
180 |
-
}
|
181 |
-
|
182 |
-
/** ===== Thumbnails ===== */
|
183 |
-
.thumbnails-container {
|
184 |
-
float: left;
|
185 |
-
clear: left;
|
186 |
-
width: 100%;
|
187 |
-
margin: 15px -300px 0 0;
|
188 |
-
}
|
189 |
-
.thumbnails-container .inner {
|
190 |
-
margin-right: 300px;
|
191 |
-
}
|
192 |
-
.thumbnails-container .thumbnail {
|
193 |
-
float: left;
|
194 |
-
position: relative;
|
195 |
-
}
|
196 |
-
.thumbnails-container .thumbnail .delete-button {
|
197 |
-
position: absolute;
|
198 |
-
top: -15px;
|
199 |
-
right: 5px;
|
200 |
-
width: 36px;
|
201 |
-
height: 36px;
|
202 |
-
z-index: 10;
|
203 |
-
background: url(../images/delete_icon.png) no-repeat top left;
|
204 |
-
cursor: pointer;
|
205 |
-
opacity: 0;
|
206 |
-
-webkit-transition: opacity 0.125s ease;
|
207 |
-
-moz-transition: opacity 0.125s ease;
|
208 |
-
-ms-transition: opacity 0.125s ease;
|
209 |
-
-o-transition: opacity 0.125s ease;
|
210 |
-
transition: opacity 0.125s ease;
|
211 |
-
}
|
212 |
-
.thumbnails-container .thumbnail:hover .delete-button {
|
213 |
-
opacity: 1;
|
214 |
-
}
|
215 |
-
.thumbnails-container .thumbnail img {
|
216 |
-
-moz-box-shadow: 0px 1px 4px 0px #a5a5a5;
|
217 |
-
-webkit-box-shadow: 0px 1px 4px 0px #a5a5a5;
|
218 |
-
box-shadow: 0px 1px 4px 0px #a5a5a5;
|
219 |
-
-webkit-border-radius: 2px;
|
220 |
-
border-radius: 2px;
|
221 |
-
cursor: pointer;
|
222 |
-
width: 150px;
|
223 |
-
height: 150px;
|
224 |
-
padding: 0;
|
225 |
-
margin: 0 20px 20px 0;
|
226 |
-
}
|
227 |
-
|
228 |
-
/** ===== Media Frame ===== */
|
229 |
-
.media-frame-title,
|
230 |
-
.media-frame-router,
|
231 |
-
.media-frame-content,
|
232 |
-
.media-frame-toolbar {
|
233 |
-
left: 0 !important;
|
234 |
-
}
|
235 |
-
.media-frame-content {
|
236 |
-
padding: 0 16px;
|
237 |
-
}
|
238 |
-
.media-main {
|
239 |
-
margin-right: 283px;
|
240 |
-
}
|
241 |
-
.media-main h2 {
|
242 |
-
font-weight: 200;
|
243 |
-
}
|
244 |
-
.media-main input,
|
245 |
-
.media-main textarea {
|
246 |
-
max-width: 500px !important;
|
247 |
-
}
|
248 |
-
.media-main textarea {
|
249 |
-
height: 200px;
|
250 |
-
resize: none;
|
251 |
-
}
|
252 |
-
.media-main .embed-link-settings {
|
253 |
-
top: 0;
|
254 |
-
}
|
255 |
-
.media-main .setting {
|
256 |
-
margin-top: 30px !important;
|
257 |
-
}
|
258 |
-
.media-main .setting:first-child {
|
259 |
-
margin-top: 0 !important;
|
260 |
-
}
|
261 |
-
.media-main .description {
|
262 |
-
font-size: 11px;
|
263 |
-
margin-top: 5px;
|
264 |
-
}
|
265 |
-
.media-main .thumbnail {
|
266 |
-
position: relative;
|
267 |
-
}
|
268 |
-
.media-main .thumbnail .change-image {
|
269 |
-
position: absolute;
|
270 |
-
bottom: 10px;
|
271 |
-
right: 10px;
|
272 |
-
z-index: 9999;
|
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 |
-
|
284 |
-
/** ===== Additional ===== */
|
285 |
-
.easingsliderlite-updated-admin .welcome-panel {
|
286 |
-
padding-bottom: 11px;
|
287 |
-
}
|
288 |
-
|
289 |
-
.easingsliderlite-updated-admin .sidebar-name {
|
290 |
-
border-bottom: 1px solid #eee;
|
291 |
-
}
|
292 |
-
|
293 |
-
.easingsliderlite-updated-admin .closed .sidebar-name {
|
294 |
-
border-width: 0;
|
295 |
-
}
|
296 |
-
|
297 |
-
.easingsliderlite-updated-admin .sidebar-name h3 {
|
298 |
-
padding: 15px;
|
299 |
-
}
|
300 |
-
|
301 |
-
.easingsliderlite-updated-admin .sidebar-name-arrow:before {
|
302 |
-
top: 4px !important;
|
303 |
-
}
|
304 |
-
|
305 |
-
.easingsliderlite-updated-admin .sidebar-content {
|
306 |
-
border-color: #fff;
|
307 |
-
}
|
308 |
-
|
309 |
-
.easingsliderlite-updated-admin .widgets-holder-wrap {
|
310 |
-
margin-bottom: 9px;
|
311 |
-
}
|
312 |
-
|
313 |
-
.easingsliderlite-updated-admin .settings-container .sidebar-content {
|
314 |
-
padding-left: 15px;
|
315 |
-
padding-right: 15px;
|
316 |
-
}
|
317 |
-
|
318 |
-
.easingsliderlite-updated-admin .customize-container {
|
319 |
-
background-image: none !important;
|
320 |
-
}
|
321 |
-
|
322 |
-
.easingsliderlite-updated-admin .wp-media-buttons span.wp-media-buttons-icon {
|
323 |
-
margin-top: 1px;
|
324 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/admin.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.pull-left{float:left}.pull-right{float:right}.clearfix{*zoom:1}.clearfix::after,.clearfix::before{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,.3)!important;box-shadow:1px 1px 2px rgba(213,147,146,.3)!important}input.success,textarea.success{border-color:#468847!important;-webkit-box-shadow:1px 1px 2px rgba(122,186,123,.3)!important;box-shadow:1px 1px 2px rgba(122,186,123,.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:700;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:700;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-content,.media-frame-router,.media-frame-title,.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}.easingsliderlite-updated-admin .welcome-panel{padding-bottom:11px}.easingsliderlite-updated-admin .sidebar-name{border-bottom:1px solid #eee}.easingsliderlite-updated-admin .closed .sidebar-name{border-width:0}.easingsliderlite-updated-admin .sidebar-name h3{padding:15px}.easingsliderlite-updated-admin .sidebar-name-arrow:before{top:4px!important}.easingsliderlite-updated-admin .sidebar-content{border-color:#fff}.easingsliderlite-updated-admin .widgets-holder-wrap{margin-bottom:9px}.easingsliderlite-updated-admin .settings-container .sidebar-content{padding-left:15px;padding-right:15px}.easingsliderlite-updated-admin .customize-container{background-image:none!important}.easingsliderlite-updated-admin .wp-media-buttons span.wp-media-buttons-icon{margin-top:1px}
|
|
css/customizer.css
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#customize-container {
|
2 |
+
display: block;
|
3 |
+
}
|
4 |
+
|
5 |
+
#customize-container #customize-controls {
|
6 |
+
z-index: 9999;
|
7 |
+
}
|
8 |
+
|
9 |
+
#customize-container #customize-preview {
|
10 |
+
min-width: 300px;
|
11 |
+
margin: 45px;
|
12 |
+
}
|
css/customizer.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#customize-container{display:block}#customize-container #customize-controls{z-index:9999}#customize-container #customize-preview{min-width:300px;margin:45px}
|
css/easingslider.css
ADDED
@@ -0,0 +1,599 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* 1.0 Slider
|
3 |
+
*
|
4 |
+
* All of our slider styling, including resets.
|
5 |
+
* Very strict to ensure it doesn't get broken by themes, other plugins, etc.
|
6 |
+
*/
|
7 |
+
.easingslider,
|
8 |
+
.easingslider-viewport,
|
9 |
+
.easingslider-slide,
|
10 |
+
.easingslider-link,
|
11 |
+
.easingslider-image {
|
12 |
+
line-height: 0 !important;
|
13 |
+
outline: none !important;
|
14 |
+
padding: 0 !important;
|
15 |
+
margin: 0 !important;
|
16 |
+
}
|
17 |
+
|
18 |
+
.easingslider-viewport,
|
19 |
+
.easingslider-slide,
|
20 |
+
.easingslider-link,
|
21 |
+
.easingslider-image {
|
22 |
+
clear: none !important;
|
23 |
+
border: 0 !important;
|
24 |
+
}
|
25 |
+
|
26 |
+
.easingslider {
|
27 |
+
position: relative !important;
|
28 |
+
z-index: 1;
|
29 |
+
}
|
30 |
+
|
31 |
+
.easingslider.has-loaded .easingslider-arrows,
|
32 |
+
.easingslider.has-loaded .easingslider-pagination {
|
33 |
+
opacity: 1;
|
34 |
+
}
|
35 |
+
|
36 |
+
.easingslider-viewport {
|
37 |
+
position: relative !important;
|
38 |
+
}
|
39 |
+
|
40 |
+
.easingslider-preload {
|
41 |
+
background: url(../images/loading.gif) no-repeat center center #fff !important;
|
42 |
+
width: 100% !important;
|
43 |
+
height: 100% !important;
|
44 |
+
position: absolute !important;
|
45 |
+
top: 0 !important;
|
46 |
+
left: 0 !important;
|
47 |
+
z-index: 999999 !important;
|
48 |
+
}
|
49 |
+
|
50 |
+
.easingslider-slide {
|
51 |
+
display: none;
|
52 |
+
overflow: hidden;
|
53 |
+
position: absolute;
|
54 |
+
top: 0;
|
55 |
+
left: 0;
|
56 |
+
bottom: 0;
|
57 |
+
right: 0;
|
58 |
+
}
|
59 |
+
|
60 |
+
.easingslider-slide.active,
|
61 |
+
.easingslider-slide.next-in,
|
62 |
+
.easingslider-slide.next-out,
|
63 |
+
.easingslider-slide.prev-in,
|
64 |
+
.easingslider-slide.prev-out {
|
65 |
+
display: block;
|
66 |
+
}
|
67 |
+
|
68 |
+
.easingslider-slide.active {
|
69 |
+
z-index: 999 !important;
|
70 |
+
}
|
71 |
+
|
72 |
+
.easingslider-slide.next-out,
|
73 |
+
.easingslider-slide.prev-out {
|
74 |
+
z-index: 9999 !important;
|
75 |
+
}
|
76 |
+
|
77 |
+
.easingslider-slide.next-in,
|
78 |
+
.easingslider-slide.prev-in {
|
79 |
+
z-index: 99999 !important;
|
80 |
+
}
|
81 |
+
|
82 |
+
.easingslider-image {
|
83 |
+
height: auto;
|
84 |
+
width: 100%;
|
85 |
+
}
|
86 |
+
|
87 |
+
.easingslider .easingslider-arrows.has-hover,
|
88 |
+
.easingslider .easingslider-pagination.has-hover {
|
89 |
+
opacity: 0;
|
90 |
+
}
|
91 |
+
|
92 |
+
.easingslider:hover .easingslider-arrows.has-hover,
|
93 |
+
.easingslider:hover .easingslider-pagination.has-hover {
|
94 |
+
opacity: 1;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* 2.0 "Arrow" navigation
|
99 |
+
*
|
100 |
+
* CSS for our directional arrow navigation
|
101 |
+
*/
|
102 |
+
.easingslider-arrows {
|
103 |
+
position: absolute;
|
104 |
+
top: 46%;
|
105 |
+
width: 30px;
|
106 |
+
height: 30px;
|
107 |
+
background-repeat: no-repeat;
|
108 |
+
z-index: 99999;
|
109 |
+
cursor: pointer;
|
110 |
+
opacity: 0;
|
111 |
+
-webkit-transition: opacity 0.25s ease;
|
112 |
+
-moz-transition: opacity 0.25s ease;
|
113 |
+
-ms-transition: opacity 0.25s ease;
|
114 |
+
-o-transition: opacity 0.25s ease;
|
115 |
+
transition: opacity 0.25s ease;
|
116 |
+
}
|
117 |
+
|
118 |
+
.easingslider-arrows.easingslider-next {
|
119 |
+
background-image: url(../images/nav-arrow-next.png);
|
120 |
+
background-position: top right;
|
121 |
+
}
|
122 |
+
|
123 |
+
.easingslider-arrows.easingslider-prev {
|
124 |
+
background-image: url(../images/nav-arrow-prev.png);
|
125 |
+
background-position: top left;
|
126 |
+
}
|
127 |
+
|
128 |
+
.easingslider-arrows.easingslider-next.inside {
|
129 |
+
right: 10px;
|
130 |
+
}
|
131 |
+
|
132 |
+
.easingslider-arrows.easingslider-next.outside {
|
133 |
+
right: -40px;
|
134 |
+
padding-left: 20px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.easingslider-arrows.easingslider-prev.inside {
|
138 |
+
left: 10px;
|
139 |
+
}
|
140 |
+
|
141 |
+
.easingslider-arrows.easingslider-prev.outside {
|
142 |
+
left: -40px;
|
143 |
+
padding-right: 20px;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* 2.1 "Pagination" navigation
|
148 |
+
*
|
149 |
+
* CSS for our icon pagination navigation
|
150 |
+
*/
|
151 |
+
.easingslider-pagination {
|
152 |
+
position: absolute;
|
153 |
+
z-index: 99999;
|
154 |
+
opacity: 0;
|
155 |
+
-webkit-transition: opacity 0.25s ease;
|
156 |
+
-moz-transition: opacity 0.25s ease;
|
157 |
+
-ms-transition: opacity 0.25s ease;
|
158 |
+
-o-transition: opacity 0.25s ease;
|
159 |
+
transition: opacity 0.25s ease;
|
160 |
+
}
|
161 |
+
|
162 |
+
.easingslider-pagination.inside.bottom-left {
|
163 |
+
bottom: 10px;
|
164 |
+
left: 10px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.easingslider-pagination.inside.bottom-right {
|
168 |
+
bottom: 10px;
|
169 |
+
right: 10px;
|
170 |
+
}
|
171 |
+
|
172 |
+
.easingslider-pagination.inside.bottom-center {
|
173 |
+
bottom: 10px;
|
174 |
+
left: 0;
|
175 |
+
width: 100%;
|
176 |
+
text-align: center;
|
177 |
+
}
|
178 |
+
|
179 |
+
.easingslider-pagination.inside.top-left {
|
180 |
+
top: 10px;
|
181 |
+
left: 10px;
|
182 |
+
}
|
183 |
+
|
184 |
+
.easingslider-pagination.inside.top-right {
|
185 |
+
top: 10px;
|
186 |
+
right: 10px;
|
187 |
+
}
|
188 |
+
|
189 |
+
.easingslider-pagination.inside.top-center {
|
190 |
+
top: 10px;
|
191 |
+
left: 0;
|
192 |
+
width: 100%;
|
193 |
+
text-align: center;
|
194 |
+
}
|
195 |
+
|
196 |
+
.easingslider-pagination.outside.bottom-left {
|
197 |
+
bottom: -25px;
|
198 |
+
left: 0;
|
199 |
+
padding-top: 20px;
|
200 |
+
}
|
201 |
+
|
202 |
+
.easingslider-pagination.outside.bottom-right {
|
203 |
+
bottom: -25px;
|
204 |
+
right: 0;
|
205 |
+
padding-top: 20px;
|
206 |
+
}
|
207 |
+
|
208 |
+
.easingslider-pagination.outside.bottom-center {
|
209 |
+
bottom: -25px;
|
210 |
+
left: 0;
|
211 |
+
width: 100%;
|
212 |
+
text-align: center;
|
213 |
+
padding-top: 20px;
|
214 |
+
}
|
215 |
+
|
216 |
+
.easingslider-pagination.outside.top-left {
|
217 |
+
top: -25px;
|
218 |
+
left: 0;
|
219 |
+
padding-bottom: 20px;
|
220 |
+
}
|
221 |
+
|
222 |
+
.easingslider-pagination.outside.top-right {
|
223 |
+
top: -25px;
|
224 |
+
right: 0;
|
225 |
+
padding-bottom: 20px;
|
226 |
+
}
|
227 |
+
|
228 |
+
.easingslider-pagination.outside.top-center {
|
229 |
+
top: -25px;
|
230 |
+
left: 0;
|
231 |
+
width: 100%;
|
232 |
+
text-align: center;
|
233 |
+
padding-bottom: 20px;
|
234 |
+
}
|
235 |
+
|
236 |
+
.easingslider-pagination .easingslider-icon {
|
237 |
+
width: 15px;
|
238 |
+
height: 15px;
|
239 |
+
margin: 0;
|
240 |
+
padding: 0;
|
241 |
+
background-image: url(../images/nav-icon-inactive.png);
|
242 |
+
background-repeat: no-repeat;
|
243 |
+
background-position: 0 0;
|
244 |
+
display: inline-block;
|
245 |
+
*display: inline; /** IE7 hack */
|
246 |
+
zoom: 1; /** IE7 hack */
|
247 |
+
z-index: 99999;
|
248 |
+
cursor: pointer;
|
249 |
+
}
|
250 |
+
|
251 |
+
.easingslider-pagination .easingslider-icon:last-child {
|
252 |
+
margin-right: 0;
|
253 |
+
}
|
254 |
+
|
255 |
+
.easingslider-pagination .easingslider-icon.active {
|
256 |
+
background-image: url(../images/nav-icon-active.png);
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* 3.0 "Fade" effect
|
261 |
+
*
|
262 |
+
* CSS related to the "Fade" transition effect.
|
263 |
+
*/
|
264 |
+
.easingslider.use-fade .easingslider-slide.next-in,
|
265 |
+
.easingslider.use-fade .easingslider-slide.prev-in {
|
266 |
+
-webkit-animation: fadeIn 0.3s ease;
|
267 |
+
-moz-animation: fadeIn 0.3s ease;
|
268 |
+
-ms-animation: fadeIn 0.3s ease;
|
269 |
+
-o-animation: fadeIn 0.3s ease;
|
270 |
+
animation: fadeIn 0.3s ease;
|
271 |
+
}
|
272 |
+
|
273 |
+
._easingslider.use-fade .easingslider-slide.next-out,
|
274 |
+
._easingslider.use-fade .easingslider-slide.prev-out {
|
275 |
+
-webkit-animation: fadeOut 0.3s ease;
|
276 |
+
-moz-animation: fadeOut 0.3s ease;
|
277 |
+
-ms-animation: fadeOut 0.3s ease;
|
278 |
+
-o-animation: fadeOut 0.3s ease;
|
279 |
+
animation: fadeOut 0.3s ease;
|
280 |
+
}
|
281 |
+
|
282 |
+
@-webkit-keyframes fadeIn {
|
283 |
+
0% {
|
284 |
+
opacity: 0;
|
285 |
+
}
|
286 |
+
100% {
|
287 |
+
opacity: 1;
|
288 |
+
}
|
289 |
+
}
|
290 |
+
@-moz-keyframes fadeIn {
|
291 |
+
0% {
|
292 |
+
opacity: 0;
|
293 |
+
}
|
294 |
+
100% {
|
295 |
+
opacity: 1;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
@-ms-keyframes fadeIn {
|
299 |
+
0% {
|
300 |
+
opacity: 0;
|
301 |
+
}
|
302 |
+
100% {
|
303 |
+
opacity: 1;
|
304 |
+
}
|
305 |
+
}
|
306 |
+
@-o-keyframes fadeIn {
|
307 |
+
0% {
|
308 |
+
opacity: 0;
|
309 |
+
}
|
310 |
+
100% {
|
311 |
+
opacity: 1;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
@keyframes fadeIn {
|
315 |
+
0% {
|
316 |
+
opacity: 0;
|
317 |
+
}
|
318 |
+
100% {
|
319 |
+
opacity: 1;
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
@-webkit-keyframes fadeOut {
|
324 |
+
0% {
|
325 |
+
opacity: 1;
|
326 |
+
}
|
327 |
+
100% {
|
328 |
+
opacity: 0;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
@-moz-keyframes fadeOut {
|
332 |
+
0% {
|
333 |
+
opacity: 1;
|
334 |
+
}
|
335 |
+
100% {
|
336 |
+
opacity: 0;
|
337 |
+
}
|
338 |
+
}
|
339 |
+
@-ms-keyframes fadeOut {
|
340 |
+
0% {
|
341 |
+
opacity: 1;
|
342 |
+
}
|
343 |
+
100% {
|
344 |
+
opacity: 0;
|
345 |
+
}
|
346 |
+
}
|
347 |
+
@-o-keyframes fadeOut {
|
348 |
+
0% {
|
349 |
+
opacity: 1;
|
350 |
+
}
|
351 |
+
100% {
|
352 |
+
opacity: 0;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
@keyframes fadeOut {
|
356 |
+
0% {
|
357 |
+
opacity: 1;
|
358 |
+
}
|
359 |
+
100% {
|
360 |
+
opacity: 0;
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* 3.1 "Slide" effect
|
366 |
+
*
|
367 |
+
* CSS related to the "Slide" transition effect.
|
368 |
+
*/
|
369 |
+
.easingslider.use-slide .easingslider-viewport {
|
370 |
+
overflow: hidden;
|
371 |
+
}
|
372 |
+
|
373 |
+
.easingslider.use-slide .easingslider-slide.next-in {
|
374 |
+
-webkit-animation: slideNextIn 0.3s ease;
|
375 |
+
-moz-animation: slideNextIn 0.3s ease;
|
376 |
+
-ms-animation: slideNextIn 0.3s ease;
|
377 |
+
-o-animation: slideNextIn 0.3s ease;
|
378 |
+
animation: slideNextIn 0.3s ease;
|
379 |
+
}
|
380 |
+
|
381 |
+
.easingslider.use-slide .easingslider-slide.next-out {
|
382 |
+
-webkit-animation: slideNextOut 0.3s ease;
|
383 |
+
-moz-animation: slideNextOut 0.3s ease;
|
384 |
+
-ms-animation: slideNextOut 0.3s ease;
|
385 |
+
-o-animation: slideNextOut 0.3s ease;
|
386 |
+
animation: slideNextOut 0.3s ease;
|
387 |
+
}
|
388 |
+
|
389 |
+
.easingslider.use-slide .easingslider-slide.prev-out {
|
390 |
+
-webkit-animation: slidePrevOut 0.3s ease;
|
391 |
+
-moz-animation: slidePrevOut 0.3s ease;
|
392 |
+
-ms-animation: slidePrevOut 0.3s ease;
|
393 |
+
-o-animation: slidePrevOut 0.3s ease;
|
394 |
+
animation: slidePrevOut 0.3s ease;
|
395 |
+
}
|
396 |
+
|
397 |
+
.easingslider.use-slide .easingslider-slide.prev-in {
|
398 |
+
-webkit-animation: slidePrevIn 0.3s ease;
|
399 |
+
-moz-animation: slidePrevIn 0.3s ease;
|
400 |
+
-ms-animation: slidePrevIn 0.3s ease;
|
401 |
+
-o-animation: slidePrevIn 0.3s ease;
|
402 |
+
animation: slidePrevIn 0.3s ease;
|
403 |
+
}
|
404 |
+
|
405 |
+
@-webkit-keyframes slideNextIn {
|
406 |
+
0% {
|
407 |
+
-webkit-transform: translate3d(100%, 0, 0);
|
408 |
+
transform: translate3d(100%, 0, 0);
|
409 |
+
}
|
410 |
+
100% {
|
411 |
+
-webkit-transform: none;
|
412 |
+
transform: none;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
@-moz-keyframes slideNextIn {
|
416 |
+
0% {
|
417 |
+
-moz-transform: translate3d(100%, 0, 0);
|
418 |
+
transform: translate3d(100%, 0, 0);
|
419 |
+
}
|
420 |
+
100% {
|
421 |
+
-moz-transform: none;
|
422 |
+
transform: none;
|
423 |
+
}
|
424 |
+
}
|
425 |
+
@-ms-keyframes slideNextIn {
|
426 |
+
0% {
|
427 |
+
-ms-transform: translate3d(100%, 0, 0);
|
428 |
+
transform: translate3d(100%, 0, 0);
|
429 |
+
}
|
430 |
+
100% {
|
431 |
+
-ms-transform: none;
|
432 |
+
transform: none;
|
433 |
+
}
|
434 |
+
}
|
435 |
+
@-o-keyframes slideNextIn {
|
436 |
+
0% {
|
437 |
+
-o-transform: translate3d(100%, 0, 0);
|
438 |
+
transform: translate3d(100%, 0, 0);
|
439 |
+
}
|
440 |
+
100% {
|
441 |
+
-o-transform: none;
|
442 |
+
transform: none;
|
443 |
+
}
|
444 |
+
}
|
445 |
+
@keyframes slideNextIn {
|
446 |
+
0% {
|
447 |
+
transform: translate3d(100%, 0, 0);
|
448 |
+
}
|
449 |
+
100% {
|
450 |
+
transform: none;
|
451 |
+
}
|
452 |
+
}
|
453 |
+
|
454 |
+
@-webkit-keyframes slideNextOut {
|
455 |
+
0% {
|
456 |
+
-webkit-transform: none;
|
457 |
+
transform: none;
|
458 |
+
}
|
459 |
+
100% {
|
460 |
+
-webkit-transform: translate3d(100%, 0, 0);
|
461 |
+
transform: translate3d(100%, 0, 0);
|
462 |
+
}
|
463 |
+
}
|
464 |
+
@-moz-keyframes slideNextOut {
|
465 |
+
0% {
|
466 |
+
-moz-transform: none;
|
467 |
+
transform: none;
|
468 |
+
}
|
469 |
+
100% {
|
470 |
+
-moz-transform: translate3d(100%, 0, 0);
|
471 |
+
transform: translate3d(100%, 0, 0);
|
472 |
+
}
|
473 |
+
}
|
474 |
+
@-ms-keyframes slideNextOut {
|
475 |
+
0% {
|
476 |
+
-ms-transform: none;
|
477 |
+
transform: none;
|
478 |
+
}
|
479 |
+
100% {
|
480 |
+
-ms-transform: translate3d(100%, 0, 0);
|
481 |
+
transform: translate3d(100%, 0, 0);
|
482 |
+
}
|
483 |
+
}
|
484 |
+
@-o-keyframes slideNextOut {
|
485 |
+
0% {
|
486 |
+
-o-transform: none;
|
487 |
+
transform: none;
|
488 |
+
}
|
489 |
+
100% {
|
490 |
+
-o-transform: translate3d(100%, 0, 0);
|
491 |
+
transform: translate3d(100%, 0, 0);
|
492 |
+
}
|
493 |
+
}
|
494 |
+
@keyframes slideNextOut {
|
495 |
+
0% {
|
496 |
+
transform: none;
|
497 |
+
}
|
498 |
+
100% {
|
499 |
+
transform: translate3d(100%, 0, 0);
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
@-webkit-keyframes slidePrevOut {
|
504 |
+
0% {
|
505 |
+
-webkit-transform: none;
|
506 |
+
transform: none;
|
507 |
+
}
|
508 |
+
100% {
|
509 |
+
-webkit-transform: translate3d(-100%, 0, 0);
|
510 |
+
transform: translate3d(-100%, 0, 0);
|
511 |
+
}
|
512 |
+
}
|
513 |
+
@-moz-keyframes slidePrevOut {
|
514 |
+
0% {
|
515 |
+
-moz-transform: none;
|
516 |
+
transform: none;
|
517 |
+
}
|
518 |
+
100% {
|
519 |
+
-moz-transform: translate3d(-100%, 0, 0);
|
520 |
+
transform: translate3d(-100%, 0, 0);
|
521 |
+
}
|
522 |
+
}
|
523 |
+
@-ms-keyframes slidePrevOut {
|
524 |
+
0% {
|
525 |
+
-ms-transform: none;
|
526 |
+
transform: none;
|
527 |
+
}
|
528 |
+
100% {
|
529 |
+
-ms-transform: translate3d(-100%, 0, 0);
|
530 |
+
transform: translate3d(-100%, 0, 0);
|
531 |
+
}
|
532 |
+
}
|
533 |
+
@-o-keyframes slidePrevOut {
|
534 |
+
0% {
|
535 |
+
-o-transform: none;
|
536 |
+
transform: none;
|
537 |
+
}
|
538 |
+
100% {
|
539 |
+
-o-transform: translate3d(-100%, 0, 0);
|
540 |
+
transform: translate3d(-100%, 0, 0);
|
541 |
+
}
|
542 |
+
}
|
543 |
+
@keyframes slidePrevOut {
|
544 |
+
0% {
|
545 |
+
transform: none;
|
546 |
+
}
|
547 |
+
100% {
|
548 |
+
transform: translate3d(-100%, 0, 0);
|
549 |
+
}
|
550 |
+
}
|
551 |
+
|
552 |
+
@-webkit-keyframes slidePrevIn {
|
553 |
+
0% {
|
554 |
+
-webkit-transform: translate3d(-100%, 0, 0);
|
555 |
+
transform: translate3d(-100%, 0, 0);
|
556 |
+
}
|
557 |
+
100% {
|
558 |
+
-webkit-transform: none;
|
559 |
+
transform: none;
|
560 |
+
}
|
561 |
+
}
|
562 |
+
@-moz-keyframes slidePrevIn {
|
563 |
+
0% {
|
564 |
+
-moz-transform: translate3d(-100%, 0, 0);
|
565 |
+
transform: translate3d(-100%, 0, 0);
|
566 |
+
}
|
567 |
+
100% {
|
568 |
+
-moz-transform: none;
|
569 |
+
transform: none;
|
570 |
+
}
|
571 |
+
}
|
572 |
+
@-ms-keyframes slidePrevIn {
|
573 |
+
0% {
|
574 |
+
-ms-transform: translate3d(-100%, 0, 0);
|
575 |
+
transform: translate3d(-100%, 0, 0);
|
576 |
+
}
|
577 |
+
100% {
|
578 |
+
-ms-transform: none;
|
579 |
+
transform: none;
|
580 |
+
}
|
581 |
+
}
|
582 |
+
@-o-keyframes slidePrevIn {
|
583 |
+
0% {
|
584 |
+
-o-transform: translate3d(-100%, 0, 0);
|
585 |
+
transform: translate3d(-100%, 0, 0);
|
586 |
+
}
|
587 |
+
100% {
|
588 |
+
-o-transform: none;
|
589 |
+
transform: none;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
@keyframes slidePrevIn {
|
593 |
+
0% {
|
594 |
+
transform: translate3d(-100%, 0, 0);
|
595 |
+
}
|
596 |
+
100% {
|
597 |
+
transform: none;
|
598 |
+
}
|
599 |
+
}
|
css/easingslider.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.easingslider,.easingslider-image,.easingslider-link,.easingslider-slide,.easingslider-viewport{line-height:0!important;outline:0!important;padding:0!important;margin:0!important}.easingslider-image,.easingslider-link,.easingslider-slide,.easingslider-viewport{clear:none!important;border:0!important}.easingslider{position:relative!important;z-index:1}.easingslider.has-loaded .easingslider-arrows,.easingslider.has-loaded .easingslider-pagination{opacity:1}.easingslider-viewport{position:relative!important}.easingslider-preload{background:url(../images/loading.gif) center center no-repeat #fff!important;width:100%!important;height:100%!important;position:absolute!important;top:0!important;left:0!important;z-index:999999!important}.easingslider-slide{display:none;overflow:hidden;position:absolute;top:0;left:0;bottom:0;right:0}.easingslider-slide.active,.easingslider-slide.next-in,.easingslider-slide.next-out,.easingslider-slide.prev-in,.easingslider-slide.prev-out{display:block}.easingslider-slide.active{z-index:999!important}.easingslider-slide.next-out,.easingslider-slide.prev-out{z-index:9999!important}.easingslider-slide.next-in,.easingslider-slide.prev-in{z-index:99999!important}.easingslider-image{height:auto;width:100%}.easingslider .easingslider-arrows.has-hover,.easingslider .easingslider-pagination.has-hover{opacity:0}.easingslider:hover .easingslider-arrows.has-hover,.easingslider:hover .easingslider-pagination.has-hover{opacity:1}.easingslider-arrows{position:absolute;top:46%;width:30px;height:30px;background-repeat:no-repeat;z-index:99999;cursor:pointer;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;-ms-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.easingslider-arrows.easingslider-next{background-image:url(../images/nav-arrow-next.png);background-position:top right}.easingslider-arrows.easingslider-prev{background-image:url(../images/nav-arrow-prev.png);background-position:top left}.easingslider-arrows.easingslider-next.inside{right:10px}.easingslider-arrows.easingslider-next.outside{right:-40px;padding-left:20px}.easingslider-arrows.easingslider-prev.inside{left:10px}.easingslider-arrows.easingslider-prev.outside{left:-40px;padding-right:20px}.easingslider-pagination{position:absolute;z-index:99999;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;-ms-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.easingslider-pagination.inside.bottom-left{bottom:10px;left:10px}.easingslider-pagination.inside.bottom-right{bottom:10px;right:10px}.easingslider-pagination.inside.bottom-center{bottom:10px;left:0;width:100%;text-align:center}.easingslider-pagination.inside.top-left{top:10px;left:10px}.easingslider-pagination.inside.top-right{top:10px;right:10px}.easingslider-pagination.inside.top-center{top:10px;left:0;width:100%;text-align:center}.easingslider-pagination.outside.bottom-left{bottom:-25px;left:0;padding-top:20px}.easingslider-pagination.outside.bottom-right{bottom:-25px;right:0;padding-top:20px}.easingslider-pagination.outside.bottom-center{bottom:-25px;left:0;width:100%;text-align:center;padding-top:20px}.easingslider-pagination.outside.top-left{top:-25px;left:0;padding-bottom:20px}.easingslider-pagination.outside.top-right{top:-25px;right:0;padding-bottom:20px}.easingslider-pagination.outside.top-center{top:-25px;left:0;width:100%;text-align:center;padding-bottom:20px}.easingslider-pagination .easingslider-icon{width:15px;height:15px;margin:0;padding:0;background-image:url(../images/nav-icon-inactive.png);background-repeat:no-repeat;background-position:0 0;display:inline-block;zoom:1;z-index:99999;cursor:pointer}.easingslider-pagination .easingslider-icon:last-child{margin-right:0}.easingslider-pagination .easingslider-icon.active{background-image:url(../images/nav-icon-active.png)}.easingslider.use-fade .easingslider-slide.next-in,.easingslider.use-fade .easingslider-slide.prev-in{-webkit-animation:fadeIn .3s ease;-moz-animation:fadeIn .3s ease;-ms-animation:fadeIn .3s ease;-o-animation:fadeIn .3s ease;animation:fadeIn .3s ease}._easingslider.use-fade .easingslider-slide.next-out,._easingslider.use-fade .easingslider-slide.prev-out{-webkit-animation:fadeOut .3s ease;-moz-animation:fadeOut .3s ease;-ms-animation:fadeOut .3s ease;-o-animation:fadeOut .3s ease;animation:fadeOut .3s ease}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-ms-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.easingslider.use-slide .easingslider-viewport{overflow:hidden}.easingslider.use-slide .easingslider-slide.next-in{-webkit-animation:slideNextIn .3s ease;-moz-animation:slideNextIn .3s ease;-ms-animation:slideNextIn .3s ease;-o-animation:slideNextIn .3s ease;animation:slideNextIn .3s ease}.easingslider.use-slide .easingslider-slide.next-out{-webkit-animation:slideNextOut .3s ease;-moz-animation:slideNextOut .3s ease;-ms-animation:slideNextOut .3s ease;-o-animation:slideNextOut .3s ease;animation:slideNextOut .3s ease}.easingslider.use-slide .easingslider-slide.prev-out{-webkit-animation:slidePrevOut .3s ease;-moz-animation:slidePrevOut .3s ease;-ms-animation:slidePrevOut .3s ease;-o-animation:slidePrevOut .3s ease;animation:slidePrevOut .3s ease}.easingslider.use-slide .easingslider-slide.prev-in{-webkit-animation:slidePrevIn .3s ease;-moz-animation:slidePrevIn .3s ease;-ms-animation:slidePrevIn .3s ease;-o-animation:slidePrevIn .3s ease;animation:slidePrevIn .3s ease}@-webkit-keyframes slideNextIn{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-webkit-transform:none;transform:none}}@-moz-keyframes slideNextIn{0%{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-moz-transform:none;transform:none}}@-ms-keyframes slideNextIn{0%{-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-ms-transform:none;transform:none}}@-o-keyframes slideNextIn{0%{-o-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}100%{-o-transform:none;transform:none}}@keyframes slideNextIn{0%{transform:translate3d(100%,0,0)}100%{transform:none}}@-webkit-keyframes slideNextOut{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-moz-keyframes slideNextOut{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-ms-keyframes slideNextOut{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-o-keyframes slideNextOut{0%{-o-transform:none;transform:none}100%{-o-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideNextOut{0%{transform:none}100%{transform:translate3d(100%,0,0)}}@-webkit-keyframes slidePrevOut{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-moz-keyframes slidePrevOut{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-ms-keyframes slidePrevOut{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-o-keyframes slidePrevOut{0%{-o-transform:none;transform:none}100%{-o-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slidePrevOut{0%{transform:none}100%{transform:translate3d(-100%,0,0)}}@-webkit-keyframes slidePrevIn{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-webkit-transform:none;transform:none}}@-moz-keyframes slidePrevIn{0%{-moz-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-moz-transform:none;transform:none}}@-ms-keyframes slidePrevIn{0%{-ms-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-ms-transform:none;transform:none}}@-o-keyframes slidePrevIn{0%{-o-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}100%{-o-transform:none;transform:none}}@keyframes slidePrevIn{0%{transform:translate3d(-100%,0,0)}100%{transform:none}}
|
css/editor-pages.css
ADDED
@@ -0,0 +1,325 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.clearfix {
|
2 |
+
*zoom: 1;
|
3 |
+
}
|
4 |
+
|
5 |
+
.clearfix::before, .clearfix::after {
|
6 |
+
display: table;
|
7 |
+
content: '';
|
8 |
+
line-height: 0;
|
9 |
+
}
|
10 |
+
|
11 |
+
.clearfix::after {
|
12 |
+
clear: both;
|
13 |
+
}
|
14 |
+
|
15 |
+
.updated.notice {
|
16 |
+
border-color: #ffba00 !important;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wp-list-table .column-ID {
|
20 |
+
width: 4em;
|
21 |
+
}
|
22 |
+
|
23 |
+
.media-toolbar .media-toolbar-primary {
|
24 |
+
max-width: 40%;
|
25 |
+
}
|
26 |
+
|
27 |
+
.media-toolbar .media-toolbar-secondary {
|
28 |
+
max-width: 60%;
|
29 |
+
}
|
30 |
+
|
31 |
+
.image-details .media-modal {
|
32 |
+
left: 30px !important;
|
33 |
+
right: 30px !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
.image-details .details-url {
|
37 |
+
width: 100%;
|
38 |
+
}
|
39 |
+
|
40 |
+
.image-details .settings {
|
41 |
+
border-bottom-width: 0 !important;
|
42 |
+
}
|
43 |
+
|
44 |
+
.image-details .settings h3 {
|
45 |
+
margin: 10px 0;
|
46 |
+
}
|
47 |
+
|
48 |
+
.image-details .column-settings h3.no-border {
|
49 |
+
border-top-width: 0;
|
50 |
+
padding-top: 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
.description {
|
54 |
+
font-size: 11px !important;
|
55 |
+
font-style: italic !important;
|
56 |
+
display: block !important;
|
57 |
+
color: #777 !important;
|
58 |
+
padding: 5px 0 !important;
|
59 |
+
}
|
60 |
+
|
61 |
+
.media-modal .description {
|
62 |
+
margin-top: 10px !important;
|
63 |
+
}
|
64 |
+
|
65 |
+
.list {
|
66 |
+
margin: 0 0 20px 20px !important;
|
67 |
+
}
|
68 |
+
|
69 |
+
.list li {
|
70 |
+
font-size: 11px !important;
|
71 |
+
color: #777 !important;
|
72 |
+
}
|
73 |
+
|
74 |
+
.toolbar-container .media-toolbar {
|
75 |
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
76 |
+
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
77 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
78 |
+
border: 1px solid #e5e5e5;
|
79 |
+
margin-top: 10px;
|
80 |
+
margin-bottom: 15px;
|
81 |
+
position: relative;
|
82 |
+
height: auto;
|
83 |
+
}
|
84 |
+
|
85 |
+
.toolbar-container .media-toolbar .media-button {
|
86 |
+
margin-top: 10px;
|
87 |
+
margin-bottom: 10px;
|
88 |
+
}
|
89 |
+
|
90 |
+
.toolbar-container .media-toolbar .randomize {
|
91 |
+
float: left;
|
92 |
+
margin-top: 9px;
|
93 |
+
margin-bottom: 9px;
|
94 |
+
line-height: 32px;
|
95 |
+
}
|
96 |
+
|
97 |
+
.toolbar-container .media-toolbar .randomize input[type="checkbox"] {
|
98 |
+
margin-right: 8px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.toolbar-container .title-form {
|
102 |
+
float: left;
|
103 |
+
margin-top: 9px;
|
104 |
+
}
|
105 |
+
|
106 |
+
.toolbar-container .title-form .media-button {
|
107 |
+
margin-top: 1px;
|
108 |
+
margin-left: 9px;
|
109 |
+
}
|
110 |
+
|
111 |
+
.toolbar-container .title-form label {
|
112 |
+
vertical-align: top;
|
113 |
+
font-weight: bold;
|
114 |
+
line-height: 32px;
|
115 |
+
margin: 0 5px 0 0;
|
116 |
+
}
|
117 |
+
|
118 |
+
.toolbar-container .title-form input[type="text"] {
|
119 |
+
margin: 0;
|
120 |
+
padding: 3px 5px;
|
121 |
+
width: 280px;
|
122 |
+
font-size: 16px;
|
123 |
+
font-weight: 300;
|
124 |
+
line-height: 1.5;
|
125 |
+
}
|
126 |
+
|
127 |
+
.settings-container {
|
128 |
+
float: right;
|
129 |
+
clear: right;
|
130 |
+
width: 285px;
|
131 |
+
padding-right: 5px;
|
132 |
+
}
|
133 |
+
|
134 |
+
.settings-container .banners a {
|
135 |
+
display: block;
|
136 |
+
margin-bottom: 15px;
|
137 |
+
}
|
138 |
+
|
139 |
+
.settings-container .widgets-holder-wrap {
|
140 |
+
margin-top: 0;
|
141 |
+
margin-bottom: 10px;
|
142 |
+
}
|
143 |
+
|
144 |
+
.settings-container .sidebar-name {
|
145 |
+
border-bottom: 1px solid #eee;
|
146 |
+
}
|
147 |
+
|
148 |
+
.settings-container .sidebar-name h3 {
|
149 |
+
padding: 15px;
|
150 |
+
}
|
151 |
+
|
152 |
+
.settings-container .sidebar-name-arrow:before {
|
153 |
+
top: 4px !important;
|
154 |
+
}
|
155 |
+
|
156 |
+
.settings-container.closed .sidebar-name {
|
157 |
+
border-width: 0;
|
158 |
+
}
|
159 |
+
|
160 |
+
.settings-container .sidebar-content {
|
161 |
+
border-width: 0 1px 1px;
|
162 |
+
border-style: none solid solid;
|
163 |
+
border-color: #fff;
|
164 |
+
-webkit-border-bottom-right-radius: 3px;
|
165 |
+
-webkit-border-bottom-left-radius: 3px;
|
166 |
+
border-bottom-right-radius: 3px;
|
167 |
+
border-bottom-left-radius: 3px;
|
168 |
+
padding: 10px 15px;
|
169 |
+
min-height: 20px;
|
170 |
+
}
|
171 |
+
|
172 |
+
.settings-container .sidebar-content .divider {
|
173 |
+
margin-bottom: 0;
|
174 |
+
}
|
175 |
+
|
176 |
+
.settings-container .sidebar-content .field,
|
177 |
+
.settings-container .sidebar-content .radio {
|
178 |
+
width: 100%;
|
179 |
+
margin: 1em 0;
|
180 |
+
}
|
181 |
+
|
182 |
+
.settings-container .sidebar-content .field span {
|
183 |
+
font-weight: bold;
|
184 |
+
display: block;
|
185 |
+
}
|
186 |
+
|
187 |
+
.settings-container .sidebar-content .field {
|
188 |
+
float: left;
|
189 |
+
}
|
190 |
+
|
191 |
+
.settings-container .sidebar-content .field select,
|
192 |
+
.settings-container .sidebar-content .field input[type="text"],
|
193 |
+
.settings-container .sidebar-content .field input[type="number"] {
|
194 |
+
width: 90%;
|
195 |
+
}
|
196 |
+
|
197 |
+
.settings-container .sidebar-content .field input[type="checkbox"] {
|
198 |
+
margin-right: 4px;
|
199 |
+
}
|
200 |
+
|
201 |
+
.settings-container .sidebar-content .radio > span {
|
202 |
+
font-weight: bold;
|
203 |
+
float: left;
|
204 |
+
}
|
205 |
+
|
206 |
+
.settings-container .sidebar-content .radio .buttons {
|
207 |
+
float: right;
|
208 |
+
}
|
209 |
+
|
210 |
+
.settings-container .sidebar-content .radio .buttons label {
|
211 |
+
margin-right: 10px;
|
212 |
+
}
|
213 |
+
|
214 |
+
.settings-container .sidebar-content .radio .buttons input {
|
215 |
+
margin-top: 0;
|
216 |
+
margin-right: 2px;
|
217 |
+
}
|
218 |
+
|
219 |
+
.settings-container .sidebar-content .manage-slides-buttons .dashicons-plus {
|
220 |
+
line-height: 28px;
|
221 |
+
}
|
222 |
+
|
223 |
+
.settings-container .sidebar-content .manage-slides-buttons .dashicons-trash {
|
224 |
+
line-height: 27px;
|
225 |
+
}
|
226 |
+
|
227 |
+
.settings-container .sidebar-content .misc-pub-section {
|
228 |
+
padding-left: 0;
|
229 |
+
padding-right: 0;
|
230 |
+
}
|
231 |
+
|
232 |
+
.settings-container .dimension-settings .field.half {
|
233 |
+
width: 45%;
|
234 |
+
}
|
235 |
+
|
236 |
+
.settings-container .dimension-settings .field.half:first-child {
|
237 |
+
margin-right: 5%;
|
238 |
+
}
|
239 |
+
|
240 |
+
.slides-container {
|
241 |
+
margin: 0 350px 0 0;
|
242 |
+
}
|
243 |
+
|
244 |
+
#slides-browser .spinner {
|
245 |
+
float: left;
|
246 |
+
display: inline;
|
247 |
+
}
|
248 |
+
|
249 |
+
#slides-browser .attachment .toolbar {
|
250 |
+
display: none;
|
251 |
+
text-align: left;
|
252 |
+
position: absolute;
|
253 |
+
top: 0;
|
254 |
+
left: 0;
|
255 |
+
}
|
256 |
+
|
257 |
+
#slides-browser .attachment:hover .toolbar {
|
258 |
+
display: block;
|
259 |
+
}
|
260 |
+
|
261 |
+
#slides-browser .attachment .toolbar i {
|
262 |
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
|
263 |
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
|
264 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
|
265 |
+
position: relative;
|
266 |
+
margin-top: 7px;
|
267 |
+
margin-left: 7px;
|
268 |
+
padding: 2px;
|
269 |
+
font-size: 30px;
|
270 |
+
height: 30px;
|
271 |
+
width: 30px;
|
272 |
+
background: #000;
|
273 |
+
background: rgba(0, 0, 0, 0.9);
|
274 |
+
cursor: pointer;
|
275 |
+
z-index: 9999;
|
276 |
+
color: #fff;
|
277 |
+
}
|
278 |
+
|
279 |
+
#slides-browser .attachment .toolbar i:hover {
|
280 |
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
|
281 |
+
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
|
282 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
|
283 |
+
background-color: #000;
|
284 |
+
color: #2ea2cc;
|
285 |
+
}
|
286 |
+
|
287 |
+
#slides-browser .attachment .check div {
|
288 |
+
background-position: 21px 0;
|
289 |
+
}
|
290 |
+
|
291 |
+
#slides-browser .attachment.selected .check div {
|
292 |
+
background-position: -21px 0;
|
293 |
+
}
|
294 |
+
|
295 |
+
#slides-browser .attachment.selected .check:hover div {
|
296 |
+
background-position: -60px 0;
|
297 |
+
}
|
298 |
+
|
299 |
+
#slides-browser .thumbnail .delete-button {
|
300 |
+
position: absolute;
|
301 |
+
top: -15px;
|
302 |
+
right: 5px;
|
303 |
+
width: 36px;
|
304 |
+
height: 36px;
|
305 |
+
z-index: 10;
|
306 |
+
background: url(../images/delete_icon.png) no-repeat top left;
|
307 |
+
cursor: pointer;
|
308 |
+
opacity: 0;
|
309 |
+
-webkit-transition: opacity 0.125s ease;
|
310 |
+
-moz-transition: opacity 0.125s ease;
|
311 |
+
-ms-transition: opacity 0.125s ease;
|
312 |
+
-o-transition: opacity 0.125s ease;
|
313 |
+
transition: opacity 0.125s ease;
|
314 |
+
}
|
315 |
+
|
316 |
+
#slides-browser .thumbnail:hover .delete-button {
|
317 |
+
opacity: 1;
|
318 |
+
}
|
319 |
+
|
320 |
+
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
|
321 |
+
.image-details .media-modal {
|
322 |
+
left: 0 !important;
|
323 |
+
right: 0 !important;
|
324 |
+
}
|
325 |
+
}
|
css/editor-pages.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.clearfix::after,.clearfix::before{display:table;content:'';line-height:0}.clearfix::after{clear:both}.updated.notice{border-color:#ffba00!important}.wp-list-table .column-ID{width:4em}.media-toolbar .media-toolbar-primary{max-width:40%}.media-toolbar .media-toolbar-secondary{max-width:60%}.image-details .media-modal{left:30px!important;right:30px!important}.image-details .details-url{width:100%}.image-details .settings{border-bottom-width:0!important}.image-details .settings h3{margin:10px 0}.image-details .column-settings h3.no-border{border-top-width:0;padding-top:0}.description{font-size:11px!important;font-style:italic!important;display:block!important;color:#777!important;padding:5px 0!important}.media-modal .description{margin-top:10px!important}.list{margin:0 0 20px 20px!important}.list li{font-size:11px!important;color:#777!important}.toolbar-container .media-toolbar{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);border:1px solid #e5e5e5;margin-top:10px;margin-bottom:15px;position:relative;height:auto}.toolbar-container .media-toolbar .media-button{margin-top:10px;margin-bottom:10px}.toolbar-container .media-toolbar .randomize{float:left;margin-top:9px;margin-bottom:9px;line-height:32px}.toolbar-container .media-toolbar .randomize input[type=checkbox]{margin-right:8px}.toolbar-container .title-form{float:left;margin-top:9px}.toolbar-container .title-form .media-button{margin-top:1px;margin-left:9px}.toolbar-container .title-form label{vertical-align:top;font-weight:700;line-height:32px;margin:0 5px 0 0}.toolbar-container .title-form input[type=text]{margin:0;padding:3px 5px;width:280px;font-size:16px;font-weight:300;line-height:1.5}.settings-container{float:right;clear:right;width:285px;padding-right:5px}.settings-container .banners a{display:block;margin-bottom:15px}.settings-container .widgets-holder-wrap{margin-top:0;margin-bottom:10px}.settings-container .sidebar-name{border-bottom:1px solid #eee}.settings-container .sidebar-name h3{padding:15px}.settings-container .sidebar-name-arrow:before{top:4px!important}.settings-container.closed .sidebar-name{border-width:0}.settings-container .sidebar-content{border-width:0 1px 1px;border-style:none solid solid;border-color:#fff;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px 15px;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:700;display:block}.settings-container .sidebar-content .field{float:left}.settings-container .sidebar-content .field input[type=number],.settings-container .sidebar-content .field input[type=text],.settings-container .sidebar-content .field select{width:90%}.settings-container .sidebar-content .field input[type=checkbox]{margin-right:4px}.settings-container .sidebar-content .radio>span{font-weight:700;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 .sidebar-content .manage-slides-buttons .dashicons-plus{line-height:28px}.settings-container .sidebar-content .manage-slides-buttons .dashicons-trash{line-height:27px}.settings-container .sidebar-content .misc-pub-section{padding-left:0;padding-right:0}.settings-container .dimension-settings .field.half{width:45%}.settings-container .dimension-settings .field.half:first-child{margin-right:5%}.slides-container{margin:0 350px 0 0}#slides-browser .spinner{float:left;display:inline}#slides-browser .attachment .toolbar{display:none;text-align:left;position:absolute;top:0;left:0}#slides-browser .attachment:hover .toolbar{display:block}#slides-browser .attachment .toolbar i{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.5);-moz-box-shadow:0 1px 3px rgba(0,0,0,.5);box-shadow:0 1px 3px rgba(0,0,0,.5);position:relative;margin-top:7px;margin-left:7px;padding:2px;font-size:30px;height:30px;width:30px;background:#000;background:rgba(0,0,0,.9);cursor:pointer;z-index:9999;color:#fff}#slides-browser .attachment .toolbar i:hover{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.8);-moz-box-shadow:0 1px 3px rgba(0,0,0,.8);box-shadow:0 1px 3px rgba(0,0,0,.8);background-color:#000;color:#2ea2cc}#slides-browser .attachment .check div{background-position:21px 0}#slides-browser .attachment.selected .check div{background-position:-21px 0}#slides-browser .attachment.selected .check:hover div{background-position:-60px 0}#slides-browser .thumbnail .delete-button{position:absolute;top:-15px;right:5px;width:36px;height:36px;z-index:10;background:url(../images/delete_icon.png) top left no-repeat;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}#slides-browser .thumbnail:hover .delete-button{opacity:1}@media only screen and (max-width:640px),screen and (max-height:400px){.image-details .media-modal{left:0!important;right:0!important}}
|
css/extensions-page.css
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wrap > p {
|
2 |
+
margin-bottom: 25px;
|
3 |
+
}
|
4 |
+
|
5 |
+
.updated.notice {
|
6 |
+
border-color: #ffba00 !important;
|
7 |
+
}
|
8 |
+
|
9 |
+
.extension {
|
10 |
+
background: #f1f1f1;
|
11 |
+
border: 1px solid #ccc;
|
12 |
+
margin: 0 20px 20px 0;
|
13 |
+
padding: 15px;
|
14 |
+
float: left;
|
15 |
+
width: 300px;
|
16 |
+
height: 350px;
|
17 |
+
position: relative;
|
18 |
+
}
|
19 |
+
|
20 |
+
.extension a {
|
21 |
+
display: block;
|
22 |
+
}
|
23 |
+
|
24 |
+
.extension img {
|
25 |
+
max-width: 100%;
|
26 |
+
height: auto;
|
27 |
+
}
|
28 |
+
|
29 |
+
.extension .button {
|
30 |
+
position: absolute;
|
31 |
+
bottom: 10px;
|
32 |
+
right: 10px;
|
33 |
+
}
|
css/extensions-page.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wrap>p{margin-bottom:25px}.updated.notice{border-color:#ffba00!important}.extension{background:#f1f1f1;border:1px solid #ccc;margin:0 20px 20px 0;padding:15px;float:left;width:300px;height:350px;position:relative}.extension a{display:block}.extension img{max-width:100%;height:auto}.extension .button{position:absolute;bottom:10px;right:10px}
|
css/settings-page.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.description {
|
2 |
+
font-size: 11px !important;
|
3 |
+
font-style: italic !important;
|
4 |
+
display: block !important;
|
5 |
+
color: #777 !important;
|
6 |
+
padding: 5px 0 !important;
|
7 |
+
}
|
8 |
+
|
9 |
+
.form-table label span {
|
10 |
+
margin-right: 15px;
|
11 |
+
}
|
12 |
+
|
13 |
+
.valid-license {
|
14 |
+
position: relative;
|
15 |
+
}
|
16 |
+
|
17 |
+
.valid-license:after {
|
18 |
+
content: "\f147";
|
19 |
+
font-family: "Dashicons";
|
20 |
+
position: absolute;
|
21 |
+
top: 0;
|
22 |
+
bottom: 0;
|
23 |
+
right: 10px;
|
24 |
+
color: #468847;
|
25 |
+
font-size: 18px;
|
26 |
+
}
|
27 |
+
|
28 |
+
.updated.notice {
|
29 |
+
border-color: #ffba00 !important;
|
30 |
+
}
|
css/settings-page.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.description{font-size:11px!important;font-style:italic!important;display:block!important;color:#777!important;padding:5px 0!important}.form-table label span{margin-right:15px}.valid-license{position:relative}.valid-license:after{content:"\f147";font-family:Dashicons;position:absolute;top:0;bottom:0;right:10px;color:#468847;font-size:18px}.updated.notice{border-color:#ffba00!important}
|
css/slideshow.css
DELETED
@@ -1,298 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Easing Slider "Lite"
|
3 |
-
*
|
4 |
-
* Slideshow CSS. Advised you don't make changes to this. Instead, add styling changing to your theme's style.css file.
|
5 |
-
*
|
6 |
-
* Why do we use a lot of '!important' declarations here?
|
7 |
-
* Because we need to make sure any theme CSS doesn't destroy the slideshow functionality. Simple as that.
|
8 |
-
*
|
9 |
-
* Some information:
|
10 |
-
* The slideshow container is set to 'display: none;' via inline CSS to prevent the 'flash' of images before the CSS file is conditionally loaded in the footer.
|
11 |
-
* This CSS file then sets the container to 'display: block !important', to make sure it overrides the inline CSS.
|
12 |
-
* It works, because the CSS is loaded after the slideshow is printed.
|
13 |
-
*/
|
14 |
-
|
15 |
-
/* ===== Core structural CSS. Don't edit this! ===== */
|
16 |
-
.easingsliderlite,
|
17 |
-
.easingsliderlite div,
|
18 |
-
.easingsliderlite a,
|
19 |
-
.easingsliderlite img {
|
20 |
-
margin: 0 !important;
|
21 |
-
padding: 0 !important;
|
22 |
-
line-height: 0 !important;
|
23 |
-
outline: none !important;
|
24 |
-
}
|
25 |
-
|
26 |
-
.easingsliderlite div,
|
27 |
-
.easingsliderlite a,
|
28 |
-
.easingsliderlite img {
|
29 |
-
border: 0 !important;
|
30 |
-
clear: none !important;
|
31 |
-
}
|
32 |
-
|
33 |
-
.easingsliderlite {
|
34 |
-
position: relative !important;
|
35 |
-
}
|
36 |
-
|
37 |
-
.easingsliderlite-preload {
|
38 |
-
background: url(../images/loading.gif) no-repeat center center #fff !important;
|
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 |
-
|
47 |
-
.easingsliderlite-arrows.has-hover {
|
48 |
-
opacity: 0;
|
49 |
-
}
|
50 |
-
|
51 |
-
.easingsliderlite:hover .easingsliderlite-arrows.has-hover {
|
52 |
-
opacity: 1;
|
53 |
-
}
|
54 |
-
|
55 |
-
.easingsliderlite-pagination.has-hover {
|
56 |
-
opacity: 0;
|
57 |
-
}
|
58 |
-
|
59 |
-
.easingsliderlite:hover .easingsliderlite-pagination.has-hover {
|
60 |
-
opacity: 1;
|
61 |
-
}
|
62 |
-
|
63 |
-
.easingsliderlite-viewport {
|
64 |
-
position: relative !important;
|
65 |
-
overflow: hidden !important;
|
66 |
-
width: 100% !important;
|
67 |
-
}
|
68 |
-
|
69 |
-
.easingsliderlite-slides-container {
|
70 |
-
overflow: hidden !important;
|
71 |
-
position: absolute !important;
|
72 |
-
top: 0;
|
73 |
-
left: 0;
|
74 |
-
display: block !important;
|
75 |
-
}
|
76 |
-
|
77 |
-
.easingsliderlite.use-css3 .easingsliderlite-slides-container {
|
78 |
-
-webkit-transform: translate3d(0, 0, 0);
|
79 |
-
-moz-transform: translate3d(0, 0, 0);
|
80 |
-
-ms-transform: translate3d(0, 0, 0);
|
81 |
-
-o-transform: translate3d(0, 0, 0);
|
82 |
-
transform: translate3d(0, 0, 0);
|
83 |
-
}
|
84 |
-
|
85 |
-
.easingsliderlite.use-slide.use-css3 .easingsliderlite-slides-container {
|
86 |
-
-webkit-transition: -webkit-transform 0.5s ease;
|
87 |
-
-moz-transition: -moz-transform 0.5s ease;
|
88 |
-
-ms-transition: -ms-transform 0.5s ease;
|
89 |
-
-o-transition: -o-transform 0.5s ease;
|
90 |
-
transition: transform 0.5s ease;
|
91 |
-
}
|
92 |
-
|
93 |
-
.easingsliderlite.use-fade.use-css3 .easingsliderlite-slides-container {
|
94 |
-
-webkit-transition: none;
|
95 |
-
-moz-transition: none;
|
96 |
-
-ms-transition: none;
|
97 |
-
-o-transition: none;
|
98 |
-
transition: none;
|
99 |
-
}
|
100 |
-
|
101 |
-
.easingsliderlite.use-css3 .easingsliderlite-slide {
|
102 |
-
-webkit-perspective: 1000;
|
103 |
-
-webkit-backface-visibility: hidden;
|
104 |
-
}
|
105 |
-
|
106 |
-
.easingsliderlite.use-slide .easingsliderlite-slide {
|
107 |
-
float: left !important;
|
108 |
-
position: relative !important;
|
109 |
-
}
|
110 |
-
|
111 |
-
.easingsliderlite.use-fade .easingsliderlite-slide {
|
112 |
-
position: absolute !important;
|
113 |
-
top: 0 !important;
|
114 |
-
left: 0 !important;
|
115 |
-
}
|
116 |
-
|
117 |
-
.easingsliderlite-slide {
|
118 |
-
width: 100%;
|
119 |
-
}
|
120 |
-
|
121 |
-
.easingsliderlite-slide > a {
|
122 |
-
display: block !important;
|
123 |
-
}
|
124 |
-
|
125 |
-
.easingsliderlite-image {
|
126 |
-
width: 100% !important;
|
127 |
-
max-width: 100% !important;
|
128 |
-
display: block !important;
|
129 |
-
border: none !important;
|
130 |
-
}
|
131 |
-
|
132 |
-
.easingsliderlite-shadow,
|
133 |
-
.easingsliderlite-shadow img {
|
134 |
-
padding: 0 !important;
|
135 |
-
line-height: 0 !important;
|
136 |
-
outline: none !important;
|
137 |
-
-webkit-box-shadow: none !important;
|
138 |
-
-moz-box-shadow: none !important;
|
139 |
-
box-shadow: none !important;
|
140 |
-
}
|
141 |
-
|
142 |
-
.easingsliderlite-shadow img {
|
143 |
-
margin: 0 !important;
|
144 |
-
width: 100%;
|
145 |
-
}
|
146 |
-
|
147 |
-
/* ===== Anything below here can be edited. Have fun! ===== */
|
148 |
-
.easingsliderlite-arrows {
|
149 |
-
position: absolute;
|
150 |
-
top: 46%;
|
151 |
-
width: 30px;
|
152 |
-
height: 30px;
|
153 |
-
background-repeat: no-repeat;
|
154 |
-
z-index: 30;
|
155 |
-
cursor: pointer;
|
156 |
-
opacity: 0; /* Slideshow will set to this 1 when it has loaded */
|
157 |
-
-webkit-transition: opacity 0.25s linear;
|
158 |
-
-moz-transition: opacity 0.25s linear;
|
159 |
-
-ms-transition: opacity 0.25s linear;
|
160 |
-
-o-transition: opacity 0.25s linear;
|
161 |
-
transition: opacity 0.25s linear;
|
162 |
-
}
|
163 |
-
|
164 |
-
.easingsliderlite-arrows.easingsliderlite-next {
|
165 |
-
background-image: url(../images/slideshow_arrow_next.png);
|
166 |
-
background-position: top left;
|
167 |
-
}
|
168 |
-
|
169 |
-
.easingsliderlite-arrows.easingsliderlite-prev {
|
170 |
-
background-image: url(../images/slideshow_arrow_prev.png);
|
171 |
-
background-position: top right;
|
172 |
-
}
|
173 |
-
|
174 |
-
.easingsliderlite-next.inside {
|
175 |
-
right: 10px;
|
176 |
-
}
|
177 |
-
|
178 |
-
.easingsliderlite-next.outside {
|
179 |
-
right: -40px;
|
180 |
-
padding-left: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
|
181 |
-
}
|
182 |
-
|
183 |
-
.easingsliderlite-prev.inside {
|
184 |
-
left: 10px;
|
185 |
-
}
|
186 |
-
|
187 |
-
.easingsliderlite-prev.outside {
|
188 |
-
left: -40px;
|
189 |
-
padding-right: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
|
190 |
-
}
|
191 |
-
|
192 |
-
.easingsliderlite-pagination {
|
193 |
-
position: absolute;
|
194 |
-
z-index: 30;
|
195 |
-
opacity: 0; /** Slideshow will set to this 1 when it has loaded */
|
196 |
-
-webkit-transition: opacity 0.25s linear;
|
197 |
-
-moz-transition: opacity 0.25s linear;
|
198 |
-
-ms-transition: opacity 0.25s linear;
|
199 |
-
-o-transition: opacity 0.25s linear;
|
200 |
-
transition: opacity 0.25s linear;
|
201 |
-
}
|
202 |
-
|
203 |
-
.easingsliderlite-pagination.inside.bottom-left {
|
204 |
-
bottom: 10px;
|
205 |
-
left: 10px;
|
206 |
-
}
|
207 |
-
|
208 |
-
.easingsliderlite-pagination.inside.bottom-right {
|
209 |
-
bottom: 10px;
|
210 |
-
right: 10px;
|
211 |
-
}
|
212 |
-
|
213 |
-
.easingsliderlite-pagination.inside.bottom-center {
|
214 |
-
bottom: 10px;
|
215 |
-
left: 0;
|
216 |
-
width: 100%;
|
217 |
-
text-align: center;
|
218 |
-
}
|
219 |
-
|
220 |
-
.easingsliderlite-pagination.inside.top-left {
|
221 |
-
top: 10px;
|
222 |
-
left: 10px;
|
223 |
-
}
|
224 |
-
|
225 |
-
.easingsliderlite-pagination.inside.top-right {
|
226 |
-
top: 10px;
|
227 |
-
right: 10px;
|
228 |
-
}
|
229 |
-
|
230 |
-
.easingsliderlite-pagination.inside.top-center {
|
231 |
-
top: 10px;
|
232 |
-
left: 0;
|
233 |
-
width: 100%;
|
234 |
-
text-align: center;
|
235 |
-
}
|
236 |
-
|
237 |
-
.easingsliderlite-pagination.outside.bottom-left {
|
238 |
-
bottom: -25px;
|
239 |
-
left: 0;
|
240 |
-
padding-top: 20px; /* Prevents fade when moving mouse from slideshow to outside navigation */
|
241 |
-
}
|
242 |
-
|
243 |
-
.easingsliderlite-pagination.outside.bottom-right {
|
244 |
-
bottom: -25px;
|
245 |
-
right: 0;
|
246 |
-
padding-top: 20px;
|
247 |
-
}
|
248 |
-
|
249 |
-
.easingsliderlite-pagination.outside.bottom-center {
|
250 |
-
bottom: -25px;
|
251 |
-
left: 0;
|
252 |
-
width: 100%;
|
253 |
-
text-align: center;
|
254 |
-
padding-top: 20px;
|
255 |
-
}
|
256 |
-
|
257 |
-
.easingsliderlite-pagination.outside.top-left {
|
258 |
-
top: -25px;
|
259 |
-
left: 0;
|
260 |
-
padding-bottom: 20px;
|
261 |
-
}
|
262 |
-
|
263 |
-
.easingsliderlite-pagination.outside.top-right {
|
264 |
-
top: -25px;
|
265 |
-
right: 0;
|
266 |
-
padding-bottom: 20px;
|
267 |
-
}
|
268 |
-
|
269 |
-
.easingsliderlite-pagination.outside.top-center {
|
270 |
-
top: -25px;
|
271 |
-
left: 0;
|
272 |
-
width: 100%;
|
273 |
-
text-align: center;
|
274 |
-
padding-bottom: 20px;
|
275 |
-
}
|
276 |
-
|
277 |
-
.easingsliderlite-icon {
|
278 |
-
width: 15px;
|
279 |
-
height: 15px;
|
280 |
-
margin: 0;
|
281 |
-
padding: 0;
|
282 |
-
background-image: url(../images/slideshow_icon_inactive.png);
|
283 |
-
background-repeat: no-repeat;
|
284 |
-
background-position: 0 0;
|
285 |
-
display: inline-block;
|
286 |
-
*display: inline; /** IE7 hack */
|
287 |
-
zoom: 1; /** IE7 hack */
|
288 |
-
z-index: 30;
|
289 |
-
cursor: pointer;
|
290 |
-
}
|
291 |
-
|
292 |
-
.easingsliderlite-icon:last-child {
|
293 |
-
margin-right: 0;
|
294 |
-
}
|
295 |
-
|
296 |
-
.easingsliderlite-icon.active {
|
297 |
-
background-image: url(../images/slideshow_icon_active.png);
|
298 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/slideshow.min.css
DELETED
@@ -1 +0,0 @@
|
|
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;clear: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;width:100%!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-css3 .easingsliderlite-slide{-webkit-perspective:1000;-webkit-backface-visibility:hidden}.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-slide{width:100%}.easingsliderlite-slide>a{display:block!important}.easingsliderlite-image{width:100%!important;max-width:100%!important;display:block!important;border:none!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;*display:inline;zoom:1;z-index:30;cursor:pointer}.easingsliderlite-icon:last-child{margin-right:0}.easingsliderlite-icon.active{background-image:url(../images/slideshow_icon_active.png)}
|
|
css/welcome-pages.css
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.easingslider-badge {
|
2 |
+
position: absolute;
|
3 |
+
top: 0;
|
4 |
+
right: 0;
|
5 |
+
height: 160px;
|
6 |
+
width: 185px;
|
7 |
+
padding-top: 100px;
|
8 |
+
color: #abb6c5;
|
9 |
+
font-weight: bold;
|
10 |
+
font-size: 14px;
|
11 |
+
text-align: center;
|
12 |
+
margin: 0 -5px;
|
13 |
+
background: url(../images/easingslider-badge.jpg) no-repeat;
|
14 |
+
}
|
15 |
+
|
16 |
+
.updated.notice {
|
17 |
+
border-color: #ffba00 !important;
|
18 |
+
}
|
19 |
+
|
20 |
+
.about-wrap .changelog .about-text {
|
21 |
+
margin-right: 0;
|
22 |
+
margin-bottom: 50px;
|
23 |
+
text-align: center;
|
24 |
+
}
|
25 |
+
|
26 |
+
.about-wrap .changelog .about-headline-callout.credits-headline {
|
27 |
+
text-align: left;
|
28 |
+
margin-bottom: 30px;
|
29 |
+
}
|
30 |
+
|
31 |
+
.about-wrap h4.wp-people-group {
|
32 |
+
margin-top: 50px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.about-wrap .welcome-screenshot {
|
36 |
+
width: 100%;
|
37 |
+
margin: 30px 0 20px 0 !important;
|
38 |
+
}
|
39 |
+
|
40 |
+
@media screen and (max-width: 782px) {
|
41 |
+
.welcome-screenshot {
|
42 |
+
margin-top: 0 !important;
|
43 |
+
}
|
44 |
+
}
|
css/welcome-pages.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.easingslider-badge{position:absolute;top:0;right:0;height:160px;width:185px;padding-top:100px;color:#abb6c5;font-weight:700;font-size:14px;text-align:center;margin:0 -5px;background:url(../images/easingslider-badge.jpg) no-repeat}.updated.notice{border-color:#ffba00!important}.about-wrap .changelog .about-text{margin-right:0;margin-bottom:50px;text-align:center}.about-wrap .changelog .about-headline-callout.credits-headline{text-align:left;margin-bottom:30px}.about-wrap h4.wp-people-group{margin-top:50px}.about-wrap .welcome-screenshot{width:100%;margin:30px 0 20px!important}@media screen and (max-width:782px){.welcome-screenshot{margin-top:0!important}}
|
easing-slider.php
ADDED
@@ -0,0 +1,462 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Easing Slider
|
5 |
+
Plugin URI: http://easingslider.com/
|
6 |
+
Version: 2.2
|
7 |
+
Author: Matthew Ruddy
|
8 |
+
Author URI: http://matthewruddy.com/
|
9 |
+
Description: Easing Slider is an easy to use slider plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get creating sliders without any difficulty.
|
10 |
+
License: GNU General Public License v2.0 or later
|
11 |
+
License URI: http://www.opensource.org/licenses/gpl-license.php
|
12 |
+
|
13 |
+
Copyright 2015 Matthew Ruddy
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License, version 2, as
|
17 |
+
published by the Free Software Foundation.
|
18 |
+
|
19 |
+
This program is distributed in the hope that it will be useful,
|
20 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
+
GNU General Public License for more details.
|
23 |
+
|
24 |
+
You should have received a copy of the GNU General Public License
|
25 |
+
along with this program; if not, write to the Free Software
|
26 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
+
*/
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Exit if accessed directly
|
31 |
+
*/
|
32 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
33 |
+
exit;
|
34 |
+
}
|
35 |
+
|
36 |
+
// Let's go!
|
37 |
+
if ( class_exists( 'Easing_Slider' ) ) {
|
38 |
+
new Easing_Slider();
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Loads and defines the plugin functionality.
|
43 |
+
*
|
44 |
+
* This class can also be used as an alias for the "ES_Slider" class.
|
45 |
+
* All calls to undefined methods or variables are forwarded to it.
|
46 |
+
*
|
47 |
+
* @author Matthew Ruddy
|
48 |
+
*/
|
49 |
+
class Easing_Slider {
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Our plugin version
|
53 |
+
*
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
public static $version = '2.2';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Constructor
|
60 |
+
*
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
public function __construct() {
|
64 |
+
|
65 |
+
// Activation and uninstall hooks
|
66 |
+
register_activation_hook( __FILE__, array( __CLASS__, 'do_activation' ) );
|
67 |
+
register_uninstall_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
|
68 |
+
|
69 |
+
// Load dependancies
|
70 |
+
$this->load_dependancies();
|
71 |
+
|
72 |
+
// Setup localization
|
73 |
+
$this->set_locale();
|
74 |
+
|
75 |
+
// Register post type
|
76 |
+
$this->register_post_type();
|
77 |
+
|
78 |
+
// Define hooks
|
79 |
+
$this->define_hooks();
|
80 |
+
|
81 |
+
/**
|
82 |
+
* The customizer has been prepared for export as an "extension" in the near future.
|
83 |
+
* To keep our current users happy and prepare them for the changes, we've bootstrapped the customizer
|
84 |
+
* into the core plugin, alongside a notice informing them of these changes.
|
85 |
+
*
|
86 |
+
* Once the changeover is complete, this code will be removed.
|
87 |
+
*/
|
88 |
+
$this->bootstrap_customizer();
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Activation
|
94 |
+
*
|
95 |
+
* @return void
|
96 |
+
*/
|
97 |
+
public static function do_activation() {
|
98 |
+
|
99 |
+
global $wp_version;
|
100 |
+
|
101 |
+
// Deactivate the plugin if the WordPress version is below the minimum required.
|
102 |
+
if ( version_compare( $wp_version, '4.0', '<' ) ) {
|
103 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
104 |
+
wp_die( __( sprintf( 'Sorry, but your version of WordPress, <strong>%s</strong>, is not supported. The plugin has been deactivated. <a href="%s">Return to the Dashboard.</a>', $wp_version, admin_url() ), 'easingslider' ) );
|
105 |
+
return false;
|
106 |
+
}
|
107 |
+
|
108 |
+
// Add options
|
109 |
+
add_option( 'easingslider_version', self::$version );
|
110 |
+
add_option( 'easingslider_settings', (object) array(
|
111 |
+
'image_resizing' => false,
|
112 |
+
'load_assets' => 'header',
|
113 |
+
'remove_data' => false
|
114 |
+
) );
|
115 |
+
|
116 |
+
// Let's flush rewrite rules as we're using a custom post type
|
117 |
+
flush_rewrite_rules();
|
118 |
+
|
119 |
+
// Trigger hooks
|
120 |
+
do_action( 'easingslider_activate' );
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Uninstall
|
126 |
+
*
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public static function do_uninstall() {
|
130 |
+
|
131 |
+
// Get the settings
|
132 |
+
$settings = get_option( 'easingslider_settings' );
|
133 |
+
|
134 |
+
// If enabled, remove the plugin data
|
135 |
+
if ( $settings->remove_data ) {
|
136 |
+
|
137 |
+
// Delete all of the sliders
|
138 |
+
foreach ( static::all() as $slider ) {
|
139 |
+
static::delete( $slider->ID );
|
140 |
+
}
|
141 |
+
|
142 |
+
// Delete options
|
143 |
+
delete_option( 'easingslider_version' );
|
144 |
+
delete_option( 'easingslider_settings' );
|
145 |
+
|
146 |
+
// Remove data hook
|
147 |
+
do_action( 'easingslider_remove_data' );
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
// Trigger hooks
|
152 |
+
do_action( 'easingslider_uninstall' );
|
153 |
+
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Load dependancies
|
158 |
+
*
|
159 |
+
* @return void
|
160 |
+
*/
|
161 |
+
protected function load_dependancies() {
|
162 |
+
|
163 |
+
// The file responsible for loading our helpers
|
164 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/helpers.php';
|
165 |
+
|
166 |
+
// The class responsible for defining our admin editor
|
167 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-editor-pages.php';
|
168 |
+
|
169 |
+
// The class responsible for discovering extensions
|
170 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-extensions-page.php';
|
171 |
+
|
172 |
+
// The class responsible for resizing attachment images
|
173 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-image-resizer.php';
|
174 |
+
|
175 |
+
// The class responsible for importing legacy settings
|
176 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-legacy.php';
|
177 |
+
|
178 |
+
// The class responsible for adding our plugin toplevel menu
|
179 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-menu.php';
|
180 |
+
|
181 |
+
// The class responsible for managing our migrations
|
182 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-migrations.php';
|
183 |
+
|
184 |
+
// The class responsible for defining our admin settings
|
185 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-settings-page.php';
|
186 |
+
|
187 |
+
// The class responsible for handling plugin shortcodes
|
188 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-shortcode.php';
|
189 |
+
|
190 |
+
// The class responsible for managing our public facing functionality
|
191 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-slider.php';
|
192 |
+
|
193 |
+
// The class responsible for handling our slider list table
|
194 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-sliders-list-table.php';
|
195 |
+
|
196 |
+
// The class responsible for extension updates and licensing
|
197 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-update-manager.php';
|
198 |
+
|
199 |
+
// The class responsible for displaying our welcome page(s)
|
200 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-welcome-pages.php';
|
201 |
+
|
202 |
+
// The class responsible for adding a widget for displaying a slider
|
203 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-widget.php';
|
204 |
+
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Set locale
|
209 |
+
*
|
210 |
+
* @return void
|
211 |
+
*/
|
212 |
+
protected function set_locale() {
|
213 |
+
|
214 |
+
// Load plugin textdomain
|
215 |
+
load_plugin_textdomain( 'easing-slider', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Register our "easingslider" post type
|
221 |
+
*
|
222 |
+
* @return void
|
223 |
+
*/
|
224 |
+
protected function register_post_type() {
|
225 |
+
|
226 |
+
// Register the post type
|
227 |
+
register_post_type( 'easingslider', array(
|
228 |
+
'query_var' => false,
|
229 |
+
'rewrite' => false,
|
230 |
+
'public' => true,
|
231 |
+
'exclude_from_search' => true,
|
232 |
+
'publicly_queryable' => false,
|
233 |
+
'show_in_nav_menus' => false,
|
234 |
+
'show_ui' => false,
|
235 |
+
'labels' => array(
|
236 |
+
'name' => __( 'Sliders', 'easingslider' )
|
237 |
+
)
|
238 |
+
) );
|
239 |
+
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Define menu hooks
|
244 |
+
*
|
245 |
+
* @return void
|
246 |
+
*/
|
247 |
+
protected function define_hooks() {
|
248 |
+
|
249 |
+
// Initiate components
|
250 |
+
$editor_pages = new ES_Editor_Pages();
|
251 |
+
$extensions_page = new ES_Extensions_Page();
|
252 |
+
$image_resizer = new ES_Image_Resizer();
|
253 |
+
$legacy = new ES_Legacy();
|
254 |
+
$menu = new ES_Menu();
|
255 |
+
$migrations = new ES_Migrations();
|
256 |
+
$settings_page = new ES_Settings_Page();
|
257 |
+
$shortcode = new ES_Shortcode();
|
258 |
+
$slider = new ES_Slider();
|
259 |
+
$welcome_pages = new ES_Welcome_Pages();
|
260 |
+
$widget = new ES_Widget();
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Hook everything, "connect all the dots"!
|
264 |
+
*
|
265 |
+
* All of these actions connect the various parts of our plugin together.
|
266 |
+
* The idea behind this is to keep each "component" as separate as possible, decoupled from other components.
|
267 |
+
*
|
268 |
+
* These hooks bridge the gaps.
|
269 |
+
*/
|
270 |
+
add_action( 'admin_init', array( $editor_pages, 'register_assets' ) );
|
271 |
+
add_action( 'admin_menu', array( $editor_pages, 'add_edit_page' ), 999 );
|
272 |
+
add_action( 'admin_menu', array( $editor_pages, 'add_publish_page' ), 999 );
|
273 |
+
add_action( 'easingslider_activate', array( $editor_pages, 'add_capabilities' ) );
|
274 |
+
add_action( 'easingslider_remove_data', array( $editor_pages, 'remove_capabilities' ) );
|
275 |
+
add_filter( 'set-screen-option', array( $editor_pages, 'set_screen_option' ), 10, 3 );
|
276 |
+
|
277 |
+
add_action( 'admin_init', array( $extensions_page, 'register_assets' ) );
|
278 |
+
add_action( 'admin_menu', array( $extensions_page, 'add_submenu_page' ), 99999 );
|
279 |
+
add_action( 'easingslider_activate', array( $extensions_page, 'add_capabilities' ) );
|
280 |
+
add_action( 'easingslider_remove_data', array( $extensions_page, 'remove_capabilities' ) );
|
281 |
+
|
282 |
+
add_action( 'delete_attachment', array( $image_resizer, 'delete_resized_attachments' ) );
|
283 |
+
add_filter( 'easingslider_modify_image_url', array( $image_resizer, 'resized_image_url' ), 10, 3 );
|
284 |
+
|
285 |
+
add_action( 'init', array( $legacy, 'lite_upgrade_from_100' ) );
|
286 |
+
add_action( 'init', array( $legacy, 'lite_upgrade_from_200' ) );
|
287 |
+
add_action( 'init', array( $legacy, 'pro_upgrade_from_100' ) );
|
288 |
+
add_action( 'init', array( $legacy, 'pro_upgrade_from_200' ) );
|
289 |
+
add_action( 'easingslider_remove_data', array( $legacy, 'remove_options' ) );
|
290 |
+
add_action( 'easingslider_delete_slider', array( $legacy, 'delete_lite_slider' ) );
|
291 |
+
add_action( 'easingslider_delete_slider', array( $legacy, 'delete_pro_slider' ) );
|
292 |
+
add_action( 'easingslider_pre_redirect_to_welcome', array( $legacy, 'redirect_to_whats_new' ) );
|
293 |
+
add_shortcode( 'easingsliderlite', array( $legacy, 'do_lite_shortcode' ) );
|
294 |
+
add_shortcode( 'easingsliderpro', array( $legacy, 'do_pro_shortcode' ) );
|
295 |
+
add_shortcode( 'rivasliderpro', array( $legacy, 'do_pro_shortcode' ) );
|
296 |
+
|
297 |
+
add_action( 'admin_menu', array( $menu, 'add_toplevel_menu' ) );
|
298 |
+
|
299 |
+
add_action( 'init', array( $migrations, 'do_migrations' ) );
|
300 |
+
add_action( 'easingslider_update_plugin', array( $migrations, 'migrate_to_22' ) );
|
301 |
+
add_action( 'easingslider_update_plugin', array( $migrations, 'update_version' ), 999 );
|
302 |
+
|
303 |
+
add_action( 'admin_init', array( $settings_page, 'register_assets' ) );
|
304 |
+
add_action( 'admin_menu', array( $settings_page, 'add_submenu_page' ), 999 );
|
305 |
+
add_action( 'easingslider_activate', array( $settings_page, 'add_capabilities' ) );
|
306 |
+
add_action( 'easingslider_remove_data', array( $settings_page, 'remove_capabilities' ) );
|
307 |
+
|
308 |
+
add_action( 'admin_footer', array( $shortcode, 'print_media_thickbox' ) );
|
309 |
+
add_action( 'media_buttons', array( $shortcode, 'print_media_button' ), 999 );
|
310 |
+
add_shortcode( 'easingslider', array( $shortcode, 'render' ) );
|
311 |
+
|
312 |
+
add_action( 'init', array( $slider, 'register_assets' ) );
|
313 |
+
add_action( 'wp_enqueue_scripts', array( $slider, 'enqueue_assets' ) );
|
314 |
+
add_filter( 'easingslider_pre_save_slider', array( $slider, 'no_title' ) );
|
315 |
+
add_filter( 'easingslider_pre_display_slider', array( $slider, 'maybe_randomize' ) );
|
316 |
+
add_filter( 'easingslider_get_html_data', array( $slider, 'cleanup_data' ) );
|
317 |
+
add_filter( 'easingslider_before_slider_content', array( $slider, 'add_preload' ), 10, 2 );
|
318 |
+
add_filter( 'easingslider_display_image_slide', array( $slider, 'add_image' ), 10, 3 );
|
319 |
+
add_filter( 'easingslider_before_display_slide', array( $slider, 'open_link' ), 10, 3 );
|
320 |
+
add_filter( 'easingslider_after_display_slide', array( $slider, 'close_link' ), 10, 3 );
|
321 |
+
|
322 |
+
add_action( 'admin_init', array( $welcome_pages, 'register_assets' ) );
|
323 |
+
add_action( 'admin_init', array( $welcome_pages, 'redirect_to_welcome' ) );
|
324 |
+
add_action( 'admin_menu', array( $welcome_pages, 'add_dashboard_pages' ) );
|
325 |
+
add_action( 'admin_head', array( $welcome_pages, 'hide_individual_pages' ) );
|
326 |
+
add_action( 'easingslider_activate', array( $welcome_pages, 'set_redirect_transient' ) );
|
327 |
+
|
328 |
+
add_action( 'widgets_init', array( $widget, 'register' ) );
|
329 |
+
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* This method bootstraps the customization functionality, which will soon be exported into an extension.
|
334 |
+
* If the "Visual Customizer" extension is already activated, this method won't do anything.
|
335 |
+
*
|
336 |
+
* This method will be removed in due course.
|
337 |
+
*
|
338 |
+
* @return void
|
339 |
+
*/
|
340 |
+
public function bootstrap_customizer() {
|
341 |
+
|
342 |
+
// Bail if the customizer has already been loaded
|
343 |
+
if ( ! class_exists( 'ES_Customizer' ) ) {
|
344 |
+
|
345 |
+
// Load the customizer components
|
346 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-customizations.php';
|
347 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-customizer-legacy.php';
|
348 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-customizer-notice.php';
|
349 |
+
require_once plugin_dir_path( __FILE__ ) . 'includes/class-es-customizer.php';
|
350 |
+
|
351 |
+
// Initiate components
|
352 |
+
$customizations = new ES_Customizations();
|
353 |
+
$customizer_legacy = new ES_Customizer_Legacy();
|
354 |
+
$customizer_notice = new ES_Customizer_Notice();
|
355 |
+
$customizer = new ES_Customizer();
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Define hooks
|
359 |
+
*/
|
360 |
+
add_filter( 'easingslider_metadata_defaults', array( $customizations, 'merge_defaults' ) );
|
361 |
+
add_filter( 'easingslider_after_display_slider', array( $customizations, 'drop_shadow' ), 10, 2 );
|
362 |
+
add_filter( 'easingslider_before_display_slider', array( $customizations, 'display_styling' ), 10, 2 );
|
363 |
+
|
364 |
+
add_action( 'init', array( $customizer_legacy, 'lite_upgrade_from_100' ) );
|
365 |
+
add_action( 'init', array( $customizer_legacy, 'lite_upgrade_from_200' ) );
|
366 |
+
add_action( 'init', array( $customizer_legacy, 'pro_upgrade_from_200' ) );
|
367 |
+
add_action( 'easingslider_remove_data', array( $customizer_legacy, 'remove_options' ) );
|
368 |
+
|
369 |
+
/**
|
370 |
+
* We're not quite ready to display this notice yet.
|
371 |
+
* This code will be uncommented when the customizer is available as an extension.
|
372 |
+
*/
|
373 |
+
// add_action( 'admin_init', array( $customizer_notice, 'handle_dismiss' ) );
|
374 |
+
// add_action( 'admin_init', array( $customizer_notice, 'display' ), 999 );
|
375 |
+
// add_action( 'easingslider_uninstall', array( $customizer_notice, 'unset_flag' ) );
|
376 |
+
|
377 |
+
add_action( 'admin_init', array( $customizer, 'register_assets' ) );
|
378 |
+
add_action( 'admin_menu', array( $customizer, 'add_submenu_page' ), 9999 );
|
379 |
+
add_action( 'easingslider_activate', array( $customizer, 'add_capabilities' ) );
|
380 |
+
add_action( 'easingslider_remove_data', array( $customizer, 'remove_capabilities' ) );
|
381 |
+
|
382 |
+
}
|
383 |
+
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Forwards all set variables to our "ES_Slider" class.
|
388 |
+
*
|
389 |
+
* This allows us to use this class as a nicely named alias for "ES_Slider", whilst
|
390 |
+
* separating our concerns.
|
391 |
+
*
|
392 |
+
* @param string $name The variable name
|
393 |
+
* @param mixed $value The variable value
|
394 |
+
* @return mixed
|
395 |
+
*/
|
396 |
+
public function __set( $name, $value ) {
|
397 |
+
|
398 |
+
if ( ! isset( $this->slider ) OR ! $this->slider instanceof ES_Slider ) {
|
399 |
+
$this->slider = new ES_Slider();
|
400 |
+
}
|
401 |
+
|
402 |
+
$this->slider->$name = $value;
|
403 |
+
|
404 |
+
}
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Forwards all get variables to our "ES_Slider" class.
|
408 |
+
*
|
409 |
+
* @param string $name The variable name
|
410 |
+
* @return mixed
|
411 |
+
*/
|
412 |
+
public function __get( $name ) {
|
413 |
+
|
414 |
+
if ( ! isset( $this->slider ) OR ! $this->slider instanceof ES_Slider ) {
|
415 |
+
$this->slider = new ES_Slider();
|
416 |
+
}
|
417 |
+
|
418 |
+
if ( isset( $this->slider->$name ) ) {
|
419 |
+
return $this->slider->$name;
|
420 |
+
}
|
421 |
+
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Forwards all other method calls to our "ES_Slider" class.
|
426 |
+
*
|
427 |
+
* @param string $name The method name
|
428 |
+
* @param array $arguments The array of method arguments
|
429 |
+
* @return mixed
|
430 |
+
*/
|
431 |
+
public function __call( $name, $arguments ) {
|
432 |
+
|
433 |
+
if ( ! isset( $this->slider ) OR ! $this->slider instanceof ES_Slider ) {
|
434 |
+
$this->slider = new ES_Slider();
|
435 |
+
}
|
436 |
+
|
437 |
+
// Check if the method exists. If so, execute it.
|
438 |
+
if ( method_exists( $this->slider, $name ) ) {
|
439 |
+
return call_user_func_array( array( $this->slider, $name ), $arguments );
|
440 |
+
}
|
441 |
+
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Forwards all other static method calls to our "ES_Slider" class.
|
446 |
+
*
|
447 |
+
* @param string $name The method name
|
448 |
+
* @param array $arguments The array of method arguments
|
449 |
+
* @return mixed
|
450 |
+
*/
|
451 |
+
public static function __callStatic( $name, $arguments ) {
|
452 |
+
|
453 |
+
$static = new ES_Slider();
|
454 |
+
|
455 |
+
// Check if the method exists. If so, execute it.
|
456 |
+
if ( method_exists( $static, $name ) ) {
|
457 |
+
return call_user_func_array( array( $static, $name ), $arguments );
|
458 |
+
}
|
459 |
+
|
460 |
+
}
|
461 |
+
|
462 |
+
}
|
easingsliderlite.php
DELETED
@@ -1,1077 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: Easing Slider "Lite"
|
5 |
-
Plugin URI: http://easingslider.com/
|
6 |
-
Version: 2.1.4.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.
|
10 |
-
License: GNU General Public License v2.0 or later
|
11 |
-
License URI: http://www.opensource.org/licenses/gpl-license.php
|
12 |
-
|
13 |
-
Copyright 2013 Matthew Ruddy
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License, version 2, as
|
17 |
-
published by the Free Software Foundation.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
/** Load all of the necessary class files for the plugin */
|
30 |
-
spl_autoload_register( 'EasingSliderLite::autoload' );
|
31 |
-
|
32 |
-
/** Let's go! */
|
33 |
-
if ( class_exists( 'EasingSliderLite' ) )
|
34 |
-
EasingSliderLite::get_instance();
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Main plugin class
|
38 |
-
*
|
39 |
-
* @author Matthew Ruddy
|
40 |
-
* @since 2.0
|
41 |
-
*/
|
42 |
-
class EasingSliderLite {
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Class instance
|
46 |
-
*
|
47 |
-
* @since 2.0
|
48 |
-
*/
|
49 |
-
private static $instance;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* String name of the main plugin file
|
53 |
-
*
|
54 |
-
* @since 2.0
|
55 |
-
*/
|
56 |
-
private static $file = __FILE__;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Our plugin version
|
60 |
-
*
|
61 |
-
* @since 2.0
|
62 |
-
*/
|
63 |
-
public static $version = '2.1.4.3';
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Our array of Easing Slider "Lite" admin pages. These are used to conditionally load scripts.
|
67 |
-
*
|
68 |
-
* @since 2.0.1.2
|
69 |
-
*/
|
70 |
-
public $whitelist = array();
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Arrays of admin messages
|
74 |
-
*
|
75 |
-
* @since 2.0
|
76 |
-
*/
|
77 |
-
public $admin_messages = array();
|
78 |
-
|
79 |
-
/**
|
80 |
-
* A handy flag for identifying if we are currently using the new WordPress admin area
|
81 |
-
*
|
82 |
-
* @since 2.1.3
|
83 |
-
*/
|
84 |
-
private $is_updated_admin = false;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Flag for indicating that we are on a EasingSliderLite plugin page
|
88 |
-
*
|
89 |
-
* @since 2.0
|
90 |
-
*/
|
91 |
-
private $is_easingsliderlite_page = false;
|
92 |
-
|
93 |
-
/**
|
94 |
-
* PSR-0 compliant autoloader to load classes as needed.
|
95 |
-
*
|
96 |
-
* @since 2.0
|
97 |
-
*/
|
98 |
-
public static function autoload( $classname ) {
|
99 |
-
|
100 |
-
if ( 'ESL' !== substr( $classname, 0, 3 ) )
|
101 |
-
return;
|
102 |
-
|
103 |
-
$filename = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . str_replace( 'ESL_', '', $classname ) . '.php';
|
104 |
-
require $filename;
|
105 |
-
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Getter method for retrieving the class instance.
|
110 |
-
*
|
111 |
-
* @since 2.0
|
112 |
-
*/
|
113 |
-
public static function get_instance() {
|
114 |
-
|
115 |
-
if ( !self::$instance instanceof self )
|
116 |
-
self::$instance = new self;
|
117 |
-
return self::$instance;
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Gets the main plugin file
|
123 |
-
*
|
124 |
-
* @since 2.0
|
125 |
-
*/
|
126 |
-
public static function get_file() {
|
127 |
-
return self::$file;
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Constructor
|
132 |
-
*
|
133 |
-
* @since 2.0
|
134 |
-
*/
|
135 |
-
private function __construct() {
|
136 |
-
|
137 |
-
global $wp_version;
|
138 |
-
|
139 |
-
/** Load plugin textdomain for language capabilities */
|
140 |
-
load_plugin_textdomain( 'easingsliderlite', false, dirname( plugin_basename( self::get_file() ) ) . '/languages' );
|
141 |
-
|
142 |
-
/** Flag the new admin area if appropriate */
|
143 |
-
$this->is_updated_admin = ( version_compare( $wp_version, '3.8', '>=' ) ) ? true : false;
|
144 |
-
|
145 |
-
/** Activation and deactivation hooks. Static methods are used to avoid activation/uninstallation scoping errors. */
|
146 |
-
if ( is_multisite() ) {
|
147 |
-
register_activation_hook( __FILE__, array( __CLASS__, 'do_network_activation' ) );
|
148 |
-
register_uninstall_hook( __FILE__, array( __CLASS__, 'do_network_uninstall' ) );
|
149 |
-
}
|
150 |
-
else {
|
151 |
-
register_activation_hook( __FILE__, array( __CLASS__, 'do_activation' ) );
|
152 |
-
register_uninstall_hook( __FILE__, array( __CLASS__, 'do_uninstall' ) );
|
153 |
-
}
|
154 |
-
|
155 |
-
/** Legacy functionality */
|
156 |
-
if ( apply_filters( 'easingsliderlite_legacy_functionality', __return_true() ) )
|
157 |
-
ESL_Legacy::init( $this );
|
158 |
-
|
159 |
-
/** Plugin shortcodes */
|
160 |
-
add_shortcode( 'easingsliderlite', array( $this, 'do_shortcode' ) );
|
161 |
-
|
162 |
-
/** Plugin actions */
|
163 |
-
add_action( 'init', array( $this, 'register_all_styles' ) );
|
164 |
-
add_action( 'init', array( $this, 'register_all_scripts' ) );
|
165 |
-
add_action( 'admin_menu', array( $this, 'add_menus' ) );
|
166 |
-
add_action( 'admin_menu', array( $this, 'do_actions' ) );
|
167 |
-
add_action( 'admin_body_class', array( $this, 'admin_body_classes' ) );
|
168 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
169 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
170 |
-
add_action( 'media_buttons', array( $this, 'add_media_button' ), 11 );
|
171 |
-
add_action( 'print_media_templates', array( $this, 'print_backbone_templates' ) );
|
172 |
-
add_action( 'wp_before_admin_bar_render', array( $this, 'add_admin_bar_links' ) );
|
173 |
-
|
174 |
-
/** Do plugin upgrades */
|
175 |
-
add_action( 'admin_init', array( 'ESL_Upgrade', 'do_upgrades' ) );
|
176 |
-
|
177 |
-
/** Register our custom widget */
|
178 |
-
add_action( 'widgets_init', create_function( '', 'register_widget( "ESL_Widget" );' ) );
|
179 |
-
|
180 |
-
/** Some hooks for our own custom actions */
|
181 |
-
add_action( 'easingsliderlite_edit_slideshow_actions', array( $this, 'do_slideshow_actions' ) );
|
182 |
-
add_action( 'easingsliderlite_customizer_actions', array( $this, 'do_customizer_actions' ) );
|
183 |
-
add_action( 'easingsliderlite_edit_settings_actions', array( $this, 'do_settings_actions' ) );
|
184 |
-
|
185 |
-
/** Get plugin settings */
|
186 |
-
$settings = get_option( 'easingsliderlite_settings' );
|
187 |
-
|
188 |
-
/** Load slideshow scripts & styles in the header if set to do so */
|
189 |
-
if ( isset( $settings['load_scripts'] ) && $settings['load_scripts'] == 'header' )
|
190 |
-
add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_scripts' ) );
|
191 |
-
if ( isset( $settings['load_styles'] ) && $settings['load_styles'] == 'header' ) {
|
192 |
-
add_action( 'wp_enqueue_scripts', array( 'ESL_Slideshow', 'enqueue_styles' ) );
|
193 |
-
add_action( 'wp_head', array( 'ESL_Slideshow', 'print_custom_styles') );
|
194 |
-
}
|
195 |
-
|
196 |
-
/** Initialization hook for adding external functionality */
|
197 |
-
do_action_ref_array( 'easingsliderlite', array( $this ) );
|
198 |
-
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Executes a network activation
|
203 |
-
*
|
204 |
-
* @since 2.0
|
205 |
-
*/
|
206 |
-
public static function do_network_activation() {
|
207 |
-
self::get_instance()->network_activate();
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Executes a network uninstall
|
212 |
-
*
|
213 |
-
* @since 2.0
|
214 |
-
*/
|
215 |
-
public static function do_network_uninstall() {
|
216 |
-
self::get_instance()->network_uninstall();
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Executes an activation
|
221 |
-
*
|
222 |
-
* @since 2.0
|
223 |
-
*/
|
224 |
-
public static function do_activation() {
|
225 |
-
self::get_instance()->activate();
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Executes an uninstall
|
230 |
-
*
|
231 |
-
* @since 2.0
|
232 |
-
*/
|
233 |
-
public static function do_uninstall() {
|
234 |
-
self::get_instance()->uninstall();
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Network activation hook
|
239 |
-
*
|
240 |
-
* @since 2.0
|
241 |
-
*/
|
242 |
-
public function network_activate() {
|
243 |
-
|
244 |
-
/** Do plugin version check */
|
245 |
-
if ( !$this->version_check() )
|
246 |
-
return;
|
247 |
-
|
248 |
-
/** Get all of the blogs */
|
249 |
-
$blogs = $this->get_multisite_blogs();
|
250 |
-
|
251 |
-
/** Execute acivation for each blog */
|
252 |
-
foreach ( $blogs as $blog_id ) {
|
253 |
-
switch_to_blog( $blog_id );
|
254 |
-
$this->activate();
|
255 |
-
restore_current_blog();
|
256 |
-
}
|
257 |
-
|
258 |
-
/** Trigger hooks */
|
259 |
-
do_action_ref_array( 'easingsliderlite_network_activate', array( $this ) );
|
260 |
-
|
261 |
-
}
|
262 |
-
|
263 |
-
/**
|
264 |
-
* Network uninstall hook
|
265 |
-
*
|
266 |
-
* @since 2.0
|
267 |
-
*/
|
268 |
-
public function network_uninstall() {
|
269 |
-
|
270 |
-
/** Get all of the blogs */
|
271 |
-
$blogs = $this->get_multisite_blogs();
|
272 |
-
|
273 |
-
/** Execute uninstall for each blog */
|
274 |
-
foreach ( $blogs as $blog_id ) {
|
275 |
-
switch_to_blog( $blog_id );
|
276 |
-
$this->uninstall();
|
277 |
-
restore_current_blog();
|
278 |
-
}
|
279 |
-
|
280 |
-
/** Trigger hooks */
|
281 |
-
do_action_ref_array( 'easingsliderlite_network_uninstall', array( $this ) );
|
282 |
-
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Activation hook
|
287 |
-
*
|
288 |
-
* @since 2.0
|
289 |
-
*/
|
290 |
-
public function activate() {
|
291 |
-
|
292 |
-
/** Do plugin version check */
|
293 |
-
if ( !$this->version_check() )
|
294 |
-
return;
|
295 |
-
|
296 |
-
/** Add "wp_options" table options */
|
297 |
-
add_option( 'easingsliderlite_version', self::$version );
|
298 |
-
add_option( 'easingsliderlite_slideshow', $this->slideshow_defaults() );
|
299 |
-
add_option( 'easingsliderlite_customizations', $this->customization_defaults() );
|
300 |
-
add_option( 'easingsliderlite_settings',
|
301 |
-
array(
|
302 |
-
'resizing' => false,
|
303 |
-
'load_styles' => 'header',
|
304 |
-
'load_scripts' => 'header'
|
305 |
-
)
|
306 |
-
);
|
307 |
-
add_option( 'easingsliderlite_major_upgrade', 0 );
|
308 |
-
add_option( 'easingsliderlite_disable_welcome_panel', 0 );
|
309 |
-
|
310 |
-
/** Add user capabilities */
|
311 |
-
$this->manage_capabilities( 'add' );
|
312 |
-
|
313 |
-
/** Trigger hooks */
|
314 |
-
do_action_ref_array( 'easingsliderlite_activate', array( $this ) );
|
315 |
-
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Uninstall Hook
|
320 |
-
*
|
321 |
-
* @since 2.0
|
322 |
-
*/
|
323 |
-
public function uninstall() {
|
324 |
-
|
325 |
-
/** Delete "wp_options" table options */
|
326 |
-
delete_option( 'easingsliderlite_version' );
|
327 |
-
delete_option( 'easingsliderlite_slideshow' );
|
328 |
-
delete_option( 'easingsliderlite_customizations' );
|
329 |
-
delete_option( 'easingsliderlite_settings' );
|
330 |
-
delete_option( 'easingsliderlite_major_upgrade' );
|
331 |
-
delete_option( 'easingsliderlite_disable_welcome_panel' );
|
332 |
-
|
333 |
-
/** Remove user capabilities */
|
334 |
-
$this->manage_capabilities( 'remove' );
|
335 |
-
|
336 |
-
/** Trigger hooks */
|
337 |
-
do_action_ref_array( 'easingsliderlite_uninstall', array( $this ) );
|
338 |
-
|
339 |
-
}
|
340 |
-
|
341 |
-
/**
|
342 |
-
* Does a plugin version check, making sure the current Wordpress version is supported. If not, the plugin is deactivated and an error message is displayed.
|
343 |
-
*
|
344 |
-
* @author Matthew Ruddy
|
345 |
-
* @version 2.0.1
|
346 |
-
*/
|
347 |
-
public function version_check() {
|
348 |
-
global $wp_version;
|
349 |
-
if ( version_compare( $wp_version, '3.5', '<' ) ) {
|
350 |
-
deactivate_plugins( plugin_basename( __FILE__ ) );
|
351 |
-
wp_die( __( sprintf( 'Sorry, but your version of WordPress, <strong>%s</strong>, is not supported. The plugin has been deactivated. <a href="%s">Return to the Dashboard.</a>', $wp_version, admin_url() ), 'easingsliderlite' ) );
|
352 |
-
return false;
|
353 |
-
}
|
354 |
-
return true;
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Returns the ids of the various multisite blogs. Returns false if not a multisite installation.
|
359 |
-
*
|
360 |
-
* @since 2.0
|
361 |
-
*/
|
362 |
-
public function get_multisite_blogs() {
|
363 |
-
|
364 |
-
global $wpdb;
|
365 |
-
|
366 |
-
/** Bail if not multisite */
|
367 |
-
if ( !is_multisite() )
|
368 |
-
return false;
|
369 |
-
|
370 |
-
/** Get the blogs ids from database */
|
371 |
-
$query = "SELECT blog_id from $wpdb->blogs";
|
372 |
-
$blogs = $wpdb->get_col($query);
|
373 |
-
|
374 |
-
/** Push blog ids to array */
|
375 |
-
$blog_ids = array();
|
376 |
-
foreach ( $blogs as $blog )
|
377 |
-
$blog_ids[] = $blog;
|
378 |
-
|
379 |
-
/** Return the multisite blog ids */
|
380 |
-
return $blog_ids;
|
381 |
-
|
382 |
-
}
|
383 |
-
|
384 |
-
/**
|
385 |
-
* Default slideshow options
|
386 |
-
*
|
387 |
-
* @since 2.0
|
388 |
-
*/
|
389 |
-
public function slideshow_defaults() {
|
390 |
-
|
391 |
-
/** Get the current user to be assigned as the slideshow author */
|
392 |
-
$author = __( 'Unknown', 'easingsliderlite' );
|
393 |
-
if ( function_exists( 'wp_get_current_user' ) )
|
394 |
-
$author = wp_get_current_user()->user_login;
|
395 |
-
|
396 |
-
$object = new stdClass();
|
397 |
-
$object->author = $author;
|
398 |
-
$object->slides = array();
|
399 |
-
$object->general = (object) array( 'randomize' => '' );
|
400 |
-
$object->dimensions = (object) array( 'width' => 640, 'height' => 240, 'responsive' => true );
|
401 |
-
$object->transitions = (object) array( 'effect' => 'slide', 'duration' => 500 );
|
402 |
-
$object->navigation = (object) array( 'arrows' => true, 'arrows_hover' => false, 'arrows_position' => 'inside', 'pagination' => true, 'pagination_hover' => false, 'pagination_position' => 'inside', 'pagination_location' => 'bottom-center' );
|
403 |
-
$object->playback = (object) array( 'enabled' => true, 'pause' => 4000 );
|
404 |
-
return apply_filters( 'easingsliderlite_slideshow_defaults', $object );
|
405 |
-
|
406 |
-
}
|
407 |
-
|
408 |
-
/**
|
409 |
-
* Get custom styling default options
|
410 |
-
*
|
411 |
-
* @since 2.1
|
412 |
-
*/
|
413 |
-
public function customization_defaults() {
|
414 |
-
|
415 |
-
$object = (object) array(
|
416 |
-
'arrows' => (object) array(
|
417 |
-
'next' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_arrow_next.png' ) ),
|
418 |
-
'prev' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_arrow_prev.png' ) ),
|
419 |
-
'width' => 30,
|
420 |
-
'height' => 30
|
421 |
-
),
|
422 |
-
'pagination' => (object) array(
|
423 |
-
'inactive' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_icon_inactive.png' ) ),
|
424 |
-
'active' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_icon_active.png' ) ),
|
425 |
-
'width' => 15,
|
426 |
-
'height' => 15
|
427 |
-
),
|
428 |
-
'border' => (object) array(
|
429 |
-
'color' => '#000',
|
430 |
-
'width' => 0,
|
431 |
-
'radius' => 0
|
432 |
-
),
|
433 |
-
'shadow' => (object) array(
|
434 |
-
'enable' => false,
|
435 |
-
'image' => stripslashes_deep( plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'slideshow_shadow.png' ) )
|
436 |
-
)
|
437 |
-
);
|
438 |
-
return apply_filters( 'easingsliderlite_customizer_defaults', $object );
|
439 |
-
|
440 |
-
}
|
441 |
-
|
442 |
-
/**
|
443 |
-
* Returns the plugin capabilities
|
444 |
-
*
|
445 |
-
* @since 2.0
|
446 |
-
*/
|
447 |
-
public function capabilities() {
|
448 |
-
$capabilities = array(
|
449 |
-
'easingsliderlite_edit_slideshow',
|
450 |
-
'easingsliderlite_can_customize',
|
451 |
-
'easingsliderlite_edit_settings'
|
452 |
-
);
|
453 |
-
$capabilities = apply_filters( 'easingsliderlite_capabilities', $capabilities );
|
454 |
-
return $capabilities;
|
455 |
-
}
|
456 |
-
|
457 |
-
/**
|
458 |
-
* Manages (adds or removes) user capabilities
|
459 |
-
*
|
460 |
-
* @since 2.0
|
461 |
-
*/
|
462 |
-
public function manage_capabilities( $action ) {
|
463 |
-
|
464 |
-
global $wp_roles;
|
465 |
-
|
466 |
-
/** Get the capabilities */
|
467 |
-
$capabilities = $this->capabilities();
|
468 |
-
|
469 |
-
/** Add capability for each applicable user role */
|
470 |
-
foreach ( $wp_roles->roles as $role => $info ) {
|
471 |
-
$user_role = get_role( $role );
|
472 |
-
foreach ( $capabilities as $capability ) {
|
473 |
-
if ( $action == 'add' )
|
474 |
-
$this->add_capability( $capability, $user_role );
|
475 |
-
elseif ( $action == 'remove' )
|
476 |
-
$this->remove_capability( $capability, $user_role );
|
477 |
-
}
|
478 |
-
}
|
479 |
-
|
480 |
-
}
|
481 |
-
|
482 |
-
/**
|
483 |
-
* Adds a user capability
|
484 |
-
*
|
485 |
-
* @since 2.0
|
486 |
-
*/
|
487 |
-
public function add_capability( $capability, $role ) {
|
488 |
-
if ( $role->has_cap( 'edit_plugins' ) )
|
489 |
-
$role->add_cap( $capability );
|
490 |
-
}
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Removes a user capability
|
494 |
-
*
|
495 |
-
* @since 2.0
|
496 |
-
*/
|
497 |
-
public function remove_capability( $capability, $role ) {
|
498 |
-
if ( $role->has_cap( $capability ) )
|
499 |
-
$role->remove_cap( $capability );
|
500 |
-
}
|
501 |
-
|
502 |
-
/**
|
503 |
-
* Adds the admin menus
|
504 |
-
*
|
505 |
-
* @since 2.0
|
506 |
-
*/
|
507 |
-
public function add_menus() {
|
508 |
-
|
509 |
-
/** Hook suffixs for admin menus */
|
510 |
-
$pages = array( 'easingsliderlite_edit_slideshow', 'easingsliderlite_customizer', 'easingsliderlite_edit_settings' );
|
511 |
-
|
512 |
-
/** Show a dashicon if using the updated admin area */
|
513 |
-
$icon = ( $this->is_updated_admin ) ? 'dashicons-format-gallery' : null;
|
514 |
-
|
515 |
-
/** Toplevel menu */
|
516 |
-
$this->whitelist[] = add_menu_page(
|
517 |
-
__( 'Slideshow', 'easingsliderlite' ),
|
518 |
-
__( 'Slideshow', 'easingsliderlite' ),
|
519 |
-
'easingsliderlite_edit_slideshow',
|
520 |
-
'easingsliderlite_edit_slideshow',
|
521 |
-
null,
|
522 |
-
$icon
|
523 |
-
);
|
524 |
-
|
525 |
-
/** Submenus */
|
526 |
-
$this->whitelist[] = add_submenu_page(
|
527 |
-
'easingsliderlite_edit_slideshow',
|
528 |
-
__( 'Edit Slideshow', 'easingsliderlite' ),
|
529 |
-
__( 'Edit Slideshow', 'easingsliderlite' ),
|
530 |
-
'easingsliderlite_edit_slideshow',
|
531 |
-
'easingsliderlite_edit_slideshow',
|
532 |
-
array( $this, 'edit_slideshow_view' )
|
533 |
-
);
|
534 |
-
$this->whitelist[] = add_submenu_page(
|
535 |
-
'easingsliderlite_edit_slideshow',
|
536 |
-
__( 'Customizer', 'easingsliderlite' ),
|
537 |
-
__( 'Customize', 'easingsliderlite' ),
|
538 |
-
'easingsliderlite_can_customize',
|
539 |
-
'easingsliderlite_customizer',
|
540 |
-
array( $this, 'customizer_view' )
|
541 |
-
);
|
542 |
-
$this->whitelist[] = add_submenu_page(
|
543 |
-
'easingsliderlite_edit_slideshow',
|
544 |
-
__( 'Edit Settings', 'easingsliderlite' ),
|
545 |
-
__( 'Settings', 'easingsliderlite' ),
|
546 |
-
'easingsliderlite_edit_settings',
|
547 |
-
'easingsliderlite_edit_settings',
|
548 |
-
array( $this, 'edit_settings_view' )
|
549 |
-
);
|
550 |
-
|
551 |
-
/** Set flag if we are on one of our own plugin pages */
|
552 |
-
if ( isset( $_GET['page'] ) && in_array( $_GET['page'], $pages ) )
|
553 |
-
$this->is_easingsliderlite_page = true;
|
554 |
-
|
555 |
-
}
|
556 |
-
|
557 |
-
/**
|
558 |
-
* Adds plugin links to the admin bar
|
559 |
-
*
|
560 |
-
* @author Matthew Ruddy
|
561 |
-
* @version 2.0.1
|
562 |
-
*/
|
563 |
-
function add_admin_bar_links() {
|
564 |
-
|
565 |
-
global $wp_admin_bar;
|
566 |
-
|
567 |
-
/** Avoid showing these links when not logged into admin (prevents buddypress bug) */
|
568 |
-
if ( ! is_admin() )
|
569 |
-
return;
|
570 |
-
|
571 |
-
/** Add the new toplevel menu */
|
572 |
-
$wp_admin_bar->add_menu(
|
573 |
-
array(
|
574 |
-
'id' => 'slideshows-top_menu',
|
575 |
-
'title' => __( 'Slideshow', 'easingsliderlite' ),
|
576 |
-
'href' => admin_url( "admin.php?page=easingsliderlite_edit_slideshow" )
|
577 |
-
)
|
578 |
-
);
|
579 |
-
|
580 |
-
/** Add submenu links to our toplevel menu */
|
581 |
-
$wp_admin_bar->add_menu(
|
582 |
-
array(
|
583 |
-
'parent' => 'slideshows-top_menu',
|
584 |
-
'id' => 'edit-slideshow-sub_menu',
|
585 |
-
'title' => __( 'Edit Slideshow', 'easingsliderlite' ),
|
586 |
-
'href' => admin_url( "admin.php?page=easingsliderlite_edit_slideshow" )
|
587 |
-
)
|
588 |
-
);
|
589 |
-
$wp_admin_bar->add_menu(
|
590 |
-
array(
|
591 |
-
'parent' => 'slideshows-top_menu',
|
592 |
-
'id' => 'customizer-sub_menu',
|
593 |
-
'title' => __( 'Customize', 'easingsliderlite' ),
|
594 |
-
'href' => admin_url( "admin.php?page=easingsliderlite_customizer" )
|
595 |
-
)
|
596 |
-
);
|
597 |
-
$wp_admin_bar->add_menu(
|
598 |
-
array(
|
599 |
-
'parent' => 'slideshows-top_menu',
|
600 |
-
'id' => 'edit-settings-sub_menu',
|
601 |
-
'title' => __( 'Settings', 'easingsliderlite' ),
|
602 |
-
'href' => admin_url( "admin.php?page=easingsliderlite_edit_settings" )
|
603 |
-
)
|
604 |
-
);
|
605 |
-
|
606 |
-
}
|
607 |
-
|
608 |
-
/**
|
609 |
-
* Adds a media button (for inserting a slideshow) to the Post Editor
|
610 |
-
*
|
611 |
-
* @since 2.0
|
612 |
-
*/
|
613 |
-
function add_media_button( $editor_id ) {
|
614 |
-
|
615 |
-
/** Load button javascript */
|
616 |
-
?>
|
617 |
-
<script type="text/javascript">
|
618 |
-
function insertSlideshow() {
|
619 |
-
send_to_editor( '[easingsliderlite]' );
|
620 |
-
tb_close();
|
621 |
-
return false;
|
622 |
-
}
|
623 |
-
</script>
|
624 |
-
<?php
|
625 |
-
|
626 |
-
/** Show appropriate button and styling */
|
627 |
-
if ( $this->is_updated_admin ) {
|
628 |
-
|
629 |
-
/** WordPress v3.8+ button */
|
630 |
-
?>
|
631 |
-
<style type="text/css">
|
632 |
-
.insert-slideshow.button .insert-slideshow-icon:before {
|
633 |
-
content: "\f128";
|
634 |
-
font: 400 18px/1 dashicons;
|
635 |
-
speak: none;
|
636 |
-
-webkit-font-smoothing: antialiased;
|
637 |
-
-moz-osx-font-smoothing: grayscale;
|
638 |
-
}
|
639 |
-
</style>
|
640 |
-
<a onClick="insertSlideshow();" class="button insert-slideshow" data-editor="<?php echo esc_attr( $editor_id ); ?>" title="<?php _e( 'Add a slideshow', 'easingsliderlite' ); ?>"><?php echo '<span class="wp-media-buttons-icon insert-slideshow-icon"></span>' . __( ' Add Slideshow', 'easingsliderlite' ); ?></a>
|
641 |
-
<?php
|
642 |
-
|
643 |
-
}
|
644 |
-
else {
|
645 |
-
|
646 |
-
/** Backwards compatibility button */
|
647 |
-
?>
|
648 |
-
<style type="text/css">
|
649 |
-
.insert-slideshow.button .insert-slideshow-icon {
|
650 |
-
width: 16px;
|
651 |
-
height: 16px;
|
652 |
-
margin-top: -1px;
|
653 |
-
margin-left: -1px;
|
654 |
-
margin-right: 4px;
|
655 |
-
display: inline-block;
|
656 |
-
vertical-align: text-top;
|
657 |
-
background: url(<?php echo plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'menu_icon_single_grey.png' ); ?>) no-repeat top left;
|
658 |
-
}
|
659 |
-
</style>
|
660 |
-
<a onClick="insertSlideshow();" class="button insert-slideshow" data-editor="<?php echo esc_attr( $editor_id ); ?>" title="<?php _e( 'Add a slideshow', 'easingsliderlite' ); ?>"><?php echo '<span class="insert-slideshow-icon"></span>' . __( 'Add Slideshow', 'easingsliderlite' ); ?></a>
|
661 |
-
<?php
|
662 |
-
|
663 |
-
}
|
664 |
-
|
665 |
-
}
|
666 |
-
|
667 |
-
/**
|
668 |
-
* Queues an admin message to be displayed
|
669 |
-
*
|
670 |
-
* @since 2.0
|
671 |
-
*/
|
672 |
-
public function queue_message( $text, $type ) {
|
673 |
-
if ( !$this->is_easingsliderlite_page )
|
674 |
-
return;
|
675 |
-
$message = "<div class='message $type'><p>$text</p></div>";
|
676 |
-
add_action( 'admin_notices', create_function( '', 'echo "'. $message .'";' ) );
|
677 |
-
}
|
678 |
-
|
679 |
-
/**
|
680 |
-
* Does security nonce checks
|
681 |
-
*
|
682 |
-
* @since 2.0
|
683 |
-
*/
|
684 |
-
public function security_check( $action, $page ) {
|
685 |
-
if ( check_admin_referer( "easingsliderlite-{$action}_{$page}", "easingsliderlite-{$action}_{$page}" ) )
|
686 |
-
return true;
|
687 |
-
return false;
|
688 |
-
}
|
689 |
-
|
690 |
-
/**
|
691 |
-
* Nonce URL function, polyfill for upcoming trac contribution by me! :)
|
692 |
-
* http://core.trac.wordpress.org/ticket/22423
|
693 |
-
*
|
694 |
-
* @since 2.0
|
695 |
-
*/
|
696 |
-
public function nonce_url( $actionurl, $action, $arg = '_wpnonce' ) {
|
697 |
-
$actionurl = str_replace( '&', '&', $actionurl );
|
698 |
-
return esc_html( add_query_arg( $arg, wp_create_nonce( $action, $actionurl ), $actionurl ) );
|
699 |
-
}
|
700 |
-
|
701 |
-
/**
|
702 |
-
* Does admin actions (if appropriate)
|
703 |
-
*
|
704 |
-
* @since 2.0
|
705 |
-
*/
|
706 |
-
public function do_actions() {
|
707 |
-
|
708 |
-
/** Bail if we aren't on a EasingSliderLite page */
|
709 |
-
if ( !$this->is_easingsliderlite_page )
|
710 |
-
return;
|
711 |
-
|
712 |
-
/** Do admin actions */
|
713 |
-
do_action( "{$_GET['page']}_actions", $_GET['page'] );
|
714 |
-
|
715 |
-
}
|
716 |
-
|
717 |
-
/**
|
718 |
-
* Slideshow based actions
|
719 |
-
*
|
720 |
-
* @since 2.0
|
721 |
-
*/
|
722 |
-
public function do_slideshow_actions( $page ) {
|
723 |
-
|
724 |
-
/** Disable welcome panel if it is dismissed */
|
725 |
-
if ( isset( $_GET['disable_welcome_panel'] ) )
|
726 |
-
update_option( 'easingsliderlite_disable_welcome_panel', filter_var( $_GET['disable_welcome_panel'], FILTER_VALIDATE_BOOLEAN ) );
|
727 |
-
|
728 |
-
/** Save or update a slideshow. Whichever is appropriate. */
|
729 |
-
if ( isset( $_POST['save'] ) ) {
|
730 |
-
|
731 |
-
/** Security check. Page is hardcoded to prevent errors when adding a new slidesow) */
|
732 |
-
if ( !$this->security_check( 'save', 'easingsliderlite_edit_slideshow' ) ) {
|
733 |
-
wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'easingsliderlite' ) );
|
734 |
-
exit();
|
735 |
-
}
|
736 |
-
|
737 |
-
/** Updates the slideshow */
|
738 |
-
update_option( 'easingsliderlite_slideshow',
|
739 |
-
(object) array(
|
740 |
-
'author' => stripslashes_deep( $_POST['author'] ),
|
741 |
-
'slides' => json_decode( stripslashes_deep( $_POST['slides'] ) ), /** Slides are stored as JSON string and need to be decoded before being saved. */
|
742 |
-
'general' => (object) stripslashes_deep( $_POST['general'] ),
|
743 |
-
'dimensions' => (object) stripslashes_deep( $_POST['dimensions'] ),
|
744 |
-
'transitions' => (object) stripslashes_deep( $_POST['transitions'] ),
|
745 |
-
'navigation' => (object) stripslashes_deep( $_POST['navigation'] ),
|
746 |
-
'playback' => (object) stripslashes_deep( $_POST['playback'] )
|
747 |
-
)
|
748 |
-
);
|
749 |
-
|
750 |
-
/** Return success message */
|
751 |
-
return $this->queue_message( __( 'Slideshow has been <strong>saved</strong> successfully.', 'easingsliderlite' ), 'updated' );
|
752 |
-
|
753 |
-
}
|
754 |
-
|
755 |
-
}
|
756 |
-
|
757 |
-
/**
|
758 |
-
* Customization page actions
|
759 |
-
*
|
760 |
-
* @since 2.1
|
761 |
-
*/
|
762 |
-
public function do_customizer_actions( $page ) {
|
763 |
-
|
764 |
-
/** Save customizations */
|
765 |
-
if ( isset( $_POST['save'] ) ) {
|
766 |
-
|
767 |
-
/** Security check */
|
768 |
-
if ( !$this->security_check( 'save', $page ) ) {
|
769 |
-
wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'easingsliderlite' ) );
|
770 |
-
exit();
|
771 |
-
}
|
772 |
-
|
773 |
-
/** Save the customizations */
|
774 |
-
update_option( 'easingsliderlite_customizations',
|
775 |
-
EasingSliderLite::get_instance()->validate( (object) array(
|
776 |
-
'arrows' => (object) $_POST['arrows'],
|
777 |
-
'pagination' => (object) $_POST['pagination'],
|
778 |
-
'border' => (object) $_POST['border'],
|
779 |
-
'shadow' => (object) $_POST['shadow']
|
780 |
-
) )
|
781 |
-
);
|
782 |
-
|
783 |
-
}
|
784 |
-
|
785 |
-
}
|
786 |
-
|
787 |
-
/**
|
788 |
-
* Settings page actions
|
789 |
-
*
|
790 |
-
* @since 2.0
|
791 |
-
*/
|
792 |
-
public function do_settings_actions( $page ) {
|
793 |
-
|
794 |
-
/** Reset plugin */
|
795 |
-
if ( isset( $_POST['reset'] ) ) {
|
796 |
-
|
797 |
-
/** Security check */
|
798 |
-
if ( !$this->security_check( 'reset', $page ) ) {
|
799 |
-
wp_die( __( 'Security check has failed. Reset has been prevented. Please try again.', 'easingsliderlite' ) );
|
800 |
-
exit();
|
801 |
-
}
|
802 |
-
|
803 |
-
/** Do reset */
|
804 |
-
$this->uninstall();
|
805 |
-
$this->activate();
|
806 |
-
|
807 |
-
/** Queue message */
|
808 |
-
return $this->queue_message( __( 'Plugin has been reset successfully.', 'easingsliderlite' ), 'updated' );
|
809 |
-
|
810 |
-
}
|
811 |
-
|
812 |
-
/** Save the settings */
|
813 |
-
if ( isset( $_POST['save'] ) ) {
|
814 |
-
|
815 |
-
/** Security check */
|
816 |
-
if ( !$this->security_check( 'save', $page ) ) {
|
817 |
-
wp_die( __( 'Security check has failed. Save has been prevented. Please try again.', 'easingsliderlite' ) );
|
818 |
-
exit();
|
819 |
-
}
|
820 |
-
|
821 |
-
/** Get settings and do some validation */
|
822 |
-
$settings = $this->validate( $_POST['settings'] );
|
823 |
-
|
824 |
-
/** Update database option and get response */
|
825 |
-
update_option( 'easingsliderlite_settings', stripslashes_deep( $settings ) );
|
826 |
-
|
827 |
-
/** Show update message */
|
828 |
-
return $this->queue_message( __( 'Settings have been <strong>saved</strong> successfully.', 'easingsliderlite' ), 'updated' );
|
829 |
-
|
830 |
-
}
|
831 |
-
|
832 |
-
}
|
833 |
-
|
834 |
-
/**
|
835 |
-
* Does validation
|
836 |
-
*
|
837 |
-
* @since 2.0
|
838 |
-
*/
|
839 |
-
public function validate( $values ) {
|
840 |
-
|
841 |
-
/** Object flag */
|
842 |
-
$is_object = ( is_object( $values ) ) ? true : false;
|
843 |
-
|
844 |
-
/** Convert objects to arrays */
|
845 |
-
if ( $is_object )
|
846 |
-
$values = (array) $values;
|
847 |
-
|
848 |
-
/** Get settings and do some validation */
|
849 |
-
foreach ( $values as $key => $value ) {
|
850 |
-
|
851 |
-
/** Validators */
|
852 |
-
if ( is_numeric( $value ) )
|
853 |
-
$values[ $key ] = filter_var( $value, FILTER_VALIDATE_INT );
|
854 |
-
elseif ( $value === 'true' || $value === 'false' )
|
855 |
-
$values[ $key ] = filter_var( $value, FILTER_VALIDATE_BOOLEAN );
|
856 |
-
|
857 |
-
/** Recurse if necessary */
|
858 |
-
if ( is_object( $value ) || is_array( $value ) )
|
859 |
-
$values[ $key ] = $this->validate( $value );
|
860 |
-
|
861 |
-
}
|
862 |
-
|
863 |
-
/** Convert back to an object */
|
864 |
-
if ( $is_object )
|
865 |
-
$values = (object) $values;
|
866 |
-
|
867 |
-
return stripslashes_deep( $values );
|
868 |
-
|
869 |
-
}
|
870 |
-
|
871 |
-
/**
|
872 |
-
* Executes a shortcode handler
|
873 |
-
*
|
874 |
-
* @since 2.0
|
875 |
-
*/
|
876 |
-
public function do_shortcode() {
|
877 |
-
|
878 |
-
/** Get the slideshow */
|
879 |
-
$slideshow = ESL_Slideshow::get_instance()->display_slideshow();
|
880 |
-
|
881 |
-
/** Display the slideshow (or error message if it doesn't exist) */
|
882 |
-
if ( is_wp_error( $slideshow ) )
|
883 |
-
return $slideshow->get_error_message();
|
884 |
-
else
|
885 |
-
return trim( $slideshow );
|
886 |
-
|
887 |
-
}
|
888 |
-
|
889 |
-
/**
|
890 |
-
* Adds our admin specific body classes
|
891 |
-
*
|
892 |
-
* @since 2.1.3
|
893 |
-
*/
|
894 |
-
public function admin_body_classes( $classes ) {
|
895 |
-
|
896 |
-
/** Add a reference to the new-look flat WordPress admin area if appropriate */
|
897 |
-
if ( $this->is_updated_admin ) {
|
898 |
-
$classes .= ' easingsliderlite-updated-admin ';
|
899 |
-
}
|
900 |
-
|
901 |
-
return $classes;
|
902 |
-
|
903 |
-
}
|
904 |
-
|
905 |
-
/**
|
906 |
-
* Register all admin stylesheets
|
907 |
-
*
|
908 |
-
* @since 2.1
|
909 |
-
*/
|
910 |
-
public function register_all_styles() {
|
911 |
-
|
912 |
-
/** Get the extension */
|
913 |
-
$ext = ( apply_filters( 'easingsliderlite_debug_styles', __return_false() ) === true ) ? '.css' : '.min.css';
|
914 |
-
|
915 |
-
/** Register styles */
|
916 |
-
wp_register_style( 'esl-admin', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'admin'. $ext ), false, self::$version );
|
917 |
-
wp_register_style( 'esl-slideshow', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'css'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, self::$version );
|
918 |
-
|
919 |
-
}
|
920 |
-
|
921 |
-
/**
|
922 |
-
* Register all admin scripts
|
923 |
-
*
|
924 |
-
* @since 2.1
|
925 |
-
*/
|
926 |
-
public function register_all_scripts() {
|
927 |
-
|
928 |
-
/** Get the extension */
|
929 |
-
$ext = ( apply_filters( 'easingsliderlite_debug_scripts', __return_false() ) ) ? '.js' : '.min.js';
|
930 |
-
|
931 |
-
/** Register scripts */
|
932 |
-
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 );
|
933 |
-
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 );
|
934 |
-
wp_register_script( 'esl-slideshow', plugins_url( dirname( plugin_basename( self::get_file() ) ) . DIRECTORY_SEPARATOR .'js'. DIRECTORY_SEPARATOR .'slideshow'. $ext ), false, self::$version );
|
935 |
-
|
936 |
-
}
|
937 |
-
|
938 |
-
/**
|
939 |
-
* Loads admin stylesheets
|
940 |
-
*
|
941 |
-
* @since 2.0
|
942 |
-
*/
|
943 |
-
public function enqueue_admin_styles( $hook ) {
|
944 |
-
|
945 |
-
/** Bail if not an Easing Slider "Lite" page */
|
946 |
-
if ( !in_array( $hook, $this->whitelist ) )
|
947 |
-
return;
|
948 |
-
|
949 |
-
/** Load dashicons if using the new flat administration area */
|
950 |
-
if ( $this->is_updated_admin ) {
|
951 |
-
wp_enqueue_style( 'dashicons' );
|
952 |
-
}
|
953 |
-
|
954 |
-
/** Load styles */
|
955 |
-
wp_enqueue_style( 'esl-admin' );
|
956 |
-
do_action( 'easingsliderlite_enqueue_admin_styles' );
|
957 |
-
|
958 |
-
}
|
959 |
-
|
960 |
-
/**
|
961 |
-
* Loads admin javascript files
|
962 |
-
*
|
963 |
-
* @since 2.0
|
964 |
-
*/
|
965 |
-
public function enqueue_admin_scripts( $hook ) {
|
966 |
-
|
967 |
-
/** Bail if not an Easing Slider "Lite" page */
|
968 |
-
if ( !in_array( $hook, $this->whitelist ) )
|
969 |
-
return;
|
970 |
-
|
971 |
-
/** Print Localized variables */
|
972 |
-
wp_localize_script( 'esl-admin', 'easingsliderlite', $this->localizations() );
|
973 |
-
|
974 |
-
/** Load scripts */
|
975 |
-
wp_enqueue_media();
|
976 |
-
wp_enqueue_script( 'esl-admin' );
|
977 |
-
do_action( 'easingsliderlite_enqueue_admin_scripts' );
|
978 |
-
|
979 |
-
}
|
980 |
-
|
981 |
-
/**
|
982 |
-
* Translations localized via Javascript
|
983 |
-
*
|
984 |
-
* @since 2.0
|
985 |
-
*/
|
986 |
-
public function localizations() {
|
987 |
-
return array(
|
988 |
-
'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( self::get_file() ) ) .'/',
|
989 |
-
'warn' => __( 'Are you sure you wish to do this? This cannot be reversed.', 'easingsliderlite' ),
|
990 |
-
'delete_image' => __( 'Are you sure you wish to delete this image? This cannot be reversed.', 'easingsliderlite' ),
|
991 |
-
'delete_images' => __( 'Are you sure you wish to delete all of this slideshows images? This cannot be reversed.', 'easingsliderlite' ),
|
992 |
-
'media_upload' => array(
|
993 |
-
'title' => __( 'Add Images to Slideshow', 'easingsliderlite' ),
|
994 |
-
'button' => __( 'Insert into slideshow', 'easingsliderlite' ),
|
995 |
-
'change' => __( 'Use this image', 'easingsliderlite' ),
|
996 |
-
'discard_changes' => __( 'Are you sure you wish to discard changes?', 'easingsliderlite' )
|
997 |
-
)
|
998 |
-
);
|
999 |
-
}
|
1000 |
-
|
1001 |
-
/**
|
1002 |
-
* Prints the backbone templates used in the admin area
|
1003 |
-
*
|
1004 |
-
* @since 2.0
|
1005 |
-
*/
|
1006 |
-
public function print_backbone_templates() {
|
1007 |
-
|
1008 |
-
/** Bail if not a EasingSliderLite page */
|
1009 |
-
if ( !$this->is_easingsliderlite_page )
|
1010 |
-
return;
|
1011 |
-
|
1012 |
-
/** Slide template */
|
1013 |
-
echo '<script type="text/html" id="tmpl-slide">';
|
1014 |
-
require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow-thumbnail.php';
|
1015 |
-
echo '</script>';
|
1016 |
-
|
1017 |
-
/** Slide editor template */
|
1018 |
-
echo '<script type="text/html" id="tmpl-edit-slide">';
|
1019 |
-
require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow-slide.php';
|
1020 |
-
echo '</script>';
|
1021 |
-
|
1022 |
-
/** Media Library custom sidebar */
|
1023 |
-
echo '<script type="text/html" id="tmpl-media-details">';
|
1024 |
-
require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow-media-details.php';
|
1025 |
-
echo '</script>';
|
1026 |
-
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
/**
|
1030 |
-
* Edit a slideshow view
|
1031 |
-
*
|
1032 |
-
* @since 2.0
|
1033 |
-
*/
|
1034 |
-
public function edit_slideshow_view() {
|
1035 |
-
|
1036 |
-
/** Load the edit view template */
|
1037 |
-
require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editslideshow.php';
|
1038 |
-
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
/**
|
1042 |
-
* Customizer view
|
1043 |
-
*
|
1044 |
-
* @since 2.1
|
1045 |
-
*/
|
1046 |
-
public function customizer_view() {
|
1047 |
-
|
1048 |
-
/** Load the customizer view template */
|
1049 |
-
require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'customizer.php';
|
1050 |
-
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
/**
|
1054 |
-
* Edit settings view
|
1055 |
-
*
|
1056 |
-
* @since 2.0
|
1057 |
-
*/
|
1058 |
-
public function edit_settings_view() {
|
1059 |
-
|
1060 |
-
/** Load the edit settings view */
|
1061 |
-
require dirname( self::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'editsettings.php';
|
1062 |
-
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
/**
|
1068 |
-
* Slideshow helper function
|
1069 |
-
*
|
1070 |
-
* @author Matthew Ruddy
|
1071 |
-
* @since 2.0
|
1072 |
-
*/
|
1073 |
-
if ( !function_exists( 'easingsliderlite' ) ) {
|
1074 |
-
function easingsliderlite() {
|
1075 |
-
echo ESL_Slideshow::get_instance()->display_slideshow();
|
1076 |
-
}
|
1077 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
images/banner-easingsliderpro.png
DELETED
Binary file
|
images/banner-rocketgalleries.png
DELETED
Binary file
|
images/delete_icon.png
DELETED
Binary file
|
images/delete_icon@2x.png
DELETED
Binary file
|
images/easingslider-badge.jpg
ADDED
Binary file
|
images/edit_icon.png
DELETED
Binary file
|
images/edit_icon@2x.png
DELETED
Binary file
|
images/function-screenshot.jpg
ADDED
Binary file
|
images/interface-screenshot.jpg
ADDED
Binary file
|
images/list-screenshot.jpg
ADDED
Binary file
|
images/loading.gif
CHANGED
File without changes
|
images/menu_icon.png
DELETED
Binary file
|
images/menu_icon_2x.png
DELETED
Binary file
|
images/menu_icon_single.png
DELETED
Binary file
|
images/menu_icon_single_grey.png
DELETED
Binary file
|
images/{slideshow_arrow_next.png → nav-arrow-next.png}
RENAMED
File without changes
|
images/{slideshow_arrow_prev.png → nav-arrow-prev.png}
RENAMED
File without changes
|
images/{slideshow_icon_active.png → nav-icon-active.png}
RENAMED
File without changes
|
images/{slideshow_icon_inactive.png → nav-icon-inactive.png}
RENAMED
File without changes
|
images/{slideshow_shadow.png → shadow.png}
RENAMED
File without changes
|
images/shortcode-screenshot.jpg
ADDED
Binary file
|
images/trash.png
DELETED
Binary file
|
images/trash@2x.png
DELETED
Binary file
|
images/welcome-screenshot.jpg
ADDED
Binary file
|
images/widget-screenshot.jpg
ADDED
Binary file
|
includes/Legacy.php
DELETED
@@ -1,259 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Legacy plugin functionality.
|
5 |
-
* All v1.x related functionality is located here.
|
6 |
-
*
|
7 |
-
* @author Matthew Ruddy
|
8 |
-
* @since 2.1.1
|
9 |
-
*/
|
10 |
-
class ESL_Legacy {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Parent class object
|
14 |
-
*
|
15 |
-
* @since 2.1.1
|
16 |
-
*/
|
17 |
-
private static $class;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Initialize legacy functionality
|
21 |
-
*
|
22 |
-
* @since 2.1.1
|
23 |
-
*/
|
24 |
-
public static final function init( $class ) {
|
25 |
-
|
26 |
-
global $pagenow;
|
27 |
-
|
28 |
-
/** Store parent */
|
29 |
-
self::$class = $class;
|
30 |
-
|
31 |
-
/** Hook old shortcodes */
|
32 |
-
add_shortcode( 'rivasliderlite', array( $class, 'do_shortcode' ) );
|
33 |
-
add_shortcode( 'easingslider', array( $class, 'do_shortcode' ) );
|
34 |
-
|
35 |
-
/** Continue only if there are legacy settings to act upon */
|
36 |
-
if ( get_option( 'easingslider_version' ) || get_option( 'activation' ) || get_option( 'sImg1' ) ) {
|
37 |
-
|
38 |
-
/** Import settings admin notice */
|
39 |
-
if ( $pagenow == 'plugins.php' && !get_option( 'easingsliderlite_major_upgrade' ) )
|
40 |
-
add_action( 'admin_notices', create_function( '', '_e( "<div class=\'message updated\'><p>Don\'t forget to import your old Easing Slider settings. <a href=\'admin.php?page=easingsliderlite_edit_slideshow\'>Click here.</a></p></div>", "easingsliderlite" );' ) );
|
41 |
-
|
42 |
-
/** Hook actions */
|
43 |
-
add_action( 'easingsliderlite_edit_slideshow_actions', array( __CLASS__, 'do_legacy_import' ) );
|
44 |
-
add_action( 'easingsliderlite_edit_settings_actions', array( __CLASS__, 'do_legacy_import' ) );
|
45 |
-
add_action( 'easingsliderlite_edit_settings_actions', array( __CLASS__, 'do_legacy_remove' ) );
|
46 |
-
add_action( 'easingsliderlite_welcome_panel_before', array( __CLASS__, 'print_legacy_message' ) );
|
47 |
-
add_action( 'easingsliderlite_settings_after', array( __CLASS__, 'print_legacy_settings_field' ), 10, 2 );
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Imports old settings from the old Easing Slider plugin (v1.x).
|
55 |
-
* We don't do this automatically in the ESL_Upgrade class. Instead, we give the user the choice through the 'Edit Slideshow' panel.
|
56 |
-
* This is because users were having issues with the plugin deactivating after upgrade, failing to fire the automatic process.
|
57 |
-
* Although this solution isn't ideal, it is the best failsafe.
|
58 |
-
*
|
59 |
-
* @since 2.1.1
|
60 |
-
*/
|
61 |
-
public static final function legacy_import() {
|
62 |
-
|
63 |
-
/** Reset the plugin */
|
64 |
-
EasingSliderLite::get_instance()->uninstall();
|
65 |
-
EasingSliderLite::get_instance()->activate();
|
66 |
-
|
67 |
-
/** Get default slideshow settings */
|
68 |
-
$slideshow = EasingSliderLite::get_instance()->slideshow_defaults();
|
69 |
-
|
70 |
-
/** Transfer the settings */
|
71 |
-
$slideshow->dimensions->width = get_option( 'width' );
|
72 |
-
$slideshow->dimensions->height = get_option( 'height' );
|
73 |
-
$slideshow->dimensions->responsive = false;
|
74 |
-
$slideshow->transitions->effect = ( get_option( 'transition' ) == 'fade' ) ? 'fade' : 'slide';
|
75 |
-
$slideshow->transitions->duration = get_option( 'transpeed' );
|
76 |
-
$slideshow->navigation->arrows = ( get_option( 'buttons' ) == '' ) ? 'false' : 'true';
|
77 |
-
$slideshow->navigation->pagination = ( get_option( 'sPagination' ) == '' ) ? 'false' : 'true';
|
78 |
-
$slideshow->playback->pause = get_option( 'interval' );
|
79 |
-
|
80 |
-
/** Add the slides */
|
81 |
-
$slideshow->slides = array();
|
82 |
-
for ( $i = 1; $i <= 10; $i++ ) {
|
83 |
-
|
84 |
-
/** Check if the slide has an image. Bail if not. */
|
85 |
-
$image = get_option( "sImg{$i}" );
|
86 |
-
if ( empty( $image ) )
|
87 |
-
continue;
|
88 |
-
|
89 |
-
/** Resize the image and get its thumbnail */
|
90 |
-
$sizes = (object) array(
|
91 |
-
'thumbnail' => (object) array(
|
92 |
-
'url' => $image
|
93 |
-
)
|
94 |
-
);
|
95 |
-
|
96 |
-
/** Add the slide image & link */
|
97 |
-
$slideshow->slides[] = (object) array(
|
98 |
-
'id' => $i,
|
99 |
-
'url' => $image,
|
100 |
-
'alt' => null,
|
101 |
-
'title' => null,
|
102 |
-
'link' => get_option( "sImgLink{$i}" ),
|
103 |
-
'linkTarget' => '_blank',
|
104 |
-
'sizes' => $sizes
|
105 |
-
);
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
/** Update the slideshow settings */
|
110 |
-
update_option( 'easingsliderlite_slideshow', $slideshow );
|
111 |
-
|
112 |
-
/** Flag upgrade */
|
113 |
-
update_option( 'easingsliderlite_major_upgrade', 1 );
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Does a legacy settings import
|
119 |
-
*
|
120 |
-
* @since 2.1.1
|
121 |
-
*/
|
122 |
-
public static final function do_legacy_import( $page ) {
|
123 |
-
|
124 |
-
/** Imports legacy Easing Slider setting */
|
125 |
-
if ( isset( $_POST['legacy-import'] ) ) {
|
126 |
-
|
127 |
-
/** Security check */
|
128 |
-
if ( !self::$class->security_check( 'legacy-import', $page ) ) {
|
129 |
-
wp_die( __( 'Security check has failed. Import has been prevented. Please try again.', 'easingsliderlite' ) );
|
130 |
-
exit();
|
131 |
-
}
|
132 |
-
|
133 |
-
/** Do upgrade (thus importing settings) */
|
134 |
-
self::legacy_import();
|
135 |
-
|
136 |
-
/** Queue message */
|
137 |
-
return self::$class->queue_message( __( 'Easing Slider settings have been imported.', 'easingsliderlite' ), 'updated' );
|
138 |
-
|
139 |
-
}
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Does the removal of legacy settings
|
145 |
-
*
|
146 |
-
* @since 2.1.1
|
147 |
-
*/
|
148 |
-
public static final function do_legacy_remove( $page ) {
|
149 |
-
|
150 |
-
/** Removes legacy Easing Slider settings */
|
151 |
-
if ( isset( $_POST['legacy-remove'] ) ) {
|
152 |
-
|
153 |
-
/** Security check */
|
154 |
-
if ( !self::$class->security_check( 'legacy-remove', $page ) ) {
|
155 |
-
wp_die( __( 'Security check has failed. Removal has been prevented. Please try again.', 'easingsliderlite' ) );
|
156 |
-
exit();
|
157 |
-
}
|
158 |
-
|
159 |
-
/** Horrific amount of options. God I was bad back then! */
|
160 |
-
$options = array(
|
161 |
-
'sImg1', 'sImg2', 'sImg3', 'sImg4', 'sImg5', 'sImg6', 'sImg7', 'sImg8', 'sImg9', 'sImg10',
|
162 |
-
'sImglink1', 'sImglink2', 'sImglink3', 'sImglink4', 'sImglink5', 'sImglink6', 'sImglink7', 'sImglink8', 'sImglink9', 'sImglink10',
|
163 |
-
'activation', 'width', 'height', 'shadow', 'interval', 'transition', 'bgcolour', 'transpeed', 'bwidth', 'bcolour', 'preload', 'starts',
|
164 |
-
'buttons', 'source', 'featcat', 'featpost', 'padbottom', 'padleft', 'padright', 'paddingtop', 'shadowstyle', 'paginationon', 'paginationoff',
|
165 |
-
'next', 'prev', 'pageposition', 'pageside', 'permalink', 'jquery', 'easingslider_version'
|
166 |
-
);
|
167 |
-
|
168 |
-
/** Delete the options */
|
169 |
-
foreach ( $options as $option )
|
170 |
-
delete_option( $option );
|
171 |
-
|
172 |
-
/** Queue message */
|
173 |
-
return self::$class->queue_message( __( 'Easing Slider settings have been permanently deleted!', 'easingsliderlite' ), 'updated' );
|
174 |
-
|
175 |
-
}
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Prints the legacy settings warning message in the "Welcome" panel.
|
180 |
-
*
|
181 |
-
* @since 2.1.1
|
182 |
-
*/
|
183 |
-
public static final function print_legacy_message() {
|
184 |
-
|
185 |
-
/** Display import legacy settings message in welcome panel */
|
186 |
-
if ( !get_option( 'easingsliderlite_major_upgrade' ) ) :
|
187 |
-
?>
|
188 |
-
<div class="welcome-panel-content">
|
189 |
-
<?php
|
190 |
-
/** Security field */
|
191 |
-
wp_nonce_field( "easingsliderlite-legacy-import_{$_GET['page']}", "easingsliderlite-legacy-import_{$_GET['page']}", false );
|
192 |
-
?>
|
193 |
-
<h2><?php _e( 'Legacy Settings Detected', 'easingsliderlite' ); ?></h2>
|
194 |
-
<p class="about-description">
|
195 |
-
<?php _e( 'Click the button below to import your settings from Easing Slider v1.x', 'easingsliderlite' ); ?>
|
196 |
-
</p>
|
197 |
-
<div class="welcome-panel-column-container">
|
198 |
-
<div class="welcome-panel-column">
|
199 |
-
<h4><?php _e( 'Import your old settings', 'easingsliderlite' ); ?></h4>
|
200 |
-
<input type="submit" name="legacy-import" class="button button-primary button-hero" value="<?php _e( 'Import my v1.x Easing Slider settings.', 'easingsliderlite' ); ?>">
|
201 |
-
</div>
|
202 |
-
</div>
|
203 |
-
</div>
|
204 |
-
<div class="divider"></div>
|
205 |
-
<?php
|
206 |
-
endif;
|
207 |
-
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Prints the legacy settings options fields in the "Settings" panel.
|
212 |
-
*
|
213 |
-
* @since 2.1.1
|
214 |
-
*/
|
215 |
-
public static final function print_legacy_settings_field( $settings, $page ) {
|
216 |
-
|
217 |
-
/** Display field related to legacy settings in "Settings" admin panel */
|
218 |
-
?>
|
219 |
-
<h3><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></h3>
|
220 |
-
<table class="form-table main-settings">
|
221 |
-
<tbody>
|
222 |
-
<tr valign="top">
|
223 |
-
<?php
|
224 |
-
/** Security nonce fields */
|
225 |
-
wp_nonce_field( "easingsliderlite-legacy-import_{$_GET['page']}", "easingsliderlite-legacy-import_{$_GET['page']}", false );
|
226 |
-
wp_nonce_field( "easingsliderlite-legacy-remove_{$_GET['page']}", "easingsliderlite-legacy-remove_{$_GET['page']}", false );
|
227 |
-
?>
|
228 |
-
<th scope="row"><label><?php _e( 'Legacy Settings', 'easingsliderlite' ); ?></label></th>
|
229 |
-
<td>
|
230 |
-
<input type="submit" name="legacy-import" class="button button-primary warn" value="<?php _e( 'Import v1.x Settings', 'easingsliderlite' ); ?>">
|
231 |
-
<input type="submit" name="legacy-remove" class="button button-secondary warn" value="<?php _e( 'Remove v1.x Settings', 'easingsliderlite' ); ?>">
|
232 |
-
<p class="description"><?php _e( 'These buttons allow you to import and remove your old Easing Slider v1.x settings. Only remove them if you are sure you will not be downgrading the plugin in the future.', 'easingsliderlite' ); ?></p>
|
233 |
-
</td>
|
234 |
-
</tr>
|
235 |
-
</tbody>
|
236 |
-
</table>
|
237 |
-
|
238 |
-
<div class="divider"></div>
|
239 |
-
<?php
|
240 |
-
|
241 |
-
}
|
242 |
-
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Handy helper & legacy functions for displaying a slideshow
|
247 |
-
*
|
248 |
-
* @since 2.1.1
|
249 |
-
*/
|
250 |
-
if ( !function_exists( 'rivasliderlite' ) ) {
|
251 |
-
function rivasliderlite() {
|
252 |
-
echo ESL_Slideshow::get_instance()->display_slideshow();
|
253 |
-
}
|
254 |
-
}
|
255 |
-
if ( !function_exists( 'easing_slider' ) ) {
|
256 |
-
function easing_slider() {
|
257 |
-
echo ESL_Slideshow::get_instance()->display_slideshow();
|
258 |
-
}
|
259 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Resize.php
DELETED
@@ -1,181 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Our custom image resizing class (no Timthumb here!)
|
5 |
-
*
|
6 |
-
* @author Matthew Ruddy
|
7 |
-
* @since 2.0
|
8 |
-
*/
|
9 |
-
add_action( 'delete_attachment', array( 'ESL_Resize', 'destroy' ) );
|
10 |
-
class ESL_Resize {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Main resizing function
|
14 |
-
*
|
15 |
-
* @since 2.0
|
16 |
-
*/
|
17 |
-
public static function resize( $url, $width, $height, $crop = true, $retina = false ) {
|
18 |
-
|
19 |
-
global $wpdb;
|
20 |
-
|
21 |
-
if ( empty( $url ) )
|
22 |
-
return new WP_Error( 'no_image_url', __( 'No image URL has been entered.' ), $url );
|
23 |
-
|
24 |
-
/** Allow for different retina sizes */
|
25 |
-
$retina = $retina ? ( $retina === true ? 2 : $retina ) : 1;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Bail if this image isn't in the Media Library.
|
29 |
-
* We only want to resize Media Library images, so we can be sure they get deleted correctly when appropriate.
|
30 |
-
*/
|
31 |
-
$query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE guid='%s'", $url );
|
32 |
-
$get_attachment = $wpdb->get_results( $query );
|
33 |
-
if ( !$get_attachment )
|
34 |
-
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
35 |
-
|
36 |
-
/** Get the image file path */
|
37 |
-
$file_path = parse_url( $url );
|
38 |
-
$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];
|
39 |
-
|
40 |
-
/** Check for Multisite */
|
41 |
-
if ( is_multisite() ) {
|
42 |
-
global $blog_id;
|
43 |
-
$blog_details = get_blog_details( $blog_id );
|
44 |
-
$file_path = str_replace( $blog_details->path . 'files/', '/wp-content/blogs.dir/'. $blog_id .'/files/', $file_path );
|
45 |
-
}
|
46 |
-
|
47 |
-
/** Destination width and height variables */
|
48 |
-
$dest_width = $width * $retina;
|
49 |
-
$dest_height = $height * $retina;
|
50 |
-
|
51 |
-
/** File name suffix (appended to original file name) */
|
52 |
-
$suffix = "{$dest_width}x{$dest_height}";
|
53 |
-
|
54 |
-
/** Some additional info about the image */
|
55 |
-
$info = pathinfo( $file_path );
|
56 |
-
$dir = $info['dirname'];
|
57 |
-
$ext = $info['extension'];
|
58 |
-
$name = wp_basename( $file_path, ".$ext" );
|
59 |
-
|
60 |
-
/** Suffix applied to filename */
|
61 |
-
$suffix = "{$dest_width}x{$dest_height}";
|
62 |
-
|
63 |
-
/** Get the destination file name */
|
64 |
-
$dest_file_name = "{$dir}/{$name}-{$suffix}.{$ext}";
|
65 |
-
|
66 |
-
if ( !file_exists( $dest_file_name ) ) {
|
67 |
-
|
68 |
-
/** Load Wordpress Image Editor */
|
69 |
-
$editor = wp_get_image_editor( $file_path );
|
70 |
-
if ( is_wp_error( $editor ) )
|
71 |
-
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
72 |
-
|
73 |
-
/** Get the original image size */
|
74 |
-
$size = $editor->get_size();
|
75 |
-
$orig_width = $size['width'];
|
76 |
-
$orig_height = $size['height'];
|
77 |
-
|
78 |
-
$src_x = $src_y = 0;
|
79 |
-
$src_w = $orig_width;
|
80 |
-
$src_h = $orig_height;
|
81 |
-
|
82 |
-
if ( $crop ) {
|
83 |
-
|
84 |
-
$cmp_x = $orig_width / $dest_width;
|
85 |
-
$cmp_y = $orig_height / $dest_height;
|
86 |
-
|
87 |
-
/** Calculate x or y coordinate, and width or height of source */
|
88 |
-
if ( $cmp_x > $cmp_y ) {
|
89 |
-
$src_w = round( $orig_width / $cmp_x * $cmp_y );
|
90 |
-
$src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 );
|
91 |
-
}
|
92 |
-
else if ( $cmp_y > $cmp_x ) {
|
93 |
-
$src_h = round( $orig_height / $cmp_y * $cmp_x );
|
94 |
-
$src_y = round( ( $orig_height - ( $orig_height / $cmp_y * $cmp_x ) ) / 2 );
|
95 |
-
}
|
96 |
-
|
97 |
-
}
|
98 |
-
|
99 |
-
/** Time to crop the image! */
|
100 |
-
$editor->crop( $src_x, $src_y, $src_w, $src_h, $dest_width, $dest_height );
|
101 |
-
|
102 |
-
/** Now let's save the image */
|
103 |
-
$saved = $editor->save( $dest_file_name );
|
104 |
-
|
105 |
-
/** Get resized image information */
|
106 |
-
$resized_url = str_replace( basename( $url ), basename( $saved['path'] ), $url );
|
107 |
-
$resized_width = $saved['width'];
|
108 |
-
$resized_height = $saved['height'];
|
109 |
-
$resized_type = $saved['mime-type'];
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Add the resized dimensions to original image metadata
|
113 |
-
* (so we can delete our resized images when the original image is delete from the Media Library)
|
114 |
-
*/
|
115 |
-
$metadata = wp_get_attachment_metadata( $get_attachment[0]->ID );
|
116 |
-
if ( isset( $metadata['image_meta'] ) ) {
|
117 |
-
$metadata['image_meta']['resized_images'][] = $resized_width .'x'. $resized_height;
|
118 |
-
wp_update_attachment_metadata( $get_attachment[0]->ID, $metadata );
|
119 |
-
}
|
120 |
-
|
121 |
-
/** Create the image array */
|
122 |
-
$resized_image = array(
|
123 |
-
'url' => $resized_url,
|
124 |
-
'width' => $resized_width,
|
125 |
-
'height' => $resized_height,
|
126 |
-
'type' => $resized_type
|
127 |
-
);
|
128 |
-
|
129 |
-
}
|
130 |
-
else {
|
131 |
-
$resized_image = array(
|
132 |
-
'url' => str_replace( basename( $url ), basename( $dest_file_name ), $url ),
|
133 |
-
'width' => $dest_width,
|
134 |
-
'height' => $dest_height,
|
135 |
-
'type' => $ext
|
136 |
-
);
|
137 |
-
}
|
138 |
-
|
139 |
-
/** And we're done! */
|
140 |
-
return $resized_image;
|
141 |
-
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Deletes any resized image (from above function) when the original image is deleted from the Wordpress Media Library.
|
146 |
-
*
|
147 |
-
* @since 2.0
|
148 |
-
*/
|
149 |
-
public static function destroy( $post_id ) {
|
150 |
-
|
151 |
-
// Get attachment image metadata
|
152 |
-
$metadata = wp_get_attachment_metadata( $post_id );
|
153 |
-
if ( !$metadata )
|
154 |
-
return;
|
155 |
-
|
156 |
-
// Do some bailing if we cannot continue
|
157 |
-
if ( !isset( $metadata['file'] ) || !isset( $metadata['image_meta']['resized_images'] ) )
|
158 |
-
return;
|
159 |
-
$pathinfo = pathinfo( $metadata['file'] );
|
160 |
-
$resized_images = $metadata['image_meta']['resized_images'];
|
161 |
-
|
162 |
-
// Get Wordpress uploads directory (and bail if it doesn't exist)
|
163 |
-
$wp_upload_dir = wp_upload_dir();
|
164 |
-
$upload_dir = $wp_upload_dir['basedir'];
|
165 |
-
if ( !is_dir( $upload_dir ) )
|
166 |
-
return;
|
167 |
-
|
168 |
-
// Delete the resized images
|
169 |
-
foreach ( $resized_images as $dims ) {
|
170 |
-
|
171 |
-
// Get the resized images filename
|
172 |
-
$file = $upload_dir .'/'. $pathinfo['dirname'] .'/'. $pathinfo['filename'] .'-'. $dims .'.'. $pathinfo['extension'];
|
173 |
-
|
174 |
-
// Delete the resized image
|
175 |
-
@unlink( $file );
|
176 |
-
|
177 |
-
}
|
178 |
-
|
179 |
-
}
|
180 |
-
|
181 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Slideshow.php
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Main Slideshow Class
|
5 |
-
*
|
6 |
-
* @author Matthew Ruddy
|
7 |
-
* @since 2.0
|
8 |
-
*/
|
9 |
-
class ESL_Slideshow {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class instance
|
13 |
-
*
|
14 |
-
* @since 2.0
|
15 |
-
*/
|
16 |
-
private static $instance;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Getter method for retrieving the class instance.
|
20 |
-
*
|
21 |
-
* @since 2.0
|
22 |
-
*/
|
23 |
-
public static function get_instance() {
|
24 |
-
|
25 |
-
if ( !self::$instance instanceof self )
|
26 |
-
self::$instance = new self;
|
27 |
-
return self::$instance;
|
28 |
-
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Loads slideshow styles
|
33 |
-
*
|
34 |
-
* @since 2.0
|
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 |
-
|
44 |
-
/**
|
45 |
-
* Loads slideshow scripts
|
46 |
-
*
|
47 |
-
* @since 2.0
|
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 = 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 |
-
/**
|
138 |
-
* Displays a slideshow
|
139 |
-
*
|
140 |
-
* @since 2.0
|
141 |
-
*/
|
142 |
-
public function display_slideshow() {
|
143 |
-
|
144 |
-
/** Display the slideshow */
|
145 |
-
ob_start();
|
146 |
-
require dirname( EasingSliderLite::get_file() ) . DIRECTORY_SEPARATOR .'templates'. DIRECTORY_SEPARATOR .'slideshow.php';
|
147 |
-
return ob_get_clean();
|
148 |
-
|
149 |
-
}
|
150 |
-
|
151 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Upgrade.php
DELETED
@@ -1,141 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Plugin upgrade class. This will become more populated over time.
|
5 |
-
*
|
6 |
-
* @author Matthew Ruddy
|
7 |
-
* @since 2.0
|
8 |
-
*/
|
9 |
-
class ESL_Upgrade {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Upgrade from Easing Slider
|
13 |
-
*
|
14 |
-
* @since 2.0
|
15 |
-
*/
|
16 |
-
public static final function do_upgrades() {
|
17 |
-
|
18 |
-
/** Get current plugin version */
|
19 |
-
$version = get_option( 'easingsliderlite_version' );
|
20 |
-
|
21 |
-
/** Trigger activation if needed */
|
22 |
-
if ( !$version )
|
23 |
-
EasingSliderLite::get_instance()->activate();
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Check and do upgrade for v2.0.1.
|
27 |
-
* Bug fix included here incase upgrade from v2.0 - v2.0.1.3 didn't go smoothly and plugin wasn't activated correctly.
|
28 |
-
* A name change occurred in this version, so we check for the old database option before execution (because the user may never have upgraded to v2.0!)
|
29 |
-
*/
|
30 |
-
if ( get_option( 'rivasliderlite_version' ) && ( version_compare( $version, '2.0.1', '<' ) || version_compare( $version, '2.0.1.3', '=' ) ) )
|
31 |
-
self::do_201_upgrade();
|
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 |
-
/** Upgrade to v2.1.4.3 */
|
40 |
-
if ( version_compare( $version, '2.1.4.3', '<' ) )
|
41 |
-
self::do_2143_upgrade();
|
42 |
-
|
43 |
-
/** Custom hooks */
|
44 |
-
do_action( 'easingsliderlite_upgrades', EasingSliderLite::$version, $version );
|
45 |
-
|
46 |
-
/** Update plugin version number if needed */
|
47 |
-
if ( !version_compare( $version, EasingSliderLite::$version, '=' ) )
|
48 |
-
update_option( 'easingsliderlite_version', EasingSliderLite::$version );
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Do 2.0.1 upgrades
|
54 |
-
*
|
55 |
-
* @since 2.0.1
|
56 |
-
*/
|
57 |
-
public static final function do_201_upgrade() {
|
58 |
-
|
59 |
-
global $wp_roles;
|
60 |
-
|
61 |
-
/** Transfer old options for plugin name revert */
|
62 |
-
update_option( 'easingsliderlite_version', get_option( 'rivasliderlite_version' ) );
|
63 |
-
update_option( 'easingsliderlite_slideshow', get_option( 'rivasliderlite_slideshow' ) );
|
64 |
-
update_option( 'easingsliderlite_settings', get_option( 'rivasliderlite_settings' ) );
|
65 |
-
/**
|
66 |
-
* If we've upgraded to v2.0, regardless if our major upgrade fired successfully or not
|
67 |
-
* we don't want to fire it again and destroy up any changes we've made since
|
68 |
-
*/
|
69 |
-
update_option( 'easingsliderlite_major_upgrade', 1 );
|
70 |
-
update_option( 'easingsliderlite_disable_welcome_panel', get_option( 'rivasliderlite_disable_welcome_panel' ) );
|
71 |
-
|
72 |
-
/** Cleanup the old settings */
|
73 |
-
self::do_201_cleanup();
|
74 |
-
|
75 |
-
/** Remove old permissions and add new ones */
|
76 |
-
foreach ( $wp_roles->roles as $role => $info ) {
|
77 |
-
$user_role = get_role( $role );
|
78 |
-
EasingSliderLite::get_instance()->remove_capability( 'rivasliderlite_edit_slideshow', $user_role );
|
79 |
-
EasingSliderLite::get_instance()->remove_capability( 'rivasliderlite_edit_settings', $user_role );
|
80 |
-
}
|
81 |
-
EasingSliderLite::get_instance()->manage_capabilities( 'add' );
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Clean's up setting after v2.0.1 upgrade
|
87 |
-
*
|
88 |
-
* @since 2.0.1.3
|
89 |
-
*/
|
90 |
-
public static final function do_201_cleanup() {
|
91 |
-
delete_option( 'rivasliderlite_version' );
|
92 |
-
delete_option( 'rivasliderlite_slideshow' );
|
93 |
-
delete_option( 'rivasliderlite_settings' );
|
94 |
-
delete_option( 'rivasliderlite_easingslider_upgrade' );
|
95 |
-
delete_option( 'rivasliderlite_disable_welcome_panel' );
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Does 2.1 plugin upgrade
|
100 |
-
*
|
101 |
-
* @since 2.1
|
102 |
-
*/
|
103 |
-
public static final function do_210_upgrade() {
|
104 |
-
|
105 |
-
global $wp_roles;
|
106 |
-
|
107 |
-
/** Add the customizations database option */
|
108 |
-
add_option( 'easingsliderlite_customizations', EasingSliderLite::get_instance()->customization_defaults() );
|
109 |
-
|
110 |
-
/** Add the customization panel capability */
|
111 |
-
foreach ( $wp_roles->roles as $role => $info )
|
112 |
-
EasingSliderLite::get_instance()->add_capability( 'easingsliderlite_can_customize', get_role( $role ) );
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Does 2.1.4.3 plugin upgrade
|
118 |
-
*
|
119 |
-
* @since 2.1.4.3
|
120 |
-
*/
|
121 |
-
public static final function do_2143_upgrade() {
|
122 |
-
|
123 |
-
/**
|
124 |
-
* This fixes issues with JSON encoding of customization options.
|
125 |
-
* We've decided not to JSON encode them anymore, so let's make ammends.
|
126 |
-
*/
|
127 |
-
$customizations = get_option( 'easingsliderlite_customizations' );
|
128 |
-
|
129 |
-
$decoded_json = @json_decode( $customizations );
|
130 |
-
|
131 |
-
// Bail if the settings are already converted to an object
|
132 |
-
if ( ! $decoded_json && is_object( $customizations ) ) {
|
133 |
-
return;
|
134 |
-
}
|
135 |
-
|
136 |
-
// Save the decoded customizations
|
137 |
-
update_option( 'easingsliderlite_customizations', $decoded_json );
|
138 |
-
|
139 |
-
}
|
140 |
-
|
141 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Widget.php
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Adds a 'Slideshows' widget to the WordPress widgets interface
|
5 |
-
*
|
6 |
-
* @author Matthew Ruddy
|
7 |
-
* @since 2.0
|
8 |
-
*/
|
9 |
-
class ESL_Widget extends WP_Widget {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Constructor
|
13 |
-
*
|
14 |
-
* @since 2.0
|
15 |
-
*/
|
16 |
-
public function __construct() {
|
17 |
-
parent::__construct(
|
18 |
-
'easingsliderlite_widget',
|
19 |
-
__( 'Slideshow', 'easingsliderlite' ),
|
20 |
-
array( 'description' => __( 'Display a slideshow using a widget', 'easingsliderlite' ) )
|
21 |
-
);
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Widget logic
|
26 |
-
*
|
27 |
-
* @since 2.0
|
28 |
-
*/
|
29 |
-
public function widget( $args, $instance ) {
|
30 |
-
|
31 |
-
/** Extract arguments */
|
32 |
-
extract( $args );
|
33 |
-
|
34 |
-
/** Get widget title */
|
35 |
-
$title = apply_filters( 'widget_title', $instance['title'] );
|
36 |
-
|
37 |
-
/** Display widget header */
|
38 |
-
echo $before_widget;
|
39 |
-
if ( !empty( $title ) )
|
40 |
-
echo $before_title . $title . $after_title;
|
41 |
-
|
42 |
-
/** Display slideshow */
|
43 |
-
echo ESL_Slideshow::get_instance()->display_slideshow();
|
44 |
-
|
45 |
-
/** Display widget footer */
|
46 |
-
echo $after_widget;
|
47 |
-
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Returns updated settings array. Also does some sanatization.
|
53 |
-
*
|
54 |
-
* @since 2.0
|
55 |
-
*/
|
56 |
-
public function update( $new_instance, $old_instance ) {
|
57 |
-
return array(
|
58 |
-
'title' => strip_tags( $new_instance['title'] )
|
59 |
-
);
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Widget settings form
|
64 |
-
*
|
65 |
-
* @since 2.0
|
66 |
-
*/
|
67 |
-
public function form( $instance ) {
|
68 |
-
|
69 |
-
?>
|
70 |
-
<p>
|
71 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'easingsliderlite' ); ?></label>
|
72 |
-
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" class="widefat" value="<?php if ( isset( $instance['title'] ) ) echo esc_attr( $instance['title'] ); ?>">
|
73 |
-
</p>
|
74 |
-
<?php
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-es-customizations.php
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines & loads our customizations
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Customizations {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Returns the defaults for our slider "customizations" metadata
|
19 |
+
*
|
20 |
+
* @return object
|
21 |
+
*/
|
22 |
+
public function defaults() {
|
23 |
+
|
24 |
+
$plugin_url = plugins_url( 'easing-slider/images' );
|
25 |
+
|
26 |
+
return (object) array(
|
27 |
+
'arrows' => (object) array(
|
28 |
+
'next' => "{$plugin_url}/nav-arrow-next.png",
|
29 |
+
'prev' => "{$plugin_url}/nav-arrow-prev.png",
|
30 |
+
'width' => 30,
|
31 |
+
'height' => 30
|
32 |
+
),
|
33 |
+
'pagination' => (object) array(
|
34 |
+
'inactive' => "{$plugin_url}/nav-icon-inactive.png",
|
35 |
+
'active' => "{$plugin_url}/nav-icon-active.png",
|
36 |
+
'width' => 15,
|
37 |
+
'height' => 15
|
38 |
+
),
|
39 |
+
'border' => (object) array(
|
40 |
+
'color' => '#000000',
|
41 |
+
'width' => 0,
|
42 |
+
'radius' => 0
|
43 |
+
),
|
44 |
+
'shadow' => (object) array(
|
45 |
+
'enabled' => false,
|
46 |
+
'image' => "{$plugin_url}/shadow.png"
|
47 |
+
)
|
48 |
+
);
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Merges in our default slider "customizations" metadata
|
54 |
+
*
|
55 |
+
* @param array $metadata_defaults The default metadata
|
56 |
+
* @return array
|
57 |
+
*/
|
58 |
+
public function merge_defaults( $metadata_defaults ) {
|
59 |
+
|
60 |
+
$defaults = array( 'customizations' => $this->defaults() );
|
61 |
+
|
62 |
+
return array_merge( $metadata_defaults, $defaults );
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Displays the customization styling for a slider
|
68 |
+
*
|
69 |
+
* @param string $html The slider HTML
|
70 |
+
* @param ES_Slider $slider The slider object
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
public function display_styling( $html, $slider ) {
|
74 |
+
|
75 |
+
// Get the defaults & customizations
|
76 |
+
$defaults = $this->defaults();
|
77 |
+
$customizations = $slider->customizations;
|
78 |
+
|
79 |
+
// Bail if we have no customizations
|
80 |
+
if ( $defaults == $customizations ) {
|
81 |
+
return $html;
|
82 |
+
}
|
83 |
+
|
84 |
+
// Open the output
|
85 |
+
$html .= "<style type=\"text/css\">";
|
86 |
+
|
87 |
+
// Next & Previous Arrows
|
88 |
+
if ( $defaults->arrows != $customizations->arrows ) {
|
89 |
+
|
90 |
+
// Width & height
|
91 |
+
$html .= ".easingslider-{$slider->ID} .easingslider-arrows { ";
|
92 |
+
if ( $defaults->arrows->width != $customizations->arrows->width ) {
|
93 |
+
$html .= "width: {$customizations->arrows->width}px; ";
|
94 |
+
}
|
95 |
+
if ( $defaults->arrows->height != $customizations->arrows->height ) {
|
96 |
+
$html .= "height: {$customizations->arrows->height}px; ";
|
97 |
+
$html .= "margin-top: {($customizations->arrows->height / 2)}px; ";
|
98 |
+
}
|
99 |
+
$html .= "}";
|
100 |
+
|
101 |
+
// "Next" image
|
102 |
+
if ( $defaults->arrows->next != $customizations->arrows->next ) {
|
103 |
+
$html .= ".easingslider-{$slider->ID} .easingslider-next { ";
|
104 |
+
$html .= "background-image: url({$customizations->arrows->next}); ";
|
105 |
+
$html .= "}";
|
106 |
+
}
|
107 |
+
|
108 |
+
// "Prev" image
|
109 |
+
if ( $defaults->arrows->prev != $customizations->arrows->prev ) {
|
110 |
+
$html .= ".easingslider-{$slider->ID} .easingslider-prev { ";
|
111 |
+
$html .= "background-image: url({$customizations->arrows->prev}); ";
|
112 |
+
$html .= "}";
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
// Pagination
|
118 |
+
if ( $defaults->pagination != $customizations->pagination ) {
|
119 |
+
|
120 |
+
// Width & height, and "inactive" image
|
121 |
+
$html .= ".easingslider-{$slider->ID} .easingslider-icon { ";
|
122 |
+
if ( $defaults->pagination->width != $customizations->pagination->width ) {
|
123 |
+
$html .= "width: {$customizations->pagination->width}px; ";
|
124 |
+
}
|
125 |
+
if ( $defaults->pagination->height != $customizations->pagination->height ) {
|
126 |
+
$html .= "height: {$customizations->pagination->height}px; ";
|
127 |
+
}
|
128 |
+
if ( $defaults->pagination->inactive != $customizations->pagination->inactive ) {
|
129 |
+
$html .= "background-image: url({$customizations->pagination->inactive}); ";
|
130 |
+
}
|
131 |
+
$html .= "}";
|
132 |
+
|
133 |
+
// "Active" image
|
134 |
+
if ( $defaults->pagination->active != $customizations->pagination->active ) {
|
135 |
+
$html .= ".easingslider-{$slider->ID} .easingslider-icon.active { ";
|
136 |
+
$html .= "background-image: url({$customizations->pagination->active}); ";
|
137 |
+
$html .= "}";
|
138 |
+
}
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
// Border
|
143 |
+
if ( $defaults->border != $customizations->border ) {
|
144 |
+
$html .= ".easingslider-{$slider->ID} { ";
|
145 |
+
|
146 |
+
// Color
|
147 |
+
if ( $defaults->border->color != $customizations->border->color ) {
|
148 |
+
$html .= "border-color: {$customizations->border->color}; ";
|
149 |
+
}
|
150 |
+
|
151 |
+
// Width
|
152 |
+
if ( $defaults->border->width != $customizations->border->width ) {
|
153 |
+
$html .= "border-width: {$customizations->border->width}px; ";
|
154 |
+
$html .= "border-style: solid; ";
|
155 |
+
}
|
156 |
+
|
157 |
+
// Radius
|
158 |
+
if ( $defaults->border->radius != $customizations->border->radius ) {
|
159 |
+
$html .= "-webkit-border-radius: {$customizations->border->radius}px; ";
|
160 |
+
$html .= "-moz-border-radius: {$customizations->border->radius}px; ";
|
161 |
+
$html .= "border-radius: {$customizations->border->radius}px; ";
|
162 |
+
}
|
163 |
+
|
164 |
+
$html .= "}";
|
165 |
+
}
|
166 |
+
|
167 |
+
// Drop Shadow (if enabled)
|
168 |
+
if ( $customizations->shadow->enabled ) {
|
169 |
+
$html .= ".easingslider-shadow-{$slider->ID} { ";
|
170 |
+
|
171 |
+
// Make responsive or fixed
|
172 |
+
if ( $slider->dimensions->responsive ) {
|
173 |
+
$html .= "width: 100%; ";
|
174 |
+
$html .= "max-width: {$slider->dimensions->width}px; ";
|
175 |
+
}
|
176 |
+
else {
|
177 |
+
$html .= "width: {$slider->dimensions->width}px; ";
|
178 |
+
}
|
179 |
+
|
180 |
+
$html .= "}";
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
// Close the output
|
185 |
+
$html .= "</style>";
|
186 |
+
|
187 |
+
return $html;
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Displays a drop shadow beneath the slider
|
193 |
+
*
|
194 |
+
* @param string $html The slider HTML
|
195 |
+
* @param ES_Slider $slider The slider object
|
196 |
+
* @return string
|
197 |
+
*/
|
198 |
+
public function drop_shadow( $html, $slider ) {
|
199 |
+
|
200 |
+
/**
|
201 |
+
* If we are on the "customizer" page, we always want to render the shadow.
|
202 |
+
* This allow us to toggle it with our live preview. Can't be achieved as easily otherwise.
|
203 |
+
*
|
204 |
+
* We also add some CSS to ensure it is hidden if currently disabled, but still printed in the slider's HTML.
|
205 |
+
*/
|
206 |
+
if ( isset( $_GET['page'] ) && 'easingslider_manage_customizations' == $_GET['page'] ) {
|
207 |
+
|
208 |
+
// No need for this if the shadow is already enabled
|
209 |
+
if ( ! $slider->customizations->shadow->enabled ) {
|
210 |
+
$slider->customizations->shadow->enabled = true;
|
211 |
+
|
212 |
+
// Add the HTML
|
213 |
+
$html .= "<style type=\"text/css\">";
|
214 |
+
$html .= ".easingslider-shadow { ";
|
215 |
+
$html .= "display: none; ";
|
216 |
+
|
217 |
+
// Make responsive or fixed
|
218 |
+
if ( $slider->dimensions->responsive ) {
|
219 |
+
$html .= "width: 100%; ";
|
220 |
+
$html .= "max-width: {$slider->dimensions->width}px; ";
|
221 |
+
}
|
222 |
+
else {
|
223 |
+
$html .= "width: {$slider->dimensions->width}px; ";
|
224 |
+
}
|
225 |
+
$html .= "}";
|
226 |
+
$html .= "</style>";
|
227 |
+
}
|
228 |
+
|
229 |
+
}
|
230 |
+
|
231 |
+
// Render the shadow if enabled
|
232 |
+
if ( $slider->customizations->shadow->enabled ) {
|
233 |
+
$html .= "<div class=\"easingslider-shadow easingslider-shadow-{$slider->ID}\">";
|
234 |
+
$html .= "<img src=\"{$slider->customizations->shadow->image}\" style=\"width: 100%;\" />";
|
235 |
+
$html .= "</div>";
|
236 |
+
}
|
237 |
+
|
238 |
+
return $html;
|
239 |
+
|
240 |
+
}
|
241 |
+
|
242 |
+
}
|
includes/class-es-customizer-legacy.php
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* This class ensures a smooth transition from "Lite" or "Pro" to our new unified "Easing Slider" customizer extension.
|
12 |
+
*
|
13 |
+
* Lots of horrible, messy legacy code here that I absolutely hate, but is necessary.
|
14 |
+
*
|
15 |
+
* @author Matthew Ruddy
|
16 |
+
*/
|
17 |
+
class ES_Customizer_Legacy {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Gets a Easing Slider "Pro" legacy slider.
|
21 |
+
*
|
22 |
+
* @param int $legacy_id The legacy slider ID
|
23 |
+
* @return Easing_Slider|false
|
24 |
+
*/
|
25 |
+
public function get_pro_slider( $legacy_id ) {
|
26 |
+
|
27 |
+
// Bail if Easing Slider isn't active
|
28 |
+
if ( ! class_exists( 'Easing_Slider' ) ) {
|
29 |
+
return false;
|
30 |
+
}
|
31 |
+
|
32 |
+
// Get our "pivot" array option
|
33 |
+
$pivots = get_option( 'easingslider_pro_slider_pivots' );
|
34 |
+
|
35 |
+
// Bail if we have no pivots
|
36 |
+
if ( ! $pivots ) {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
+
// Loop through each pivot and return the match, if we have find one.
|
41 |
+
foreach ( $pivots as $pivot ) {
|
42 |
+
if ( $legacy_id == $pivot->legacy_id ) {
|
43 |
+
return Easing_Slider::find( $pivot->id );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
return false;
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Upgrades the plugin from Easing Slider "Pro" v2.0 and onwards.
|
53 |
+
*
|
54 |
+
* @return void
|
55 |
+
*/
|
56 |
+
public function pro_upgrade_from_200() {
|
57 |
+
|
58 |
+
global $wpdb;
|
59 |
+
|
60 |
+
// Bail if this has already been carried out
|
61 |
+
if ( get_option( 'easingslider-customizer_upgraded_from_pro' ) ) {
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
+
// Bail if we don't have a version, telling us that the plugin wasn't installed and there is nothing to upgrade.
|
66 |
+
if ( ! get_option( 'easingsliderpro_version' ) ) {
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
+
// Get the legacy sliders
|
71 |
+
$legacy_sliders = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}easingsliderpro" );
|
72 |
+
|
73 |
+
// Add the sliders, if we have any.
|
74 |
+
if ( $legacy_sliders ) {
|
75 |
+
foreach ( $legacy_sliders as $legacy_slider ) {
|
76 |
+
|
77 |
+
// Get the Easing Slider "Pro" slider
|
78 |
+
$slider = $this->get_pro_slider( $legacy_slider->id, $legacy_slider->name );
|
79 |
+
|
80 |
+
// Bail if we have no slider
|
81 |
+
if ( ! $slider ) {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Add customizations if we have any
|
86 |
+
if ( ! empty( $legacy_slider->customizations ) ) {
|
87 |
+
|
88 |
+
// Decode the legacy slider's json
|
89 |
+
$legacy_slider->customizations = json_decode( $legacy_slider->customizations );
|
90 |
+
|
91 |
+
// Transfer the data
|
92 |
+
$slider->customizations = $legacy_slider->customizations;
|
93 |
+
|
94 |
+
// Make some ammendments to our properties (fixing some inconsistencies and mapping new images)
|
95 |
+
$slider->customizations->shadow->enabled = $slider->customizations->shadow->enable;
|
96 |
+
$slider->customizations->shadow->image = str_replace( 'easingsliderpro/images/slideshow_shadow.png', 'easing-slider/images/shadow.png', $slider->customizations->shadow->image );
|
97 |
+
$slider->customizations->arrows->next = str_replace( 'easingsliderpro/images/slideshow_arrow_next.png', 'easing-slider/images/nav-arrow-next.png', $slider->customizations->arrows->next );
|
98 |
+
$slider->customizations->arrows->prev = str_replace( 'easingsliderpro/images/slideshow_arrow_prev.png', 'easing-slider/images/nav-arrow-prev.png', $slider->customizations->arrows->prev );
|
99 |
+
$slider->customizations->pagination->active = str_replace( 'easingsliderpro/images/slideshow_icon_active.png', 'easing-slider/images/nav-icon-active.png', $slider->customizations->pagination->active );
|
100 |
+
$slider->customizations->pagination->inactive = str_replace( 'easingsliderpro/images/slideshow_icon_inactive.png', 'easing-slider/images/nav-icon-inactive.png', $slider->customizations->pagination->inactive );
|
101 |
+
|
102 |
+
// Remove properties that are no longer used
|
103 |
+
unset( $slider->customizations->shadow->enable );
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
// Save the slider
|
108 |
+
$slider->save();
|
109 |
+
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
// Flag that this migration has been done
|
114 |
+
update_option( 'easingslider-customizer_upgraded_from_pro', true );
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Gets the Easing Slider "Lite" legacy slider.
|
120 |
+
*
|
121 |
+
* @return Easing_Slider|false
|
122 |
+
*/
|
123 |
+
public function get_lite_slider() {
|
124 |
+
|
125 |
+
// Bail if Easing Slider isn't active
|
126 |
+
if ( ! class_exists( 'Easing_Slider' ) ) {
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
|
130 |
+
// Get the ID of our "Lite" slider
|
131 |
+
$lite_id = get_option( 'easingslider_lite_slider_id' );
|
132 |
+
|
133 |
+
// Get the Easing Slider "Lite" slider
|
134 |
+
$lite_slider = Easing_Slider::find( $lite_id );
|
135 |
+
|
136 |
+
return $lite_slider;
|
137 |
+
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Upgrades the plugin from Easing Slider "Lite" v1.0 and onwards.
|
142 |
+
*
|
143 |
+
* @return void
|
144 |
+
*/
|
145 |
+
public function lite_upgrade_from_100() {
|
146 |
+
|
147 |
+
/**
|
148 |
+
* This version of the plugin had no "version" option, so we have to improvise.
|
149 |
+
*
|
150 |
+
* To do this, we will cycle through the options used to store the images from #1 to #10.
|
151 |
+
* If we find an image, we will assume the plugin settings exist and will continue with the migration.
|
152 |
+
*/
|
153 |
+
$legacy_images = array( 'sImg1', 'sImg2', 'sImg3', 'sImg4', 'sImg5', 'sImg6', 'sImg7', 'sImg8', 'sImg9', 'sImg10' );
|
154 |
+
|
155 |
+
// Loop through each image option, and continue if we find a match.
|
156 |
+
foreach ( $legacy_images as $legacy_image ) {
|
157 |
+
|
158 |
+
// Continue if we find an image, telling us that the plugin was being used
|
159 |
+
if ( get_option( $legacy_image ) ) {
|
160 |
+
|
161 |
+
// Get the Easing Slider "Lite" slider
|
162 |
+
$slider = $this->get_lite_slider();
|
163 |
+
|
164 |
+
// Enable shadow
|
165 |
+
$slider->customizations->shadow->enabled = true;
|
166 |
+
|
167 |
+
// Save the slider
|
168 |
+
$slider->save();
|
169 |
+
|
170 |
+
// We've done our update. Time to bail!
|
171 |
+
return;
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
}
|
176 |
+
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Upgrades the plugin from Easing Slider "Lite" v2.0 and onwards.
|
181 |
+
*
|
182 |
+
* @return void
|
183 |
+
*/
|
184 |
+
public function lite_upgrade_from_200() {
|
185 |
+
|
186 |
+
global $wpdb;
|
187 |
+
|
188 |
+
// Bail if this has already been carried out
|
189 |
+
if ( get_option( 'easingslider-customizer_upgraded_from_lite' ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* In my previous attempts to change the plugin name from "Easing Slider" to "Riva Slider",
|
195 |
+
* I made the catastrophic mistake of changing the plugin directory name and options, etc, which
|
196 |
+
* created dozens of issues and prompted the name change reversal.
|
197 |
+
*
|
198 |
+
* As a result, it's possible options may exist under the prefix "rivaslider" or "easingslider".
|
199 |
+
* Let's accommodate for both.
|
200 |
+
*/
|
201 |
+
$plugin_slug = ( get_option( 'easingsliderlite_version' ) ) ? 'easingsliderlite' : 'rivasliderlite';
|
202 |
+
|
203 |
+
// Get the legacy slider customizations
|
204 |
+
$legacy_customizations = get_option( "{$plugin_slug}_customizations" );
|
205 |
+
|
206 |
+
// Bail if we have no customizations
|
207 |
+
if ( ! $legacy_customizations ) {
|
208 |
+
return;
|
209 |
+
}
|
210 |
+
|
211 |
+
// Get the Easing Slider "Lite" slider
|
212 |
+
$slider = $this->get_lite_slider();
|
213 |
+
|
214 |
+
// Bail if we have no slider
|
215 |
+
if ( ! $slider ) {
|
216 |
+
return false;
|
217 |
+
}
|
218 |
+
|
219 |
+
// Transfer the data
|
220 |
+
$slider->customizations = $legacy_customizations;
|
221 |
+
|
222 |
+
// Make some ammendments to our properties (fixing some inconsistencies and mapping new images)
|
223 |
+
$slider->customizations->shadow->enabled = $slider->customizations->shadow->enable;
|
224 |
+
$slider->customizations->shadow->image = str_replace( 'images/slideshow_shadow.png', 'images/shadow.png', $slider->customizations->shadow->image );
|
225 |
+
$slider->customizations->arrows->next = str_replace( 'images/slideshow_arrow_next.png', 'images/nav-arrow-next.png', $slider->customizations->arrows->next );
|
226 |
+
$slider->customizations->arrows->prev = str_replace( 'images/slideshow_arrow_prev.png', 'images/nav-arrow-prev.png', $slider->customizations->arrows->prev );
|
227 |
+
$slider->customizations->pagination->active = str_replace( 'images/slideshow_icon_active.png', 'images/nav-icon-active.png', $slider->customizations->pagination->active );
|
228 |
+
$slider->customizations->pagination->inactive = str_replace( 'images/slideshow_icon_inactive.png', 'images/nav-icon-inactive.png', $slider->customizations->pagination->inactive );
|
229 |
+
|
230 |
+
// Remove properties that are no longer used
|
231 |
+
unset( $slider->customizations->shadow->enable );
|
232 |
+
|
233 |
+
// Save the slider
|
234 |
+
$slider->save();
|
235 |
+
|
236 |
+
// Flag that this migration has been done
|
237 |
+
update_option( 'easingslider-customizer_upgraded_from_lite', true );
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Deletes all the legacy related options.
|
243 |
+
*
|
244 |
+
* @return void
|
245 |
+
*/
|
246 |
+
public function remove_options() {
|
247 |
+
|
248 |
+
delete_option( 'easingslider-customizer_upgraded_from_lite' );
|
249 |
+
delete_option( 'easingslider-customizer_upgraded_from_pro' );
|
250 |
+
|
251 |
+
}
|
252 |
+
|
253 |
+
}
|
includes/class-es-customizer-notice.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* This class adds a notice to the WordPress admin area telling users that the
|
12 |
+
* "Customizer" functionality will soon be extracted into a separate extension.
|
13 |
+
*
|
14 |
+
* @author Matthew Ruddy
|
15 |
+
*/
|
16 |
+
class ES_Customizer_Notice {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Sets the database "flag" option for this notice
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function set_flag() {
|
24 |
+
|
25 |
+
add_option( 'easingslider_dismissed_customizer_notice', true );
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Deletes the database "flag" option for this notice
|
31 |
+
*
|
32 |
+
* @return void
|
33 |
+
*/
|
34 |
+
public function unset_flag() {
|
35 |
+
|
36 |
+
delete_option( 'easingslider_dismissed_customizer_notice' );
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Dismisses the notice, if applicable
|
42 |
+
*
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
+
public function handle_dismiss() {
|
46 |
+
|
47 |
+
// Check for dismissal
|
48 |
+
if ( ! empty( $_GET['dismiss_customizer_notice'] ) ) {
|
49 |
+
|
50 |
+
// Set the flag, telling us that the user has dismissed the notice
|
51 |
+
$this->set_flag();
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Displays the notice
|
59 |
+
*
|
60 |
+
* @return void
|
61 |
+
*/
|
62 |
+
public function display() {
|
63 |
+
|
64 |
+
// Bail if not an plugin admin page
|
65 |
+
if ( ! isset( $_GET['page'] ) ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
// Get the current page URL
|
70 |
+
$current_page = "{$_SERVER['REQUEST_URI']}&dismiss_customizer_notice=true";
|
71 |
+
|
72 |
+
// Populate the message
|
73 |
+
$message = sprintf( __( 'The Easing Slider "Customizer" functionality will soon be removed from this plugin and made available as an extension. If you use the "Customize" panel, download and activate the free extension <a href="%s" target="_blank">here</a> to prevents any disruptions. <a href="%s">Dismiss</a>.', 'easingslider' ), 'http://easingslider.com/extensions/visual-customizer', $current_page );
|
74 |
+
|
75 |
+
// Bail if we've dismissed the notice
|
76 |
+
if ( get_option( 'easingslider_dismissed_customizer_notice' ) ) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
// Tell the user
|
81 |
+
if ( function_exists( 'easingslider_show_notice' ) ) {
|
82 |
+
easingslider_show_notice( $message, 'updated notice' );
|
83 |
+
}
|
84 |
+
|
85 |
+
}
|
86 |
+
}
|
includes/class-es-customizer.php
ADDED
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines our "Customizer"
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Customizer {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Adds our "customizer" user capabilities
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function add_capabilities() {
|
23 |
+
|
24 |
+
// Get user role
|
25 |
+
$role = get_role( 'administrator' );
|
26 |
+
|
27 |
+
// Add the capability
|
28 |
+
$role->add_cap( 'easingslider_manage_customizations' );
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Removes our "customizer" user capabilities
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function remove_capabilities() {
|
38 |
+
|
39 |
+
// Get user role
|
40 |
+
$role = get_role( 'administrator' );
|
41 |
+
|
42 |
+
// Remove the capability
|
43 |
+
$role->remove_cap( 'easingslider_manage_customizations' );
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Adds our page to the "Sliders" menu
|
50 |
+
*
|
51 |
+
* @return void
|
52 |
+
*/
|
53 |
+
public function add_submenu_page() {
|
54 |
+
|
55 |
+
// "Customize" page
|
56 |
+
$hook = add_submenu_page(
|
57 |
+
'easingslider_edit_sliders',
|
58 |
+
__( 'Customize', 'easingslider' ),
|
59 |
+
__( 'Customize', 'easingslider' ),
|
60 |
+
'easingslider_manage_customizations',
|
61 |
+
'easingslider_manage_customizations',
|
62 |
+
array( $this, 'display_view' )
|
63 |
+
);
|
64 |
+
|
65 |
+
// Page-specific hooks
|
66 |
+
add_action( "load-{$hook}", array( $this, 'do_actions' ) );
|
67 |
+
add_action( "admin_print_styles-{$hook}", array( $this, 'enqueue_styles' ) );
|
68 |
+
add_action( "admin_print_scripts-{$hook}", array( $this, 'enqueue_scripts' ) );
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Registers our assets
|
74 |
+
*
|
75 |
+
* @return void
|
76 |
+
*/
|
77 |
+
public function register_assets() {
|
78 |
+
|
79 |
+
// Get our directories
|
80 |
+
$css_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/css';
|
81 |
+
$js_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/js';
|
82 |
+
|
83 |
+
// Get file suffix
|
84 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
85 |
+
|
86 |
+
// Dependancies
|
87 |
+
$dependancies = array( 'jquery', 'backbone' );
|
88 |
+
|
89 |
+
// Register our stylesheets
|
90 |
+
wp_register_style( 'easingslider-customizer', "{$css_dir}/customizer{$suffix}.css", false, Easing_Slider::$version );
|
91 |
+
|
92 |
+
// Register our javascripts
|
93 |
+
wp_register_script( 'easingslider-customizer', "{$js_dir}/customizer{$suffix}.js", $dependancies, Easing_Slider::$version, true );
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Enqueues all of our customizer styles
|
99 |
+
*
|
100 |
+
* @return void
|
101 |
+
*/
|
102 |
+
public function enqueue_styles() {
|
103 |
+
|
104 |
+
// Enqueue our stylesheets
|
105 |
+
wp_enqueue_style( 'customize-controls' );
|
106 |
+
wp_enqueue_style( 'wp-color-picker' );
|
107 |
+
wp_enqueue_style( 'easingslider' );
|
108 |
+
wp_enqueue_style( 'easingslider-customizer' );
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Enqueues all of our customizer scripts
|
114 |
+
*
|
115 |
+
* @return void
|
116 |
+
*/
|
117 |
+
public function enqueue_scripts() {
|
118 |
+
|
119 |
+
// Enqueue our javascripts
|
120 |
+
wp_enqueue_script( 'customize-controls');
|
121 |
+
wp_enqueue_script( 'wp-color-picker' );
|
122 |
+
wp_enqueue_script( 'easingslider' );
|
123 |
+
wp_enqueue_script( 'easingslider-customizer' );
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Gets the "customizer" form fields
|
129 |
+
*
|
130 |
+
* @return array
|
131 |
+
*/
|
132 |
+
public function get_form_fields() {
|
133 |
+
|
134 |
+
$data = apply_filters( 'easingslider-customizer_form_fields', array() );
|
135 |
+
|
136 |
+
// Form fields
|
137 |
+
$fields = array( 'arrows', 'pagination', 'border', 'shadow' );
|
138 |
+
|
139 |
+
// Set form fields
|
140 |
+
foreach ( $fields as $field ) {
|
141 |
+
if ( isset( $_POST[ $field ] ) ) {
|
142 |
+
$data[ $field ] = (object) $_POST[ $field ];
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
// If data validation functionality exists, use it.
|
147 |
+
if ( function_exists( 'easingslider_validate_data' ) ) {
|
148 |
+
foreach ( $data as &$value ) {
|
149 |
+
$value = easingslider_validate_data( $value );
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
return $data;
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Does our "customizer" actions
|
159 |
+
*
|
160 |
+
* @return void
|
161 |
+
*/
|
162 |
+
public function do_actions() {
|
163 |
+
|
164 |
+
// Bail if not on the customizer page
|
165 |
+
if ( isset( $_POST['save'] ) && isset( $_POST['slider_id'] ) ) {
|
166 |
+
|
167 |
+
// Get our slider
|
168 |
+
$slider = Easing_Slider::find( $_POST['slider_id'] );
|
169 |
+
|
170 |
+
// Set the customizations
|
171 |
+
$slider->customizations = (object) $this->get_form_fields();
|
172 |
+
|
173 |
+
// Save the slider
|
174 |
+
$slider->save();
|
175 |
+
|
176 |
+
// Redirect back to the customizer
|
177 |
+
wp_redirect( "admin.php?page=easingslider_manage_customizations&edit={$slider->ID}" );
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Displays the view
|
185 |
+
*
|
186 |
+
* @return void
|
187 |
+
*/
|
188 |
+
public function display_view() {
|
189 |
+
|
190 |
+
// Get the current page
|
191 |
+
$page = $_GET['page'];
|
192 |
+
|
193 |
+
// We need Easing Slider to be loaded by now, so continue if it has.
|
194 |
+
if ( class_exists( 'Easing_Slider' ) ) {
|
195 |
+
|
196 |
+
// Get all sliders
|
197 |
+
$sliders = Easing_Slider::all();
|
198 |
+
|
199 |
+
// If we have no sliders, tell the user.
|
200 |
+
if ( empty( $sliders ) ) {
|
201 |
+
wp_die( __( 'You need to create some sliders to use the customizer.', 'easingslider' ) );
|
202 |
+
exit();
|
203 |
+
}
|
204 |
+
|
205 |
+
// Get the specified slider, or pick the first one.
|
206 |
+
if ( isset( $_GET['edit'] ) ) {
|
207 |
+
$slider = Easing_Slider::find( $_GET['edit'] );
|
208 |
+
}
|
209 |
+
else {
|
210 |
+
$slider = array_shift( array_values( $sliders ) );
|
211 |
+
}
|
212 |
+
|
213 |
+
// Display the view
|
214 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/customizer.php';
|
215 |
+
|
216 |
+
}
|
217 |
+
|
218 |
+
}
|
219 |
+
|
220 |
+
}
|
includes/class-es-editor-pages.php
ADDED
@@ -0,0 +1,406 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines our admin slider editor pages.
|
12 |
+
*
|
13 |
+
* @uses ES_Sliders_List_Table
|
14 |
+
* @author Matthew Ruddy
|
15 |
+
*/
|
16 |
+
class ES_Editor_Pages {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Adds our editor user capabilities
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function add_capabilities() {
|
24 |
+
|
25 |
+
// Get user role
|
26 |
+
$role = get_role( 'administrator' );
|
27 |
+
|
28 |
+
// Add the capabilities
|
29 |
+
$role->add_cap( 'easingslider_edit_sliders' );
|
30 |
+
$role->add_cap( 'easingslider_publish_sliders' );
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Removes our editor user capabilities
|
36 |
+
*
|
37 |
+
* @return void
|
38 |
+
*/
|
39 |
+
public function remove_capabilities() {
|
40 |
+
|
41 |
+
// Get user role
|
42 |
+
$role = get_role( 'administrator' );
|
43 |
+
|
44 |
+
// Remove the capabilities
|
45 |
+
$role->remove_cap( 'easingslider_edit_sliders' );
|
46 |
+
$role->remove_cap( 'easingslider_publish_sliders' );
|
47 |
+
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Adds our "All Sliders" page to the plugin admin menu
|
52 |
+
*
|
53 |
+
* @return void
|
54 |
+
*/
|
55 |
+
public function add_edit_page() {
|
56 |
+
|
57 |
+
// "All Sliders" page
|
58 |
+
$hook = add_submenu_page(
|
59 |
+
'easingslider_edit_sliders',
|
60 |
+
__( 'Sliders', 'easingslider' ),
|
61 |
+
__( 'All Sliders', 'easingslider' ),
|
62 |
+
'easingslider_edit_sliders',
|
63 |
+
'easingslider_edit_sliders',
|
64 |
+
array( $this, 'display_edit_view' )
|
65 |
+
);
|
66 |
+
|
67 |
+
// Page-specific hooks
|
68 |
+
add_action( "load-{$hook}", array( $this, 'do_edit_actions' ) );
|
69 |
+
add_action( "load-{$hook}", array( $this, 'add_screen_options' ) );
|
70 |
+
add_action( "load-{$hook}", array( $this, 'hide_media_tabs' ) );
|
71 |
+
add_action( "admin_print_styles-{$hook}", array( $this, 'enqueue_styles' ) );
|
72 |
+
add_action( "admin_print_scripts-{$hook}", array( $this, 'enqueue_scripts' ) );
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Adds our "Add New" page to the plugin admin menu
|
78 |
+
*
|
79 |
+
* @return void
|
80 |
+
*/
|
81 |
+
public function add_publish_page() {
|
82 |
+
|
83 |
+
// "Add New" page
|
84 |
+
$hook = add_submenu_page(
|
85 |
+
'easingslider_edit_sliders',
|
86 |
+
__( 'Add New Slider', 'easingslider' ),
|
87 |
+
__( 'Add New', 'easingslider' ),
|
88 |
+
'easingslider_publish_sliders',
|
89 |
+
'easingslider_publish_slider',
|
90 |
+
array( $this, 'display_publish_view' )
|
91 |
+
);
|
92 |
+
|
93 |
+
// Page-specific hooks
|
94 |
+
add_action( "load-{$hook}", array( $this, 'do_publish_actions' ) );
|
95 |
+
add_action( "load-{$hook}", array( $this, 'add_screen_options' ) );
|
96 |
+
add_action( "load-{$hook}", array( $this, 'hide_media_tabs' ) );
|
97 |
+
add_action( "admin_print_styles-{$hook}", array( $this, 'enqueue_styles' ) );
|
98 |
+
add_action( "admin_print_scripts-{$hook}", array( $this, 'enqueue_scripts' ) );
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Registers all of our editor assets
|
104 |
+
*
|
105 |
+
* @return void
|
106 |
+
*/
|
107 |
+
public function register_assets() {
|
108 |
+
|
109 |
+
// Get our directories
|
110 |
+
$css_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/css';
|
111 |
+
$js_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/js';
|
112 |
+
|
113 |
+
// Get file suffix
|
114 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
115 |
+
|
116 |
+
// Dependancies
|
117 |
+
$dependancies = array( 'jquery', 'jquery-ui-sortable', 'backbone', 'media-grid' );
|
118 |
+
|
119 |
+
// Register our stylesheets
|
120 |
+
wp_register_style( 'easingslider-editor-pages', "{$css_dir}/editor-pages{$suffix}.css", false, Easing_Slider::$version );
|
121 |
+
|
122 |
+
// Register our javascripts
|
123 |
+
wp_register_script( 'easingslider-editor-pages', "{$js_dir}/editor-pages{$suffix}.js", $dependancies, Easing_Slider::$version, true );
|
124 |
+
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Enqueues all of our editor styles
|
129 |
+
*
|
130 |
+
* @return void
|
131 |
+
*/
|
132 |
+
public function enqueue_styles() {
|
133 |
+
|
134 |
+
// Enqueue our stylesheets
|
135 |
+
wp_enqueue_style( 'easingslider-editor-pages' );
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Enqueues all of our editor scripts
|
141 |
+
*
|
142 |
+
* @return void
|
143 |
+
*/
|
144 |
+
public function enqueue_scripts() {
|
145 |
+
|
146 |
+
// Load media grid localizations
|
147 |
+
wp_localize_script( 'media-grid', '_wpMediaGridSettings', array(
|
148 |
+
'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ),
|
149 |
+
) );
|
150 |
+
|
151 |
+
// Load our localizations
|
152 |
+
wp_localize_script( 'easingslider-editor-pages', '_easingsliderAdminL10n', array(
|
153 |
+
'warn' => __( 'Are you sure you wish to do this? This cannot be reversed.', 'easingslider' ),
|
154 |
+
'plugin_url' => '/wp-content/plugins/'. dirname( plugin_basename( __FILE__ ) ) .'/',
|
155 |
+
'delete_slide' => __( 'Are you sure you wish to delete this slide? This cannot be reversed.', 'easingslider' ),
|
156 |
+
'delete_slides' => __( 'Are you sure you wish to delete all of this slider\'s images? This cannot be reversed.', 'easingslider' ),
|
157 |
+
'media_upload' => array(
|
158 |
+
'title' => __( 'Add Images to Slider', 'easingslider' ),
|
159 |
+
'button' => __( 'Insert into slider', 'easingslider' ),
|
160 |
+
'change' => __( 'Use this image', 'easingslider' ),
|
161 |
+
'discard_changes' => __( 'Are you sure you wish to discard changes?', 'easingslider' )
|
162 |
+
)
|
163 |
+
) );
|
164 |
+
|
165 |
+
// Enqueue our javascripts
|
166 |
+
wp_enqueue_media();
|
167 |
+
wp_enqueue_script( 'easingslider-editor-pages' );
|
168 |
+
|
169 |
+
// Print our backbone templates
|
170 |
+
add_action( 'admin_footer', array( $this, 'print_backbone_templates' ) );
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Adds our editor screen options
|
176 |
+
*
|
177 |
+
* @return void
|
178 |
+
*/
|
179 |
+
public function add_screen_options() {
|
180 |
+
|
181 |
+
// Show the appropriate screen options
|
182 |
+
if ( ! isset( $_GET['edit'] ) ) {
|
183 |
+
|
184 |
+
/**
|
185 |
+
* WP_List_Table automatically adds the table columns to our screen options when initialised,
|
186 |
+
* so let's trigger this by creating a new instance of our class.
|
187 |
+
*/
|
188 |
+
$list_table = new ES_Sliders_List_Table();
|
189 |
+
|
190 |
+
// Add the sliders per page screen option
|
191 |
+
add_screen_option( 'per_page', array(
|
192 |
+
'label' => __( 'Sliders per page', 'easingslider' ),
|
193 |
+
'default' => 20,
|
194 |
+
'option' => 'sliders_per_page'
|
195 |
+
) );
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Sets our editor screen option
|
203 |
+
*
|
204 |
+
* @param mixed $status
|
205 |
+
* @param mixed $option The screen option
|
206 |
+
* @param mixed $value The screen option value
|
207 |
+
* @return mixed
|
208 |
+
*/
|
209 |
+
public function set_screen_option( $status, $option, $value ) {
|
210 |
+
|
211 |
+
if ( 'sliders_per_page' == $option ) {
|
212 |
+
return $value;
|
213 |
+
}
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Hides any Media Upload (possibly from other plugins) that we don't want to show
|
219 |
+
*
|
220 |
+
* @return void
|
221 |
+
*/
|
222 |
+
public function hide_media_tabs() {
|
223 |
+
|
224 |
+
add_filter( 'media_upload_tabs', '__return_empty_array', 99999 );
|
225 |
+
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Prints our backbone.js templates
|
230 |
+
*
|
231 |
+
* @return void
|
232 |
+
*/
|
233 |
+
public function print_backbone_templates() {
|
234 |
+
|
235 |
+
// Require our templates
|
236 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'backbone/edit-slide.php';
|
237 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'backbone/slide.php';
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Gets our form fields
|
243 |
+
*
|
244 |
+
* @return array
|
245 |
+
*/
|
246 |
+
public function get_form_fields() {
|
247 |
+
|
248 |
+
$data = apply_filters( 'easingslider_pre_get_editor_form_fields', array() );
|
249 |
+
|
250 |
+
// Set the form fields
|
251 |
+
if ( isset( $_POST['post_title'] ) ) {
|
252 |
+
$data['post_title'] = $_POST['post_title'];
|
253 |
+
}
|
254 |
+
if ( isset( $_POST['general'] ) ) {
|
255 |
+
$data['general'] = (object) easingslider_validate_data( $_POST['general'] );
|
256 |
+
}
|
257 |
+
if ( isset( $_POST['dimensions'] ) ) {
|
258 |
+
$data['dimensions'] = (object) easingslider_validate_data( $_POST['dimensions'] );
|
259 |
+
}
|
260 |
+
if ( isset( $_POST['transitions'] ) ) {
|
261 |
+
$data['transitions'] = (object) easingslider_validate_data( $_POST['transitions'] );
|
262 |
+
}
|
263 |
+
if ( isset( $_POST['navigation'] ) ) {
|
264 |
+
$data['navigation'] = (object) easingslider_validate_data( $_POST['navigation'] );
|
265 |
+
}
|
266 |
+
if ( isset( $_POST['playback'] ) ) {
|
267 |
+
$data['playback'] = (object) easingslider_validate_data( $_POST['playback'] );
|
268 |
+
}
|
269 |
+
if ( isset( $_POST['slides'] ) ) {
|
270 |
+
$data['slides'] = array_map( 'easingslider_validate_data', $_POST['slides'] );
|
271 |
+
|
272 |
+
$data['slides'] = array_map( 'json_decode', $data['slides'] );
|
273 |
+
}
|
274 |
+
else {
|
275 |
+
$data['slides'] = array();
|
276 |
+
}
|
277 |
+
|
278 |
+
return $data;
|
279 |
+
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Does our edit actions
|
284 |
+
*
|
285 |
+
* @return void
|
286 |
+
*/
|
287 |
+
public function do_edit_actions() {
|
288 |
+
|
289 |
+
// Continue if the save button has been pressed
|
290 |
+
if ( isset( $_POST['save'] ) && isset( $_GET['edit'] ) ) {
|
291 |
+
|
292 |
+
// Bail if nonce is invalid
|
293 |
+
if ( ! check_admin_referer( 'save' ) ) {
|
294 |
+
return;
|
295 |
+
}
|
296 |
+
|
297 |
+
// Get our slider
|
298 |
+
$slider = Easing_Slider::find( $_GET['edit'] );
|
299 |
+
|
300 |
+
// Update attributes
|
301 |
+
$slider->set( $this->get_form_fields() );
|
302 |
+
|
303 |
+
// Save the slider
|
304 |
+
$slider->save();
|
305 |
+
|
306 |
+
// Trigger actions
|
307 |
+
do_action( 'easingslider_save_slider_actions' );
|
308 |
+
|
309 |
+
// Tell the user
|
310 |
+
easingslider_show_notice( __( 'Slider has been saved successfully.', 'easingslider' ), 'updated' );
|
311 |
+
|
312 |
+
}
|
313 |
+
|
314 |
+
// Trigger actions
|
315 |
+
do_action( 'easingslider_do_editor_actions' );
|
316 |
+
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Does our publish actions
|
321 |
+
*
|
322 |
+
* @return void
|
323 |
+
*/
|
324 |
+
public function do_publish_actions() {
|
325 |
+
|
326 |
+
// Continue if the save button has been pressed
|
327 |
+
if ( isset( $_POST['save'] ) ) {
|
328 |
+
|
329 |
+
// Bail if nonce is invalid
|
330 |
+
if ( ! check_admin_referer( 'save' ) ) {
|
331 |
+
return;
|
332 |
+
}
|
333 |
+
|
334 |
+
// Create a new slider
|
335 |
+
$slider = Easing_Slider::create();
|
336 |
+
|
337 |
+
// Set attributes
|
338 |
+
$slider->set( $this->get_form_fields() );
|
339 |
+
|
340 |
+
// Save the slider
|
341 |
+
$slider->save();
|
342 |
+
|
343 |
+
// Trigger actions
|
344 |
+
do_action( 'easingslider_publish_slider_actions' );
|
345 |
+
|
346 |
+
// Redirect to the editor for our new slider
|
347 |
+
wp_redirect( "admin.php?page=easingslider_edit_sliders&edit={$slider->ID}" );
|
348 |
+
|
349 |
+
}
|
350 |
+
|
351 |
+
// Trigger actions
|
352 |
+
do_action( 'easingslider_do_editor_actions' );
|
353 |
+
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Displays the edit view
|
358 |
+
*
|
359 |
+
* @return void
|
360 |
+
*/
|
361 |
+
public function display_edit_view() {
|
362 |
+
|
363 |
+
// Get the page
|
364 |
+
$page = $_GET['page'];
|
365 |
+
|
366 |
+
// Show the appropriate view
|
367 |
+
if ( isset( $_GET['edit'] ) ) {
|
368 |
+
|
369 |
+
// Get the slider by its ID
|
370 |
+
$slider = Easing_Slider::find( $_GET['edit'] );
|
371 |
+
|
372 |
+
// Display the editor
|
373 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/edit-slider.php';
|
374 |
+
|
375 |
+
}
|
376 |
+
else {
|
377 |
+
|
378 |
+
// Get the sliders list table
|
379 |
+
$list_table = new ES_Sliders_List_Table();
|
380 |
+
|
381 |
+
// Display the list
|
382 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/list-sliders.php';
|
383 |
+
|
384 |
+
}
|
385 |
+
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Displays the publish view
|
390 |
+
*
|
391 |
+
* @return void
|
392 |
+
*/
|
393 |
+
public function display_publish_view() {
|
394 |
+
|
395 |
+
// Get the current page
|
396 |
+
$page = $_GET['page'];
|
397 |
+
|
398 |
+
// Initiate a new slider
|
399 |
+
$slider = Easing_Slider::create();
|
400 |
+
|
401 |
+
// Display the view
|
402 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/edit-slider.php';
|
403 |
+
|
404 |
+
}
|
405 |
+
|
406 |
+
}
|
includes/class-es-extensions-page.php
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class for "Extensions" discovery page.
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Extensions_Page {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Adds our "extensions" page user capabilities
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function add_capabilities() {
|
23 |
+
|
24 |
+
// Get user role
|
25 |
+
$role = get_role( 'administrator' );
|
26 |
+
|
27 |
+
// Add the capability
|
28 |
+
$role->add_cap( 'easingslider_discover_extensions' );
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Removes our "extensions" page user capabilities
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function remove_capabilities() {
|
38 |
+
|
39 |
+
// Get user role
|
40 |
+
$role = get_role( 'administrator' );
|
41 |
+
|
42 |
+
// Remove the capability
|
43 |
+
$role->remove_cap( 'easingslider_discover_extensions' );
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Adds our page to the "Sliders" menu
|
49 |
+
*
|
50 |
+
* @return void
|
51 |
+
*/
|
52 |
+
public function add_submenu_page() {
|
53 |
+
|
54 |
+
// "Extensions" page
|
55 |
+
$hook = add_submenu_page(
|
56 |
+
'easingslider_edit_sliders',
|
57 |
+
__( 'Extensions', 'easingslider' ),
|
58 |
+
__( 'Extensions', 'easingslider' ),
|
59 |
+
'easingslider_discover_extensions',
|
60 |
+
'easingslider_discover_extensions',
|
61 |
+
array( $this, 'display_view' )
|
62 |
+
);
|
63 |
+
|
64 |
+
// Page-specific hooks
|
65 |
+
add_action( "admin_print_styles-{$hook}", array( $this, 'enqueue_styles' ) );
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Registers all of our extensions page assets
|
71 |
+
*
|
72 |
+
* @return void
|
73 |
+
*/
|
74 |
+
public function register_assets() {
|
75 |
+
|
76 |
+
// Get our directory
|
77 |
+
$css_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/css';
|
78 |
+
|
79 |
+
// Get file suffix
|
80 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
81 |
+
|
82 |
+
// Register our stylesheet
|
83 |
+
wp_register_style( 'easingslider-extensions-page', "{$css_dir}/extensions-page{$suffix}.css", false, Easing_Slider::$version );
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Enqueues all of our extensions page styles
|
89 |
+
*
|
90 |
+
* @return void
|
91 |
+
*/
|
92 |
+
public function enqueue_styles() {
|
93 |
+
|
94 |
+
// Enqueue our stylesheet
|
95 |
+
wp_enqueue_style( 'easingslider-extensions-page' );
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Returns an array of available extensions
|
101 |
+
*
|
102 |
+
* @return array
|
103 |
+
*/
|
104 |
+
public function available_extensions() {
|
105 |
+
|
106 |
+
$available_extensions = array(
|
107 |
+
(object) array(
|
108 |
+
'title' => __( 'Visual Customizer', 'easingslider' ),
|
109 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2014/12/customizer.jpg',
|
110 |
+
'content' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis.', 'easingslider' ),
|
111 |
+
'link' => 'http://easingslider.com/extensions/visual-customizer/'
|
112 |
+
),
|
113 |
+
(object) array(
|
114 |
+
'title' => __( 'HTML Captions', 'easingslider' ),
|
115 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2014/12/captions.jpg',
|
116 |
+
'content' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis.', 'easingslider' ),
|
117 |
+
'link' => 'http://easingslider.com/extensions/html-captions/'
|
118 |
+
),
|
119 |
+
(object) array(
|
120 |
+
'title' => __( 'Touch & Swipe', 'easingslider' ),
|
121 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2014/12/touch.jpg',
|
122 |
+
'content' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis.', 'easingslider' ),
|
123 |
+
'link' => 'http://easingslider.com/extensions/touch-swipe/'
|
124 |
+
),
|
125 |
+
(object) array(
|
126 |
+
'title' => __( 'Lightbox', 'easingslider' ),
|
127 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2014/12/lightbox.jpg',
|
128 |
+
'content' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis.', 'easingslider' ),
|
129 |
+
'link' => 'http://easingslider.com/extensions/lightbox/'
|
130 |
+
),
|
131 |
+
(object) array(
|
132 |
+
'title' => __( 'Images from URL', 'easingslider' ),
|
133 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2014/12/images-from-url.jpg',
|
134 |
+
'content' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis.', 'easingslider' ),
|
135 |
+
'link' => 'http://easingslider.com/extensions/images-url/'
|
136 |
+
),
|
137 |
+
(object) array(
|
138 |
+
'title' => __( 'Featured Content', 'easingslider' ),
|
139 |
+
'image' => 'http://easingslider.com/wp-content/uploads/edd/2014/12/featured-content.jpg',
|
140 |
+
'content' => __( 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis.', 'easingslider' ),
|
141 |
+
'link' => 'http://easingslider.com/extensions/featured-content/'
|
142 |
+
)
|
143 |
+
);
|
144 |
+
|
145 |
+
// Randomize
|
146 |
+
shuffle( $available_extensions );
|
147 |
+
|
148 |
+
return $available_extensions;
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Displays the view
|
154 |
+
*
|
155 |
+
* @return void
|
156 |
+
*/
|
157 |
+
public function display_view() {
|
158 |
+
|
159 |
+
// Get available extensions
|
160 |
+
$extensions = $this->available_extensions();
|
161 |
+
|
162 |
+
// Display the view
|
163 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/discover-extensions.php';
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
}
|
includes/class-es-image-resizer.php
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Our custom image resizing class (no Timthumb here!)
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Image_Resizer {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Resizes an image
|
19 |
+
*
|
20 |
+
* @param string $url The image URL
|
21 |
+
* @param int $width The desired width
|
22 |
+
* @param int $height The desired height
|
23 |
+
* @param boolean $crop Toggles cropping
|
24 |
+
* @return array|WP_Error
|
25 |
+
*/
|
26 |
+
public function resize( $url, $width, $height, $crop = true ) {
|
27 |
+
|
28 |
+
global $wpdb;
|
29 |
+
|
30 |
+
// Return a WP_Error if an empty URL was provided
|
31 |
+
if ( empty( $url ) ) {
|
32 |
+
return new WP_Error( 'no_image_url', __( 'No image URL has been entered.', 'easingslider' ), $url );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Bail if this image isn't in the Media Library.
|
37 |
+
*
|
38 |
+
* We only want to resize Media Library images, so we can be sure they get deleted correctly when appropriate.
|
39 |
+
*/
|
40 |
+
$query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE guid='%s'", $url );
|
41 |
+
$get_attachment = $wpdb->get_results( $query );
|
42 |
+
|
43 |
+
if ( ! $get_attachment ) {
|
44 |
+
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
45 |
+
}
|
46 |
+
|
47 |
+
// Get the image file path
|
48 |
+
$file_path = parse_url( $url );
|
49 |
+
$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];
|
50 |
+
|
51 |
+
// Additional handling for multisite
|
52 |
+
if ( is_multisite() ) {
|
53 |
+
global $blog_id;
|
54 |
+
$blog_details = get_blog_details( $blog_id );
|
55 |
+
$file_path = str_replace( $blog_details->path . 'files/', '/wp-content/blogs.dir/'. $blog_id .'/files/', $file_path );
|
56 |
+
}
|
57 |
+
|
58 |
+
// Destination width and height variables
|
59 |
+
$dest_width = apply_filters( 'easingslider_resize_image_width', $width, $get_attachment );
|
60 |
+
$dest_height = apply_filters( 'easingslider_resize_image_height', $height, $get_attachment );
|
61 |
+
|
62 |
+
// File name suffix (appended to original file name)
|
63 |
+
$suffix = "{$dest_width}x{$dest_height}";
|
64 |
+
|
65 |
+
// Some additional info about the image
|
66 |
+
$info = pathinfo( $file_path );
|
67 |
+
$dir = $info['dirname'];
|
68 |
+
$ext = $info['extension'];
|
69 |
+
$name = wp_basename( $file_path, ".$ext" );
|
70 |
+
|
71 |
+
// Suffix applied to filename
|
72 |
+
$suffix = "{$dest_width}x{$dest_height}";
|
73 |
+
|
74 |
+
// Get the destination file name
|
75 |
+
$dest_file_name = "{$dir}/{$name}-{$suffix}.{$ext}";
|
76 |
+
|
77 |
+
// Execute the resizing if resized image doesn't already exist.
|
78 |
+
if ( ! file_exists( $dest_file_name ) ) {
|
79 |
+
|
80 |
+
// Load Wordpress Image Editor
|
81 |
+
$editor = wp_get_image_editor( $file_path );
|
82 |
+
|
83 |
+
// Bail if we encounter a WP_Error
|
84 |
+
if ( is_wp_error( $editor ) ) {
|
85 |
+
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
86 |
+
}
|
87 |
+
|
88 |
+
// Get the original image size
|
89 |
+
$size = $editor->get_size();
|
90 |
+
$orig_width = $size['width'];
|
91 |
+
$orig_height = $size['height'];
|
92 |
+
|
93 |
+
$src_x = $src_y = 0;
|
94 |
+
$src_w = $orig_width;
|
95 |
+
$src_h = $orig_height;
|
96 |
+
|
97 |
+
// Handle cropping
|
98 |
+
if ( $crop ) {
|
99 |
+
|
100 |
+
$cmp_x = $orig_width / $dest_width;
|
101 |
+
$cmp_y = $orig_height / $dest_height;
|
102 |
+
|
103 |
+
// Calculate x or y coordinate, and width or height of source
|
104 |
+
if ( $cmp_x > $cmp_y ) {
|
105 |
+
$src_w = round( $orig_width / $cmp_x * $cmp_y );
|
106 |
+
$src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 );
|
107 |
+
}
|
108 |
+
else if ( $cmp_y > $cmp_x ) {
|
109 |
+
$src_h = round( $orig_height / $cmp_y * $cmp_x );
|
110 |
+
$src_y = round( ( $orig_height - ( $orig_height / $cmp_y * $cmp_x ) ) / 2 );
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
// Time to crop the image
|
116 |
+
$editor->crop( $src_x, $src_y, $src_w, $src_h, $dest_width, $dest_height );
|
117 |
+
|
118 |
+
// Now let's save the image
|
119 |
+
$saved = $editor->save( $dest_file_name );
|
120 |
+
|
121 |
+
// Get resized image information
|
122 |
+
$resized_url = str_replace( basename( $url ), basename( $saved['path'] ), $url );
|
123 |
+
$resized_width = $saved['width'];
|
124 |
+
$resized_height = $saved['height'];
|
125 |
+
$resized_type = $saved['mime-type'];
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Add the resized dimensions to original image metadata
|
129 |
+
*
|
130 |
+
* This ensures our resized images are deleted when the original image is deleted from the Media Library
|
131 |
+
*/
|
132 |
+
$metadata = wp_get_attachment_metadata( $get_attachment[0]->ID );
|
133 |
+
if ( isset( $metadata['image_meta'] ) ) {
|
134 |
+
$metadata['image_meta']['resized_images'][] = $resized_width .'x'. $resized_height;
|
135 |
+
wp_update_attachment_metadata( $get_attachment[0]->ID, $metadata );
|
136 |
+
}
|
137 |
+
|
138 |
+
// Create the image array
|
139 |
+
$resized_image = array(
|
140 |
+
'url' => $resized_url,
|
141 |
+
'width' => $resized_width,
|
142 |
+
'height' => $resized_height,
|
143 |
+
'type' => $resized_type
|
144 |
+
);
|
145 |
+
|
146 |
+
}
|
147 |
+
else {
|
148 |
+
$resized_image = array(
|
149 |
+
'url' => str_replace( basename( $url ), basename( $dest_file_name ), $url ),
|
150 |
+
'width' => $dest_width,
|
151 |
+
'height' => $dest_height,
|
152 |
+
'type' => $ext
|
153 |
+
);
|
154 |
+
}
|
155 |
+
|
156 |
+
// And we're done!
|
157 |
+
return $resized_image;
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Swaps the image URL with the URL of our resized image, if resizing is enabled.
|
163 |
+
*
|
164 |
+
* @param string $image_url The current image URL
|
165 |
+
* @param object $width The desired image width
|
166 |
+
* @param object $height The desired image height
|
167 |
+
* @return object
|
168 |
+
*/
|
169 |
+
public function resized_image_url( $image_url, $width, $height ) {
|
170 |
+
|
171 |
+
// Get plugin settings
|
172 |
+
$settings = get_option( 'easingslider_settings' );
|
173 |
+
|
174 |
+
// Check for resizing
|
175 |
+
if ( ! empty( $settings->image_resizing ) ) {
|
176 |
+
|
177 |
+
// Resize the image
|
178 |
+
$resized_image = $this->resize( $image_url, $width, $height, true );
|
179 |
+
|
180 |
+
// Check for errors
|
181 |
+
if ( ! is_wp_error( $resized_image ) ) {
|
182 |
+
$image_url = $resized_image['url'];
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
return $image_url;
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Deletes any resized images when the original image is deleted from the Wordpress Media Library.
|
193 |
+
*
|
194 |
+
* @param int $post_id The attachment ID
|
195 |
+
* @return void
|
196 |
+
*/
|
197 |
+
public function delete_resized_attachments( $post_id ) {
|
198 |
+
|
199 |
+
// Get attachment image metadata
|
200 |
+
$metadata = wp_get_attachment_metadata( $post_id );
|
201 |
+
|
202 |
+
// Bail if we've failed
|
203 |
+
if ( ! $metadata ) {
|
204 |
+
return;
|
205 |
+
}
|
206 |
+
|
207 |
+
// Bail if we don't have the parameters needed to continue
|
208 |
+
if ( ! isset( $metadata['file'] ) OR ! isset( $metadata['image_meta']['resized_images'] ) ) {
|
209 |
+
return;
|
210 |
+
}
|
211 |
+
|
212 |
+
// Establish variables
|
213 |
+
$pathinfo = pathinfo( $metadata['file'] );
|
214 |
+
$resized_images = $metadata['image_meta']['resized_images'];
|
215 |
+
|
216 |
+
// Get Wordpress uploads directory
|
217 |
+
$wp_upload_dir = wp_upload_dir();
|
218 |
+
$upload_dir = $wp_upload_dir['basedir'];
|
219 |
+
|
220 |
+
// Bail if WordPress uploads directory doesn't exist
|
221 |
+
if ( ! is_dir( $upload_dir ) ) {
|
222 |
+
return;
|
223 |
+
}
|
224 |
+
|
225 |
+
// Delete the resized images
|
226 |
+
foreach ( $resized_images as $dimensions ) {
|
227 |
+
|
228 |
+
// Get the resized images filename
|
229 |
+
$file = $upload_dir .'/'. $pathinfo['dirname'] .'/'. $pathinfo['filename'] .'-'. $dimensions .'.'. $pathinfo['extension'];
|
230 |
+
|
231 |
+
// Delete the resized image
|
232 |
+
@unlink( $file );
|
233 |
+
|
234 |
+
}
|
235 |
+
|
236 |
+
}
|
237 |
+
|
238 |
+
}
|
includes/class-es-legacy.php
ADDED
@@ -0,0 +1,640 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Simple helper legacy functions for displaying sliders
|
12 |
+
*
|
13 |
+
* @param int $id The legacy slider ID
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
if ( ! function_exists( 'easingsliderlite' ) ) {
|
17 |
+
function easingsliderlite() {
|
18 |
+
echo do_shortcode( "[easingsliderlite]" );
|
19 |
+
}
|
20 |
+
}
|
21 |
+
if ( ! function_exists( 'easingsliderpro' ) ) {
|
22 |
+
function easingsliderpro( $id ) {
|
23 |
+
echo do_shortcode( "[easingsliderpro id=\"{$id}\"]" );
|
24 |
+
}
|
25 |
+
}
|
26 |
+
if ( ! function_exists( 'riva_slider_pro' ) ) {
|
27 |
+
function riva_slider_pro( $id ) {
|
28 |
+
echo do_shortcode( "[rivasliderpro id=\"{$id}\"]" );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* This class ensures a smooth transition from "Lite" or "Pro" to our new unified "Easing Slider" plugin.
|
34 |
+
*
|
35 |
+
* Lots of horrible, messy legacy code here that I absolutely hate, but is necessary.
|
36 |
+
*
|
37 |
+
* @author Matthew Ruddy
|
38 |
+
*/
|
39 |
+
class ES_Legacy {
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Gets a Easing Slider "Pro" legacy slider.
|
43 |
+
*
|
44 |
+
* @param int $legacy_id The legacy slider ID
|
45 |
+
* @return Easing_Slider|false
|
46 |
+
*/
|
47 |
+
public function get_pro_slider( $legacy_id ) {
|
48 |
+
|
49 |
+
// Get our "pivot" array option
|
50 |
+
$pivots = get_option( 'easingslider_pro_slider_pivots' );
|
51 |
+
|
52 |
+
// Bail if we have no pivots
|
53 |
+
if ( ! $pivots ) {
|
54 |
+
return false;
|
55 |
+
}
|
56 |
+
|
57 |
+
// Loop through each pivot and return the match, if we have find one.
|
58 |
+
foreach ( $pivots as $pivot ) {
|
59 |
+
if ( $legacy_id == $pivot->legacy_id ) {
|
60 |
+
return Easing_Slider::find( $pivot->id );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
return false;
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Creates a Easing Slider "Pro" legacy slider.
|
70 |
+
*
|
71 |
+
* @param int $legacy_id The legacy slider ID
|
72 |
+
* @param string $legacy_title The legacy slider title
|
73 |
+
* @return Easing_Slider
|
74 |
+
*/
|
75 |
+
public function create_pro_slider( $legacy_id, $legacy_title = null ) {
|
76 |
+
|
77 |
+
// If we don't have a pivot option already, create one. Does nothing otherwise.
|
78 |
+
add_option( 'easingslider_pro_slider_pivots', array() );
|
79 |
+
|
80 |
+
// Get our "pivot" array option
|
81 |
+
$pivots = get_option( 'easingslider_pro_slider_pivots' );
|
82 |
+
|
83 |
+
// Create our Easing Slider "Pro" legacy slider
|
84 |
+
$pro_slider = Easing_Slider::create();
|
85 |
+
$pro_slider->post_title = easingslider_validate_data( $legacy_title );
|
86 |
+
$pro_slider->save();
|
87 |
+
|
88 |
+
// Populate the pivot
|
89 |
+
$pivot = (object) array( 'legacy_id' => (int) $legacy_id, 'id' => (int) $pro_slider->ID );
|
90 |
+
|
91 |
+
// Save to our pivots
|
92 |
+
update_option( 'easingslider_pro_slider_pivots', array_merge( $pivots, array( $pivot ) ) );
|
93 |
+
|
94 |
+
return $pro_slider;
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Deletes the Easing Slider "Pro" related options when the slider itself is deleted.
|
100 |
+
*
|
101 |
+
* @param int $id The slider ID
|
102 |
+
* @return void
|
103 |
+
*/
|
104 |
+
public function delete_pro_slider( $id ) {
|
105 |
+
|
106 |
+
// Get the "pivot" array option
|
107 |
+
$pivots = get_option( 'easingslider_pro_slider_pivots' );
|
108 |
+
|
109 |
+
// Bail if we have no pivots
|
110 |
+
if ( ! $pivots ) {
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
|
114 |
+
// Loop through and find a matching pivot
|
115 |
+
foreach ( $pivots as $key => $pivot ) {
|
116 |
+
if ( $id == $pivot->id ) {
|
117 |
+
unset( $pivots[ $key ] );
|
118 |
+
|
119 |
+
update_option( 'easingslider_pro_slider_pivots', $pivots );
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
// If pivots are empty, delete the option altogether.
|
124 |
+
if ( count( $pivots ) == 0 ) {
|
125 |
+
delete_option( 'easingslider_pro_slider_pivots' );
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Renders our Easing Slider "Pro" shortcode
|
132 |
+
*
|
133 |
+
* @param int $legacy_id The legacy slider ID
|
134 |
+
* @return string
|
135 |
+
*/
|
136 |
+
public function render_pro_slider( $legacy_id ) {
|
137 |
+
|
138 |
+
// Get our "Pro" slider
|
139 |
+
$pro_slider = $this->get_pro_slider( $legacy_id );
|
140 |
+
|
141 |
+
return $pro_slider->render();
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Handle the functionality for our Easing Slider "Pro" shortcode
|
147 |
+
*
|
148 |
+
* @param array $atts The shortcode attributes
|
149 |
+
* @return string
|
150 |
+
*/
|
151 |
+
public function do_pro_shortcode( $atts ) {
|
152 |
+
|
153 |
+
// Extract shortcode attributes
|
154 |
+
extract(
|
155 |
+
shortcode_atts(
|
156 |
+
array( 'id' => false ),
|
157 |
+
$atts
|
158 |
+
)
|
159 |
+
);
|
160 |
+
|
161 |
+
// Display error message if no ID has been entered
|
162 |
+
if ( ! $id ) {
|
163 |
+
return __( 'Looks like you\'ve forgotten to add a slideshow ID to this shortcode. Oh dear!', 'easingslider' );
|
164 |
+
}
|
165 |
+
|
166 |
+
return $this->render_pro_slider( $id );
|
167 |
+
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Upgrades the plugin from Easing Slider "Pro" v1.0 and onwards (was known as Riva Slider "Pro" at this time).
|
172 |
+
*
|
173 |
+
* @return void
|
174 |
+
*/
|
175 |
+
public function pro_upgrade_from_100() {
|
176 |
+
|
177 |
+
// Bail if this has already been carried out
|
178 |
+
if ( get_option( 'easingslider_upgraded_from_pro' ) ) {
|
179 |
+
return;
|
180 |
+
}
|
181 |
+
|
182 |
+
// Bail if we don't have a version, telling us that the plugin wasn't installed and there is nothing to update.
|
183 |
+
if ( ! get_option( 'riva_slider_pro_version' ) ) {
|
184 |
+
return;
|
185 |
+
}
|
186 |
+
|
187 |
+
// Get the legacy sliders
|
188 |
+
$legacy_sliders = get_option( 'riva_slider_pro_slideshows' );
|
189 |
+
|
190 |
+
// Add the sliders, if we have any.
|
191 |
+
if ( $legacy_sliders ) {
|
192 |
+
foreach ( $legacy_sliders as $legacy_slider ) {
|
193 |
+
|
194 |
+
// Create the Easing Slider "Pro" slider
|
195 |
+
$slider = $this->create_pro_slider( $legacy_slider['id'], $legacy_slider['name'] );
|
196 |
+
|
197 |
+
// Transfer the data
|
198 |
+
$slider->general->randomize = ( ! empty( $legacy_slider['random_order'] ) ) ? true : false;
|
199 |
+
$slider->dimensions->width = easingslider_validate_data( $legacy_slider['width'] );
|
200 |
+
$slider->dimensions->height = easingslider_validate_data( $legacy_slider['height'] );
|
201 |
+
$slider->transitions->duration = easingslider_validate_data( $legacy_slider['trans_time'] );
|
202 |
+
$slider->navigation->arrows = ( $legacy_slider['direction_nav'] == 'enable' ) ? true : false;
|
203 |
+
$slider->navigation->arrows_hover = easingslider_validate_data( $legacy_slider['direction_nav_hover'] );
|
204 |
+
$slider->navigation->arrows_position = easingslider_validate_data( $legacy_slider['direction_nav_position'] );
|
205 |
+
$slider->navigation->pagination = ( $legacy_slider['control_nav'] == 'enable' ) ? true : false;
|
206 |
+
$slider->navigation->pagination_location = easingslider_validate_data( str_replace( '_', '-', $old_slideshow['control_nav_pos'] ) );
|
207 |
+
|
208 |
+
// Add the slides
|
209 |
+
foreach ( $legacy_slider['images'] as $key => $legacy_slide ) {
|
210 |
+
|
211 |
+
// Query the guid
|
212 |
+
$attachment_query = $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s'", $legacy_slide['image-url'] );
|
213 |
+
|
214 |
+
// Attempt to get the attachment of this image
|
215 |
+
$attachment_id = $wpdb->get_var( $attachment_query );
|
216 |
+
|
217 |
+
// Populate the slide
|
218 |
+
$slide = (object) array(
|
219 |
+
'id' => easingslider_validate_data( ( $key + 1 ) ),
|
220 |
+
'attachment_id' => easingslider_validate_data( $attachment_id ),
|
221 |
+
'type' => 'image',
|
222 |
+
'alt' => easingslider_validate_data( $legacy_slide['image-alt'] ),
|
223 |
+
'aspectRatio' => null,
|
224 |
+
'link' => 'custom',
|
225 |
+
'linkUrl' => ( 'webpage' == $legacy_slide['image-link'] ) ? $legacy_slide['webpage-url'] : $legacy_slide['video-url'],
|
226 |
+
'title' => easingslider_validate_data( $legacy_slide['image-title'] )
|
227 |
+
);
|
228 |
+
|
229 |
+
// Add an image URL if we aren't using an attachment
|
230 |
+
if ( ! $attachment_id ) {
|
231 |
+
$slide->url = easingslider_validate_data( $legacy_slide['image-url'] );
|
232 |
+
}
|
233 |
+
|
234 |
+
// Validate & add the slide
|
235 |
+
$slider->slides[] = easingslider_validate_data( $slide );
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
// Save the slider
|
240 |
+
$slider->save();
|
241 |
+
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
// Flag that this update has been done
|
246 |
+
update_option( 'easingslider_upgraded_from_pro', true );
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Upgrades the plugin from Easing Slider "Pro" v2.0 and onwards.
|
252 |
+
*
|
253 |
+
* @return void
|
254 |
+
*/
|
255 |
+
public function pro_upgrade_from_200() {
|
256 |
+
|
257 |
+
global $wpdb;
|
258 |
+
|
259 |
+
// Bail if this has already been carried out
|
260 |
+
if ( get_option( 'easingslider_upgraded_from_pro' ) ) {
|
261 |
+
return;
|
262 |
+
}
|
263 |
+
|
264 |
+
// Bail if we don't have a version, telling us that the plugin wasn't installed and there is nothing to update.
|
265 |
+
if ( ! get_option( 'easingsliderpro_version' ) ) {
|
266 |
+
return;
|
267 |
+
}
|
268 |
+
|
269 |
+
// Get the legacy sliders
|
270 |
+
$legacy_sliders = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}easingsliderpro" );
|
271 |
+
|
272 |
+
// Add the sliders, if we have any.
|
273 |
+
if ( $legacy_sliders ) {
|
274 |
+
foreach ( $legacy_sliders as $legacy_slider ) {
|
275 |
+
|
276 |
+
// Create the Easing Slider "Pro" slider
|
277 |
+
$slider = $this->create_pro_slider( $legacy_slider->id, $legacy_slider->name );
|
278 |
+
|
279 |
+
// Decode the legacy slider's json
|
280 |
+
$legacy_slider->general = json_decode( $legacy_slider->general );
|
281 |
+
$legacy_slider->dimensions = json_decode( $legacy_slider->dimensions );
|
282 |
+
$legacy_slider->transitions = json_decode( $legacy_slider->transitions );
|
283 |
+
$legacy_slider->navigation = json_decode( $legacy_slider->navigation );
|
284 |
+
$legacy_slider->playback = json_decode( $legacy_slider->playback );
|
285 |
+
$legacy_slider->slides = json_decode( $legacy_slider->slides );
|
286 |
+
|
287 |
+
// Transfer the data
|
288 |
+
$slider->general->randomize = easingslider_validate_data( $legacy_slider->general->randomize );
|
289 |
+
$slider->dimensions->width = easingslider_validate_data( $legacy_slider->dimensions->width );
|
290 |
+
$slider->dimensions->height = easingslider_validate_data( $legacy_slider->dimensions->height );
|
291 |
+
$slider->dimensions->responsive = easingslider_validate_data( $legacy_slider->dimensions->responsive );
|
292 |
+
$slider->transitions->effect = easingslider_validate_data( $legacy_slider->transitions->effect );
|
293 |
+
$slider->transitions->duration = easingslider_validate_data( $legacy_slider->transitions->duration );
|
294 |
+
$slider->navigation->arrows = easingslider_validate_data( $legacy_slider->navigation->arrows );
|
295 |
+
$slider->navigation->arrows_hover = easingslider_validate_data( $legacy_slider->navigation->arrows_hover );
|
296 |
+
$slider->navigation->arrows_position = easingslider_validate_data( $legacy_slider->navigation->arrows_position );
|
297 |
+
$slider->navigation->pagination = easingslider_validate_data( $legacy_slider->navigation->pagination );
|
298 |
+
$slider->navigation->pagination_hover = easingslider_validate_data( $legacy_slider->navigation->pagination_hover );
|
299 |
+
$slider->navigation->pagination_position = easingslider_validate_data( $legacy_slider->navigation->pagination_position );
|
300 |
+
$slider->navigation->pagination_location = easingslider_validate_data( $legacy_slider->navigation->pagination_location );
|
301 |
+
$slider->playback->enabled = easingslider_validate_data( $legacy_slider->playback->enabled );
|
302 |
+
$slider->playback->pause = easingslider_validate_data( $legacy_slider->playback->pause );
|
303 |
+
|
304 |
+
// Add the slides
|
305 |
+
foreach ( $legacy_slider->slides as $legacy_slide ) {
|
306 |
+
|
307 |
+
// Query the guid
|
308 |
+
$attachment_query = $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s'", $legacy_slide->url );
|
309 |
+
|
310 |
+
// Attempt to get the attachment of this image
|
311 |
+
$attachment_id = $wpdb->get_var( $attachment_query );
|
312 |
+
|
313 |
+
// Populate the slide
|
314 |
+
$slide = (object) array(
|
315 |
+
'id' => easingslider_validate_data( $legacy_slide->id ),
|
316 |
+
'attachment_id' => easingslider_validate_data( $attachment_id ),
|
317 |
+
'type' => 'image',
|
318 |
+
'alt' => easingslider_validate_data( $legacy_slide->alt ),
|
319 |
+
'aspectRatio' => null,
|
320 |
+
'link' => ( $legacy_slide->link ) ? 'custom' : 'none',
|
321 |
+
'linkUrl' => easingslider_validate_data( $legacy_slide->link ),
|
322 |
+
'title' => easingslider_validate_data( $legacy_slide->title )
|
323 |
+
);
|
324 |
+
|
325 |
+
// Add an image URL if we aren't using an attachment
|
326 |
+
if ( ! $attachment_id ) {
|
327 |
+
$slide->url = easingslider_validate_data( $legacy_slide->url );
|
328 |
+
}
|
329 |
+
|
330 |
+
// Validate & add the slide
|
331 |
+
$slider->slides[] = easingslider_validate_data( $slide );
|
332 |
+
|
333 |
+
}
|
334 |
+
|
335 |
+
// Save the slider
|
336 |
+
$slider->save();
|
337 |
+
|
338 |
+
}
|
339 |
+
}
|
340 |
+
|
341 |
+
// Get the settings
|
342 |
+
$settings = get_option( 'easingslider_settings' );
|
343 |
+
|
344 |
+
// Get the legacy settings
|
345 |
+
$legacy_settings = get_option( "easingsliderpro_settings" );
|
346 |
+
|
347 |
+
// Transfer the settings
|
348 |
+
$settings->load_assets = $legacy_settings['load_scripts'];
|
349 |
+
$settings->image_resizing = $legacy_settings['resizing'];
|
350 |
+
|
351 |
+
// Save the settings
|
352 |
+
update_option( 'easingslider_settings', $settings );
|
353 |
+
|
354 |
+
// Flag that this update has been done
|
355 |
+
update_option( 'easingslider_upgraded_from_pro', true );
|
356 |
+
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Gets the Easing Slider "Lite" legacy slider.
|
361 |
+
*
|
362 |
+
* @return Easing_Slider|false
|
363 |
+
*/
|
364 |
+
public function get_lite_slider() {
|
365 |
+
|
366 |
+
// Get the ID of our "Lite" slider
|
367 |
+
$lite_id = get_option( 'easingslider_lite_slider_id' );
|
368 |
+
|
369 |
+
// Get the Easing Slider "Lite" slider
|
370 |
+
$lite_slider = Easing_Slider::find( $lite_id );
|
371 |
+
|
372 |
+
return $lite_slider;
|
373 |
+
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Creates the Easing Slider "Lite" legacy slider.
|
378 |
+
*
|
379 |
+
* @return Easing_Slider
|
380 |
+
*/
|
381 |
+
public function create_lite_slider() {
|
382 |
+
|
383 |
+
// Create the slider
|
384 |
+
$lite_slider = Easing_Slider::create();
|
385 |
+
$lite_slider->post_title = 'Easing Slider "Lite"';
|
386 |
+
$lite_slider->save();
|
387 |
+
|
388 |
+
// Save the Easing Slider "Lite" slider ID
|
389 |
+
update_option( 'easingslider_lite_slider_id', $lite_slider->ID );
|
390 |
+
|
391 |
+
return $lite_slider;
|
392 |
+
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Deletes the Easing Slider "Lite" related options when the slider itself is deleted.
|
397 |
+
*
|
398 |
+
* @param int $id The slider ID
|
399 |
+
* @return void
|
400 |
+
*/
|
401 |
+
public function delete_lite_slider( $id ) {
|
402 |
+
|
403 |
+
// If we've deleted the Easing Slider "Lite" slider, delete its options.
|
404 |
+
if ( $id == get_option( 'easingslider_lite_slider_id' ) ) {
|
405 |
+
delete_option( 'easingslider_lite_slider_id' );
|
406 |
+
}
|
407 |
+
|
408 |
+
}
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Renders our Easing Slider "Lite" shortcode
|
412 |
+
*
|
413 |
+
* @return string
|
414 |
+
*/
|
415 |
+
public function render_lite_slider() {
|
416 |
+
|
417 |
+
// Get our "Lite" slider
|
418 |
+
$lite_slider = $this->get_lite_slider();
|
419 |
+
|
420 |
+
return $lite_slider->render();
|
421 |
+
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Handle the functionality for our Easing Slider "Lite" shortcode
|
426 |
+
*
|
427 |
+
* @return string
|
428 |
+
*/
|
429 |
+
public function do_lite_shortcode() {
|
430 |
+
|
431 |
+
return $this->render_lite_slider();
|
432 |
+
|
433 |
+
}
|
434 |
+
|
435 |
+
/**
|
436 |
+
* Upgrades the plugin from Easing Slider "Lite" v1.0 and onwards.
|
437 |
+
*
|
438 |
+
* @return void
|
439 |
+
*/
|
440 |
+
public function lite_upgrade_from_100() {
|
441 |
+
|
442 |
+
/**
|
443 |
+
* This version of the plugin had no "version" option, so we have to improvise.
|
444 |
+
*
|
445 |
+
* To do this, we will cycle through the options used to store the images from #1 to #10.
|
446 |
+
* If we find an image, we will assume the plugin settings exist and will continue with the update.
|
447 |
+
*/
|
448 |
+
$legacy_images = array( 'sImg1', 'sImg2', 'sImg3', 'sImg4', 'sImg5', 'sImg6', 'sImg7', 'sImg8', 'sImg9', 'sImg10' );
|
449 |
+
|
450 |
+
// Loop through each image option, and continue if we find a match.
|
451 |
+
foreach ( $legacy_images as $legacy_image ) {
|
452 |
+
|
453 |
+
// Continue if we find an image, telling us that the plugin was being used
|
454 |
+
if ( get_option( $legacy_image ) ) {
|
455 |
+
|
456 |
+
// Create the Easing Slider "Lite" slider
|
457 |
+
$slider = $this->create_lite_slider();
|
458 |
+
|
459 |
+
// Transfer the data
|
460 |
+
$slider->dimensions->width = easingslider_validate_data( get_option( 'width' ) );
|
461 |
+
$slider->dimensions->height = easingslider_validate_data( get_option( 'height' ) );
|
462 |
+
$slider->dimensions->responsive = false;
|
463 |
+
$slider->transitions->effect = ( get_option( 'transition' ) == 'fade' ) ? 'fade' : 'slide';
|
464 |
+
$slider->transitions->duration = easingslider_validate_data( get_option( 'transpeed' ) );
|
465 |
+
$slider->navigation->arrows = ( get_option( 'buttons' ) == '' ) ? false : true;
|
466 |
+
$slider->navigation->pagination = ( get_option( 'sPagination' ) == '' ) ? false : true;
|
467 |
+
$slider->playback->pause = easingslider_validate_data( get_option( 'interval' ) );
|
468 |
+
|
469 |
+
// Add the slides. We used to have a maximum of ten, hence the "for" loop.
|
470 |
+
for ( $i = 1; $i <= 10; $i++ ) {
|
471 |
+
|
472 |
+
// Get the image, and bail if it doesn't exist.
|
473 |
+
if ( ! ( $image == get_option( "sImg{$i}" ) ) ) {
|
474 |
+
continue;
|
475 |
+
}
|
476 |
+
|
477 |
+
// Push the slide data
|
478 |
+
$slider->slides[] = (object) array(
|
479 |
+
'id' => $i,
|
480 |
+
'attachment_id' => null,
|
481 |
+
'type' => 'image',
|
482 |
+
'alt' => '',
|
483 |
+
'aspectRatio' => null,
|
484 |
+
'link' => ( get_option( "sImgLink{$i}" ) == '' ) ? 'none' : 'custom',
|
485 |
+
'linkUrl' => easingslider_validate_data( get_option( "sImgLink{$i}" ) ),
|
486 |
+
'title' => '',
|
487 |
+
'url' => easingslider_validate_data( $image )
|
488 |
+
);
|
489 |
+
|
490 |
+
}
|
491 |
+
|
492 |
+
// Save the slider
|
493 |
+
$slider->save();
|
494 |
+
|
495 |
+
// We've done our update. Time to bail!
|
496 |
+
return;
|
497 |
+
|
498 |
+
}
|
499 |
+
|
500 |
+
}
|
501 |
+
|
502 |
+
}
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Upgrades the plugin from Easing Slider "Lite" v2.0 and onwards.
|
506 |
+
*
|
507 |
+
* @return void
|
508 |
+
*/
|
509 |
+
public function lite_upgrade_from_200() {
|
510 |
+
|
511 |
+
global $wpdb;
|
512 |
+
|
513 |
+
// Bail if this has already been carried out
|
514 |
+
if ( get_option( 'easingslider_upgraded_from_lite' ) ) {
|
515 |
+
return;
|
516 |
+
}
|
517 |
+
|
518 |
+
/**
|
519 |
+
* In my previous attempts to change the plugin name from "Easing Slider" to "Riva Slider",
|
520 |
+
* I made the catastrophic mistake of changing the plugin directory name and options, etc, which
|
521 |
+
* created dozens of issues and prompted the name change reversal.
|
522 |
+
*
|
523 |
+
* As a result, it's possible options may exist under the prefix "rivaslider" or "easingslider".
|
524 |
+
* Let's accommodate for both.
|
525 |
+
*/
|
526 |
+
$plugin_slug = ( get_option( 'easingsliderlite_version' ) ) ? 'easingsliderlite' : 'rivasliderlite';
|
527 |
+
|
528 |
+
// Bail if we don't have a version, telling us that the plugin wasn't installed and there is nothing to update.
|
529 |
+
if ( ! get_option( "{$plugin_slug}_version" ) ) {
|
530 |
+
return;
|
531 |
+
}
|
532 |
+
|
533 |
+
// Create the Easing Slider "Lite" slider
|
534 |
+
$slider = $this->create_lite_slider();
|
535 |
+
|
536 |
+
// Get the legacy slider
|
537 |
+
$legacy_slider = get_option( "{$plugin_slug}_slideshow" );
|
538 |
+
|
539 |
+
// Transfer the data
|
540 |
+
$slider->general->randomize = easingslider_validate_data( $legacy_slider->general->randomize );
|
541 |
+
$slider->dimensions->width = easingslider_validate_data( $legacy_slider->dimensions->width );
|
542 |
+
$slider->dimensions->height = easingslider_validate_data( $legacy_slider->dimensions->height );
|
543 |
+
$slider->dimensions->responsive = easingslider_validate_data( $legacy_slider->dimensions->responsive );
|
544 |
+
$slider->transitions->effect = easingslider_validate_data( $legacy_slider->transitions->effect );
|
545 |
+
$slider->transitions->duration = easingslider_validate_data( $legacy_slider->transitions->duration );
|
546 |
+
$slider->navigation->arrows = easingslider_validate_data( $legacy_slider->navigation->arrows );
|
547 |
+
$slider->navigation->arrows_hover = easingslider_validate_data( $legacy_slider->navigation->arrows_hover );
|
548 |
+
$slider->navigation->arrows_position = easingslider_validate_data( $legacy_slider->navigation->arrows_position );
|
549 |
+
$slider->navigation->pagination = easingslider_validate_data( $legacy_slider->navigation->pagination );
|
550 |
+
$slider->navigation->pagination_hover = easingslider_validate_data( $legacy_slider->navigation->pagination_hover );
|
551 |
+
$slider->navigation->pagination_position = easingslider_validate_data( $legacy_slider->navigation->pagination_position );
|
552 |
+
$slider->navigation->pagination_location = easingslider_validate_data( $legacy_slider->navigation->pagination_location );
|
553 |
+
$slider->playback->enabled = easingslider_validate_data( $legacy_slider->playback->enabled );
|
554 |
+
$slider->playback->pause = easingslider_validate_data( $legacy_slider->playback->pause );
|
555 |
+
|
556 |
+
// Add the slides
|
557 |
+
foreach ( $legacy_slider->slides as $legacy_slide ) {
|
558 |
+
|
559 |
+
// Query the guid
|
560 |
+
$attachment_query = $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE guid='%s'", $legacy_slide->url );
|
561 |
+
|
562 |
+
// Attempt to get the attachment of this image
|
563 |
+
$attachment_id = $wpdb->get_var( $attachment_query );
|
564 |
+
|
565 |
+
// Populate the slide
|
566 |
+
$slide = (object) array(
|
567 |
+
'id' => easingslider_validate_data( $legacy_slide->id ),
|
568 |
+
'attachment_id' => easingslider_validate_data( $attachment_id ),
|
569 |
+
'type' => 'image',
|
570 |
+
'alt' => easingslider_validate_data( $legacy_slide->alt ),
|
571 |
+
'aspectRatio' => null,
|
572 |
+
'link' => ( $legacy_slide->link ) ? 'custom' : 'none',
|
573 |
+
'linkUrl' => easingslider_validate_data( $legacy_slide->link ),
|
574 |
+
'title' => easingslider_validate_data( $legacy_slide->title )
|
575 |
+
);
|
576 |
+
|
577 |
+
// Add an image URL if we aren't using an attachment
|
578 |
+
if ( ! $attachment_id ) {
|
579 |
+
$slide->url = easingslider_validate_data( $legacy_slide->url );
|
580 |
+
}
|
581 |
+
|
582 |
+
// Validate & add the slide
|
583 |
+
$slider->slides[] = easingslider_validate_data( $slide );
|
584 |
+
|
585 |
+
}
|
586 |
+
|
587 |
+
// Save the slider
|
588 |
+
$slider->save();
|
589 |
+
|
590 |
+
// Get the settings
|
591 |
+
$settings = get_option( 'easingslider_settings' );
|
592 |
+
|
593 |
+
// Get the legacy settings
|
594 |
+
$legacy_settings = get_option( "{$plugin_slug}_settings" );
|
595 |
+
|
596 |
+
// Transfer the settings
|
597 |
+
$settings->load_assets = $legacy_settings['load_scripts'];
|
598 |
+
$settings->image_resizing = $legacy_settings['resizing'];
|
599 |
+
|
600 |
+
// Save the settings
|
601 |
+
update_option( 'easingslider_settings', $settings );
|
602 |
+
|
603 |
+
// Flag that this update has been done
|
604 |
+
update_option( 'easingslider_upgraded_from_lite', true );
|
605 |
+
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Redirects all users upgrading from legacy versions to the "What's New" page after activation
|
610 |
+
*
|
611 |
+
* @return void
|
612 |
+
*/
|
613 |
+
public function redirect_to_whats_new() {
|
614 |
+
|
615 |
+
// Check for previous versions
|
616 |
+
if ( get_option( 'riva_slider_pro_version' ) OR get_option( 'easingsliderpro_version' ) OR get_option( 'rivasliderlite_version' ) OR get_option( 'easingsliderlite_version' ) ) {
|
617 |
+
|
618 |
+
// Redirect to "What's New"
|
619 |
+
wp_safe_redirect( admin_url( 'index.php?page=easingslider-about' ) );
|
620 |
+
exit;
|
621 |
+
|
622 |
+
}
|
623 |
+
|
624 |
+
}
|
625 |
+
|
626 |
+
/**
|
627 |
+
* Deletes all the legacy related options.
|
628 |
+
*
|
629 |
+
* @return void
|
630 |
+
*/
|
631 |
+
public function remove_options() {
|
632 |
+
|
633 |
+
delete_option( 'easingslider_lite_slider_id' );
|
634 |
+
delete_option( 'easingslider_pro_slider_pivots' );
|
635 |
+
delete_option( 'easingslider_upgraded_from_lite' );
|
636 |
+
delete_option( 'easingslider_upgraded_from_pro' );
|
637 |
+
|
638 |
+
}
|
639 |
+
|
640 |
+
}
|
includes/class-es-menu.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class for creating our toplevel admin menu.
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Menu {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Adds the plugin toplevel menu
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function add_toplevel_menu() {
|
23 |
+
|
24 |
+
global $menu;
|
25 |
+
|
26 |
+
// Default menu positioning
|
27 |
+
$position = '100.1';
|
28 |
+
|
29 |
+
// If enabled, relocate the plugin menus higher
|
30 |
+
if ( apply_filters( 'easingslider_relocate_menus', __return_true() ) ) {
|
31 |
+
|
32 |
+
for ( $position = '40.1'; $position <= '100.1'; $position += '0.1' ) {
|
33 |
+
|
34 |
+
// Ensure there is a space before and after each position we are checking, leaving room for our separators.
|
35 |
+
$before = $position - '0.1';
|
36 |
+
$after = $position + '0.1';
|
37 |
+
|
38 |
+
// Do the checks for each position. These need to be strings, hence the quotation marks.
|
39 |
+
if ( isset( $menu[ "$position" ] ) ) {
|
40 |
+
continue;
|
41 |
+
}
|
42 |
+
if ( isset( $menu[ "$before" ] ) ) {
|
43 |
+
continue;
|
44 |
+
}
|
45 |
+
if ( isset( $menu[ "$after" ] ) ) {
|
46 |
+
continue;
|
47 |
+
}
|
48 |
+
|
49 |
+
// If we've successfully gotten this far, break the loop. We've found the position we need.
|
50 |
+
break;
|
51 |
+
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
// Add toplevel menu
|
57 |
+
add_menu_page(
|
58 |
+
__( 'Sliders', 'easingslider' ),
|
59 |
+
__( 'Sliders', 'easingslider' ),
|
60 |
+
'easingslider_edit_sliders',
|
61 |
+
'easingslider_edit_sliders',
|
62 |
+
null,
|
63 |
+
'dashicons-images-alt',
|
64 |
+
"$position"
|
65 |
+
);
|
66 |
+
|
67 |
+
// Do action allowing extension to add their own toplevel menus
|
68 |
+
do_action( 'easingslider_add_toplevel_menu', $position );
|
69 |
+
|
70 |
+
// Add the menu separators if menus have been relocated (they are by default). Quotations marks ensure these are strings.
|
71 |
+
if ( apply_filters( 'easingslider_relocate_menus', __return_true() ) ) {
|
72 |
+
$this->add_menu_separator( "$before" );
|
73 |
+
$this->add_menu_separator( "$after" );
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Create a separator in the admin menus, above and below our plugin menus
|
80 |
+
*
|
81 |
+
* @param string $position The menu position to insert the separator
|
82 |
+
* @return void
|
83 |
+
*/
|
84 |
+
protected function add_menu_separator( $position = '40.1' ) {
|
85 |
+
|
86 |
+
|
87 |
+
global $menu;
|
88 |
+
|
89 |
+
$index = 0;
|
90 |
+
foreach ( $menu as $offset => $section ) {
|
91 |
+
|
92 |
+
if ( 'separator' == substr( $section[2], 0, 9 ) ) {
|
93 |
+
$index++;
|
94 |
+
}
|
95 |
+
|
96 |
+
if ( $offset >= $position ) {
|
97 |
+
|
98 |
+
// Quotation marks ensures the position is a string. Integers won't work if we are using decimal values.
|
99 |
+
$menu[ "$position" ] = array( '', 'read', "separator{$index}", '', 'wp-menu-separator' );
|
100 |
+
break;
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
105 |
+
ksort( $menu );
|
106 |
+
|
107 |
+
}
|
108 |
+
|
109 |
+
}
|
includes/class-es-migrations.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines the version migrations.
|
12 |
+
*
|
13 |
+
* All of our update procedures can be found here.
|
14 |
+
*
|
15 |
+
* @author Matthew Ruddy
|
16 |
+
*/
|
17 |
+
class ES_Migrations {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Do migrations
|
21 |
+
*
|
22 |
+
* @return void
|
23 |
+
*/
|
24 |
+
public function do_migrations() {
|
25 |
+
|
26 |
+
// Get the plugin version
|
27 |
+
$version = get_option( 'easingslider_version' );
|
28 |
+
|
29 |
+
// Hook additional functionality
|
30 |
+
do_action( 'easingslider_update_plugin', $version );
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Updates the plugin to v2.2.
|
36 |
+
*
|
37 |
+
* @param int $version The current plugin version
|
38 |
+
* @return void
|
39 |
+
*/
|
40 |
+
public function migrate_to_22( $version ) {
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Do the update if we have no version (just upgraded from Easing Slider "Lite" or "Pro"), or if we have a version number
|
44 |
+
* below v2.2 (possible from very early versions of the plugin).
|
45 |
+
*/
|
46 |
+
if ( ! $version OR version_compare( $version, '2.2', '<' ) ) {
|
47 |
+
|
48 |
+
// Trigger activation
|
49 |
+
Easing_Slider::do_activation();
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Updates the plugin version
|
57 |
+
*
|
58 |
+
* @return void
|
59 |
+
*/
|
60 |
+
public function update_version() {
|
61 |
+
|
62 |
+
update_option( 'easingslider_version', Easing_Slider::$version );
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
includes/class-es-settings-page.php
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines our admin settings.
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Settings_Page {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Adds our settings user capabilities
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function add_capabilities() {
|
23 |
+
|
24 |
+
// Get user role
|
25 |
+
$role = get_role( 'administrator' );
|
26 |
+
|
27 |
+
// Add the capability
|
28 |
+
$role->add_cap( 'easingslider_manage_settings' );
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Removes our settings user capabilities
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function remove_capabilities() {
|
38 |
+
|
39 |
+
// Get user role
|
40 |
+
$role = get_role( 'administrator' );
|
41 |
+
|
42 |
+
// Remove the capability
|
43 |
+
$role->remove_cap( 'easingslider_manage_settings' );
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Adds our "Settings" page to the plugin admin menu
|
49 |
+
*
|
50 |
+
* @return void
|
51 |
+
*/
|
52 |
+
public function add_submenu_page() {
|
53 |
+
|
54 |
+
// "Settings" page
|
55 |
+
$hook = add_submenu_page(
|
56 |
+
'easingslider_edit_sliders',
|
57 |
+
__( 'Edit Settings', 'easingslider' ),
|
58 |
+
__( 'Settings', 'easingslider' ),
|
59 |
+
'easingslider_manage_settings',
|
60 |
+
'easingslider_manage_settings',
|
61 |
+
array( $this, 'display_view' )
|
62 |
+
);
|
63 |
+
|
64 |
+
// Page-specific hooks
|
65 |
+
add_action( "load-{$hook}", array( $this, 'do_actions' ) );
|
66 |
+
add_action( "admin_print_styles-{$hook}", array( $this, 'enqueue_styles' ) );
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Registers all of our settings assets
|
72 |
+
*
|
73 |
+
* @return void
|
74 |
+
*/
|
75 |
+
public function register_assets() {
|
76 |
+
|
77 |
+
// Get our directory
|
78 |
+
$css_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/css';
|
79 |
+
|
80 |
+
// Get file suffix
|
81 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
82 |
+
|
83 |
+
// Register our stylesheet
|
84 |
+
wp_register_style( 'easingslider-settings-page', "{$css_dir}/settings-page{$suffix}.css", false, Easing_Slider::$version );
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Enqueues all of our settings styles
|
90 |
+
*
|
91 |
+
* @return void
|
92 |
+
*/
|
93 |
+
public function enqueue_styles() {
|
94 |
+
|
95 |
+
// Enqueue our stylesheet
|
96 |
+
wp_enqueue_style( 'easingslider-settings-page' );
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Gets the tabs for our "Settings" page
|
102 |
+
*
|
103 |
+
* @return array
|
104 |
+
*/
|
105 |
+
public function get_tabs() {
|
106 |
+
|
107 |
+
return apply_filters( 'easingslider_settings_tabs', array(
|
108 |
+
'general' => __( 'General', 'easingslider' ),
|
109 |
+
'licenses' => __( 'Licenses', 'easingslider' )
|
110 |
+
) );
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Gets the current "Settings" tab
|
116 |
+
*
|
117 |
+
* @return string
|
118 |
+
*/
|
119 |
+
public function current_tab() {
|
120 |
+
|
121 |
+
return ( isset( $_GET['tab'] ) ) ? $_GET['tab'] : 'general';
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Gets our form fields
|
127 |
+
*
|
128 |
+
* @return array
|
129 |
+
*/
|
130 |
+
public function get_form_fields() {
|
131 |
+
|
132 |
+
$data = apply_filters( 'easingslider_pre_get_settings_form_fields', array() );
|
133 |
+
|
134 |
+
// Set the form fields
|
135 |
+
if ( isset( $_POST['settings'] ) && is_array( $_POST['settings'] ) ) {
|
136 |
+
$data = easingslider_validate_data( array_merge( $data, $_POST['settings'] ) );
|
137 |
+
}
|
138 |
+
|
139 |
+
return $data;
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Does our actions
|
145 |
+
*
|
146 |
+
* @return void
|
147 |
+
*/
|
148 |
+
public function do_actions() {
|
149 |
+
|
150 |
+
// Continue if the save button has been pressed
|
151 |
+
if ( isset( $_POST['save'] ) ) {
|
152 |
+
|
153 |
+
// Bail if nonce is invalid
|
154 |
+
if ( ! check_admin_referer( 'save' ) ) {
|
155 |
+
return;
|
156 |
+
}
|
157 |
+
|
158 |
+
// Get the current settings
|
159 |
+
$settings = get_option( 'easingslider_settings' );
|
160 |
+
|
161 |
+
// Merge the updated settings
|
162 |
+
$settings = (object) array_merge( (array) $settings, $this->get_form_fields() );
|
163 |
+
|
164 |
+
// Update the settings
|
165 |
+
update_option( 'easingslider_settings', $settings );
|
166 |
+
|
167 |
+
// Trigger actions
|
168 |
+
do_action( 'easingslider_save_settings_actions' );
|
169 |
+
|
170 |
+
// Tell the user
|
171 |
+
easingslider_show_notice( __( 'Settings have been saved successfully.', 'easingslider' ), 'updated' );
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
// Trigger actions
|
176 |
+
do_action( 'easingslider_do_settings_actions' );
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Displays the view
|
182 |
+
*
|
183 |
+
* @return void
|
184 |
+
*/
|
185 |
+
public function display_view() {
|
186 |
+
|
187 |
+
// Get the current page
|
188 |
+
$page = $_GET['page'];
|
189 |
+
|
190 |
+
// Get the settings
|
191 |
+
$settings = get_option( 'easingslider_settings' );
|
192 |
+
|
193 |
+
// Get the tabs
|
194 |
+
$tabs = $this->get_tabs();
|
195 |
+
|
196 |
+
// Get the current tab
|
197 |
+
$current_tab = $this->current_tab();
|
198 |
+
|
199 |
+
// Display the view
|
200 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/edit-settings.php';
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
includes/class-es-shortcode.php
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines our shortcode functionality
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Shortcode {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Prints the "Add Slider" media thickbox
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function print_media_thickbox() {
|
23 |
+
|
24 |
+
global $pagenow;
|
25 |
+
|
26 |
+
// Bail if not in the post/page editor
|
27 |
+
if ( ( 'post.php' OR 'post-new.php' ) != $pagenow ) {
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
|
31 |
+
// Get all sliders
|
32 |
+
$sliders = Easing_Slider::all();
|
33 |
+
|
34 |
+
// Display the thickbox
|
35 |
+
?>
|
36 |
+
<style type="text/css">
|
37 |
+
.section {
|
38 |
+
padding: 15px 15px 0 15px;
|
39 |
+
}
|
40 |
+
</style>
|
41 |
+
|
42 |
+
<script type="text/javascript">
|
43 |
+
/**
|
44 |
+
* Sends a shortcode to the post/page editor
|
45 |
+
*/
|
46 |
+
function insertSlider() {
|
47 |
+
|
48 |
+
// Get the slider ID
|
49 |
+
var id = jQuery('#slider').val();
|
50 |
+
|
51 |
+
// Display alert and bail if no slideshow was selected
|
52 |
+
if ( '-1' === id ) {
|
53 |
+
return alert("<?php _e( 'Please select a slider', 'easingslider' ); ?>");
|
54 |
+
}
|
55 |
+
|
56 |
+
// Send shortcode to editor
|
57 |
+
send_to_editor('[easingslider id="'+ id +'"]');
|
58 |
+
|
59 |
+
// Close thickbox
|
60 |
+
tb_remove();
|
61 |
+
|
62 |
+
}
|
63 |
+
</script>
|
64 |
+
|
65 |
+
<div id="select-slider" style="display: none;">
|
66 |
+
<div class="section">
|
67 |
+
<h2><?php _e( 'Add a slider', 'easingslider' ); ?></h2>
|
68 |
+
<span><?php _e( 'Select a slider to insert from the box below.', 'easingslider' ); ?></span>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="section">
|
72 |
+
<select name="slider" id="slider">
|
73 |
+
<option value="-1"><?php _e( 'Select a slider', 'easingslider' ); ?></option>
|
74 |
+
<?php
|
75 |
+
foreach ( $sliders as $slider ) {
|
76 |
+
echo "<option value=\"{$slider->ID}\">{$slider->post_title} (ID #{$slider->ID})</option>";
|
77 |
+
}
|
78 |
+
?>
|
79 |
+
</select>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<div class="section">
|
83 |
+
<button id="insert-slider" class="button-primary" onClick="insertSlider();"><?php _e( 'Insert Slider', 'easingslider' ); ?></button>
|
84 |
+
<button id="close-slider-thickbox" class="button-secondary" style="margin-left: 5px;" onClick="tb_remove();"><?php _e( 'Close', 'easingslider' ); ?></a>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
<?php
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Prints the "Add Slider" media button
|
93 |
+
*
|
94 |
+
* @param int $editor_id The editor ID
|
95 |
+
* @return void
|
96 |
+
*/
|
97 |
+
public function print_media_button( $editor_id ) {
|
98 |
+
|
99 |
+
// Print the button's HTML and CSS
|
100 |
+
?>
|
101 |
+
<style type="text/css">
|
102 |
+
.wp-media-buttons .insert-slider span.wp-media-buttons-icon {
|
103 |
+
margin-top: -2px;
|
104 |
+
}
|
105 |
+
.wp-media-buttons .insert-slider span.wp-media-buttons-icon:before {
|
106 |
+
content: "\f232";
|
107 |
+
font: 400 18px/1 dashicons;
|
108 |
+
speak: none;
|
109 |
+
-webkit-font-smoothing: antialiased;
|
110 |
+
-moz-osx-font-smoothing: grayscale;
|
111 |
+
}
|
112 |
+
</style>
|
113 |
+
|
114 |
+
<a href="#TB_inline?width=480&inlineId=select-slider" class="button thickbox insert-slider" data-editor="<?php echo esc_attr( $editor_id ); ?>" title="<?php _e( 'Add a Slider', 'easingslider' ); ?>">
|
115 |
+
<span class="wp-media-buttons-icon dashicons dashicons-format-image"></span><?php _e( ' Add Slider', 'easingslider' ); ?>
|
116 |
+
</a>
|
117 |
+
<?php
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Renders a slider, returning the HTML
|
123 |
+
*
|
124 |
+
* @param array $atts The shortcode attributes
|
125 |
+
* @return string
|
126 |
+
*/
|
127 |
+
public function render( $atts = array() ) {
|
128 |
+
|
129 |
+
// Allow extensions to modify
|
130 |
+
$defaults = apply_filters( 'easingslider_shortcode_defaults', array( 'id' => false ) );
|
131 |
+
|
132 |
+
// Combine shortcode attributes with defaults
|
133 |
+
$atts = (object) shortcode_atts( $defaults, $atts );
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Continue as normal if we have an ID.
|
137 |
+
*
|
138 |
+
* Otherwise, let's allow extensions to render sliders using their own method(s).
|
139 |
+
*/
|
140 |
+
if ( ! empty( $atts->id ) ) {
|
141 |
+
|
142 |
+
// Find the slider
|
143 |
+
$slider = Easing_Slider::find( $atts->id );
|
144 |
+
|
145 |
+
// Display error message if no slider has been found
|
146 |
+
if ( ! $slider ) {
|
147 |
+
return sprintf( __( '<p><strong>The slider specified (ID #%s) could not be found.</strong></p>', 'easingslider' ), $atts->id );
|
148 |
+
}
|
149 |
+
|
150 |
+
// Render and return the slider
|
151 |
+
return $slider->render();
|
152 |
+
|
153 |
+
}
|
154 |
+
else {
|
155 |
+
|
156 |
+
// Start output buffer
|
157 |
+
ob_start();
|
158 |
+
|
159 |
+
// Trigger action for our extensions
|
160 |
+
do_action( 'easingslider_display_shortcode', (array) $atts );
|
161 |
+
|
162 |
+
// Return output buffer contents
|
163 |
+
return ob_get_clean();
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
+
}
|
includes/class-es-slider.php
ADDED
@@ -0,0 +1,717 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines our plugin public facing functionality
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Slider {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
|
24 |
+
// Set our default postdata and metadata respectively
|
25 |
+
$this->set( $this->get_postdata_defaults() );
|
26 |
+
$this->set( $this->get_metadata_defaults() );
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Sets an array of data on the slider
|
32 |
+
*
|
33 |
+
* @param array|object $data The array of data
|
34 |
+
* @return ES_Slider
|
35 |
+
*/
|
36 |
+
public function set( $data ) {
|
37 |
+
|
38 |
+
foreach ( $data as $key => $value ) {
|
39 |
+
$this->$key = $value;
|
40 |
+
}
|
41 |
+
|
42 |
+
return $this;
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Queries our sliders
|
48 |
+
*
|
49 |
+
* @param array $args Any arguments to be merged with the posts query
|
50 |
+
* @return WP_Query
|
51 |
+
*/
|
52 |
+
public static function query( $args = array() ) {
|
53 |
+
|
54 |
+
$sliders = array();
|
55 |
+
|
56 |
+
// Our default query arguments
|
57 |
+
$defaults = array(
|
58 |
+
'post_status' => 'publish',
|
59 |
+
'post_type' => 'easingslider',
|
60 |
+
'orderby' => 'ID',
|
61 |
+
'order' => 'asc',
|
62 |
+
'posts_per_page' => -1
|
63 |
+
);
|
64 |
+
|
65 |
+
// Merge the query arguments
|
66 |
+
$args = array_merge( (array) $defaults, (array) $args );
|
67 |
+
|
68 |
+
// Execute the query
|
69 |
+
$query = new WP_Query( $args );
|
70 |
+
|
71 |
+
// Allow extensions to apply filters
|
72 |
+
$query = apply_filters( 'easingslider_query_sliders', $query );
|
73 |
+
|
74 |
+
return $query;
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Gets all of the sliders
|
80 |
+
*
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public static function all() {
|
84 |
+
|
85 |
+
$sliders = array();
|
86 |
+
|
87 |
+
// Query our sliders
|
88 |
+
$query = static::query();
|
89 |
+
|
90 |
+
// Loop through each post
|
91 |
+
if ( $query->have_posts() ) {
|
92 |
+
while( $query->have_posts() ) {
|
93 |
+
|
94 |
+
$query->the_post();
|
95 |
+
|
96 |
+
// Initiate a new slider
|
97 |
+
$slider = new self;
|
98 |
+
|
99 |
+
// Set our postdata and metadata
|
100 |
+
$slider->set( get_object_vars( get_post( get_the_ID() ) ) );
|
101 |
+
$slider->set( $slider->get_metadata() );
|
102 |
+
|
103 |
+
// Add the slider to our sliders
|
104 |
+
$sliders[] = $slider;
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
wp_reset_query();
|
109 |
+
}
|
110 |
+
|
111 |
+
// Allow extensions to apply filters
|
112 |
+
$sliders = apply_filters( 'easingslider_all_sliders', $sliders );
|
113 |
+
|
114 |
+
return $sliders;
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Finds a slider
|
120 |
+
*
|
121 |
+
* @param int $id The slider ID
|
122 |
+
* @return ES_Slider
|
123 |
+
*/
|
124 |
+
public static function find( $id ) {
|
125 |
+
|
126 |
+
// Fetch our post
|
127 |
+
$post = get_post( $id );
|
128 |
+
|
129 |
+
// Bail if no post was found
|
130 |
+
if ( ! $post ) {
|
131 |
+
return false;
|
132 |
+
}
|
133 |
+
|
134 |
+
// Bail if not our post type
|
135 |
+
if ( 'easingslider' != $post->post_type ) {
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
// Initiate a new slider
|
140 |
+
$slider = new self;
|
141 |
+
|
142 |
+
// Set our postdata and metadata
|
143 |
+
$slider->set( get_object_vars( $post ) );
|
144 |
+
$slider->set( $slider->get_metadata() );
|
145 |
+
|
146 |
+
// Allow extensions to apply filters
|
147 |
+
$slider = apply_filters( 'easingslider_find_slider', $slider );
|
148 |
+
|
149 |
+
return $slider;
|
150 |
+
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Gets the total number slides that exist
|
155 |
+
*
|
156 |
+
* @param string $status The slider post status
|
157 |
+
* @return object
|
158 |
+
*/
|
159 |
+
public static function total( $status = 'publish' ) {
|
160 |
+
|
161 |
+
$total_items = wp_count_posts( 'easingslider' );
|
162 |
+
|
163 |
+
return $total_items->$status;
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Creates a new slider instance
|
169 |
+
*
|
170 |
+
* @return ES_Slider
|
171 |
+
*/
|
172 |
+
public static function create() {
|
173 |
+
|
174 |
+
// Initiate a new slider
|
175 |
+
$slider = new self;
|
176 |
+
|
177 |
+
// Allow extensions to apply filters
|
178 |
+
$slider = apply_filters( 'easingslider_create_slider', $slider );
|
179 |
+
|
180 |
+
return $slider;
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Deletes a slider
|
186 |
+
*
|
187 |
+
* @param int $id The slider ID
|
188 |
+
* @return void
|
189 |
+
*/
|
190 |
+
public static function delete( $id ) {
|
191 |
+
|
192 |
+
// Initiate a new slider
|
193 |
+
$slider = new self;
|
194 |
+
|
195 |
+
// Set the ID
|
196 |
+
$slider->ID = $id;
|
197 |
+
|
198 |
+
// Delete the post
|
199 |
+
wp_delete_post( $id );
|
200 |
+
|
201 |
+
// Allow extensions to do actions
|
202 |
+
do_action( 'easingslider_delete_slider', $id );
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Saves a slider
|
208 |
+
*
|
209 |
+
* @return int|false
|
210 |
+
*/
|
211 |
+
public function save() {
|
212 |
+
|
213 |
+
// "Before" filter
|
214 |
+
$slider = apply_filters( 'easingslider_pre_save_slider', $this );
|
215 |
+
|
216 |
+
// Create or update the post
|
217 |
+
if ( isset( $slider->ID ) ) {
|
218 |
+
$slider->ID = wp_update_post( (array) $slider );
|
219 |
+
}
|
220 |
+
else {
|
221 |
+
$slider->ID = wp_insert_post( (array) $slider );
|
222 |
+
}
|
223 |
+
|
224 |
+
// If an error has occurred, bail.
|
225 |
+
if ( ! $slider->ID ) {
|
226 |
+
return false;
|
227 |
+
}
|
228 |
+
|
229 |
+
// Create/update our metadata
|
230 |
+
$slider->update_metadata();
|
231 |
+
|
232 |
+
// Allow extensions to do actions
|
233 |
+
do_action( 'easingslider_save_slider', $slider );
|
234 |
+
|
235 |
+
return $slider;
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Renders the slider
|
241 |
+
*
|
242 |
+
* @return void
|
243 |
+
*/
|
244 |
+
public function render() {
|
245 |
+
|
246 |
+
// "Before" action
|
247 |
+
$slider = apply_filters( 'easingslider_pre_display_slider', $this );
|
248 |
+
|
249 |
+
// "Before" filter
|
250 |
+
$html = apply_filters( 'easingslider_before_display_slider', '', $slider );
|
251 |
+
|
252 |
+
// Start the output
|
253 |
+
$html .= "<div class=\"". esc_attr( $slider->get_html_classes() ) ."\" data-options=\"". esc_attr( $slider->get_html_data() ) ."\" style=\"". esc_attr( $slider->get_html_styles() ) ."\">";
|
254 |
+
|
255 |
+
// Inner "before" filter
|
256 |
+
$html = apply_filters( 'easingslider_before_slider_content', $html, $slider );
|
257 |
+
|
258 |
+
// Open the viewport
|
259 |
+
$html .= "<div class=\"easingslider-viewport\" style=\"padding-top: ". ( 100 * $slider->calculate_aspect_ratio() ) ."% !important;\">";
|
260 |
+
|
261 |
+
// Output the slides
|
262 |
+
foreach ( $slider->slides as $slide ) {
|
263 |
+
$html .= $slider->render_slide_html( $slide );
|
264 |
+
}
|
265 |
+
|
266 |
+
// Close the viewport
|
267 |
+
$html .= "</div>";
|
268 |
+
|
269 |
+
// Output the arrows
|
270 |
+
if ( $slider->navigation->arrows ) {
|
271 |
+
$html .= $slider->render_arrows_html();
|
272 |
+
}
|
273 |
+
|
274 |
+
// Output the pagination
|
275 |
+
if ( $slider->navigation->pagination ) {
|
276 |
+
$html .= $slider->render_pagination_html();
|
277 |
+
}
|
278 |
+
|
279 |
+
// Inner "after" filter
|
280 |
+
$html = apply_filters( 'easingslider_after_slider_content', $html, $slider );
|
281 |
+
|
282 |
+
// End the output
|
283 |
+
$html .= "</div>";
|
284 |
+
|
285 |
+
// "After" filter
|
286 |
+
$html = apply_filters( 'easingslider_after_display_slider', $html, $slider );
|
287 |
+
|
288 |
+
// Allow extensions to do actions
|
289 |
+
do_action( 'easingslider_render_slider', $slider );
|
290 |
+
|
291 |
+
return $html;
|
292 |
+
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Registers all of our slider assets
|
297 |
+
*
|
298 |
+
* @return void
|
299 |
+
*/
|
300 |
+
public function register_assets() {
|
301 |
+
|
302 |
+
// Get our directories
|
303 |
+
$css_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/css';
|
304 |
+
$js_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/js';
|
305 |
+
|
306 |
+
// Get file suffix
|
307 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
308 |
+
|
309 |
+
// Register our stylesheets
|
310 |
+
wp_register_style( 'easingslider', "{$css_dir}/easingslider{$suffix}.css", false, Easing_Slider::$version );
|
311 |
+
|
312 |
+
// Register our javascripts
|
313 |
+
wp_register_script( 'easingslider', "{$js_dir}/jquery.easingslider{$suffix}.js", array( 'jquery' ), Easing_Slider::$version );
|
314 |
+
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Enqueues all of our slider assets
|
319 |
+
*
|
320 |
+
* @return void
|
321 |
+
*/
|
322 |
+
public function enqueue_assets() {
|
323 |
+
|
324 |
+
// Get the settings
|
325 |
+
$settings = get_option( 'easingslider_settings' );
|
326 |
+
|
327 |
+
/**
|
328 |
+
* If we've set the asset loading to "Optimized" and we haven't displayed a slider on this page, let's bail.
|
329 |
+
* This prevents the assets from loading when they aren't needed.
|
330 |
+
*
|
331 |
+
* Otherwise, by default, assets will be loaded on every page ("Compatibility" mode).
|
332 |
+
*/
|
333 |
+
if ( 'footer' == $settings->load_assets && ! did_action( 'easingslider_render_slider' ) ) {
|
334 |
+
add_action( 'wp_footer', array( $this, 'enqueue_assets' ) );
|
335 |
+
return;
|
336 |
+
}
|
337 |
+
|
338 |
+
// Enqueue our assets
|
339 |
+
wp_enqueue_style( 'easingslider' );
|
340 |
+
wp_enqueue_script( 'easingslider' );
|
341 |
+
|
342 |
+
// Trigger action for our extensions
|
343 |
+
do_action( 'easingslider_enqueue_assets' );
|
344 |
+
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Method for getting our post default keys and values
|
349 |
+
*
|
350 |
+
* @return array
|
351 |
+
*/
|
352 |
+
protected function get_postdata_defaults() {
|
353 |
+
|
354 |
+
$postdata_defaults = array(
|
355 |
+
'post_title' => '',
|
356 |
+
'post_status' => 'publish',
|
357 |
+
'post_type' => 'easingslider'
|
358 |
+
);
|
359 |
+
|
360 |
+
return apply_filters( 'easingslider_postdata_defaults', $postdata_defaults );
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Method for getting our meta default keys and values
|
366 |
+
*
|
367 |
+
* @return array
|
368 |
+
*/
|
369 |
+
protected function get_metadata_defaults() {
|
370 |
+
|
371 |
+
// Our array of meta default data
|
372 |
+
$metadata_defaults = array(
|
373 |
+
'slides' => array(),
|
374 |
+
'general' => (object) array(
|
375 |
+
'randomize' => false
|
376 |
+
),
|
377 |
+
'dimensions' => (object) array(
|
378 |
+
'width' => 640,
|
379 |
+
'height' => 400,
|
380 |
+
'responsive' => true
|
381 |
+
),
|
382 |
+
'transitions' => (object) array(
|
383 |
+
'effect' => 'fade',
|
384 |
+
'duration' => 400
|
385 |
+
),
|
386 |
+
'navigation' => (object) array(
|
387 |
+
'arrows' => true,
|
388 |
+
'arrows_hover' => false,
|
389 |
+
'arrows_position' => 'inside',
|
390 |
+
'pagination' => true,
|
391 |
+
'pagination_hover' => false,
|
392 |
+
'pagination_position' => 'inside',
|
393 |
+
'pagination_location' => 'bottom-center'
|
394 |
+
),
|
395 |
+
'playback' => (object) array(
|
396 |
+
'enabled' => true,
|
397 |
+
'pause' => 4000
|
398 |
+
)
|
399 |
+
);
|
400 |
+
|
401 |
+
return apply_filters( 'easingslider_metadata_defaults', $metadata_defaults );
|
402 |
+
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Method for getting our metadata
|
407 |
+
*
|
408 |
+
* @return array
|
409 |
+
*/
|
410 |
+
protected function get_metadata() {
|
411 |
+
|
412 |
+
$metadata = array();
|
413 |
+
|
414 |
+
// Get the defaults
|
415 |
+
$metadata_defaults = $this->get_metadata_defaults();
|
416 |
+
|
417 |
+
// Loop through and merge in actual metadata
|
418 |
+
foreach ( $metadata_defaults as $default_key => $default_metadata ) {
|
419 |
+
$actual_metadata = get_post_meta( $this->ID, "_easingslider_{$default_key}", true );
|
420 |
+
|
421 |
+
// Merge in the data
|
422 |
+
if ( ! empty( $actual_metadata ) ) {
|
423 |
+
$metadata[ $default_key ] = array_merge( (array) $default_metadata, (array) $actual_metadata );
|
424 |
+
|
425 |
+
// Convert back to object if necessary
|
426 |
+
if ( is_object( $default_metadata ) ) {
|
427 |
+
$metadata[ $default_key ] = (object) $metadata[ $default_key ];
|
428 |
+
}
|
429 |
+
}
|
430 |
+
}
|
431 |
+
|
432 |
+
return $metadata;
|
433 |
+
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Method for updating our metadata
|
438 |
+
*
|
439 |
+
* @return void
|
440 |
+
*/
|
441 |
+
protected function update_metadata() {
|
442 |
+
|
443 |
+
$metadata = $this->get_metadata_defaults();
|
444 |
+
|
445 |
+
// Loop through and attempt to get postmeta
|
446 |
+
foreach ( $metadata as $key => $value ) {
|
447 |
+
update_post_meta( $this->ID, "_easingslider_{$key}", $this->$key );
|
448 |
+
}
|
449 |
+
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Returns the possible transitions
|
454 |
+
*
|
455 |
+
* @return array
|
456 |
+
*/
|
457 |
+
public function get_transitions() {
|
458 |
+
|
459 |
+
return apply_filters( 'easingslider_transitions', array(
|
460 |
+
'slide' => __( 'Slide', 'easingslider' ),
|
461 |
+
'fade' => __( 'Fade', 'easingslider' )
|
462 |
+
) );
|
463 |
+
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Returns HTML classes
|
468 |
+
*
|
469 |
+
* @return string
|
470 |
+
*/
|
471 |
+
protected function get_html_classes() {
|
472 |
+
|
473 |
+
$classes = "easingslider easingslider-{$this->ID} use-{$this->transitions->effect}";
|
474 |
+
|
475 |
+
return apply_filters( 'easingslider_get_html_classes', $classes, $this );
|
476 |
+
|
477 |
+
}
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Returns HTML styling
|
481 |
+
*
|
482 |
+
* @return string
|
483 |
+
*/
|
484 |
+
protected function get_html_styles() {
|
485 |
+
|
486 |
+
if ( $this->dimensions->responsive ) {
|
487 |
+
$styles = "max-width: {$this->dimensions->width}px !important; max-height: {$this->dimensions->height}px !important;";
|
488 |
+
}
|
489 |
+
else {
|
490 |
+
$styles = "width: {$this->dimensions->width}px !important; height: {$this->dimensions->height}px !important;";
|
491 |
+
}
|
492 |
+
|
493 |
+
return apply_filters( 'easingslider_get_html_styles', $styles, $this );
|
494 |
+
|
495 |
+
}
|
496 |
+
|
497 |
+
/**
|
498 |
+
* Returns HTML data options attribute
|
499 |
+
*
|
500 |
+
* @return string
|
501 |
+
*/
|
502 |
+
protected function get_html_data() {
|
503 |
+
|
504 |
+
$data = $this->get_metadata();
|
505 |
+
|
506 |
+
return json_encode( apply_filters( 'easingslider_get_html_data', $data, $this ) );
|
507 |
+
|
508 |
+
}
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Renders HTML for a slide
|
512 |
+
*
|
513 |
+
* @param object $slide The slide object
|
514 |
+
* @return string
|
515 |
+
*/
|
516 |
+
protected function render_slide_html( $slide ) {
|
517 |
+
|
518 |
+
// Animation duration styling. This is horrible, but necessary to have varied animation durations
|
519 |
+
$animation_duration = "-webkit-animation-duration: {$this->transitions->duration}ms; -moz-animation-duration: {$this->transitions->duration}ms; -ms-animation-duration: {$this->transitions->duration}ms; -o-animation-duration: {$this->transitions->duration}ms; animation-duration: {$this->transitions->duration}ms;";
|
520 |
+
|
521 |
+
/**
|
522 |
+
* We initially "display: none" our slides to prevent a brief flash of unstyled HTML when loading the CSS & Javascript in the footer.
|
523 |
+
*
|
524 |
+
* The Javascript will set slides to "display: block".
|
525 |
+
*/
|
526 |
+
$html = "<div class=\"easingslider-slide\" style=\"display: none; {$animation_duration}\">";
|
527 |
+
|
528 |
+
$html = apply_filters( 'easingslider_before_display_slide', $html, $slide, $this );
|
529 |
+
|
530 |
+
$html = apply_filters( "easingslider_display_{$slide->type}_slide", $html, $slide, $this );
|
531 |
+
|
532 |
+
$html = apply_filters( 'easingslider_after_display_slide', $html, $slide, $this );
|
533 |
+
|
534 |
+
$html .= "</div>";
|
535 |
+
|
536 |
+
return apply_filters( 'easingslider_get_html_slide', $html, $slide, $this );
|
537 |
+
|
538 |
+
}
|
539 |
+
|
540 |
+
/**
|
541 |
+
* Renders HTML for the arrows
|
542 |
+
*
|
543 |
+
* @return string
|
544 |
+
*/
|
545 |
+
protected function render_arrows_html() {
|
546 |
+
|
547 |
+
$html = "<div class=\"easingslider-arrows easingslider-next {$this->navigation->arrows_position}\" style=\"display: none;\"></div>";
|
548 |
+
$html .= "<div class=\"easingslider-arrows easingslider-prev {$this->navigation->arrows_position}\" style=\"display: none;\"></div>";
|
549 |
+
|
550 |
+
return apply_filters( 'easingslider_get_html_arrows', $html, $this );
|
551 |
+
|
552 |
+
}
|
553 |
+
|
554 |
+
/**
|
555 |
+
* Renders HTML for the pagination
|
556 |
+
*
|
557 |
+
* @return string
|
558 |
+
*/
|
559 |
+
protected function render_pagination_html() {
|
560 |
+
|
561 |
+
$html = "<div class=\"easingslider-pagination {$this->navigation->pagination_position} {$this->navigation->pagination_location}\" style=\"display: none;\">";
|
562 |
+
|
563 |
+
// Create an icon for each slide
|
564 |
+
foreach ( $this->slides as $slide ) {
|
565 |
+
$html .= "<div class=\"easingslider-icon\"></div>";
|
566 |
+
}
|
567 |
+
|
568 |
+
$html .= "</div>";
|
569 |
+
|
570 |
+
return apply_filters( 'easingslider_get_html_pagination', $html, $this );
|
571 |
+
|
572 |
+
}
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Calculates the aspect ratio
|
576 |
+
*
|
577 |
+
* @return string
|
578 |
+
*/
|
579 |
+
protected function calculate_aspect_ratio() {
|
580 |
+
|
581 |
+
$aspect_ratio = ( $this->dimensions->height / $this->dimensions->width );
|
582 |
+
|
583 |
+
return $aspect_ratio;
|
584 |
+
|
585 |
+
}
|
586 |
+
|
587 |
+
/**
|
588 |
+
* Randomizes the slides if set to do so
|
589 |
+
*
|
590 |
+
* @param ES_Slider $slider The slider object
|
591 |
+
* @return ES_Slider
|
592 |
+
*/
|
593 |
+
public function maybe_randomize( $slider ) {
|
594 |
+
|
595 |
+
if ( $slider->general->randomize ) {
|
596 |
+
shuffle( $slider->slides );
|
597 |
+
}
|
598 |
+
|
599 |
+
return $slider;
|
600 |
+
|
601 |
+
}
|
602 |
+
|
603 |
+
/**
|
604 |
+
* Sets a default "(no title)" if no slider title was provided
|
605 |
+
*
|
606 |
+
* @param ES_Slider $slider The slider object
|
607 |
+
* @return ES_Slider
|
608 |
+
*/
|
609 |
+
public function no_title( $slider ) {
|
610 |
+
|
611 |
+
if ( empty( $slider->post_title ) ) {
|
612 |
+
$slider->post_title = __( '(no title)', 'easingslider' );
|
613 |
+
}
|
614 |
+
|
615 |
+
return $slider;
|
616 |
+
|
617 |
+
}
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Removes unneccessary attributes from HTML data
|
621 |
+
*
|
622 |
+
* @param object $data The slider data
|
623 |
+
* @return object
|
624 |
+
*/
|
625 |
+
public function cleanup_data( $data ) {
|
626 |
+
|
627 |
+
unset( $data['slides'] );
|
628 |
+
|
629 |
+
return $data;
|
630 |
+
|
631 |
+
}
|
632 |
+
|
633 |
+
/**
|
634 |
+
* Adds the HTML for the preloader
|
635 |
+
*
|
636 |
+
* @param string $html The slider HTML
|
637 |
+
* @param object $slider The slider object
|
638 |
+
* @return string
|
639 |
+
*/
|
640 |
+
public function add_preload( $html, $slider ) {
|
641 |
+
|
642 |
+
// Add the HTML
|
643 |
+
$html .= "<div class=\"easingslider-preload\"></div>";
|
644 |
+
|
645 |
+
return $html;
|
646 |
+
|
647 |
+
}
|
648 |
+
|
649 |
+
/**
|
650 |
+
* Adds the HTML for an image
|
651 |
+
*
|
652 |
+
* @param string $html The slider HTML
|
653 |
+
* @param object $slide The slide object
|
654 |
+
* @param object $slider The slider object
|
655 |
+
* @return string
|
656 |
+
*/
|
657 |
+
public function add_image( $html, $slide, $slider ) {
|
658 |
+
|
659 |
+
// Get the image URL
|
660 |
+
$image_url = ( $slide->attachment_id ) ? wp_get_attachment_url( $slide->attachment_id ) : $slide->url;
|
661 |
+
|
662 |
+
// Filter for modifying the image URL (needed for resizing, etc).
|
663 |
+
$image_url = apply_filters( 'easingslider_modify_image_url', $image_url, $slider->dimensions->width, $slider->dimensions->height );
|
664 |
+
|
665 |
+
// Add the HTML
|
666 |
+
$html .= "<img src=\"{$image_url}\" title=\"{$slide->title}\" class=\"easingslider-image\" />";
|
667 |
+
|
668 |
+
return $html;
|
669 |
+
|
670 |
+
}
|
671 |
+
|
672 |
+
/**
|
673 |
+
* Opens a link
|
674 |
+
*
|
675 |
+
* @param string $html The slider HTML
|
676 |
+
* @param object $slide The slide object
|
677 |
+
* @param object $slider The slider object
|
678 |
+
* @return string
|
679 |
+
*/
|
680 |
+
public function open_link( $html, $slide, $slider ) {
|
681 |
+
|
682 |
+
if ( 'none' != $slide->link ) {
|
683 |
+
|
684 |
+
// The link attributes string
|
685 |
+
$attributes_string = "href=\"{$slide->linkUrl}\" class=\"easingslider-link\"";
|
686 |
+
|
687 |
+
// Apply filters to the string
|
688 |
+
$attributes_string = apply_filters( 'easingslider_open_link_html_attributes', $attributes_string, $slide, $slider );
|
689 |
+
|
690 |
+
// Add the HTML
|
691 |
+
$html .= "<a {$attributes_string}>";
|
692 |
+
|
693 |
+
}
|
694 |
+
|
695 |
+
return $html;
|
696 |
+
|
697 |
+
}
|
698 |
+
|
699 |
+
/**
|
700 |
+
* Closes a link
|
701 |
+
*
|
702 |
+
* @param string $html The slider HTML
|
703 |
+
* @param object $slide The slide object
|
704 |
+
* @param object $slider The slider object
|
705 |
+
* @return string
|
706 |
+
*/
|
707 |
+
public function close_link( $html, $slide, $slider ) {
|
708 |
+
|
709 |
+
if ( !'none' != $slide->link ) {
|
710 |
+
$html .= "</a>";
|
711 |
+
}
|
712 |
+
|
713 |
+
return $html;
|
714 |
+
|
715 |
+
}
|
716 |
+
|
717 |
+
}
|
includes/class-es-sliders-list-table.php
ADDED
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Ensure WP_List_Table class has been loaded
|
12 |
+
*/
|
13 |
+
if ( ! class_exists( 'WP_List_Table' ) ) {
|
14 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Our extension for WP_List_Table for listing sliders
|
19 |
+
*
|
20 |
+
* @author Matthew Ruddy
|
21 |
+
*/
|
22 |
+
class ES_Sliders_List_Table extends WP_List_Table {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
|
31 |
+
parent::__construct( array(
|
32 |
+
'singular' => 'slider',
|
33 |
+
'plural' => 'sliders',
|
34 |
+
'ajax' => false
|
35 |
+
));
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get our list table columns
|
41 |
+
*
|
42 |
+
* @return array
|
43 |
+
*/
|
44 |
+
public function get_columns() {
|
45 |
+
|
46 |
+
// Set our columns
|
47 |
+
$columns = array(
|
48 |
+
'cb' => '<input type="checkbox" />',
|
49 |
+
'ID' => __( 'ID', 'easingslider' ),
|
50 |
+
'post_title' => __( 'Title', 'easingslider' ),
|
51 |
+
'post_author' => __( 'Author', 'easingslider' ),
|
52 |
+
'post_date' => __( 'Date', 'easingslider' ),
|
53 |
+
'shortcode' => __( 'Shortcode', 'easingslider' )
|
54 |
+
);
|
55 |
+
|
56 |
+
return apply_filters( 'easingslider_sliders_list_table_columns', $columns );
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get the columns that have been hidden by the current user
|
62 |
+
*
|
63 |
+
* @return array
|
64 |
+
*/
|
65 |
+
public function get_hidden_columns() {
|
66 |
+
|
67 |
+
// Get the current screen
|
68 |
+
$current_screen = get_current_screen();
|
69 |
+
|
70 |
+
// Get the hidden columns
|
71 |
+
$hidden_columns = (array) get_user_option( "manage{$current_screen->id}columnshidden" );
|
72 |
+
|
73 |
+
return $hidden_columns;
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Decide which columns to activate the sorting functionality on
|
79 |
+
*
|
80 |
+
* @return array
|
81 |
+
*/
|
82 |
+
public function get_sortable_columns() {
|
83 |
+
|
84 |
+
// Set our sortable columns
|
85 |
+
$sortable_columns = array(
|
86 |
+
'ID' => array( 'ID', false ),
|
87 |
+
'post_title' => array( 'post_title', false ),
|
88 |
+
'post_author' => array( 'post_author', false ),
|
89 |
+
'post_date' => array( 'post_date', false )
|
90 |
+
);
|
91 |
+
|
92 |
+
return apply_filters( 'easingslider_sliders_list_table_sortable_columns', $sortable_columns );
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Gets the number of list items per page
|
98 |
+
*
|
99 |
+
* @return int
|
100 |
+
*/
|
101 |
+
public function get_per_page() {
|
102 |
+
|
103 |
+
// Get the current page
|
104 |
+
$current_screen = get_current_screen();
|
105 |
+
|
106 |
+
// Get the number of items per page
|
107 |
+
$per_page = (int) get_user_option( 'sliders_per_page' );
|
108 |
+
|
109 |
+
return $per_page;
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Prepare our list table items
|
115 |
+
*
|
116 |
+
* @return void
|
117 |
+
*/
|
118 |
+
public function prepare_items() {
|
119 |
+
|
120 |
+
// Process any outstanding actions
|
121 |
+
$this->process_action();
|
122 |
+
|
123 |
+
// Get our variables
|
124 |
+
$columns = $this->get_columns();
|
125 |
+
$hidden_columns = $this->get_hidden_columns();
|
126 |
+
$sortable_columns = $this->get_sortable_columns();
|
127 |
+
|
128 |
+
// Get our pagination variables
|
129 |
+
$per_page = $this->get_per_page();
|
130 |
+
$current_page = $this->get_pagenum();
|
131 |
+
|
132 |
+
// Our posts query arguments
|
133 |
+
$query_args = array(
|
134 |
+
'posts_per_page' => $per_page,
|
135 |
+
);
|
136 |
+
|
137 |
+
// If paginated, ammend our query
|
138 |
+
if ( isset( $_GET['paged'] ) ) {
|
139 |
+
$query_args['paged'] = $_GET['paged'];
|
140 |
+
}
|
141 |
+
|
142 |
+
// If searching, ammend our query
|
143 |
+
if ( isset( $_GET['s'] ) ) {
|
144 |
+
$query_args['s'] = $_GET['s'];
|
145 |
+
}
|
146 |
+
|
147 |
+
// Add sort queries
|
148 |
+
$query_args['orderby'] = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'ID';
|
149 |
+
$query_args['order'] = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc';
|
150 |
+
|
151 |
+
// Query our sliders
|
152 |
+
$query = Easing_Slider::query( $query_args );
|
153 |
+
|
154 |
+
// Set our pagination arguments
|
155 |
+
$this->set_pagination_args( array(
|
156 |
+
'total_items' => $query->found_posts,
|
157 |
+
'per_page' => $per_page
|
158 |
+
) );
|
159 |
+
|
160 |
+
// Set our column headers
|
161 |
+
$this->_column_headers = array( $columns, $hidden_columns, $sortable_columns );
|
162 |
+
|
163 |
+
// Assign our table items
|
164 |
+
$this->items = $query->posts;
|
165 |
+
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Our bulk actions for this list
|
170 |
+
*
|
171 |
+
* @return array
|
172 |
+
*/
|
173 |
+
public function get_bulk_actions() {
|
174 |
+
|
175 |
+
$actions = array(
|
176 |
+
'duplicate' => __( 'Duplicate', 'easingslider' ),
|
177 |
+
'delete' => __( 'Delete', 'easingslider' )
|
178 |
+
);
|
179 |
+
|
180 |
+
return apply_filters( 'easingslider_sliders_list_table_bulk_actions', $actions );
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Processes an action, or a bulk action if appropriate.
|
186 |
+
*
|
187 |
+
* @return void
|
188 |
+
*/
|
189 |
+
public function process_action() {
|
190 |
+
|
191 |
+
// Get the current action
|
192 |
+
$action = $this->current_action();
|
193 |
+
|
194 |
+
// Generate the method string
|
195 |
+
$method = "process_{$action}_action";
|
196 |
+
|
197 |
+
// Bail if this method doesn't exist
|
198 |
+
if ( ! method_exists( $this, $method ) ) {
|
199 |
+
return;
|
200 |
+
}
|
201 |
+
|
202 |
+
// Do either a single action or a bulk action
|
203 |
+
if ( isset( $_GET['id'] ) ) {
|
204 |
+
|
205 |
+
// Bail if nonce is invalid
|
206 |
+
if ( ! check_admin_referer( $action ) ) {
|
207 |
+
return;
|
208 |
+
}
|
209 |
+
|
210 |
+
// Call the action
|
211 |
+
call_user_func( array( $this, $method ), $_GET['id'] );
|
212 |
+
|
213 |
+
}
|
214 |
+
else if ( isset( $_GET['ids'] ) ) {
|
215 |
+
|
216 |
+
// Bail if nonce is invalid
|
217 |
+
if ( ! check_admin_referer( "bulk-{$this->_args['plural']}" ) ) {
|
218 |
+
return;
|
219 |
+
}
|
220 |
+
|
221 |
+
// Call the action for each ID
|
222 |
+
array_walk( $_GET['ids'], array( $this, $method ) );
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Processes a duplicate action
|
230 |
+
*
|
231 |
+
* @param int $id The slider ID
|
232 |
+
* @return void
|
233 |
+
*/
|
234 |
+
public function process_duplicate_action( $id ) {
|
235 |
+
|
236 |
+
// Get the slider
|
237 |
+
$slider = Easing_Slider::find( $id );
|
238 |
+
|
239 |
+
// Unset the slider ID
|
240 |
+
unset( $slider->ID );
|
241 |
+
|
242 |
+
// Append "- Copy" to the slider title
|
243 |
+
$slider->post_title = sprintf( __( "%s - Copy", 'easingslider' ), $slider->post_title );
|
244 |
+
|
245 |
+
// Save the slider, thus creating a new one as no ID is present.
|
246 |
+
$slider->save();
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Processes a delete action
|
252 |
+
*
|
253 |
+
* @param int $id The slider ID
|
254 |
+
* @return void
|
255 |
+
*/
|
256 |
+
public function process_delete_action( $id ) {
|
257 |
+
|
258 |
+
// Delete the slider
|
259 |
+
Easing_Slider::delete( $id );
|
260 |
+
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Our checkbox column method
|
265 |
+
*
|
266 |
+
* @param object $item Our column item
|
267 |
+
* @return string
|
268 |
+
*/
|
269 |
+
public function column_cb( $item ) {
|
270 |
+
|
271 |
+
return sprintf( '<input type="checkbox" name="ids[]" value="%s" />', $item->ID );
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Our post title column method
|
277 |
+
*
|
278 |
+
* @param object $item Our column item
|
279 |
+
* @return string
|
280 |
+
*/
|
281 |
+
public function column_post_title( $item ) {
|
282 |
+
|
283 |
+
// Our title string
|
284 |
+
$title = sprintf( '<strong><a class="row-title" href="?page=%s&edit=%s">%s</a></strong>', $_GET['page'], $item->ID, $item->post_title );
|
285 |
+
|
286 |
+
// Add nonces to action URLs
|
287 |
+
$duplicate_link = wp_nonce_url( "?page={$_GET['page']}&action=duplicate&id={$item->ID}", 'duplicate' );
|
288 |
+
$delete_link = wp_nonce_url( "?page={$_GET['page']}&action=delete&id={$item->ID}", 'delete' );
|
289 |
+
|
290 |
+
// Our array of actions
|
291 |
+
$actions = array(
|
292 |
+
'edit' => sprintf( '<a href="?page=%s&edit=%s">Edit</a>', $_GET['page'], $item->ID ),
|
293 |
+
'duplicate' => sprintf( '<a href="%s">Duplicate</a>', $duplicate_link ),
|
294 |
+
'delete' => sprintf( '<a href="%s">Delete</a>', $delete_link ),
|
295 |
+
);
|
296 |
+
|
297 |
+
return sprintf( '%1$s %2$s', $title, $this->row_actions( $actions ) );
|
298 |
+
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Our post author column method
|
303 |
+
*
|
304 |
+
* @param object $item Our column item
|
305 |
+
* @return string
|
306 |
+
*/
|
307 |
+
public function column_post_author( $item ) {
|
308 |
+
|
309 |
+
$author = sprintf(
|
310 |
+
'<a href="%s">%s</a>',
|
311 |
+
esc_url( add_query_arg( array( 'page' => $_GET['page'], 'author' => get_the_author_meta( 'ID', $item->post_author ) ) ) ),
|
312 |
+
get_the_author_meta( 'display_name', $item->post_author )
|
313 |
+
);
|
314 |
+
|
315 |
+
return sprintf( '%1$s', $author );
|
316 |
+
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Our post date column method
|
321 |
+
*
|
322 |
+
* @param object $item Our column item
|
323 |
+
* @return string
|
324 |
+
*/
|
325 |
+
public function column_post_date( $item ) {
|
326 |
+
|
327 |
+
// Get the time strings
|
328 |
+
$post_time = get_post_time( 'G', true, $item->ID );
|
329 |
+
$abbr_time = get_post_time( 'Y/m/d g:i:s A', true, $item->ID );
|
330 |
+
|
331 |
+
// Calculate the time difference from now
|
332 |
+
$time_diff = time() - $post_time;
|
333 |
+
|
334 |
+
// Get the appropriate time string
|
335 |
+
if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
|
336 |
+
|
337 |
+
// Return a pretty text string
|
338 |
+
$date = sprintf( __( '%s ago', 'easingslider' ), human_time_diff( $post_time ) );
|
339 |
+
|
340 |
+
}
|
341 |
+
else {
|
342 |
+
|
343 |
+
// Return a date, month and year string
|
344 |
+
$date = mysql2date( __( 'Y/m/d' ), $item->post_date );
|
345 |
+
|
346 |
+
}
|
347 |
+
|
348 |
+
return sprintf( '<abbr title="%1$s">%2$s</abbr><br />%3$s', $abbr_time, $date, __( 'Published', 'easingslider' ) );
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Our shortcode column method
|
354 |
+
*
|
355 |
+
* @param object $item Our column item
|
356 |
+
* @return string
|
357 |
+
*/
|
358 |
+
public function column_shortcode( $item ) {
|
359 |
+
|
360 |
+
return sprintf( '<code>[easingslider id="%s"]</code>', $item->ID );
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Our default column methods
|
366 |
+
*
|
367 |
+
* @param array $item Our column item
|
368 |
+
* @param string $column_name The column name
|
369 |
+
* @return string
|
370 |
+
*/
|
371 |
+
public function column_default( $item, $column_name ) {
|
372 |
+
|
373 |
+
switch ( $column_name ) {
|
374 |
+
default:
|
375 |
+
return $item->$column_name;
|
376 |
+
}
|
377 |
+
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Our custom "No items" text
|
382 |
+
*
|
383 |
+
* @return void
|
384 |
+
*/
|
385 |
+
public function no_items() {
|
386 |
+
|
387 |
+
// That's all folks!
|
388 |
+
_e( 'No sliders found.', 'easingslider' );
|
389 |
+
|
390 |
+
}
|
391 |
+
|
392 |
+
}
|
includes/class-es-update-manager.php
ADDED
@@ -0,0 +1,372 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* This code is for debugging purposes.
|
12 |
+
* Uncomment the lines to force WordPress to check for plugin updates on every page load.
|
13 |
+
*/
|
14 |
+
// set_transient( 'update_plugins', null );
|
15 |
+
// set_site_transient( 'update_plugins', null );
|
16 |
+
|
17 |
+
/**
|
18 |
+
* This class handles all the update-related stuff for extensions, including adding a license section to the "Licenses" settings tab.
|
19 |
+
*
|
20 |
+
* @author Matthew Ruddy
|
21 |
+
*/
|
22 |
+
class ES_Update_Manager {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Plugin name
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
protected $name;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Plugin slug
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
protected $slug;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Plugin version
|
40 |
+
*
|
41 |
+
* @var int
|
42 |
+
*/
|
43 |
+
protected $version;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* License key
|
47 |
+
*
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
protected $key;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Our API Url
|
54 |
+
*
|
55 |
+
* @var string
|
56 |
+
*/
|
57 |
+
public $api_url = 'http://easingslider.com/api/';
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Transient expiry time (default 6 hours)
|
61 |
+
*
|
62 |
+
* @var int
|
63 |
+
*/
|
64 |
+
public $transient_expiry = 21600;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Constructor
|
68 |
+
*
|
69 |
+
* @param array $name The plugin name
|
70 |
+
* @param string $slug The plugin slug
|
71 |
+
* @param int $version The plugin version
|
72 |
+
* @return void
|
73 |
+
*/
|
74 |
+
public function __construct( $name, $slug, $version ) {
|
75 |
+
|
76 |
+
// Establish variables
|
77 |
+
$this->name = $name;
|
78 |
+
$this->slug = $slug;
|
79 |
+
$this->version = $version;
|
80 |
+
|
81 |
+
// Set the license key
|
82 |
+
$this->set_key();
|
83 |
+
|
84 |
+
// Define hooks for this license
|
85 |
+
$this->define_hooks();
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Sets the license key
|
91 |
+
*
|
92 |
+
* @return void
|
93 |
+
*/
|
94 |
+
protected function set_key() {
|
95 |
+
|
96 |
+
// Get the settings
|
97 |
+
$settings = get_option( 'easingslider_settings' );
|
98 |
+
|
99 |
+
// Get the license key index
|
100 |
+
$key_index = "{$this->slug}_license_key";
|
101 |
+
|
102 |
+
// Set the license key if it exists
|
103 |
+
if ( isset( $settings->{$key_index} ) ) {
|
104 |
+
$this->key = $settings->{$key_index};
|
105 |
+
}
|
106 |
+
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Define hooks for this license
|
111 |
+
*
|
112 |
+
* @return void
|
113 |
+
*/
|
114 |
+
protected function define_hooks() {
|
115 |
+
|
116 |
+
add_action( 'easingslider_do_settings_actions', array( $this, 'attempt_deactivation' ) );
|
117 |
+
add_action( 'easingslider_do_settings_actions', array( $this, 'attempt_registration' ) );
|
118 |
+
add_action( 'easingslider_print_license_fields', array( $this, 'display_license_field' ) );
|
119 |
+
add_filter( 'pre_set_transient_update_plugins', array( $this, 'modify_updates_transient' ) );
|
120 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'modify_updates_transient' ) );
|
121 |
+
add_filter( 'plugins_api', array( $this, 'get_update_info' ), 10, 3 );
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Registers the license key to the current site
|
127 |
+
*
|
128 |
+
* @return boolean|string
|
129 |
+
*/
|
130 |
+
public function register() {
|
131 |
+
|
132 |
+
// Make the validation request
|
133 |
+
$request = wp_remote_post( $this->api_url, array(
|
134 |
+
'timeout' => 10,
|
135 |
+
'body' => array(
|
136 |
+
'action' => 'register_license',
|
137 |
+
'key' => $this->key,
|
138 |
+
'slug' => $this->slug,
|
139 |
+
'url' => home_url(),
|
140 |
+
'version' => $this->version
|
141 |
+
)
|
142 |
+
) );
|
143 |
+
|
144 |
+
// Bail if WordPress error was received (HTTP API may have failed or may not have access required)
|
145 |
+
if ( is_wp_error( $request ) ) {
|
146 |
+
|
147 |
+
return $request->get_error_message();
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
// Get the response headers
|
152 |
+
$headers = (object) wp_remote_retrieve_headers( $request );
|
153 |
+
|
154 |
+
// Get the response body
|
155 |
+
$response = json_decode( wp_remote_retrieve_body( $request ) );
|
156 |
+
|
157 |
+
// Bail if no response was received (service may temporarily be offline)
|
158 |
+
if ( ! isset( $response->response ) ) {
|
159 |
+
|
160 |
+
return __( 'The license key registration service is temporarily unavailable. Please try again later.', 'easingslider' );
|
161 |
+
|
162 |
+
}
|
163 |
+
|
164 |
+
// If registration was a success, return true.
|
165 |
+
if ( 200 == $headers->status ) {
|
166 |
+
|
167 |
+
// Flag the license as valid
|
168 |
+
update_option( "{$this->slug}_license_is_valid", true );
|
169 |
+
|
170 |
+
return true;
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
return $response->response;
|
175 |
+
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Deactivates the license registration for the current site
|
180 |
+
*
|
181 |
+
* @return boolean|string
|
182 |
+
*/
|
183 |
+
public function deactivate() {
|
184 |
+
|
185 |
+
// Make the validation request
|
186 |
+
$request = wp_remote_post( $this->api_url, array(
|
187 |
+
'timeout' => 10,
|
188 |
+
'body' => array(
|
189 |
+
'action' => 'deactivate_license',
|
190 |
+
'key' => $this->key,
|
191 |
+
'slug' => $this->slug,
|
192 |
+
'url' => home_url(),
|
193 |
+
'version' => $this->version
|
194 |
+
)
|
195 |
+
) );
|
196 |
+
|
197 |
+
// Bail if WordPress error was received (HTTP API may have failed or may not have access required)
|
198 |
+
if ( is_wp_error( $request ) ) {
|
199 |
+
|
200 |
+
return $request->get_error_message();
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
// Get the response headers
|
205 |
+
$headers = (object) wp_remote_retrieve_headers( $request );
|
206 |
+
|
207 |
+
// If license was successfully deactivated, return true.
|
208 |
+
if ( 204 == $headers->status ) {
|
209 |
+
|
210 |
+
// Delete the license validation flag
|
211 |
+
delete_option( "{$this->slug}_license_is_valid" );
|
212 |
+
|
213 |
+
return true;
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
// If we've gotten here, there's been an error. Tell the user.
|
218 |
+
return __( 'Your license could not be deactivated. Please contact support to have it deactivated correctly.', 'easingslider' );
|
219 |
+
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Get plugin updates, requesting to server if required.
|
224 |
+
*
|
225 |
+
* @return array|false
|
226 |
+
*/
|
227 |
+
public function get_updates() {
|
228 |
+
//
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Attempts to register the license key to this site
|
233 |
+
*
|
234 |
+
* @return void
|
235 |
+
*/
|
236 |
+
public function attempt_registration() {
|
237 |
+
|
238 |
+
// Bail if we have no license key
|
239 |
+
if ( empty( $this->key ) ) {
|
240 |
+
return;
|
241 |
+
}
|
242 |
+
|
243 |
+
// Bail if not registering this license
|
244 |
+
if ( ! isset( $_POST["register-{$this->slug}"] ) OR ! isset( $_POST['save'] ) ) {
|
245 |
+
return;
|
246 |
+
}
|
247 |
+
|
248 |
+
// Check security nonce
|
249 |
+
if ( ! check_admin_referer( 'save' ) ) {
|
250 |
+
return;
|
251 |
+
}
|
252 |
+
|
253 |
+
// Attempt to register the license
|
254 |
+
$response = $this->register();
|
255 |
+
|
256 |
+
// Handle response
|
257 |
+
if ( true === $response ) {
|
258 |
+
|
259 |
+
// Tell the user the license was registered successfully.
|
260 |
+
easingslider_show_notice( sprintf( __( '"%s" License has been registered successfully.', 'easingslider' ), $this->name ), 'updated notice' );
|
261 |
+
|
262 |
+
}
|
263 |
+
else {
|
264 |
+
|
265 |
+
// Tell the user we failed to register the license
|
266 |
+
easingslider_show_notice( $response, 'error' );
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Attempts to deactive the license key for this site
|
274 |
+
*
|
275 |
+
* @return void
|
276 |
+
*/
|
277 |
+
public function attempt_deactivation() {
|
278 |
+
|
279 |
+
// Bail if not deactivating this license
|
280 |
+
if ( ! isset( $_POST["deactivate-{$this->slug}"] ) ) {
|
281 |
+
return;
|
282 |
+
}
|
283 |
+
|
284 |
+
// Check security nonce
|
285 |
+
if ( ! check_admin_referer( 'save' ) ) {
|
286 |
+
return;
|
287 |
+
}
|
288 |
+
|
289 |
+
// Attempt to deactivate the license
|
290 |
+
$response = $this->deactivate();
|
291 |
+
|
292 |
+
// Handle response
|
293 |
+
if ( true === $response ) {
|
294 |
+
|
295 |
+
// Tell the user the license was registered successfully.
|
296 |
+
easingslider_show_notice( sprintf( __( '"%s" License has been deactivated successfully.', 'easingslider' ), $this->name ), 'updated notice' );
|
297 |
+
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
|
301 |
+
// Tell the user we failed to deactivate the license
|
302 |
+
easingslider_show_notice( $response, 'error' );
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Displays the license settings field
|
310 |
+
*
|
311 |
+
* @return void
|
312 |
+
*/
|
313 |
+
public function display_license_field() {
|
314 |
+
|
315 |
+
// Get the settings
|
316 |
+
$settings = get_option( 'easingslider_settings' );
|
317 |
+
|
318 |
+
// Get license validation flag
|
319 |
+
$is_valid = get_option( "{$this->slug}_license_is_valid" );
|
320 |
+
|
321 |
+
// Get the license key index
|
322 |
+
$key_index = "{$this->slug}_license_key";
|
323 |
+
|
324 |
+
// Display the field
|
325 |
+
?>
|
326 |
+
<tr>
|
327 |
+
<th scope="row">
|
328 |
+
<label for="<?php echo esc_attr( $this->slug ); ?>">
|
329 |
+
<?php printf( __( '"%s" License Key', 'easingslider' ), $this->name ); ?>
|
330 |
+
</label>
|
331 |
+
</th>
|
332 |
+
<td>
|
333 |
+
<input type="hidden" name="register-<?php echo esc_attr( $this->slug ); ?>" value="true">
|
334 |
+
<span class="<?php if ( $is_valid ) { echo 'valid-license'; } ?>">
|
335 |
+
<input type="text" name="<?php echo "settings[{$key_index}]"; ?>" class="regular-text" value="<?php if ( isset( $settings->{$key_index} ) ) { echo esc_attr( $settings->{$key_index} ); } ?>">
|
336 |
+
</span>
|
337 |
+
<?php if ( $is_valid ) : ?>
|
338 |
+
<input type="submit" class="button button-secondary" id="deactivate" name="deactivate-<?php echo esc_attr( $this->slug ); ?>" value="<?php _e( 'Deactivate', 'easingslider' ); ?>">
|
339 |
+
<?php endif; ?>
|
340 |
+
</td>
|
341 |
+
</tr>
|
342 |
+
<?php
|
343 |
+
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Displays plugin update information on the WordPress Plugins page
|
348 |
+
*
|
349 |
+
* @param object $res
|
350 |
+
* @param string $action The action occurring
|
351 |
+
* @param object $args The arguments
|
352 |
+
* @return object
|
353 |
+
*/
|
354 |
+
public function get_update_info( $res, $action, $args ) {
|
355 |
+
|
356 |
+
return $res;
|
357 |
+
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* Modifies the WordPress updates transient to include our update information
|
362 |
+
*
|
363 |
+
* @param object $checked_data The data of checked plugin updates
|
364 |
+
* @return object
|
365 |
+
*/
|
366 |
+
public function modify_updates_transient( $checked_data ) {
|
367 |
+
|
368 |
+
return $checked_data;
|
369 |
+
|
370 |
+
}
|
371 |
+
|
372 |
+
}
|
includes/class-es-welcome-pages.php
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Defines our "Welcome" page functionality
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Welcome_Pages {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Adds our "Welcome" page(s) to the dashboard
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function add_dashboard_pages() {
|
23 |
+
|
24 |
+
// "About" page
|
25 |
+
$hooks[] = add_dashboard_page(
|
26 |
+
__( 'Welcome to Easing Slider', 'easingslider' ),
|
27 |
+
__( 'Welcome to Easing Slider', 'easingslider' ),
|
28 |
+
'manage_options',
|
29 |
+
'easingslider-about',
|
30 |
+
array( $this, 'display_view' )
|
31 |
+
);
|
32 |
+
|
33 |
+
// "Getting Started" page
|
34 |
+
$hooks[] = add_dashboard_page(
|
35 |
+
__( 'Getting started with Easing Slider', 'easingslider' ),
|
36 |
+
__( 'Getting started with Easing Slider', 'easingslider' ),
|
37 |
+
'manage_options',
|
38 |
+
'easingslider-getting-started',
|
39 |
+
array( $this, 'display_view' )
|
40 |
+
);
|
41 |
+
|
42 |
+
// "Credits" page
|
43 |
+
$hooks[] = add_dashboard_page(
|
44 |
+
__( 'The people that build Easing Slider', 'easingslider' ),
|
45 |
+
__( 'The people that build Easing Slider', 'easingslider' ),
|
46 |
+
'manage_options',
|
47 |
+
'easingslider-credits',
|
48 |
+
array( $this, 'display_view' )
|
49 |
+
);
|
50 |
+
|
51 |
+
// Page-specific hooks
|
52 |
+
foreach ( $hooks as $hook ) {
|
53 |
+
add_action( "admin_print_styles-{$hook}", array( $this, 'enqueue_styles' ) );
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Registers all of our extensions page assets
|
60 |
+
*
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
public function register_assets() {
|
64 |
+
|
65 |
+
// Get our directory
|
66 |
+
$css_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/css';
|
67 |
+
|
68 |
+
// Get file suffix
|
69 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
70 |
+
|
71 |
+
// Register our stylesheet
|
72 |
+
wp_register_style( 'easingslider-welcome-pages', "{$css_dir}/welcome-pages{$suffix}.css", false, Easing_Slider::$version );
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Enqueues all of our extensions page styles
|
78 |
+
*
|
79 |
+
* @return void
|
80 |
+
*/
|
81 |
+
public function enqueue_styles() {
|
82 |
+
|
83 |
+
// Enqueue our stylesheet
|
84 |
+
wp_enqueue_style( 'easingslider-welcome-pages' );
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Hides the individual Dashboard pages
|
90 |
+
*
|
91 |
+
* @return void
|
92 |
+
*/
|
93 |
+
public function hide_individual_pages() {
|
94 |
+
|
95 |
+
// Remove the subpages
|
96 |
+
remove_submenu_page( 'index.php', 'easingslider-about' );
|
97 |
+
remove_submenu_page( 'index.php', 'easingslider-getting-started' );
|
98 |
+
remove_submenu_page( 'index.php', 'easingslider-credits' );
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Gets the tabs for our "Welcome" page
|
104 |
+
*
|
105 |
+
* @return array
|
106 |
+
*/
|
107 |
+
protected function get_tabs() {
|
108 |
+
|
109 |
+
return apply_filters( 'easingslider_welcome_tabs', array(
|
110 |
+
'about' => array( 'title' => __( 'What\'s New', 'easingslider' ), 'slug' => 'about' ),
|
111 |
+
'getting-started' => array( 'title' => __( 'Getting Started', 'easingslider' ), 'slug' => 'getting-started' ),
|
112 |
+
'credits' => array( 'title' => __( 'Credits', 'easingslider' ), 'slug' => 'credits' )
|
113 |
+
) );
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Sets our redirect transient, used to tell us to redirect to the "Welcome" page(s)
|
119 |
+
*
|
120 |
+
* @return void
|
121 |
+
*/
|
122 |
+
public function set_redirect_transient() {
|
123 |
+
|
124 |
+
// Bail if activating from network, or bulk
|
125 |
+
if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
|
126 |
+
return;
|
127 |
+
}
|
128 |
+
|
129 |
+
set_transient( '_easingslider_welcome_redirect', true, 30 );
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Redirects the user to the welcome page if welcome transient exits
|
135 |
+
*
|
136 |
+
* @return void
|
137 |
+
*/
|
138 |
+
public function redirect_to_welcome() {
|
139 |
+
|
140 |
+
// Bail if we have no transient
|
141 |
+
if ( ! get_transient( '_easingslider_welcome_redirect' ) ) {
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
|
145 |
+
// Delete the redirect transient
|
146 |
+
delete_transient( '_easingslider_welcome_redirect' );
|
147 |
+
|
148 |
+
// Bail if activating from network, or bulk.
|
149 |
+
if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
// Get the previous plugin version from database
|
154 |
+
$version = get_option( 'easingslider_version' );
|
155 |
+
|
156 |
+
// Trigger hooks
|
157 |
+
do_action( 'easingslider_pre_redirect_to_welcome', $version );
|
158 |
+
|
159 |
+
// Redirect the user appropriately
|
160 |
+
if ( version_compare( $version, Easing_Slider::$version, '=' ) ) {
|
161 |
+
|
162 |
+
// This is a first time install. Redirect to "Getting Started".
|
163 |
+
wp_safe_redirect( admin_url( 'index.php?page=easingslider-getting-started' ) );
|
164 |
+
exit;
|
165 |
+
|
166 |
+
}
|
167 |
+
else {
|
168 |
+
|
169 |
+
// The plugin has just been updated. Redirect to "About".
|
170 |
+
wp_safe_redirect( admin_url( 'index.php?page=easingslider-about' ) );
|
171 |
+
exit;
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Displays the view
|
179 |
+
*
|
180 |
+
* @return void
|
181 |
+
*/
|
182 |
+
public function display_view() {
|
183 |
+
|
184 |
+
// Get the current page
|
185 |
+
$page = $_GET['page'];
|
186 |
+
|
187 |
+
// Get the settings tabs
|
188 |
+
$tabs = $this->get_tabs();
|
189 |
+
|
190 |
+
// Get the current tab
|
191 |
+
$current_tab = str_replace( 'easingslider-', '', $page );
|
192 |
+
|
193 |
+
// Get the plugin version
|
194 |
+
$version = Easing_Slider::$version;
|
195 |
+
|
196 |
+
// Get the images directory
|
197 |
+
$image_dir = plugins_url( plugin_basename( dirname( __DIR__ ) ) ) . '/images';
|
198 |
+
|
199 |
+
// Display the view
|
200 |
+
require plugin_dir_path( dirname( __FILE__ ) ) . 'partials/welcome.php';
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
includes/class-es-widget.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Adds a 'Sliders' widget to the WordPress widgets interface
|
12 |
+
*
|
13 |
+
* @author Matthew Ruddy
|
14 |
+
*/
|
15 |
+
class ES_Widget extends WP_Widget {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
|
24 |
+
// Call parent constructor
|
25 |
+
parent::__construct(
|
26 |
+
'easingslider_widget',
|
27 |
+
__( 'Slider', 'easingslider' ),
|
28 |
+
array( 'description' => __( 'Display a slider using a widget', 'easingslider' ) )
|
29 |
+
);
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Registers our widget
|
35 |
+
*
|
36 |
+
* @return void
|
37 |
+
*/
|
38 |
+
public function register() {
|
39 |
+
|
40 |
+
// Register this widget
|
41 |
+
register_widget( __CLASS__ );
|
42 |
+
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Widget logic
|
47 |
+
*
|
48 |
+
* @param array $args The widget arguments
|
49 |
+
* @param array $instance The widget instance
|
50 |
+
* @return void
|
51 |
+
*/
|
52 |
+
public function widget( $args, $instance ) {
|
53 |
+
|
54 |
+
// Extract arguments
|
55 |
+
extract( $args );
|
56 |
+
|
57 |
+
// Before widget
|
58 |
+
echo $before_widget;
|
59 |
+
|
60 |
+
// Display title
|
61 |
+
if ( ! empty( $instance['title'] ) ) {
|
62 |
+
echo $before_title . apply_filters( 'widgets_title', $instance['title'] ) . $after_title;
|
63 |
+
}
|
64 |
+
|
65 |
+
// Display the slider
|
66 |
+
if ( ! empty( $instance['id'] ) ) {
|
67 |
+
echo do_shortcode( "[easingslider id=\"{$instance['id']}\"]" );
|
68 |
+
}
|
69 |
+
|
70 |
+
// After widget
|
71 |
+
echo $after_widget;
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Returns updated settings array. Also does some sanatization.
|
77 |
+
*
|
78 |
+
* @param array $new_instance The new widget settings
|
79 |
+
* @param array $old_instance The old widget settings
|
80 |
+
* @return array
|
81 |
+
*/
|
82 |
+
public function update( $new_instance, $old_instance ) {
|
83 |
+
|
84 |
+
return array(
|
85 |
+
'id' => intval( $new_instance['id'] ),
|
86 |
+
'title' => strip_tags( $new_instance['title'] )
|
87 |
+
);
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Widget settings form
|
93 |
+
*
|
94 |
+
* @param array $instance The widget instance
|
95 |
+
*/
|
96 |
+
public function form( $instance ) {
|
97 |
+
|
98 |
+
// Get all of the sliders
|
99 |
+
$sliders = Easing_Slider::all();
|
100 |
+
|
101 |
+
// Print the settings
|
102 |
+
?>
|
103 |
+
<p>
|
104 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'easingslider' ); ?></label>
|
105 |
+
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" class="widefat" value="<?php if ( isset( $instance['title'] ) ) echo esc_attr( $instance['title'] ); ?>">
|
106 |
+
</p>
|
107 |
+
<p>
|
108 |
+
<label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e( 'Select Slider:', 'easingslider' ); ?></label>
|
109 |
+
<select id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" class="widefat">
|
110 |
+
<option value="-1"><?php _e( '— Select —', 'easingslider' ); ?></option>
|
111 |
+
<?php foreach ( $sliders as $slider ) : ?>
|
112 |
+
<option value="<?php echo esc_attr( $slider->ID ); ?>" <?php if ( isset( $instance['id'] ) ) selected( $instance['id'], $slider->ID ); ?>><?php echo esc_html( $slider->post_title ) . sprintf( __( ' (ID #%s)', 'easingslider' ), $slider->ID ); ?></option>
|
113 |
+
<?php endforeach; ?>
|
114 |
+
</select>
|
115 |
+
</p>
|
116 |
+
<?php
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
}
|
includes/helpers.php
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Exit if accessed directly
|
5 |
+
*/
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Alias for displaying a slider shortcode
|
12 |
+
*
|
13 |
+
* @param int|array $args The slider arguments, or numerical ID.
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
if ( ! function_exists( 'easingslider' ) ) {
|
17 |
+
function easingslider( $args = array() ) {
|
18 |
+
|
19 |
+
// Continue if we have our shortcode class
|
20 |
+
if ( class_exists( 'ES_Shortcode' ) ) {
|
21 |
+
|
22 |
+
// Handle if we've passed just an ID
|
23 |
+
if ( is_int( $args ) ) {
|
24 |
+
$args = array( 'id' => $args );
|
25 |
+
}
|
26 |
+
|
27 |
+
// Create a new shortcode instance
|
28 |
+
$shortcode = new ES_Shortcode();
|
29 |
+
|
30 |
+
// Do the shortcode
|
31 |
+
echo $shortcode->render( $args );
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Registers an extension, settings up it's licensing and updater.
|
40 |
+
*
|
41 |
+
* @param string $name The plugin name
|
42 |
+
* @param string $slug The plugin slug
|
43 |
+
* @param int $version The plugin version
|
44 |
+
* @return ES_Update_Manager
|
45 |
+
*/
|
46 |
+
if ( ! function_exists( 'easingslider_register_extension' ) ) {
|
47 |
+
function easingslider_register_extension( $name, $slug, $version ) {
|
48 |
+
|
49 |
+
// Setup updates and licensing
|
50 |
+
if ( class_exists( 'ES_Update_Manager' ) ) {
|
51 |
+
return new ES_Update_Manager( $name, $slug, $version );
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Helpful function for requiring a "partial" template file, or alternatively loading an action.
|
59 |
+
* Often used for allowing extensions to hook into core plugin panels/views.
|
60 |
+
*
|
61 |
+
* @param string $name The file/action name
|
62 |
+
* @param mixed $settings The data to pass to the file/action
|
63 |
+
* @return void
|
64 |
+
*/
|
65 |
+
if ( ! function_exists( 'easingslider_partial_or_action' ) ) {
|
66 |
+
function easingslider_partial_or_action( $name, $settings = false ) {
|
67 |
+
|
68 |
+
// Get the filepath
|
69 |
+
$file_path = plugin_dir_path( dirname( __FILE__ ) ) . "partials/{$name}.php";
|
70 |
+
|
71 |
+
// Load the file, or trigger an action if no file is found.
|
72 |
+
if ( file_exists( $file_path ) ) {
|
73 |
+
require $file_path;
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
do_action( "easingslider_{$name}", $settings );
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Queues an admin message to be displayed
|
84 |
+
*
|
85 |
+
* @param string $text The message text
|
86 |
+
* @param string $type The message type (success, error, etc).
|
87 |
+
* @return void
|
88 |
+
*/
|
89 |
+
if ( ! function_exists( 'easingslider_admin_notice' ) ) {
|
90 |
+
function easingslider_show_notice( $text, $type = 'updated' ) {
|
91 |
+
|
92 |
+
// Add slashes to text
|
93 |
+
$text = addslashes( $text );
|
94 |
+
|
95 |
+
// Queue the message
|
96 |
+
$message = "<div class='message $type'><p>$text</p></div>";
|
97 |
+
add_action( 'admin_notices', create_function( '', 'echo "'. $message .'";' ) );
|
98 |
+
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Validates the data in an array for database insertion
|
104 |
+
*
|
105 |
+
* @param mixed $data The data to validate
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
if ( ! function_exists( 'easingslider_validate_data' ) ) {
|
109 |
+
function easingslider_validate_data( $data ) {
|
110 |
+
|
111 |
+
// Stripslashes
|
112 |
+
$data = stripslashes_deep( $data );
|
113 |
+
|
114 |
+
// Handle the various data types
|
115 |
+
if ( is_object( $data ) OR is_array( $data ) ) {
|
116 |
+
foreach ( $data as $key => &$value ) {
|
117 |
+
$value = easingslider_validate_data( $value );
|
118 |
+
}
|
119 |
+
}
|
120 |
+
else if ( is_string( $data ) && ( ! is_object( json_decode( $data ) ) OR ! is_array( json_decode( $data ) ) ) ) {
|
121 |
+
|
122 |
+
// Bail if just an empty string
|
123 |
+
if ( $data == '' ) {
|
124 |
+
return $data;
|
125 |
+
}
|
126 |
+
|
127 |
+
// Ensure integers are integers, and booleans are booleans
|
128 |
+
if ( ! is_null( ( $int = filter_var( $data, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE ) ) ) ) {
|
129 |
+
$data = $int;
|
130 |
+
}
|
131 |
+
else if ( ! is_null( ( $bool = filter_var( $data, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ) ) ) {
|
132 |
+
$data = $bool;
|
133 |
+
}
|
134 |
+
|
135 |
+
}
|
136 |
+
|
137 |
+
return $data;
|
138 |
+
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Generates a HTML attributes string, filtering for good measure.
|
144 |
+
*
|
145 |
+
* @param string $slug The slug, used in the filter
|
146 |
+
* @param array $atts The html attributes array
|
147 |
+
* @return string
|
148 |
+
*/
|
149 |
+
if ( ! function_exists( 'easingslider_html_attributes_string' ) ) {
|
150 |
+
function easingslider_html_attributes_string( $slug, $atts = array(), $output = '' ) {
|
151 |
+
|
152 |
+
// Filter the attributes
|
153 |
+
$atts = apply_filters( "easingslider_{$slug}_html_attributes", $atts );
|
154 |
+
|
155 |
+
// Generate the string
|
156 |
+
foreach ( $atts as $key => $value ) {
|
157 |
+
if ( ! $value ) {
|
158 |
+
$output .= "{$key}=\"{$value}\" ";
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
return $output;
|
163 |
+
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Displays admin footer text, thanking the user for using Easing Slider :)
|
169 |
+
*
|
170 |
+
* @param string $footer_text The current footer text
|
171 |
+
* @return string
|
172 |
+
*/
|
173 |
+
if ( ! function_exists( 'easingslider_admin_footer_text' ) ) {
|
174 |
+
function easingslider_admin_footer_text( $footer_text ) {
|
175 |
+
|
176 |
+
global $current_screen;
|
177 |
+
|
178 |
+
// Only display custom text on Easing Slider pages
|
179 |
+
if ( isset( $current_screen->id ) && false !== strpos( $current_screen->id, 'easingslider' ) ) {
|
180 |
+
return sprintf( __( 'Please rate <strong>Easing Slider</strong> <a href="%1$s" target="_blank">★★★★★</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us keep this plugin free. Thank you from the Easing Slider team!', 'easingslider' ), __( 'http://wordpress.org/support/view/plugin-reviews/easing-slider?filter=5', 'easingslider' ) );
|
181 |
+
} else {
|
182 |
+
return $footer_text;
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
add_filter( 'admin_footer_text', 'easingslider_admin_footer_text' );
|
187 |
+
}
|
js/admin.js
DELETED
@@ -1,541 +0,0 @@
|
|
1 |
-
;(function($) {
|
2 |
-
|
3 |
-
/** Our slide model */
|
4 |
-
window.Slide = Backbone.Model.extend({
|
5 |
-
|
6 |
-
defaults: {
|
7 |
-
url: null,
|
8 |
-
sizes: null,
|
9 |
-
alt: null,
|
10 |
-
title: null,
|
11 |
-
link: null,
|
12 |
-
linkTarget: '_blank',
|
13 |
-
},
|
14 |
-
|
15 |
-
});
|
16 |
-
|
17 |
-
/** Our slides collection */
|
18 |
-
window.SlideCollection = Backbone.Collection.extend({
|
19 |
-
|
20 |
-
model: Slide,
|
21 |
-
|
22 |
-
primary: 0,
|
23 |
-
|
24 |
-
initialize: function() {
|
25 |
-
|
26 |
-
var self = this;
|
27 |
-
|
28 |
-
/** Bind events */
|
29 |
-
this.on('add', this.addModel, this);
|
30 |
-
this.on('remove', this.removeModel, this);
|
31 |
-
this.on('reset', this.resetData, this);
|
32 |
-
this.on('change', this.resetData, this);
|
33 |
-
|
34 |
-
/** Increment primary key for each model (timeout ensures models are added before doing so) */
|
35 |
-
setTimeout(function() {
|
36 |
-
_.each(self.models, function(model) {
|
37 |
-
self.primary++;
|
38 |
-
});
|
39 |
-
});
|
40 |
-
|
41 |
-
},
|
42 |
-
|
43 |
-
addModel: function(model) {
|
44 |
-
|
45 |
-
/** Increment primary key */
|
46 |
-
this.primary++;
|
47 |
-
|
48 |
-
/** Add ID to model & store it */
|
49 |
-
model.set({ 'id': this.primary }, { silent: true });
|
50 |
-
|
51 |
-
/** Silently reset the collection (forces refresh of _byId and _byCid properties) */
|
52 |
-
this.reset(this.models, { silent: true });
|
53 |
-
|
54 |
-
/** Set stored data */
|
55 |
-
this.resetData();
|
56 |
-
|
57 |
-
},
|
58 |
-
|
59 |
-
removeModel: function() {
|
60 |
-
|
61 |
-
var self = this;
|
62 |
-
|
63 |
-
/** Reset model IDs */
|
64 |
-
this.resetIDs();
|
65 |
-
|
66 |
-
/** Silently reset the collection (forces refresh of _byId and _byCid properties) */
|
67 |
-
this.reset(this.models, { silent: true });
|
68 |
-
|
69 |
-
/** Set stored data */
|
70 |
-
this.resetData();
|
71 |
-
|
72 |
-
},
|
73 |
-
|
74 |
-
resetData: function() {
|
75 |
-
|
76 |
-
/** Reset stored (hidden input) data */
|
77 |
-
$('#slideshow-images').val(JSON.stringify(this));
|
78 |
-
|
79 |
-
},
|
80 |
-
|
81 |
-
resetIDs: function() {
|
82 |
-
|
83 |
-
var self = this;
|
84 |
-
|
85 |
-
/** Reset primary key */
|
86 |
-
this.primary = 0;
|
87 |
-
|
88 |
-
/** Reset ID's */
|
89 |
-
_.each(this.models, function(model) {
|
90 |
-
self.primary++;
|
91 |
-
model.set({ 'id': self.primary }, { silent: true });
|
92 |
-
});
|
93 |
-
|
94 |
-
return this;
|
95 |
-
|
96 |
-
},
|
97 |
-
|
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);
|
114 |
-
this.collection.on('reset', this.render, this);
|
115 |
-
this.collection.on('change:url', this.render, this);
|
116 |
-
|
117 |
-
/** Delete all images functionality */
|
118 |
-
$('.delete-images').bind('click', function(event) {
|
119 |
-
|
120 |
-
event.preventDefault();
|
121 |
-
|
122 |
-
/** Remove all of the thumbnails */
|
123 |
-
if ( confirm( easingsliderlite.delete_images ) )
|
124 |
-
self.removeThumbs.call(self, event);
|
125 |
-
|
126 |
-
});
|
127 |
-
|
128 |
-
/** Add image(s) functionality */
|
129 |
-
$('.add-image').bind('click', function(event) {
|
130 |
-
|
131 |
-
event.preventDefault();
|
132 |
-
|
133 |
-
/** Display the add image view */
|
134 |
-
addImageView.render();
|
135 |
-
|
136 |
-
});
|
137 |
-
|
138 |
-
/** Delete image functionality */
|
139 |
-
$(document).delegate('.delete-button', 'click', function(event) {
|
140 |
-
|
141 |
-
event.preventDefault();
|
142 |
-
|
143 |
-
/** Confirm before deleting the image */
|
144 |
-
if ( confirm( easingsliderlite.delete_image ) )
|
145 |
-
self.collection.remove(self.collection.get($(this).parent().attr('data-id')));
|
146 |
-
|
147 |
-
});
|
148 |
-
|
149 |
-
/** Edit slide functionality */
|
150 |
-
$(document).delegate('.thumbnails-container img', 'click', function(event) {
|
151 |
-
|
152 |
-
event.preventDefault();
|
153 |
-
|
154 |
-
/** Get the ID of the slide we want to edit */
|
155 |
-
var id = $(this).parent().attr('data-id'),
|
156 |
-
editSlideView = new EditSlideView({
|
157 |
-
model: self.collection.get(id)
|
158 |
-
});
|
159 |
-
|
160 |
-
/** Display slide editor view */
|
161 |
-
$(editSlideView.render().el).appendTo('body').focus();
|
162 |
-
|
163 |
-
});
|
164 |
-
|
165 |
-
},
|
166 |
-
|
167 |
-
addThumb: function(model) {
|
168 |
-
|
169 |
-
/** Add the new thumbnail for this model */
|
170 |
-
this.$container.append(this.template(model.toJSON()))
|
171 |
-
|
172 |
-
},
|
173 |
-
|
174 |
-
removeThumbs: function(event) {
|
175 |
-
|
176 |
-
event.preventDefault();
|
177 |
-
|
178 |
-
/** Remove thumbnails */
|
179 |
-
this.$container.empty();
|
180 |
-
|
181 |
-
/** Clear the collection */
|
182 |
-
this.collection.reset();
|
183 |
-
|
184 |
-
/** Reset primary index */
|
185 |
-
this.collection.primary = 0;
|
186 |
-
|
187 |
-
},
|
188 |
-
|
189 |
-
render: function() {
|
190 |
-
|
191 |
-
var self = this;
|
192 |
-
|
193 |
-
/** Remove the previous thumbnails */
|
194 |
-
this.$container.empty();
|
195 |
-
|
196 |
-
/** Add the current thumbnails */
|
197 |
-
_.each(this.collection.models, function(model) {
|
198 |
-
self.$container.append(self.template(model.toJSON()));
|
199 |
-
});
|
200 |
-
|
201 |
-
return this;
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
});
|
206 |
-
|
207 |
-
/** Edit slide view */
|
208 |
-
window.EditSlideView = wp.media.View.extend({
|
209 |
-
|
210 |
-
attributes: {
|
211 |
-
'tabindex': 0
|
212 |
-
},
|
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',
|
221 |
-
'click .change-image': 'changeImage',
|
222 |
-
/** As changes are set to the model automatically, we simple close to save changes */
|
223 |
-
'click .media-modal-save': 'close',
|
224 |
-
'click .media-menu-item': 'toggleTab',
|
225 |
-
'keydown': 'keyDown'
|
226 |
-
},
|
227 |
-
|
228 |
-
initialize: function() {
|
229 |
-
|
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 |
-
|
236 |
-
},
|
237 |
-
|
238 |
-
toggleTab: function(event) {
|
239 |
-
|
240 |
-
event.preventDefault();
|
241 |
-
|
242 |
-
/** Get new tab ID */
|
243 |
-
var id = event.target.dataset.tab;
|
244 |
-
|
245 |
-
/** Reset 'active' class */
|
246 |
-
$('.media-menu-item').removeClass('active');
|
247 |
-
$(event.target).addClass('active');
|
248 |
-
|
249 |
-
/** Toggle the appropriate tab */
|
250 |
-
$('.media-tab', this.$el).each(function() {
|
251 |
-
if ( this.id === id )
|
252 |
-
$(this).show();
|
253 |
-
else
|
254 |
-
$(this).hide();
|
255 |
-
});
|
256 |
-
|
257 |
-
},
|
258 |
-
|
259 |
-
close: function(event) {
|
260 |
-
|
261 |
-
event.preventDefault();
|
262 |
-
|
263 |
-
/** Closes the window, and delete the change image view (if created) */
|
264 |
-
this.remove();
|
265 |
-
if ( this.changeImageView )
|
266 |
-
this.changeImageView.remove();
|
267 |
-
|
268 |
-
},
|
269 |
-
|
270 |
-
change: function(event) {
|
271 |
-
|
272 |
-
/** Changes the models changes immediately after the field itself is changed */
|
273 |
-
var target = event.target,
|
274 |
-
change = {};
|
275 |
-
change[target.id] = target.value;
|
276 |
-
this.model.set(change);
|
277 |
-
|
278 |
-
},
|
279 |
-
|
280 |
-
discardChanges: function(event) {
|
281 |
-
|
282 |
-
event.preventDefault();
|
283 |
-
|
284 |
-
/** JSON strings of attributes (for comparison) */
|
285 |
-
var current = JSON.stringify(this.model.attributes),
|
286 |
-
original = JSON.stringify(this.origAttributes);
|
287 |
-
|
288 |
-
/** As model changes are done automatically, to discard changes we simple reset the original model attributes */
|
289 |
-
if ( current === original )
|
290 |
-
this.close(event);
|
291 |
-
else {
|
292 |
-
if ( confirm( easingsliderlite.media_upload.discard_changes ) ) {
|
293 |
-
this.model.set(this.origAttributes);
|
294 |
-
this.close(event);
|
295 |
-
}
|
296 |
-
}
|
297 |
-
|
298 |
-
},
|
299 |
-
|
300 |
-
resetThumbnail: function(model, value) {
|
301 |
-
var sizes = model.get('sizes'),
|
302 |
-
size = sizes.large || sizes.medium || sizes.thumbnail;
|
303 |
-
this.$('.slide-thumbnail').attr('src', size.url);
|
304 |
-
},
|
305 |
-
|
306 |
-
changeImage: function(event) {
|
307 |
-
|
308 |
-
event.preventDefault();
|
309 |
-
|
310 |
-
var self = this;
|
311 |
-
|
312 |
-
/** Create new view if doesn't already exist */
|
313 |
-
if ( this.changeImageView === null ) {
|
314 |
-
this.changeImageView = new ChangeImageView({
|
315 |
-
id: this.model.get('id'),
|
316 |
-
model: this.model
|
317 |
-
});
|
318 |
-
}
|
319 |
-
|
320 |
-
/** Render the view */
|
321 |
-
this.changeImageView.render();
|
322 |
-
|
323 |
-
/** Hide backdrop to prevent it from doubling up */
|
324 |
-
$('.media-modal-backdrop').first().hide();
|
325 |
-
|
326 |
-
/** Re-focus & show backdrop after close */
|
327 |
-
this.changeImageView.fileFrame.on('close', function() {
|
328 |
-
$('.media-modal-backdrop').first().show();
|
329 |
-
self.$el.focus();
|
330 |
-
});
|
331 |
-
|
332 |
-
},
|
333 |
-
|
334 |
-
keyDown: function(event) {
|
335 |
-
|
336 |
-
/** Close view when 'esc' is pressed */
|
337 |
-
if ( event.keyCode === 27 ) {
|
338 |
-
event.preventDefault();
|
339 |
-
this.discardChanges(event);
|
340 |
-
return;
|
341 |
-
}
|
342 |
-
|
343 |
-
},
|
344 |
-
|
345 |
-
render: function() {
|
346 |
-
$(this.el).html(this.template(this.model.toJSON()));
|
347 |
-
return this;
|
348 |
-
},
|
349 |
-
|
350 |
-
});
|
351 |
-
|
352 |
-
/** Backbone Add Image View */
|
353 |
-
window.AddImageView = Backbone.View.extend({
|
354 |
-
|
355 |
-
fileFrame: null,
|
356 |
-
|
357 |
-
frameProperties: {
|
358 |
-
title: easingsliderlite.media_upload.title,
|
359 |
-
button: easingsliderlite.media_upload.button,
|
360 |
-
multiple: true
|
361 |
-
},
|
362 |
-
|
363 |
-
modelAttributes: ['url', 'sizes', 'alt', 'title'],
|
364 |
-
|
365 |
-
initialize: function() {
|
366 |
-
|
367 |
-
/** Bail if file frame already exists */
|
368 |
-
if ( this.fileFrame )
|
369 |
-
return;
|
370 |
-
|
371 |
-
/** Create the media frame */
|
372 |
-
this.fileFrame = wp.media.frames.fileFrame = wp.media({
|
373 |
-
title: this.frameProperties.title,
|
374 |
-
button: {
|
375 |
-
text: this.frameProperties.button
|
376 |
-
},
|
377 |
-
multiple: this.frameProperties.multiple
|
378 |
-
});
|
379 |
-
|
380 |
-
/** Run callback when an image(s) is selected */
|
381 |
-
this.fileFrame.on('select', this.onSelect, this);
|
382 |
-
|
383 |
-
},
|
384 |
-
|
385 |
-
onSelect: function() {
|
386 |
-
|
387 |
-
/** Get the selected images */
|
388 |
-
var selection = this.fileFrame.state().get('selection'),
|
389 |
-
self = this;
|
390 |
-
|
391 |
-
/** Add them to the slides collection */
|
392 |
-
_.each(selection.models, function(image) {
|
393 |
-
|
394 |
-
/** Only get the attributes we want */
|
395 |
-
var newAttributes = {};
|
396 |
-
for ( var i in self.modelAttributes )
|
397 |
-
newAttributes[self.modelAttributes[i]] = image.get(self.modelAttributes[i]);
|
398 |
-
|
399 |
-
/** Push the new slide */
|
400 |
-
self.collection.add([newAttributes]);
|
401 |
-
|
402 |
-
});
|
403 |
-
|
404 |
-
},
|
405 |
-
|
406 |
-
render: function() {
|
407 |
-
this.fileFrame.open();
|
408 |
-
}
|
409 |
-
|
410 |
-
});
|
411 |
-
|
412 |
-
/** Extension of Add Image View, except for changing a slide's image */
|
413 |
-
window.ChangeImageView = AddImageView.extend({
|
414 |
-
|
415 |
-
frameProperties: {
|
416 |
-
title: easingsliderlite.media_upload.title,
|
417 |
-
button: easingsliderlite.media_upload.change,
|
418 |
-
multiple: false
|
419 |
-
},
|
420 |
-
|
421 |
-
onSelect: function() {
|
422 |
-
|
423 |
-
/** Get the selected attachment image (aka, the new slide) */
|
424 |
-
var selection = this.fileFrame.state().get('selection'),
|
425 |
-
image = selection.models[0],
|
426 |
-
newAttributes = {};
|
427 |
-
|
428 |
-
/** Only get the attributes we want */
|
429 |
-
for ( var i in this.modelAttributes )
|
430 |
-
newAttributes[this.modelAttributes[i]] = image.get(this.modelAttributes[i]);
|
431 |
-
|
432 |
-
/** Set new slide attributes (thumbnail will reset automagically) */
|
433 |
-
this.model.set(newAttributes);
|
434 |
-
|
435 |
-
},
|
436 |
-
|
437 |
-
remove: function() {
|
438 |
-
|
439 |
-
/** Call parent function */
|
440 |
-
AddImageView.prototype.remove.apply(this, arguments);
|
441 |
-
|
442 |
-
/** These two lines seem to be the only true way to remove a media uploader (this.fileFrame) at the moment! */
|
443 |
-
this.fileFrame.modal.$el.remove();
|
444 |
-
this.fileFrame.uploader.$browser.remove();
|
445 |
-
|
446 |
-
},
|
447 |
-
|
448 |
-
});
|
449 |
-
|
450 |
-
/** Override Media Library sidebar template with our own */
|
451 |
-
wp.media.view.Attachment.Details.prototype.template = wp.media.template('media-details');
|
452 |
-
|
453 |
-
/** Show/hide settings functionality */
|
454 |
-
$('.sidebar-name').bind('click', function() {
|
455 |
-
|
456 |
-
var $thisParent = $(this).parent(),
|
457 |
-
$thisContent = $thisParent.find('.sidebar-content');
|
458 |
-
|
459 |
-
// Close the other widgets before opening selected widget
|
460 |
-
if ( !$thisParent.hasClass('exclude' ) ) {
|
461 |
-
$('.sidebar-name').each(function() {
|
462 |
-
|
463 |
-
// Get parent
|
464 |
-
var $parent = $(this).parent();
|
465 |
-
|
466 |
-
// Close the widget
|
467 |
-
if ( !$parent.hasClass('exclude') && !$parent.hasClass('closed') ) {
|
468 |
-
$parent.find('.sidebar-content').slideUp(200, function() {
|
469 |
-
$parent.addClass('closed');
|
470 |
-
});
|
471 |
-
}
|
472 |
-
|
473 |
-
});
|
474 |
-
}
|
475 |
-
|
476 |
-
// Open/close the widget
|
477 |
-
if ( $thisParent.hasClass('closed') )
|
478 |
-
$thisContent.slideDown(200, function() {
|
479 |
-
$thisParent.removeClass('closed');
|
480 |
-
});
|
481 |
-
else
|
482 |
-
$thisContent.slideUp(200, function() {
|
483 |
-
$thisParent.addClass('closed');
|
484 |
-
});
|
485 |
-
|
486 |
-
});
|
487 |
-
|
488 |
-
/** Sortables functionality */
|
489 |
-
$('.thumbnails-container').sortable({
|
490 |
-
items: '.thumbnail',
|
491 |
-
containment: 'parent',
|
492 |
-
tolerance: 'pointer',
|
493 |
-
stop: function(event, ui) {
|
494 |
-
|
495 |
-
var order = [],
|
496 |
-
sortedModels = [];
|
497 |
-
|
498 |
-
/** Get the new sort order */
|
499 |
-
$(this).find('.thumbnail').each(function() {
|
500 |
-
order.push($(this).attr('data-id'));
|
501 |
-
});
|
502 |
-
|
503 |
-
/** Get array of models in sorted order */
|
504 |
-
for ( var i = 0; i < order.length; i++ )
|
505 |
-
sortedModels.push(slideCollection.get(order[i]));
|
506 |
-
|
507 |
-
/** Reset the collection & its IDs */
|
508 |
-
slideCollection.reset(sortedModels).resetIDs().resetData();
|
509 |
-
|
510 |
-
}
|
511 |
-
});
|
512 |
-
|
513 |
-
/** Fade out messages after 5 seconds */
|
514 |
-
setTimeout(function() {
|
515 |
-
$('.message').not('.permanent').each(function() {
|
516 |
-
$(this).fadeOut(400, function() {
|
517 |
-
$(this).remove();
|
518 |
-
});
|
519 |
-
});
|
520 |
-
}, 5000);
|
521 |
-
|
522 |
-
/** Show warning prompts */
|
523 |
-
$('.warn').bind('click', function() {
|
524 |
-
if ( !confirm( easingsliderlite.warn ) )
|
525 |
-
return false;
|
526 |
-
});
|
527 |
-
|
528 |
-
/** Get slides and bail if they can't be found */
|
529 |
-
if ( $('#slideshow-images').length == 0 )
|
530 |
-
return;
|
531 |
-
|
532 |
-
/** Get our essentials */
|
533 |
-
window.slideCollection = new SlideCollection(JSON.parse($('#slideshow-images').val()));
|
534 |
-
window.slideView = new SlideView({
|
535 |
-
collection: slideCollection
|
536 |
-
});
|
537 |
-
window.addImageView = new AddImageView({
|
538 |
-
collection: slideCollection
|
539 |
-
});
|
540 |
-
|
541 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/admin.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(e){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 e=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(e.models,function(t){e.primary++})})},addModel:function(e){this.primary++;e.set({id:this.primary},{silent:true});this.reset(this.models,{silent:true});this.resetData()},removeModel:function(){var e=this;this.resetIDs();this.reset(this.models,{silent:true});this.resetData()},resetData:function(){e("#slideshow-images").val(JSON.stringify(this))},resetIDs:function(){var e=this;this.primary=0;_.each(this.models,function(t){e.primary++;t.set({id:e.primary},{silent:true})});return this}});window.SlideView=wp.media.View.extend({$container:e(".thumbnails-container .inner"),template:wp.media.template("slide"),initialize:function(){var t=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);e(".delete-images").bind("click",function(e){e.preventDefault();if(confirm(easingsliderlite.delete_images))t.removeThumbs.call(t,e)});e(".add-image").bind("click",function(e){e.preventDefault();addImageView.render()});e(document).delegate(".delete-button","click",function(n){n.preventDefault();if(confirm(easingsliderlite.delete_image))t.collection.remove(t.collection.get(e(this).parent().attr("data-id")))});e(document).delegate(".thumbnails-container img","click",function(n){n.preventDefault();var r=e(this).parent().attr("data-id"),i=new EditSlideView({model:t.collection.get(r)});e(i.render().el).appendTo("body").focus()})},addThumb:function(e){this.$container.append(this.template(e.toJSON()))},removeThumbs:function(e){e.preventDefault();this.$container.empty();this.collection.reset();this.collection.primary=0},render:function(){var e=this;this.$container.empty();_.each(this.collection.models,function(t){e.$container.append(e.template(t.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(t){t.preventDefault();var n=t.target.dataset.tab;e(".media-menu-item").removeClass("active");e(t.target).addClass("active");e(".media-tab",this.$el).each(function(){if(this.id===n)e(this).show();else e(this).hide()})},close:function(e){e.preventDefault();this.remove();if(this.changeImageView)this.changeImageView.remove()},change:function(e){var t=e.target,n={};n[t.id]=t.value;this.model.set(n)},discardChanges:function(e){e.preventDefault();var t=JSON.stringify(this.model.attributes),n=JSON.stringify(this.origAttributes);if(t===n)this.close(e);else{if(confirm(easingsliderlite.media_upload.discard_changes)){this.model.set(this.origAttributes);this.close(e)}}},resetThumbnail:function(e,t){var n=e.get("sizes"),r=n.large||n.medium||n.thumbnail;this.$(".slide-thumbnail").attr("src",r.url)},changeImage:function(t){t.preventDefault();var n=this;if(this.changeImageView===null){this.changeImageView=new ChangeImageView({id:this.model.get("id"),model:this.model})}this.changeImageView.render();e(".media-modal-backdrop").first().hide();this.changeImageView.fileFrame.on("close",function(){e(".media-modal-backdrop").first().show();n.$el.focus()})},keyDown:function(e){if(e.keyCode===27){e.preventDefault();this.discardChanges(e);return}},render:function(){e(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=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 e=this.fileFrame.state().get("selection"),t=this;_.each(e.models,function(e){var n={};for(var r in t.modelAttributes)n[t.modelAttributes[r]]=e.get(t.modelAttributes[r]);t.collection.add([n])})},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 e=this.fileFrame.state().get("selection"),t=e.models[0],n={};for(var r in this.modelAttributes)n[this.modelAttributes[r]]=t.get(this.modelAttributes[r]);this.model.set(n)},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("media-details");e(".sidebar-name").bind("click",function(){var t=e(this).parent(),n=t.find(".sidebar-content");if(!t.hasClass("exclude")){e(".sidebar-name").each(function(){var t=e(this).parent();if(!t.hasClass("exclude")&&!t.hasClass("closed")){t.find(".sidebar-content").slideUp(200,function(){t.addClass("closed")})}})}if(t.hasClass("closed"))n.slideDown(200,function(){t.removeClass("closed")});else n.slideUp(200,function(){t.addClass("closed")})});e(".thumbnails-container").sortable({items:".thumbnail",containment:"parent",tolerance:"pointer",stop:function(t,n){var r=[],i=[];e(this).find(".thumbnail").each(function(){r.push(e(this).attr("data-id"))});for(var s=0;s<r.length;s++)i.push(slideCollection.get(r[s]));slideCollection.reset(i).resetIDs().resetData()}});setTimeout(function(){e(".message").not(".permanent").each(function(){e(this).fadeOut(400,function(){e(this).remove()})})},5e3);e(".warn").bind("click",function(){if(!confirm(easingsliderlite.warn))return false});if(e("#slideshow-images").length==0)return;window.slideCollection=new SlideCollection(JSON.parse(e("#slideshow-images").val()));window.slideView=new SlideView({collection:slideCollection});window.addImageView=new AddImageView({collection:slideCollection})})(jQuery)
|
|
js/customizer.js
CHANGED
@@ -1,159 +1,197 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
$('.collapse-sidebar').bind('click', function() {
|
43 |
-
|
44 |
-
/** Collapse/expand overlay */
|
45 |
-
var $overlay = $('.wp-full-overlay');
|
46 |
-
if ( $overlay.hasClass('expanded') )
|
47 |
-
$overlay.removeClass('expanded').addClass('collapsed');
|
48 |
-
else
|
49 |
-
$overlay.removeClass('collapsed').addClass('expanded');
|
50 |
-
|
51 |
-
});
|
52 |
-
|
53 |
-
/** Inititiate color pickers */
|
54 |
-
$('.color-picker-hex').each(function() {
|
55 |
$(this).wpColorPicker({
|
56 |
-
|
57 |
-
self.change(e);
|
58 |
-
},
|
59 |
defaultColor: $(this).attr('data-default')
|
60 |
});
|
61 |
});
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
-
|
136 |
-
changes[e.target.dataset.property] = e.target.value;
|
137 |
|
138 |
-
|
139 |
-
$(e.target.dataset.selector).css(this.validate(changes, e.target.dataset.selector));
|
140 |
|
141 |
-
|
142 |
|
143 |
-
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
|
150 |
-
|
|
|
151 |
|
152 |
-
|
153 |
-
$(document).ready(function() {
|
154 |
-
window.customizeView = new CustomizeView({
|
155 |
-
model: new Customizations(JSON.parse($('#customizations').val()))
|
156 |
-
}).render();
|
157 |
-
});
|
158 |
|
159 |
})(jQuery);
|
1 |
+
/**
|
2 |
+
* Globalize
|
3 |
+
*/
|
4 |
+
window.EasingSlider = window.EasingSlider || { Customizer: { models: {}, views: {} } };
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Where the magic happens!
|
8 |
+
*/
|
9 |
+
(function($) {
|
10 |
+
|
11 |
+
var Customizer = window.EasingSlider.Customizer;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Customizer View
|
15 |
+
*/
|
16 |
+
Customizer.views.Customizer = Backbone.View.extend({
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Our view element
|
20 |
+
*/
|
21 |
+
el: '.customize-container',
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Events
|
25 |
+
*/
|
26 |
+
events: {
|
27 |
+
'change #change-slider': '_changeSlider',
|
28 |
+
'change [data-selector]': '_reflectChanges',
|
29 |
+
'click .collapse-sidebar': '_toggleSidebar',
|
30 |
+
'click .accordion-section-title': '_toggleSection'
|
31 |
+
},
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*/
|
36 |
+
initialize: function() {
|
37 |
+
|
38 |
+
var view = this;
|
39 |
+
|
40 |
+
// Inititiate color pickers
|
41 |
+
this.$('.color-picker-hex').each(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
$(this).wpColorPicker({
|
43 |
+
change: view._reflectChanges,
|
|
|
|
|
44 |
defaultColor: $(this).attr('data-default')
|
45 |
});
|
46 |
});
|
47 |
|
48 |
+
},
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Changes the slider, reloading the page.
|
52 |
+
*/
|
53 |
+
_changeSlider: function(event) {
|
54 |
+
|
55 |
+
// Redirect the page
|
56 |
+
window.location.href = 'http://'+ window.location.hostname + window.location.pathname + '?page=easingslider_manage_customizations&edit='+ event.target.value;
|
57 |
+
|
58 |
+
},
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Reflects changes made to inputs on the provided selector.
|
62 |
+
* This provides a live preview of the changes as they are made.
|
63 |
+
*/
|
64 |
+
_reflectChanges: function(event) {
|
65 |
+
|
66 |
+
// Prefix and suffix the value as necessary
|
67 |
+
switch ( event.target.dataset.property ) {
|
68 |
+
|
69 |
+
case 'background-image':
|
70 |
+
$(event.target.dataset.selector).css({
|
71 |
+
'background-image': 'url('+ event.target.value +')'
|
72 |
+
});
|
73 |
+
break;
|
74 |
+
|
75 |
+
case 'border-width':
|
76 |
+
$(event.target.dataset.selector).css({
|
77 |
+
'border-style': 'solid',
|
78 |
+
'border-width': event.target.value +'px'
|
79 |
+
});
|
80 |
+
break;
|
81 |
+
|
82 |
+
case 'border-radius':
|
83 |
+
$(event.target.dataset.selector).css({
|
84 |
+
'-webkit-border-radius': event.target.value +'px',
|
85 |
+
'-moz-border-radius': event.target.value +'px',
|
86 |
+
'border-radius': event.target.value +'px'
|
87 |
+
});
|
88 |
+
break;
|
89 |
+
|
90 |
+
case 'display':
|
91 |
+
if ( 'true' == event.target.value ) {
|
92 |
+
$(event.target.dataset.selector).css('display', 'block');
|
93 |
+
}
|
94 |
+
else {
|
95 |
+
$(event.target.dataset.selector).css('display', 'none');
|
96 |
+
}
|
97 |
+
break;
|
98 |
+
|
99 |
+
case 'src':
|
100 |
+
$(event.target.dataset.selector).attr('src', event.target.value);
|
101 |
+
break;
|
102 |
+
|
103 |
+
default:
|
104 |
+
$(event.target.dataset.selector).css(event.target.dataset.property, event.target.value);
|
105 |
+
break;
|
106 |
+
|
107 |
+
}
|
108 |
+
|
109 |
+
},
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Toggles the sidebar
|
113 |
+
*/
|
114 |
+
_toggleSidebar: function(event) {
|
115 |
+
|
116 |
+
event.preventDefault();
|
117 |
+
|
118 |
+
// Expand/collapse the sidebar
|
119 |
+
if ( this.$('.wp-full-overlay').hasClass('expanded') ) {
|
120 |
+
this.$('.wp-full-overlay').removeClass('expanded').addClass('collapsed');
|
121 |
+
}
|
122 |
+
else {
|
123 |
+
this.$('.wp-full-overlay').removeClass('collapsed').addClass('expanded');
|
124 |
+
}
|
125 |
+
|
126 |
+
},
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Toggles a section
|
130 |
+
*/
|
131 |
+
_toggleSection: function(event) {
|
132 |
+
|
133 |
+
event.preventDefault();
|
134 |
+
|
135 |
+
// Loop through and toggle each section appropriately
|
136 |
+
this.$('.accordion-section-title').each(function() {
|
137 |
+
|
138 |
+
// Get the inside
|
139 |
+
var $section = $(this).closest('.accordion-section'),
|
140 |
+
$inside = $section.find('.accordion-section-content');
|
141 |
+
|
142 |
+
// Determine if this is the clicked section, or another section.
|
143 |
+
if ( this == event.currentTarget ) {
|
144 |
+
|
145 |
+
// If the clicked section is already open, close it. Otherwise, open it.
|
146 |
+
if ( $section.hasClass('open') ) {
|
147 |
+
|
148 |
+
// "Slide Up" the section content then close it entirely
|
149 |
+
$inside.slideUp({
|
150 |
+
duration: 'fast',
|
151 |
+
easing: 'linear',
|
152 |
+
complete: function() {
|
153 |
+
$section.removeClass('open');
|
154 |
+
}
|
155 |
+
});
|
156 |
+
|
157 |
+
}
|
158 |
+
else {
|
159 |
+
|
160 |
+
// Open the section
|
161 |
+
$section.addClass('open');
|
162 |
+
|
163 |
+
// "Slide Down" the content
|
164 |
+
$inside.css({ 'display': 'none' }).slideDown('fast');
|
165 |
|
166 |
+
}
|
167 |
+
}
|
168 |
+
else {
|
169 |
+
|
170 |
+
// "Slide Up" the section content then close it entirely
|
171 |
+
$inside.slideUp({
|
172 |
+
duration: 'fast',
|
173 |
+
easing: 'linear',
|
174 |
+
complete: function() {
|
175 |
+
$section.removeClass('open');
|
176 |
+
}
|
177 |
+
});
|
178 |
|
179 |
+
}
|
|
|
180 |
|
181 |
+
});
|
|
|
182 |
|
183 |
+
},
|
184 |
|
185 |
+
});
|
186 |
|
187 |
+
/**
|
188 |
+
* Let's go!
|
189 |
+
*/
|
190 |
+
$(document).ready(function() {
|
191 |
|
192 |
+
// Initiate the view
|
193 |
+
new Customizer.views.Customizer();
|
194 |
|
195 |
+
});
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
})(jQuery);
|
js/customizer.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
window.EasingSlider=window.EasingSlider||{Customizer:{models:{},views:{}}};(function(e){var t=window.EasingSlider.Customizer;t.views.Customizer=Backbone.View.extend({el:".customize-container",events:{"change #change-slider":"_changeSlider","change [data-selector]":"_reflectChanges","click .collapse-sidebar":"_toggleSidebar","click .accordion-section-title":"_toggleSection"},initialize:function(){var t=this;this.$(".color-picker-hex").each(function(){e(this).wpColorPicker({change:t._reflectChanges,defaultColor:e(this).attr("data-default")})})},_changeSlider:function(e){window.location.href="http://"+window.location.hostname+window.location.pathname+"?page=easingslider_manage_customizations&edit="+e.target.value},_reflectChanges:function(t){switch(t.target.dataset.property){case"background-image":e(t.target.dataset.selector).css({"background-image":"url("+t.target.value+")"});break;case"border-width":e(t.target.dataset.selector).css({"border-style":"solid","border-width":t.target.value+"px"});break;case"border-radius":e(t.target.dataset.selector).css({"-webkit-border-radius":t.target.value+"px","-moz-border-radius":t.target.value+"px","border-radius":t.target.value+"px"});break;case"display":if("true"==t.target.value){e(t.target.dataset.selector).css("display","block")}else{e(t.target.dataset.selector).css("display","none")}break;case"src":e(t.target.dataset.selector).attr("src",t.target.value);break;default:e(t.target.dataset.selector).css(t.target.dataset.property,t.target.value);break}},_toggleSidebar:function(e){e.preventDefault();if(this.$(".wp-full-overlay").hasClass("expanded")){this.$(".wp-full-overlay").removeClass("expanded").addClass("collapsed")}else{this.$(".wp-full-overlay").removeClass("collapsed").addClass("expanded")}},_toggleSection:function(t){t.preventDefault();this.$(".accordion-section-title").each(function(){var n=e(this).closest(".accordion-section"),r=n.find(".accordion-section-content");if(this==t.currentTarget){if(n.hasClass("open")){r.slideUp({duration:"fast",easing:"linear",complete:function(){n.removeClass("open")}})}else{n.addClass("open");r.css({display:"none"}).slideDown("fast")}}else{r.slideUp({duration:"fast",easing:"linear",complete:function(){n.removeClass("open")}})}})}});e(document).ready(function(){new t.views.Customizer})})(jQuery)
|
js/editor-pages.js
ADDED
@@ -0,0 +1,1142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Globalize
|
3 |
+
*/
|
4 |
+
window.EasingSlider = window.EasingSlider || {
|
5 |
+
Editor: {
|
6 |
+
models: {},
|
7 |
+
collections: {},
|
8 |
+
controllers: {},
|
9 |
+
frames: {},
|
10 |
+
views: {},
|
11 |
+
router: {}
|
12 |
+
}
|
13 |
+
};
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Where the magic happens!
|
17 |
+
*/
|
18 |
+
(function($) {
|
19 |
+
|
20 |
+
var Editor = window.EasingSlider.Editor;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Returns the appropriate "Slide" model
|
24 |
+
*/
|
25 |
+
Editor.models.Slide = function(attributes) {
|
26 |
+
|
27 |
+
// Return the appropriate model
|
28 |
+
if ( 'image' == attributes.type ) {
|
29 |
+
return new Editor.models.ImageSlide(attributes);
|
30 |
+
}
|
31 |
+
|
32 |
+
};
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Image "Slide" model
|
36 |
+
*/
|
37 |
+
Editor.models.ImageSlide = Backbone.Model.extend({
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Attachment
|
41 |
+
*/
|
42 |
+
attachment: false,
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Defaults
|
46 |
+
*/
|
47 |
+
defaults: _.defaults({
|
48 |
+
attachment_id: null,
|
49 |
+
type: 'image',
|
50 |
+
alt: '',
|
51 |
+
aspectRatio: null,
|
52 |
+
link: 'none',
|
53 |
+
linkUrl: '',
|
54 |
+
title: ''
|
55 |
+
}, wp.media.model.PostImage.prototype.defaults)
|
56 |
+
|
57 |
+
});
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Our slides collection
|
61 |
+
*/
|
62 |
+
Editor.collections.Slides = Backbone.Collection.extend({
|
63 |
+
|
64 |
+
/**
|
65 |
+
* The models for this collection are polymorphic,
|
66 |
+
* so the model to add is determined by function.
|
67 |
+
*
|
68 |
+
* Don't be fooled, Editor.Slide is just a function (not a model).
|
69 |
+
*/
|
70 |
+
model: Editor.models.Slide,
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Constructor
|
74 |
+
*/
|
75 |
+
initialize: function() {
|
76 |
+
|
77 |
+
// Bind our collection events
|
78 |
+
this.on('add', this._resetIDs, this);
|
79 |
+
this.on('remove', this._resetIDs, this);
|
80 |
+
this.on('reset', this._resetIDs, this);
|
81 |
+
|
82 |
+
},
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Comparator
|
86 |
+
*/
|
87 |
+
comparator: function(model) {
|
88 |
+
|
89 |
+
return model.get('id');
|
90 |
+
|
91 |
+
},
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Resets the ID attribute on each model
|
95 |
+
*/
|
96 |
+
_resetIDs: function() {
|
97 |
+
|
98 |
+
// Create a new collection. We need to do this to avoid issues with duplicate IDs.
|
99 |
+
var collection = new Backbone.Collection();
|
100 |
+
|
101 |
+
// Loop through each model and update the ID attribute. Then add it to our collection.
|
102 |
+
_.each(this.models, function(model, index) {
|
103 |
+
model.set({ id: index + 1 });
|
104 |
+
|
105 |
+
collection.add(model);
|
106 |
+
});
|
107 |
+
|
108 |
+
// Reset this collection with the models from our temporary collection
|
109 |
+
this.reset(collection.models, { silent: true });
|
110 |
+
|
111 |
+
},
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Repositions a model to the specified index in the collection
|
115 |
+
*/
|
116 |
+
reposition: function(model, index) {
|
117 |
+
|
118 |
+
// Remove the model
|
119 |
+
this.remove(model, { silent: true });
|
120 |
+
|
121 |
+
// Add the model at our desired index
|
122 |
+
this.add(model, { at: index, silent: true });
|
123 |
+
|
124 |
+
// Reset the IDs
|
125 |
+
this._resetIDs();
|
126 |
+
|
127 |
+
return this;
|
128 |
+
|
129 |
+
},
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Syncs the models in this collection
|
133 |
+
*/
|
134 |
+
sync: function() {
|
135 |
+
|
136 |
+
var collection = this,
|
137 |
+
ids = [];
|
138 |
+
|
139 |
+
// Loop through each model and get attachment IDs
|
140 |
+
_.each(this.models, function(model) {
|
141 |
+
|
142 |
+
// Check if the model has an attachment ID
|
143 |
+
if ( model.has('attachment_id') ) {
|
144 |
+
ids.push(model.get('attachment_id'));
|
145 |
+
}
|
146 |
+
|
147 |
+
}, this);
|
148 |
+
|
149 |
+
// Query the WordPress Media Library
|
150 |
+
var query = wp.media.query({ post__in: ids });
|
151 |
+
|
152 |
+
// Do the query
|
153 |
+
query.more().done(function() {
|
154 |
+
_.each(query.models, function(attachment) {
|
155 |
+
|
156 |
+
// Get models with a matching ID
|
157 |
+
var matches = collection.where({ attachment_id: attachment.get('id') });
|
158 |
+
|
159 |
+
// Loop through each match
|
160 |
+
_.each(matches, function(model) {
|
161 |
+
|
162 |
+
// Set the attachment object
|
163 |
+
model.attachment = attachment;
|
164 |
+
|
165 |
+
});
|
166 |
+
|
167 |
+
});
|
168 |
+
|
169 |
+
// Trigger a sync action
|
170 |
+
collection.trigger('sync:done');
|
171 |
+
});
|
172 |
+
|
173 |
+
return this;
|
174 |
+
|
175 |
+
}
|
176 |
+
|
177 |
+
});
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Returns the appropriate "Edit Slide" controller, based on the type of slide provided
|
181 |
+
*/
|
182 |
+
Editor.controllers.EditSlide = function(options) {
|
183 |
+
|
184 |
+
// Return the appropriate view
|
185 |
+
if ( 'image' == options.type ) {
|
186 |
+
return new Editor.controllers.EditImageSlide(options);
|
187 |
+
}
|
188 |
+
|
189 |
+
};
|
190 |
+
|
191 |
+
/**
|
192 |
+
* "Edit Slide" controller for images
|
193 |
+
*/
|
194 |
+
Editor.controllers.EditImageSlide = wp.media.controller.ImageDetails.extend({
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Defaults
|
198 |
+
*/
|
199 |
+
defaults: _.defaults({
|
200 |
+
id: 'edit-slide',
|
201 |
+
title: 'Edit Slide',
|
202 |
+
}, wp.media.controller.ImageDetails.prototype.defaults )
|
203 |
+
|
204 |
+
});
|
205 |
+
|
206 |
+
/**
|
207 |
+
* "Add Slide" WordPress Media Frame
|
208 |
+
*/
|
209 |
+
Editor.frames.AddSlide = wp.media.view.MediaFrame.Post.extend({
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Constructor
|
213 |
+
*/
|
214 |
+
initialize: function() {
|
215 |
+
|
216 |
+
// Alter defaults
|
217 |
+
_.defaults(this.options, {
|
218 |
+
title: 'Add a Slide',
|
219 |
+
multiple: true,
|
220 |
+
button: {
|
221 |
+
text: 'Add new slide'
|
222 |
+
}
|
223 |
+
});
|
224 |
+
|
225 |
+
// Call parent constructor
|
226 |
+
wp.media.view.MediaFrame.Post.prototype.initialize.apply(this, arguments);
|
227 |
+
|
228 |
+
// Bind Handlers
|
229 |
+
this.on('content:render:browse', this.removeSidebar, this);
|
230 |
+
this.on('toolbar:create:insert-slide', this.createToolbar, this);
|
231 |
+
this.on('toolbar:render:insert-slide', this.insertToolbar, this);
|
232 |
+
|
233 |
+
},
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Creates our states
|
237 |
+
*/
|
238 |
+
createStates: function() {
|
239 |
+
|
240 |
+
// Add the default states
|
241 |
+
this.states.add([
|
242 |
+
new wp.media.controller.Library({
|
243 |
+
id: 'insert',
|
244 |
+
type: 'image',
|
245 |
+
title: 'Image from Media',
|
246 |
+
priority: 20,
|
247 |
+
toolbar: 'insert-slide',
|
248 |
+
filterable: false,
|
249 |
+
library: wp.media.query({ type: 'image' }),
|
250 |
+
multiple: true,
|
251 |
+
editable: true,
|
252 |
+
allowLocalEdits: true,
|
253 |
+
displaySettings: false,
|
254 |
+
displayUserSettings: true
|
255 |
+
})
|
256 |
+
]);
|
257 |
+
|
258 |
+
},
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Removes the sidebar from the frame
|
262 |
+
*/
|
263 |
+
removeSidebar: function(view) {
|
264 |
+
|
265 |
+
// Remove the sidebar
|
266 |
+
view.sidebar.remove('details');
|
267 |
+
|
268 |
+
// Hide sidebar altogether
|
269 |
+
view.$el.addClass('hide-sidebar');
|
270 |
+
|
271 |
+
},
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Adds our "Insert into Slider" toolbar
|
275 |
+
*/
|
276 |
+
insertToolbar: function(view) {
|
277 |
+
|
278 |
+
var controller = this;
|
279 |
+
|
280 |
+
// Add the toolbar to our provided view
|
281 |
+
view.set('insert-slide', {
|
282 |
+
style: 'primary',
|
283 |
+
priority: 80,
|
284 |
+
text: 'Insert into Slider',
|
285 |
+
requires: { selection: true },
|
286 |
+
click: function() {
|
287 |
+
|
288 |
+
// Close then trigger "insert", providing the selection
|
289 |
+
controller.close().trigger('insert', controller.getSelection()).reset();
|
290 |
+
|
291 |
+
}
|
292 |
+
});
|
293 |
+
|
294 |
+
},
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Prepares & returns our selection for handoff to our view(s)
|
298 |
+
*/
|
299 |
+
getSelection: function(selection) {
|
300 |
+
|
301 |
+
var collection = new wp.media.model.Selection(null, { multiple: true });
|
302 |
+
|
303 |
+
// Get the type & selection
|
304 |
+
var type = this.state().get('type'),
|
305 |
+
selection = this.state().get('selection');
|
306 |
+
|
307 |
+
// Loop through each selection
|
308 |
+
_.each(selection.models, function(model) {
|
309 |
+
|
310 |
+
// Create a new slide & set its type
|
311 |
+
var slide = new Editor.models.Slide({
|
312 |
+
type: type
|
313 |
+
});
|
314 |
+
|
315 |
+
// Handle attachments (attachments will have an ID attribute)
|
316 |
+
if ( model.get('id') ) {
|
317 |
+
slide.attachment = model;
|
318 |
+
slide.set({ attachment_id: model.get('id') }, { silent: true });
|
319 |
+
}
|
320 |
+
else {
|
321 |
+
slide.set(model, { silent: true });
|
322 |
+
}
|
323 |
+
|
324 |
+
// Add to the collection
|
325 |
+
collection.add(slide);
|
326 |
+
|
327 |
+
}, this);
|
328 |
+
|
329 |
+
return collection;
|
330 |
+
|
331 |
+
}
|
332 |
+
|
333 |
+
});
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Function that returns the appropriate "Edit Slide" frame
|
337 |
+
*/
|
338 |
+
Editor.frames.EditSlide = function(options) {
|
339 |
+
|
340 |
+
// Return the appropriate frame
|
341 |
+
if ( 'image' == options.model.get('type') ) {
|
342 |
+
return new Editor.frames.EditImageSlide(options);
|
343 |
+
}
|
344 |
+
|
345 |
+
};
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Frame for editing an "Image" slide
|
349 |
+
*/
|
350 |
+
Editor.frames.EditImageSlide = wp.media.view.MediaFrame.ImageDetails.extend({
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Constructor
|
354 |
+
*/
|
355 |
+
initialize: function() {
|
356 |
+
|
357 |
+
// Set the image
|
358 |
+
this.image = new wp.media.model.PostImage(this.model.attributes);
|
359 |
+
|
360 |
+
// Set our options
|
361 |
+
this.options.state = 'edit-slide';
|
362 |
+
this.options.selection = new wp.media.model.Selection(this.image.attachment, { multiple: false });
|
363 |
+
|
364 |
+
// Call parent constructor
|
365 |
+
wp.media.view.MediaFrame.Select.prototype.initialize.apply(this, arguments);
|
366 |
+
|
367 |
+
// Bind events
|
368 |
+
this.on('content:render:browse', this.removeSidebar, this);
|
369 |
+
this.state('edit-slide').on('update', this.updateSettings, this);
|
370 |
+
this.state('replace-image').on('replace', this.replaceImage, this);
|
371 |
+
|
372 |
+
},
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Creates our states
|
376 |
+
*/
|
377 |
+
createStates: function() {
|
378 |
+
|
379 |
+
// Add our "Edit Slide" state
|
380 |
+
this.states.add([
|
381 |
+
new Editor.controllers.EditSlide({
|
382 |
+
type: 'image',
|
383 |
+
image: this.image,
|
384 |
+
editable: false
|
385 |
+
})
|
386 |
+
]);
|
387 |
+
|
388 |
+
// Call parent states
|
389 |
+
wp.media.view.MediaFrame.ImageDetails.prototype.createStates.apply(this, arguments);
|
390 |
+
|
391 |
+
},
|
392 |
+
|
393 |
+
/**
|
394 |
+
* Replaces the "Image Details" section with our "Edit Slide" instead.
|
395 |
+
*
|
396 |
+
* Bit of a hack, but it works.
|
397 |
+
*/
|
398 |
+
imageDetailsContent: function(options) {
|
399 |
+
|
400 |
+
// Initiate the view
|
401 |
+
options.view = new Editor.views.EditSlide({
|
402 |
+
type: 'image',
|
403 |
+
controller: this,
|
404 |
+
model: this.state().image,
|
405 |
+
attachment: this.state().image.attachment
|
406 |
+
});
|
407 |
+
|
408 |
+
},
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Removes the sidebar from the frame
|
412 |
+
*/
|
413 |
+
removeSidebar: function(view) {
|
414 |
+
|
415 |
+
// Remove the sidebar
|
416 |
+
view.sidebar.remove('details');
|
417 |
+
|
418 |
+
// Hide sidebar altogether
|
419 |
+
view.$el.addClass('hide-sidebar');
|
420 |
+
|
421 |
+
},
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Applies a setting change to the model
|
425 |
+
*/
|
426 |
+
updateSettings: function() {
|
427 |
+
|
428 |
+
var data = {};
|
429 |
+
|
430 |
+
// Gather the settings
|
431 |
+
this.$('*[data-setting]').each(function() {
|
432 |
+
data[this.dataset.setting] = this.value;
|
433 |
+
});
|
434 |
+
|
435 |
+
// Set the model data
|
436 |
+
this.model.set(data);
|
437 |
+
|
438 |
+
},
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Replaces the image
|
442 |
+
*
|
443 |
+
* This functionality is only available to attachment,
|
444 |
+
* so we can safely assume this is one.
|
445 |
+
*/
|
446 |
+
replaceImage: function() {
|
447 |
+
|
448 |
+
// Replace the attachment
|
449 |
+
this.model.set({ attachment_id: this.image.attachment.id });
|
450 |
+
this.model.attachment.set(this.image.attachment.attributes);
|
451 |
+
|
452 |
+
}
|
453 |
+
|
454 |
+
});
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Admin view
|
458 |
+
*/
|
459 |
+
Editor.views.Admin = Backbone.View.extend({
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Our view element
|
463 |
+
*/
|
464 |
+
el: '.wrap',
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Events
|
468 |
+
*/
|
469 |
+
events: {
|
470 |
+
'click #add-slides': '_addSlide',
|
471 |
+
'click #select-all': '_selectAll',
|
472 |
+
'click #delete-slides': '_clickBulkDelete',
|
473 |
+
'click #save': '_clickSave',
|
474 |
+
'click .toolbar .edit': '_clickEdit',
|
475 |
+
'click .toolbar .remove': '_clickDelete',
|
476 |
+
'click .thumbnail': '_clickThumb',
|
477 |
+
'click .select-mode-toggle-button': '_toggleMode',
|
478 |
+
'click .sidebar-name': '_toggleWidget'
|
479 |
+
},
|
480 |
+
|
481 |
+
/**
|
482 |
+
* Constructor
|
483 |
+
*/
|
484 |
+
initialize: function() {
|
485 |
+
|
486 |
+
// Initiate our subviews
|
487 |
+
this.subviews = {
|
488 |
+
AddSlide: new Editor.frames.AddSlide(),
|
489 |
+
AdminSlides: new Editor.views.AdminSlides({
|
490 |
+
collection: this.collection
|
491 |
+
})
|
492 |
+
};
|
493 |
+
|
494 |
+
// Bind our events
|
495 |
+
this.collection.on('sync:done', this.render, this);
|
496 |
+
this.collection.on('sync:done', this._enableSave, this);
|
497 |
+
this.subviews.AddSlide.on('insert', this._handleInsert, this);
|
498 |
+
|
499 |
+
// Change number of columns on window resize
|
500 |
+
$(window).on('resize', this._setColumns.bind(this));
|
501 |
+
|
502 |
+
// Disable select mode
|
503 |
+
this._selectMode = false;
|
504 |
+
|
505 |
+
// Show the spinner
|
506 |
+
this._showSpinner();
|
507 |
+
|
508 |
+
},
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Shows the spinner
|
512 |
+
*/
|
513 |
+
_showSpinner: function() {
|
514 |
+
|
515 |
+
this.$('#slides-browser').append('<div class="spinner"></div>');
|
516 |
+
|
517 |
+
},
|
518 |
+
|
519 |
+
/**
|
520 |
+
* Hides the spinner
|
521 |
+
*/
|
522 |
+
_hideSpinner: function() {
|
523 |
+
|
524 |
+
this.$('#slides-browser .spinner').remove();
|
525 |
+
|
526 |
+
},
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Enables the save button
|
530 |
+
*/
|
531 |
+
_enableSave: function() {
|
532 |
+
|
533 |
+
this.$('#save').prop('disabled', false);
|
534 |
+
|
535 |
+
},
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Handles save button click
|
539 |
+
*/
|
540 |
+
_clickSave: function() {
|
541 |
+
|
542 |
+
this.$('#publishing-action .spinner').css({ 'display': 'block' });
|
543 |
+
|
544 |
+
},
|
545 |
+
|
546 |
+
/**
|
547 |
+
* Sets the appropriate number of columns
|
548 |
+
*/
|
549 |
+
_setColumns: function() {
|
550 |
+
|
551 |
+
var content = this.$('.media-frame-content'),
|
552 |
+
previous_columns = content.attr('data-columns'),
|
553 |
+
width = content.width();
|
554 |
+
|
555 |
+
// Continue if we have width
|
556 |
+
if ( width ) {
|
557 |
+
|
558 |
+
// Calculate the maximum number of columns we can fit
|
559 |
+
var columns = Math.min(Math.round(width / 145), 12) || 1;
|
560 |
+
|
561 |
+
// Change the number of columns if it's not the same as previously
|
562 |
+
if ( ! previous_columns || previous_columns !== columns ) {
|
563 |
+
content.attr('data-columns', columns);
|
564 |
+
}
|
565 |
+
|
566 |
+
}
|
567 |
+
|
568 |
+
},
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Handles slide(s) insert from the "Add Slide" frame view
|
572 |
+
*/
|
573 |
+
_handleInsert: function(selection) {
|
574 |
+
|
575 |
+
// Add to the collection
|
576 |
+
this.collection.add(selection.models);
|
577 |
+
|
578 |
+
},
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Handles a thumbnail click event
|
582 |
+
*/
|
583 |
+
_clickThumb: function(event) {
|
584 |
+
|
585 |
+
event.preventDefault();
|
586 |
+
|
587 |
+
// Handle click based on mode
|
588 |
+
if ( ! this._selectMode ) {
|
589 |
+
this._editSlide(event);
|
590 |
+
}
|
591 |
+
else {
|
592 |
+
this._toggleSelect(event);
|
593 |
+
}
|
594 |
+
|
595 |
+
},
|
596 |
+
|
597 |
+
/**
|
598 |
+
* Handles an "edit" button click event
|
599 |
+
*/
|
600 |
+
_clickEdit: function(event) {
|
601 |
+
|
602 |
+
event.preventDefault();
|
603 |
+
|
604 |
+
this._editSlide(event);
|
605 |
+
|
606 |
+
},
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Handles a "delete" button click event
|
610 |
+
*/
|
611 |
+
_clickDelete: function(event) {
|
612 |
+
|
613 |
+
event.preventDefault();
|
614 |
+
|
615 |
+
if ( confirm( _easingsliderAdminL10n.warn ) ) {
|
616 |
+
|
617 |
+
// Get the model ID
|
618 |
+
var id = $(event.currentTarget).parents('.attachment').attr('data-id');
|
619 |
+
|
620 |
+
// Delete the model from the collection
|
621 |
+
this.collection.remove(id);
|
622 |
+
|
623 |
+
}
|
624 |
+
|
625 |
+
},
|
626 |
+
|
627 |
+
/**
|
628 |
+
* Handles a bulk delete button click
|
629 |
+
*/
|
630 |
+
_clickBulkDelete: function(event) {
|
631 |
+
|
632 |
+
event.preventDefault();
|
633 |
+
|
634 |
+
if ( confirm( _easingsliderAdminL10n.warn ) ) {
|
635 |
+
|
636 |
+
// Delete the slides
|
637 |
+
this._deleteSlides(event);
|
638 |
+
|
639 |
+
// Toggle mode
|
640 |
+
this._toggleMode(event);
|
641 |
+
|
642 |
+
}
|
643 |
+
|
644 |
+
},
|
645 |
+
|
646 |
+
/**
|
647 |
+
* Toggles between "Bulk Select" mode
|
648 |
+
*/
|
649 |
+
_toggleMode: function(event) {
|
650 |
+
|
651 |
+
event.preventDefault();
|
652 |
+
|
653 |
+
// Toggle mode
|
654 |
+
if ( ! this._selectMode ) {
|
655 |
+
this._selectMode = true;
|
656 |
+
}
|
657 |
+
else {
|
658 |
+
this._selectMode = false;
|
659 |
+
}
|
660 |
+
|
661 |
+
// Toggle select mode class
|
662 |
+
this.$('.attachment').removeClass('selected details');
|
663 |
+
this.$('.media-frame').toggleClass('mode-select');
|
664 |
+
this.$('.media-toolbar div *').toggleClass('hidden');
|
665 |
+
|
666 |
+
},
|
667 |
+
|
668 |
+
/**
|
669 |
+
* Toggles selection of a slide on click
|
670 |
+
*/
|
671 |
+
_toggleSelect: function(event) {
|
672 |
+
|
673 |
+
event.preventDefault()
|
674 |
+
|
675 |
+
// Highlight the thumbnail
|
676 |
+
$(event.currentTarget).parents('.attachment').toggleClass('selected details');
|
677 |
+
|
678 |
+
},
|
679 |
+
|
680 |
+
/**
|
681 |
+
* Toggles a sidebar settings widget metabox
|
682 |
+
*/
|
683 |
+
_toggleWidget: function(event) {
|
684 |
+
|
685 |
+
event.preventDefault();
|
686 |
+
|
687 |
+
var $widget = $(event.currentTarget).parent(),
|
688 |
+
$content = $widget.find('.sidebar-content');
|
689 |
+
|
690 |
+
// Bail if this is a fixed widget
|
691 |
+
if ( $widget.hasClass('fixed') ) {
|
692 |
+
return;
|
693 |
+
}
|
694 |
+
|
695 |
+
// Close any open sidebar metaboxes
|
696 |
+
this.$('.widgets-holder-wrap').each(function() {
|
697 |
+
var $metabox = $(this);
|
698 |
+
|
699 |
+
if ( ! $metabox.hasClass('fixed') ) {
|
700 |
+
$metabox.find('.sidebar-content').slideUp(200, function() {
|
701 |
+
$metabox.addClass('closed');
|
702 |
+
});
|
703 |
+
}
|
704 |
+
});
|
705 |
+
|
706 |
+
// Bail if the clicked widget is already open
|
707 |
+
if ( ! $widget.hasClass('closed') ) {
|
708 |
+
return;
|
709 |
+
}
|
710 |
+
|
711 |
+
// Open the sidebar metabox
|
712 |
+
$content.slideDown(200, function() {
|
713 |
+
$widget.removeClass('closed');
|
714 |
+
});
|
715 |
+
|
716 |
+
},
|
717 |
+
|
718 |
+
/**
|
719 |
+
* Selects all of the slides
|
720 |
+
*/
|
721 |
+
_selectAll: function(event) {
|
722 |
+
|
723 |
+
event.preventDefault();
|
724 |
+
|
725 |
+
// Highlight all the thumbnails
|
726 |
+
this.$('.attachment').addClass('selected details');
|
727 |
+
|
728 |
+
},
|
729 |
+
|
730 |
+
/**
|
731 |
+
* Deletes the currently selected slides
|
732 |
+
*/
|
733 |
+
_deleteSlides: function(event) {
|
734 |
+
|
735 |
+
event.preventDefault();
|
736 |
+
|
737 |
+
// Establish variables
|
738 |
+
var collection = this.collection,
|
739 |
+
models = [];
|
740 |
+
|
741 |
+
// Loop through each slide and remove selected
|
742 |
+
this.$('.attachment').each(function(index) {
|
743 |
+
|
744 |
+
// Check if this slide has been selected & add it to be removed if so.
|
745 |
+
if ( $(this).hasClass('selected') ) {
|
746 |
+
models.push(collection.at(index));
|
747 |
+
}
|
748 |
+
|
749 |
+
});
|
750 |
+
|
751 |
+
// Remove the models from the collection
|
752 |
+
this.collection.remove(models);
|
753 |
+
|
754 |
+
},
|
755 |
+
|
756 |
+
/**
|
757 |
+
* Opens the "Add Slide" frame view on click
|
758 |
+
*/
|
759 |
+
_addSlide: function(event) {
|
760 |
+
|
761 |
+
event.preventDefault();
|
762 |
+
|
763 |
+
// Open the frame
|
764 |
+
this.addSlide();
|
765 |
+
|
766 |
+
},
|
767 |
+
|
768 |
+
/**
|
769 |
+
* Opens the "Add Slide" frame
|
770 |
+
*/
|
771 |
+
addSlide: function() {
|
772 |
+
|
773 |
+
// Open the "Add Slide" frame
|
774 |
+
this.subviews.AddSlide.open();
|
775 |
+
|
776 |
+
return this;
|
777 |
+
|
778 |
+
},
|
779 |
+
|
780 |
+
/**
|
781 |
+
* Opens the "Edit Slide" frame on click
|
782 |
+
*/
|
783 |
+
_editSlide: function(event) {
|
784 |
+
|
785 |
+
event.preventDefault();
|
786 |
+
|
787 |
+
// Get the slide ID
|
788 |
+
var id = $(event.currentTarget).parents('.attachment').attr('data-id');
|
789 |
+
|
790 |
+
// Open the frame
|
791 |
+
this.editSlide(id);
|
792 |
+
|
793 |
+
},
|
794 |
+
|
795 |
+
/**
|
796 |
+
* Opens the "Edit Slide" frame
|
797 |
+
*/
|
798 |
+
editSlide: function(id) {
|
799 |
+
|
800 |
+
// Create the frame
|
801 |
+
this.subviews.EditSlide = new Editor.frames.EditSlide({
|
802 |
+
model: this.collection.get(id)
|
803 |
+
});
|
804 |
+
|
805 |
+
// Open the frame
|
806 |
+
this.subviews.EditSlide.open();
|
807 |
+
|
808 |
+
return this;
|
809 |
+
|
810 |
+
},
|
811 |
+
|
812 |
+
/**
|
813 |
+
* Renders the view
|
814 |
+
*/
|
815 |
+
render: function() {
|
816 |
+
|
817 |
+
// Hide the spinner
|
818 |
+
this._hideSpinner();
|
819 |
+
|
820 |
+
// Render the subview
|
821 |
+
var slides = this.subviews.AdminSlides.render().el;
|
822 |
+
|
823 |
+
// Add the slides to the view
|
824 |
+
this.$('#slides-browser').append(slides);
|
825 |
+
|
826 |
+
return this;
|
827 |
+
|
828 |
+
}
|
829 |
+
|
830 |
+
});
|
831 |
+
|
832 |
+
/**
|
833 |
+
* Admin "Slides" view
|
834 |
+
*/
|
835 |
+
Editor.views.AdminSlides = Backbone.View.extend({
|
836 |
+
|
837 |
+
/**
|
838 |
+
* Tagname
|
839 |
+
*/
|
840 |
+
tagName: 'ul',
|
841 |
+
|
842 |
+
/**
|
843 |
+
* Attributes
|
844 |
+
*/
|
845 |
+
attributes: {
|
846 |
+
'class': 'attachments ui-sortable',
|
847 |
+
'tabindex': '-1'
|
848 |
+
},
|
849 |
+
|
850 |
+
/**
|
851 |
+
* Constructor
|
852 |
+
*/
|
853 |
+
initialize: function() {
|
854 |
+
|
855 |
+
// Subviews
|
856 |
+
this.subviews = [];
|
857 |
+
|
858 |
+
// Bind our collection events
|
859 |
+
this.collection.on('add', this.add, this);
|
860 |
+
this.collection.on('remove', this.render, this);
|
861 |
+
this.collection.on('reset', this.render, this);
|
862 |
+
|
863 |
+
// Enable sorting
|
864 |
+
this.$el.sortable({
|
865 |
+
items: '.attachment',
|
866 |
+
containment: 'parent',
|
867 |
+
tolerance: 'pointer',
|
868 |
+
stop: this._sort.bind(this)
|
869 |
+
});
|
870 |
+
|
871 |
+
},
|
872 |
+
|
873 |
+
/**
|
874 |
+
* Sorts the view
|
875 |
+
*/
|
876 |
+
_sort: function(event, ui) {
|
877 |
+
|
878 |
+
// Get the model
|
879 |
+
var model = this.collection.get(ui.item.context.dataset.id);
|
880 |
+
|
881 |
+
// Reposition the model in the collection
|
882 |
+
this.collection.reposition(model, ui.item.index());
|
883 |
+
|
884 |
+
},
|
885 |
+
|
886 |
+
/**
|
887 |
+
* Adds a subview
|
888 |
+
*/
|
889 |
+
add: function(model) {
|
890 |
+
|
891 |
+
// Render and add the slide to the view
|
892 |
+
var view = new Editor.views.AdminSlide({
|
893 |
+
model: model
|
894 |
+
});
|
895 |
+
|
896 |
+
// Add the subview
|
897 |
+
this.subviews.push(view);
|
898 |
+
|
899 |
+
// Render and append subview to this view
|
900 |
+
this.$el.append(view.render().$el);
|
901 |
+
|
902 |
+
return this;
|
903 |
+
|
904 |
+
},
|
905 |
+
|
906 |
+
/**
|
907 |
+
* Renders the view
|
908 |
+
*/
|
909 |
+
render: function() {
|
910 |
+
|
911 |
+
this.subviews = [];
|
912 |
+
|
913 |
+
// Empty the view
|
914 |
+
this.$el.empty();
|
915 |
+
|
916 |
+
// Render each subview
|
917 |
+
_.each(this.collection.models, function(model) {
|
918 |
+
this.add(model);
|
919 |
+
}, this);
|
920 |
+
|
921 |
+
return this;
|
922 |
+
|
923 |
+
}
|
924 |
+
|
925 |
+
});
|
926 |
+
|
927 |
+
/**
|
928 |
+
* Admin "Slide" view
|
929 |
+
*/
|
930 |
+
Editor.views.AdminSlide = Backbone.View.extend({
|
931 |
+
|
932 |
+
/**
|
933 |
+
* Tagname
|
934 |
+
*/
|
935 |
+
tagName: 'li',
|
936 |
+
|
937 |
+
/**
|
938 |
+
* Attributes
|
939 |
+
*/
|
940 |
+
attributes: function() {
|
941 |
+
return {
|
942 |
+
'role': 'checkbox',
|
943 |
+
'class': 'attachment save-ready',
|
944 |
+
'tabindex': '0',
|
945 |
+
'data-id': this.model.id
|
946 |
+
};
|
947 |
+
},
|
948 |
+
|
949 |
+
/**
|
950 |
+
* Template for this view
|
951 |
+
*/
|
952 |
+
template: wp.media.template('easingslider-slide'),
|
953 |
+
|
954 |
+
/**
|
955 |
+
* Constructor
|
956 |
+
*/
|
957 |
+
initialize: function() {
|
958 |
+
|
959 |
+
// Bind events
|
960 |
+
this.model.on('change', this._setData, this);
|
961 |
+
this.model.on('change:id', this._updateID, this);
|
962 |
+
this.model.on('change:attachment_id', this.render, this);
|
963 |
+
|
964 |
+
// Bind additional attachment events if appropriate
|
965 |
+
if ( this.model.attachment ) {
|
966 |
+
this.model.attachment.on('change', this.render, this);
|
967 |
+
}
|
968 |
+
|
969 |
+
},
|
970 |
+
|
971 |
+
/**
|
972 |
+
* Sets our data
|
973 |
+
*/
|
974 |
+
_setData: function() {
|
975 |
+
|
976 |
+
// Set data in hidden input
|
977 |
+
this.$('input[name="slides[]"]').val(JSON.stringify(this.model.attributes));
|
978 |
+
|
979 |
+
},
|
980 |
+
|
981 |
+
/**
|
982 |
+
* Update our ID attribute
|
983 |
+
*/
|
984 |
+
_updateID: function(model, value) {
|
985 |
+
|
986 |
+
// Update attrbitue on DOM
|
987 |
+
this.$el.attr('data-id', value);
|
988 |
+
|
989 |
+
// Update attribute on view object
|
990 |
+
this.attributes['data-id'] = value;
|
991 |
+
|
992 |
+
},
|
993 |
+
|
994 |
+
/**
|
995 |
+
* Renders the view
|
996 |
+
*/
|
997 |
+
render: function() {
|
998 |
+
|
999 |
+
var data = { model: this.model.toJSON() };
|
1000 |
+
|
1001 |
+
// If our model has an attachment, add it to the data.
|
1002 |
+
if ( this.model.attachment ) {
|
1003 |
+
data.attachment = this.model.attachment.toJSON();
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
// Generate the template
|
1007 |
+
this.$el.html(this.template(data));
|
1008 |
+
|
1009 |
+
return this;
|
1010 |
+
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
});
|
1014 |
+
|
1015 |
+
/**
|
1016 |
+
* Returns the appropriate "Edit Slide" view, based on the type of slide provided
|
1017 |
+
*/
|
1018 |
+
Editor.views.EditSlide = function(options) {
|
1019 |
+
|
1020 |
+
// Return the appropriate view
|
1021 |
+
if ( 'image' == options.type ) {
|
1022 |
+
return new Editor.views.EditImageSlide(options);
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
};
|
1026 |
+
|
1027 |
+
/**
|
1028 |
+
* "Edit Slide" view for images
|
1029 |
+
*/
|
1030 |
+
Editor.views.EditImageSlide = wp.media.view.ImageDetails.extend({
|
1031 |
+
|
1032 |
+
/**
|
1033 |
+
* Classname
|
1034 |
+
*/
|
1035 |
+
className: 'edit-attachment-frame attachment-details mode-select hide-menu hide-router',
|
1036 |
+
|
1037 |
+
/**
|
1038 |
+
* Template for this view
|
1039 |
+
*/
|
1040 |
+
template: wp.media.template('easingslider-edit-slide')
|
1041 |
+
|
1042 |
+
});
|
1043 |
+
|
1044 |
+
/**
|
1045 |
+
* Router
|
1046 |
+
*/
|
1047 |
+
Editor.router = Backbone.Router.extend({
|
1048 |
+
|
1049 |
+
/**
|
1050 |
+
* Routes
|
1051 |
+
*/
|
1052 |
+
routes: {
|
1053 |
+
'admin.php?page=:page&edit=:id&change=:slide': 'changeSlide',
|
1054 |
+
'admin.php?page=:page&edit=:id&slide=:slide': 'editSlide',
|
1055 |
+
'admin.php?page=:page&edit=:id': 'edit',
|
1056 |
+
'admin.php?page=:page': 'edit'
|
1057 |
+
},
|
1058 |
+
|
1059 |
+
/**
|
1060 |
+
* Shows the change slide editor within the admin editor
|
1061 |
+
*/
|
1062 |
+
changeSlide: function(page, id, slide) {
|
1063 |
+
|
1064 |
+
// Load the admin view
|
1065 |
+
this.edit();
|
1066 |
+
|
1067 |
+
// Once the colleciton has been synced, open the edit slide frame
|
1068 |
+
this.AdminView.collection.on('sync:done', function() {
|
1069 |
+
this.AdminView.openChangeSlideFrame(slide);
|
1070 |
+
}, this);
|
1071 |
+
|
1072 |
+
return this;
|
1073 |
+
|
1074 |
+
},
|
1075 |
+
|
1076 |
+
/**
|
1077 |
+
* Shows the slide editor within the admin editor
|
1078 |
+
*/
|
1079 |
+
editSlide: function(page, id, slide) {
|
1080 |
+
|
1081 |
+
// Load the admin view
|
1082 |
+
this.edit();
|
1083 |
+
|
1084 |
+
// Once the colleciton has been synced, open the edit slide frame
|
1085 |
+
this.AdminView.collection.on('sync:done', function() {
|
1086 |
+
this.AdminView.openEditSlideFrame(slide);
|
1087 |
+
}, this);
|
1088 |
+
|
1089 |
+
return this;
|
1090 |
+
|
1091 |
+
},
|
1092 |
+
|
1093 |
+
/**
|
1094 |
+
* Shows the admin editor
|
1095 |
+
*/
|
1096 |
+
edit: function(page) {
|
1097 |
+
|
1098 |
+
// Bail if we don't have slides
|
1099 |
+
if ( ! window.slides ) {
|
1100 |
+
return this;
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
// Initate our admin view
|
1104 |
+
this.AdminView = new Editor.views.Admin({
|
1105 |
+
collection: new Editor.collections.Slides(JSON.parse(window.slides))
|
1106 |
+
});
|
1107 |
+
|
1108 |
+
// Sync the collection & get the ball rolling!
|
1109 |
+
this.AdminView.collection.sync();
|
1110 |
+
|
1111 |
+
return this;
|
1112 |
+
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
});
|
1116 |
+
|
1117 |
+
/**
|
1118 |
+
* Let's go!
|
1119 |
+
*/
|
1120 |
+
$(document).ready(function() {
|
1121 |
+
|
1122 |
+
// Initiate the router
|
1123 |
+
var router = new Editor.router();
|
1124 |
+
|
1125 |
+
// Start the history
|
1126 |
+
Backbone.history.start({
|
1127 |
+
root: window._wpMediaGridSettings.adminUrl,
|
1128 |
+
pushState: true,
|
1129 |
+
});
|
1130 |
+
|
1131 |
+
// Handly delete class
|
1132 |
+
$('.delete').each(function() {
|
1133 |
+
$(this).on('click', function() {
|
1134 |
+
if ( ! confirm( _easingsliderAdminL10n.warn ) ) {
|
1135 |
+
return false;
|
1136 |
+
}
|
1137 |
+
});
|
1138 |
+
});
|
1139 |
+
|
1140 |
+
});
|
1141 |
+
|
1142 |
+
})(jQuery);
|
js/editor-pages.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
window.EasingSlider=window.EasingSlider||{Editor:{models:{},collections:{},controllers:{},frames:{},views:{},router:{}}};(function(e){var t=window.EasingSlider.Editor;t.models.Slide=function(e){if("image"==e.type){return new t.models.ImageSlide(e)}};t.models.ImageSlide=Backbone.Model.extend({attachment:false,defaults:_.defaults({attachment_id:null,type:"image",alt:"",aspectRatio:null,link:"none",linkUrl:"",title:""},wp.media.model.PostImage.prototype.defaults)});t.collections.Slides=Backbone.Collection.extend({model:t.models.Slide,initialize:function(){this.on("add",this._resetIDs,this);this.on("remove",this._resetIDs,this);this.on("reset",this._resetIDs,this)},comparator:function(e){return e.get("id")},_resetIDs:function(){var e=new Backbone.Collection;_.each(this.models,function(t,n){t.set({id:n+1});e.add(t)});this.reset(e.models,{silent:true})},reposition:function(e,t){this.remove(e,{silent:true});this.add(e,{at:t,silent:true});this._resetIDs();return this},sync:function(){var e=this,t=[];_.each(this.models,function(e){if(e.has("attachment_id")){t.push(e.get("attachment_id"))}},this);var n=wp.media.query({post__in:t});n.more().done(function(){_.each(n.models,function(t){var n=e.where({attachment_id:t.get("id")});_.each(n,function(e){e.attachment=t})});e.trigger("sync:done")});return this}});t.controllers.EditSlide=function(e){if("image"==e.type){return new t.controllers.EditImageSlide(e)}};t.controllers.EditImageSlide=wp.media.controller.ImageDetails.extend({defaults:_.defaults({id:"edit-slide",title:"Edit Slide"},wp.media.controller.ImageDetails.prototype.defaults)});t.frames.AddSlide=wp.media.view.MediaFrame.Post.extend({initialize:function(){_.defaults(this.options,{title:"Add a Slide",multiple:true,button:{text:"Add new slide"}});wp.media.view.MediaFrame.Post.prototype.initialize.apply(this,arguments);this.on("content:render:browse",this.removeSidebar,this);this.on("toolbar:create:insert-slide",this.createToolbar,this);this.on("toolbar:render:insert-slide",this.insertToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.Library({id:"insert",type:"image",title:"Image from Media",priority:20,toolbar:"insert-slide",filterable:false,library:wp.media.query({type:"image"}),multiple:true,editable:true,allowLocalEdits:true,displaySettings:false,displayUserSettings:true})])},removeSidebar:function(e){e.sidebar.remove("details");e.$el.addClass("hide-sidebar")},insertToolbar:function(e){var t=this;e.set("insert-slide",{style:"primary",priority:80,text:"Insert into Slider",requires:{selection:true},click:function(){t.close().trigger("insert",t.getSelection()).reset()}})},getSelection:function(e){var n=new wp.media.model.Selection(null,{multiple:true});var r=this.state().get("type"),e=this.state().get("selection");_.each(e.models,function(e){var i=new t.models.Slide({type:r});if(e.get("id")){i.attachment=e;i.set({attachment_id:e.get("id")},{silent:true})}else{i.set(e,{silent:true})}n.add(i)},this);return n}});t.frames.EditSlide=function(e){if("image"==e.model.get("type")){return new t.frames.EditImageSlide(e)}};t.frames.EditImageSlide=wp.media.view.MediaFrame.ImageDetails.extend({initialize:function(){this.image=new wp.media.model.PostImage(this.model.attributes);this.options.state="edit-slide";this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:false});wp.media.view.MediaFrame.Select.prototype.initialize.apply(this,arguments);this.on("content:render:browse",this.removeSidebar,this);this.state("edit-slide").on("update",this.updateSettings,this);this.state("replace-image").on("replace",this.replaceImage,this)},createStates:function(){this.states.add([new t.controllers.EditSlide({type:"image",image:this.image,editable:false})]);wp.media.view.MediaFrame.ImageDetails.prototype.createStates.apply(this,arguments)},imageDetailsContent:function(e){e.view=new t.views.EditSlide({type:"image",controller:this,model:this.state().image,attachment:this.state().image.attachment})},removeSidebar:function(e){e.sidebar.remove("details");e.$el.addClass("hide-sidebar")},updateSettings:function(){var e={};this.$("*[data-setting]").each(function(){e[this.dataset.setting]=this.value});this.model.set(e)},replaceImage:function(){this.model.set({attachment_id:this.image.attachment.id});this.model.attachment.set(this.image.attachment.attributes)}});t.views.Admin=Backbone.View.extend({el:".wrap",events:{"click #add-slides":"_addSlide","click #select-all":"_selectAll","click #delete-slides":"_clickBulkDelete","click #save":"_clickSave","click .toolbar .edit":"_clickEdit","click .toolbar .remove":"_clickDelete","click .thumbnail":"_clickThumb","click .select-mode-toggle-button":"_toggleMode","click .sidebar-name":"_toggleWidget"},initialize:function(){this.subviews={AddSlide:new t.frames.AddSlide,AdminSlides:new t.views.AdminSlides({collection:this.collection})};this.collection.on("sync:done",this.render,this);this.collection.on("sync:done",this._enableSave,this);this.subviews.AddSlide.on("insert",this._handleInsert,this);e(window).on("resize",this._setColumns.bind(this));this._selectMode=false;this._showSpinner()},_showSpinner:function(){this.$("#slides-browser").append('<div class="spinner"></div>')},_hideSpinner:function(){this.$("#slides-browser .spinner").remove()},_enableSave:function(){this.$("#save").prop("disabled",false)},_clickSave:function(){this.$("#publishing-action .spinner").css({display:"block"})},_setColumns:function(){var e=this.$(".media-frame-content"),t=e.attr("data-columns"),n=e.width();if(n){var r=Math.min(Math.round(n/145),12)||1;if(!t||t!==r){e.attr("data-columns",r)}}},_handleInsert:function(e){this.collection.add(e.models)},_clickThumb:function(e){e.preventDefault();if(!this._selectMode){this._editSlide(e)}else{this._toggleSelect(e)}},_clickEdit:function(e){e.preventDefault();this._editSlide(e)},_clickDelete:function(t){t.preventDefault();if(confirm(_easingsliderAdminL10n.warn)){var n=e(t.currentTarget).parents(".attachment").attr("data-id");this.collection.remove(n)}},_clickBulkDelete:function(e){e.preventDefault();if(confirm(_easingsliderAdminL10n.warn)){this._deleteSlides(e);this._toggleMode(e)}},_toggleMode:function(e){e.preventDefault();if(!this._selectMode){this._selectMode=true}else{this._selectMode=false}this.$(".attachment").removeClass("selected details");this.$(".media-frame").toggleClass("mode-select");this.$(".media-toolbar div *").toggleClass("hidden")},_toggleSelect:function(t){t.preventDefault();e(t.currentTarget).parents(".attachment").toggleClass("selected details")},_toggleWidget:function(t){t.preventDefault();var n=e(t.currentTarget).parent(),r=n.find(".sidebar-content");if(n.hasClass("fixed")){return}this.$(".widgets-holder-wrap").each(function(){var t=e(this);if(!t.hasClass("fixed")){t.find(".sidebar-content").slideUp(200,function(){t.addClass("closed")})}});if(!n.hasClass("closed")){return}r.slideDown(200,function(){n.removeClass("closed")})},_selectAll:function(e){e.preventDefault();this.$(".attachment").addClass("selected details")},_deleteSlides:function(t){t.preventDefault();var n=this.collection,r=[];this.$(".attachment").each(function(t){if(e(this).hasClass("selected")){r.push(n.at(t))}});this.collection.remove(r)},_addSlide:function(e){e.preventDefault();this.addSlide()},addSlide:function(){this.subviews.AddSlide.open();return this},_editSlide:function(t){t.preventDefault();var n=e(t.currentTarget).parents(".attachment").attr("data-id");this.editSlide(n)},editSlide:function(e){this.subviews.EditSlide=new t.frames.EditSlide({model:this.collection.get(e)});this.subviews.EditSlide.open();return this},render:function(){this._hideSpinner();var e=this.subviews.AdminSlides.render().el;this.$("#slides-browser").append(e);return this}});t.views.AdminSlides=Backbone.View.extend({tagName:"ul",attributes:{"class":"attachments ui-sortable",tabindex:"-1"},initialize:function(){this.subviews=[];this.collection.on("add",this.add,this);this.collection.on("remove",this.render,this);this.collection.on("reset",this.render,this);this.$el.sortable({items:".attachment",containment:"parent",tolerance:"pointer",stop:this._sort.bind(this)})},_sort:function(e,t){var n=this.collection.get(t.item.context.dataset.id);this.collection.reposition(n,t.item.index())},add:function(e){var n=new t.views.AdminSlide({model:e});this.subviews.push(n);this.$el.append(n.render().$el);return this},render:function(){this.subviews=[];this.$el.empty();_.each(this.collection.models,function(e){this.add(e)},this);return this}});t.views.AdminSlide=Backbone.View.extend({tagName:"li",attributes:function(){return{role:"checkbox","class":"attachment save-ready",tabindex:"0","data-id":this.model.id}},template:wp.media.template("easingslider-slide"),initialize:function(){this.model.on("change",this._setData,this);this.model.on("change:id",this._updateID,this);this.model.on("change:attachment_id",this.render,this);if(this.model.attachment){this.model.attachment.on("change",this.render,this)}},_setData:function(){this.$('input[name="slides[]"]').val(JSON.stringify(this.model.attributes))},_updateID:function(e,t){this.$el.attr("data-id",t);this.attributes["data-id"]=t},render:function(){var e={model:this.model.toJSON()};if(this.model.attachment){e.attachment=this.model.attachment.toJSON()}this.$el.html(this.template(e));return this}});t.views.EditSlide=function(e){if("image"==e.type){return new t.views.EditImageSlide(e)}};t.views.EditImageSlide=wp.media.view.ImageDetails.extend({className:"edit-attachment-frame attachment-details mode-select hide-menu hide-router",template:wp.media.template("easingslider-edit-slide")});t.router=Backbone.Router.extend({routes:{"admin.php?page=:page&edit=:id&change=:slide":"changeSlide","admin.php?page=:page&edit=:id&slide=:slide":"editSlide","admin.php?page=:page&edit=:id":"edit","admin.php?page=:page":"edit"},changeSlide:function(e,t,n){this.edit();this.AdminView.collection.on("sync:done",function(){this.AdminView.openChangeSlideFrame(n)},this);return this},editSlide:function(e,t,n){this.edit();this.AdminView.collection.on("sync:done",function(){this.AdminView.openEditSlideFrame(n)},this);return this},edit:function(e){if(!window.slides){return this}this.AdminView=new t.views.Admin({collection:new t.collections.Slides(JSON.parse(window.slides))});this.AdminView.collection.sync();return this}});e(document).ready(function(){var n=new t.router;Backbone.history.start({root:window._wpMediaGridSettings.adminUrl,pushState:true});e(".delete").each(function(){e(this).on("click",function(){if(!confirm(_easingsliderAdminL10n.warn)){return false}})})})})(jQuery)
|
js/jquery.easingslider.js
ADDED
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function($) {
|
2 |
+
|
3 |
+
/**
|
4 |
+
* jQuery Slider
|
5 |
+
*/
|
6 |
+
$.EasingSlider = function(el) {
|
7 |
+
|
8 |
+
// Core variables
|
9 |
+
var base = this,
|
10 |
+
o;
|
11 |
+
|
12 |
+
// Establish our elements
|
13 |
+
base.el = el;
|
14 |
+
base.$el = $(base.el);
|
15 |
+
base.$slides = base.$el.find('.easingslider-slide');
|
16 |
+
base.$arrows = base.$el.find('.easingslider-arrows');
|
17 |
+
base.$next = base.$el.find('.easingslider-next');
|
18 |
+
base.$prev = base.$el.find('.easingslider-prev');
|
19 |
+
base.$pagination = base.$el.find('.easingslider-pagination');
|
20 |
+
base.$icons = base.$el.find('.easingslider-icon');
|
21 |
+
base.$preload = base.$el.find('.easingslider-preload');
|
22 |
+
|
23 |
+
// Get the plugin options
|
24 |
+
base.options = o = $.extend({}, $.EasingSlider.defaults, $.parseJSON(base.$el.attr('data-options')));
|
25 |
+
|
26 |
+
// State variables
|
27 |
+
base.current = 0;
|
28 |
+
base.previous = 0;
|
29 |
+
base.count = base.$slides.length;
|
30 |
+
base.width = o.dimensions.width;
|
31 |
+
base.height = o.dimensions.height;
|
32 |
+
|
33 |
+
// Store our data
|
34 |
+
base.$el.data('easingslider', base);
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Constructor
|
38 |
+
*/
|
39 |
+
base.initialize = function() {
|
40 |
+
|
41 |
+
// Setup everything!
|
42 |
+
base._setupArrows();
|
43 |
+
base._setupPagination();
|
44 |
+
base._setupPlayback();
|
45 |
+
|
46 |
+
// Shwow the slides
|
47 |
+
base.$slides.css({ 'display': 'block' });
|
48 |
+
|
49 |
+
// Set the current slide
|
50 |
+
base.$slides.eq(base.current).addClass('active');
|
51 |
+
|
52 |
+
// Preload the slider
|
53 |
+
base._preload();
|
54 |
+
|
55 |
+
// Trigger event
|
56 |
+
base.$el.trigger('init', base);
|
57 |
+
|
58 |
+
return base;
|
59 |
+
|
60 |
+
};
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Sets up the "Arrow" navigation
|
64 |
+
*/
|
65 |
+
base._setupArrows = function() {
|
66 |
+
|
67 |
+
// "Next" & "Previous" arrow functionality
|
68 |
+
base.$next.on('click', base.nextSlide);
|
69 |
+
base.$prev.on('click', base.prevSlide);
|
70 |
+
|
71 |
+
// Add hover toggle if enabled
|
72 |
+
if ( o.navigation.arrows_hover ) {
|
73 |
+
base.$arrows.addClass('has-hover');
|
74 |
+
}
|
75 |
+
|
76 |
+
// Show the arrows
|
77 |
+
base.$arrows.css({ 'display': 'block' });
|
78 |
+
|
79 |
+
return base;
|
80 |
+
|
81 |
+
};
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets up the "Pagination" navigation
|
85 |
+
*/
|
86 |
+
base._setupPagination = function() {
|
87 |
+
|
88 |
+
// Bind events
|
89 |
+
base.$el.on('load', base._updatePagination);
|
90 |
+
base.$el.on('transition.before', base._updatePagination);
|
91 |
+
|
92 |
+
// Enable click event for each icon
|
93 |
+
base.$icons.on('click', function() {
|
94 |
+
|
95 |
+
// Get the next slide index and direction we are travelling
|
96 |
+
var eq = $(this).index(),
|
97 |
+
direction = (eq > base.current) ? 'forward' : 'backward';
|
98 |
+
|
99 |
+
// Transition to the desired slide
|
100 |
+
base.goToSlide(eq, direction);
|
101 |
+
|
102 |
+
});
|
103 |
+
|
104 |
+
// Add hover toggle if enabled
|
105 |
+
if ( o.navigation.pagination_hover ) {
|
106 |
+
base.$pagination.addClass('has-hover');
|
107 |
+
}
|
108 |
+
|
109 |
+
// Show the pagination
|
110 |
+
base.$pagination.css({ 'display': 'block' });
|
111 |
+
|
112 |
+
return base;
|
113 |
+
|
114 |
+
};
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Updates the active pagination icon
|
118 |
+
*/
|
119 |
+
base._updatePagination = function() {
|
120 |
+
|
121 |
+
// Bail if we don't have any pagination
|
122 |
+
if ( ! o.navigation.pagination ) {
|
123 |
+
return base;
|
124 |
+
}
|
125 |
+
|
126 |
+
// Update the active icon
|
127 |
+
base.$icons.removeClass('active').eq(base.current).addClass('active');
|
128 |
+
|
129 |
+
return base;
|
130 |
+
|
131 |
+
};
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Sets up the automatic playback
|
135 |
+
*/
|
136 |
+
base._setupPlayback = function() {
|
137 |
+
|
138 |
+
// Pause playback timer before the transition. It'll be reset after the transition has completed.
|
139 |
+
base.$el.on('transition.before', function() {
|
140 |
+
if ( o.playback.enabled ) {
|
141 |
+
base.pausePlayback();
|
142 |
+
}
|
143 |
+
});
|
144 |
+
|
145 |
+
// Once a transition has completed, restart playback, if enabled.
|
146 |
+
base.$el.on('transition.after', function() {
|
147 |
+
if ( o.playback.enabled ) {
|
148 |
+
base.startPlayback();
|
149 |
+
}
|
150 |
+
});
|
151 |
+
|
152 |
+
// Queue playback after the slider has loaded, if enabled.
|
153 |
+
if ( o.playback.enabled ) {
|
154 |
+
base.$el.on('load', base.startPlayback);
|
155 |
+
}
|
156 |
+
|
157 |
+
return base;
|
158 |
+
|
159 |
+
};
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Preloads the slider
|
163 |
+
*/
|
164 |
+
base._preload = function() {
|
165 |
+
|
166 |
+
// Preloaded slide count
|
167 |
+
base._preloadCount = 0;
|
168 |
+
|
169 |
+
// Loop through and preload each image slide. Doesn't stop on failure, just continues instead.
|
170 |
+
base.$el.find('.easingslider-image').each(function(index, image) {
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Create a virtual image element. We set its src after event handler is registered.
|
174 |
+
* We have to do this to prevent IE bugs (it doesn't always fire the onload event if image are loaded (from cache) before the event is bound)
|
175 |
+
*/
|
176 |
+
preloadImage = new Image();
|
177 |
+
|
178 |
+
// Bind preload functions. Still continues if a preload fails
|
179 |
+
preloadImage.onload = base._load;
|
180 |
+
preloadImage.onerror = base._load;
|
181 |
+
|
182 |
+
// Set image src attribute, thus preloading the image
|
183 |
+
preloadImage.src = image.src;
|
184 |
+
|
185 |
+
});
|
186 |
+
|
187 |
+
};
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Handles slide preloading
|
191 |
+
*/
|
192 |
+
base._load = function() {
|
193 |
+
|
194 |
+
// Increase preloaded count
|
195 |
+
base._preloadCount++;
|
196 |
+
|
197 |
+
// If all slides have been preloaded, hide the preloader and start the playback.
|
198 |
+
if ( base._preloadCount == base.count ) {
|
199 |
+
base.$preload.animate({ 'opacity': 0 }, {
|
200 |
+
duration: 400,
|
201 |
+
complete: function() {
|
202 |
+
|
203 |
+
// Remove preloader
|
204 |
+
$(this).remove();
|
205 |
+
|
206 |
+
// Flag as loaded
|
207 |
+
base.$el.addClass('has-loaded');
|
208 |
+
|
209 |
+
// Trigger events
|
210 |
+
base.$el.trigger('load', base);
|
211 |
+
|
212 |
+
}
|
213 |
+
});
|
214 |
+
}
|
215 |
+
|
216 |
+
},
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Starts automatic playback
|
220 |
+
*/
|
221 |
+
base.startPlayback = function() {
|
222 |
+
|
223 |
+
// Alter the option
|
224 |
+
o.playback.enabled = true;
|
225 |
+
|
226 |
+
// Runtime variable
|
227 |
+
base._runtime = new Date();
|
228 |
+
|
229 |
+
// Get pause time
|
230 |
+
base._pauseTime = o.playback.pause;
|
231 |
+
|
232 |
+
// Start automatic playback
|
233 |
+
base._playbackTimer = setTimeout(function() {
|
234 |
+
base.nextSlide();
|
235 |
+
}, base._pauseTime);
|
236 |
+
|
237 |
+
// Trigger event
|
238 |
+
base.$el.trigger('playback.start', base);
|
239 |
+
|
240 |
+
return base;
|
241 |
+
|
242 |
+
};
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Ends automatic playback
|
246 |
+
*/
|
247 |
+
base.endPlayback = function() {
|
248 |
+
|
249 |
+
// Alter the option
|
250 |
+
o.playback.enabled = false;
|
251 |
+
|
252 |
+
// Clear playback timer
|
253 |
+
clearTimeout(base._playbackTimer);
|
254 |
+
|
255 |
+
// Trigger event
|
256 |
+
base.$el.trigger('playback.end', base);
|
257 |
+
|
258 |
+
return base;
|
259 |
+
|
260 |
+
};
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Pauses automatic playback
|
264 |
+
*/
|
265 |
+
base.pausePlayback = function() {
|
266 |
+
|
267 |
+
// Clear playback timer
|
268 |
+
clearTimeout(base._playbackTimer);
|
269 |
+
|
270 |
+
// Calculate runtime left
|
271 |
+
base._runtime = Math.ceil(new Date() - base._runtime);
|
272 |
+
|
273 |
+
// Trigger event
|
274 |
+
base.$el.trigger('playback.pause', base);
|
275 |
+
|
276 |
+
return base;
|
277 |
+
|
278 |
+
};
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Resumes automatic playback
|
282 |
+
*/
|
283 |
+
base.resumePlayback = function() {
|
284 |
+
|
285 |
+
// Calculate playback time remaining
|
286 |
+
base._pauseTime = Math.ceil(base._pauseTime - base._runtime);
|
287 |
+
|
288 |
+
// Reset runtime
|
289 |
+
base._runtime = new Date();
|
290 |
+
|
291 |
+
// Resume automatic playback
|
292 |
+
base._playbackTimer = setTimeout(function() {
|
293 |
+
base.nextSlide();
|
294 |
+
}, base._pauseTime);
|
295 |
+
|
296 |
+
// Trigger event
|
297 |
+
base.$el.trigger('playback.resume', base);
|
298 |
+
|
299 |
+
return base;
|
300 |
+
|
301 |
+
};
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Executes a transition
|
305 |
+
*/
|
306 |
+
base._transition = function(eq, direction) {
|
307 |
+
|
308 |
+
// Bail if specified slide doesn't exist
|
309 |
+
if ( base.$slides.eq(eq).length == 0 ) {
|
310 |
+
return base;
|
311 |
+
}
|
312 |
+
|
313 |
+
// Bail if animating already
|
314 |
+
if ( base._animating ) {
|
315 |
+
return base;
|
316 |
+
}
|
317 |
+
|
318 |
+
// Flag that we are transitioning
|
319 |
+
base._animating = true;
|
320 |
+
|
321 |
+
// Establish the next and previous slides
|
322 |
+
base.previous = base.current;
|
323 |
+
base.current = eq;
|
324 |
+
|
325 |
+
// Add animation classes based on direction
|
326 |
+
if ( 'backward' == direction ) {
|
327 |
+
base.$slides.eq(base.previous).addClass('next-out');
|
328 |
+
base.$slides.eq(base.current).addClass('prev-in');
|
329 |
+
}
|
330 |
+
else {
|
331 |
+
base.$slides.eq(base.previous).addClass('prev-out');
|
332 |
+
base.$slides.eq(base.current).addClass('next-in');
|
333 |
+
}
|
334 |
+
|
335 |
+
// After timeout, do some cleaning up.
|
336 |
+
clearTimeout(base._cleanup);
|
337 |
+
base._cleanup = setTimeout(function() {
|
338 |
+
|
339 |
+
// Toggle the active slide
|
340 |
+
base.$slides.eq(base.current).addClass('active');
|
341 |
+
base.$slides.eq(base.previous).removeClass('active');
|
342 |
+
|
343 |
+
// Remove all animation related classes
|
344 |
+
base.$slides.removeClass('next-in next-out prev-in prev-out');
|
345 |
+
|
346 |
+
// Flag that we are no longer animating
|
347 |
+
base._animating = false;
|
348 |
+
|
349 |
+
// Trigger event
|
350 |
+
base.$el.trigger('transition.after', base, eq, direction);
|
351 |
+
|
352 |
+
}, o.transitions.duration);
|
353 |
+
|
354 |
+
// Trigger event
|
355 |
+
base.$el.trigger('transition.before', base, eq, direction);
|
356 |
+
|
357 |
+
return base;
|
358 |
+
|
359 |
+
};
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Transitions to the next slide
|
363 |
+
*/
|
364 |
+
base.nextSlide = function() {
|
365 |
+
|
366 |
+
// Establish the next slide
|
367 |
+
var eq = ( base.current == (base.count - 1) ) ? 0 : (base.current + 1);
|
368 |
+
|
369 |
+
// Transition to the next slide
|
370 |
+
base._transition(eq, 'forward');
|
371 |
+
|
372 |
+
// Trigger event
|
373 |
+
base.$el.trigger('transition.next', base, eq, 'forward');
|
374 |
+
|
375 |
+
return base;
|
376 |
+
|
377 |
+
};
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Transitions to the previous slide
|
381 |
+
*/
|
382 |
+
base.prevSlide = function() {
|
383 |
+
|
384 |
+
// Establish the previous slide
|
385 |
+
var eq = ( base.current == 0 ) ? (base.count - 1) : (base.current - 1);
|
386 |
+
|
387 |
+
// Transition to the previous slide
|
388 |
+
base._transition(eq, 'backward');
|
389 |
+
|
390 |
+
// Trigger event
|
391 |
+
base.$el.trigger('transition.prev', base, eq, 'backward');
|
392 |
+
|
393 |
+
return base;
|
394 |
+
|
395 |
+
};
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Transitions to a specified slide
|
399 |
+
*/
|
400 |
+
base.goToSlide = function(eq, direction) {
|
401 |
+
|
402 |
+
// Transition to the specified slide
|
403 |
+
this._transition(eq, direction);
|
404 |
+
|
405 |
+
// Trigger event
|
406 |
+
base.$el.trigger('transition.to', base, eq, direction);
|
407 |
+
|
408 |
+
return base;
|
409 |
+
|
410 |
+
};
|
411 |
+
|
412 |
+
// Initialize the plugin
|
413 |
+
base.initialize();
|
414 |
+
|
415 |
+
};
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Plugin defaults settings
|
419 |
+
*/
|
420 |
+
$.EasingSlider.defaults = {
|
421 |
+
dimensions: {
|
422 |
+
width: 640,
|
423 |
+
height: 400,
|
424 |
+
responsive: true
|
425 |
+
},
|
426 |
+
transitions: {
|
427 |
+
effect: 'fade',
|
428 |
+
duration: 400
|
429 |
+
},
|
430 |
+
navigation: {
|
431 |
+
arrows: true,
|
432 |
+
arrows_hover: true,
|
433 |
+
arrows_position: 'inside',
|
434 |
+
pagination: true,
|
435 |
+
pagination_hover: true,
|
436 |
+
pagination_position: 'inside',
|
437 |
+
pagination_location: 'bottom-center'
|
438 |
+
},
|
439 |
+
playback: {
|
440 |
+
enabled: true,
|
441 |
+
pause: 4000
|
442 |
+
}
|
443 |
+
};
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Initiates slider(s)
|
447 |
+
*/
|
448 |
+
$.fn.EasingSlider = function() {
|
449 |
+
return this.each(function() {
|
450 |
+
new $.EasingSlider(this);
|
451 |
+
});
|
452 |
+
};
|
453 |
+
|
454 |
+
// Let's go!
|
455 |
+
$(document).ready(function() {
|
456 |
+
$('.easingslider').EasingSlider();
|
457 |
+
});
|
458 |
+
|
459 |
+
})(jQuery);
|
js/jquery.easingslider.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(e){e.EasingSlider=function(t){var n=this,r;n.el=t;n.$el=e(n.el);n.$slides=n.$el.find(".easingslider-slide");n.$arrows=n.$el.find(".easingslider-arrows");n.$next=n.$el.find(".easingslider-next");n.$prev=n.$el.find(".easingslider-prev");n.$pagination=n.$el.find(".easingslider-pagination");n.$icons=n.$el.find(".easingslider-icon");n.$preload=n.$el.find(".easingslider-preload");n.options=r=e.extend({},e.EasingSlider.defaults,e.parseJSON(n.$el.attr("data-options")));n.current=0;n.previous=0;n.count=n.$slides.length;n.width=r.dimensions.width;n.height=r.dimensions.height;n.$el.data("easingslider",n);n.initialize=function(){n._setupArrows();n._setupPagination();n._setupPlayback();n.$slides.css({display:"block"});n.$slides.eq(n.current).addClass("active");n._preload();n.$el.trigger("init",n);return n};n._setupArrows=function(){n.$next.on("click",n.nextSlide);n.$prev.on("click",n.prevSlide);if(r.navigation.arrows_hover){n.$arrows.addClass("has-hover")}n.$arrows.css({display:"block"});return n};n._setupPagination=function(){n.$el.on("load",n._updatePagination);n.$el.on("transition.before",n._updatePagination);n.$icons.on("click",function(){var t=e(this).index(),r=t>n.current?"forward":"backward";n.goToSlide(t,r)});if(r.navigation.pagination_hover){n.$pagination.addClass("has-hover")}n.$pagination.css({display:"block"});return n};n._updatePagination=function(){if(!r.navigation.pagination){return n}n.$icons.removeClass("active").eq(n.current).addClass("active");return n};n._setupPlayback=function(){n.$el.on("transition.before",function(){if(r.playback.enabled){n.pausePlayback()}});n.$el.on("transition.after",function(){if(r.playback.enabled){n.startPlayback()}});if(r.playback.enabled){n.$el.on("load",n.startPlayback)}return n};n._preload=function(){n._preloadCount=0;n.$el.find(".easingslider-image").each(function(e,t){preloadImage=new Image;preloadImage.onload=n._load;preloadImage.onerror=n._load;preloadImage.src=t.src})};n._load=function(){n._preloadCount++;if(n._preloadCount==n.count){n.$preload.animate({opacity:0},{duration:400,complete:function(){e(this).remove();n.$el.addClass("has-loaded");n.$el.trigger("load",n)}})}},n.startPlayback=function(){r.playback.enabled=true;n._runtime=new Date;n._pauseTime=r.playback.pause;n._playbackTimer=setTimeout(function(){n.nextSlide()},n._pauseTime);n.$el.trigger("playback.start",n);return n};n.endPlayback=function(){r.playback.enabled=false;clearTimeout(n._playbackTimer);n.$el.trigger("playback.end",n);return n};n.pausePlayback=function(){clearTimeout(n._playbackTimer);n._runtime=Math.ceil(new Date-n._runtime);n.$el.trigger("playback.pause",n);return n};n.resumePlayback=function(){n._pauseTime=Math.ceil(n._pauseTime-n._runtime);n._runtime=new Date;n._playbackTimer=setTimeout(function(){n.nextSlide()},n._pauseTime);n.$el.trigger("playback.resume",n);return n};n._transition=function(e,t){if(n.$slides.eq(e).length==0){return n}if(n._animating){return n}n._animating=true;n.previous=n.current;n.current=e;if("backward"==t){n.$slides.eq(n.previous).addClass("next-out");n.$slides.eq(n.current).addClass("prev-in")}else{n.$slides.eq(n.previous).addClass("prev-out");n.$slides.eq(n.current).addClass("next-in")}clearTimeout(n._cleanup);n._cleanup=setTimeout(function(){n.$slides.eq(n.current).addClass("active");n.$slides.eq(n.previous).removeClass("active");n.$slides.removeClass("next-in next-out prev-in prev-out");n._animating=false;n.$el.trigger("transition.after",n,e,t)},r.transitions.duration);n.$el.trigger("transition.before",n,e,t);return n};n.nextSlide=function(){var e=n.current==n.count-1?0:n.current+1;n._transition(e,"forward");n.$el.trigger("transition.next",n,e,"forward");return n};n.prevSlide=function(){var e=n.current==0?n.count-1:n.current-1;n._transition(e,"backward");n.$el.trigger("transition.prev",n,e,"backward");return n};n.goToSlide=function(e,t){this._transition(e,t);n.$el.trigger("transition.to",n,e,t);return n};n.initialize()};e.EasingSlider.defaults={dimensions:{width:640,height:400,responsive:true},transitions:{effect:"fade",duration:400},navigation:{arrows:true,arrows_hover:true,arrows_position:"inside",pagination:true,pagination_hover:true,pagination_position:"inside",pagination_location:"bottom-center"},playback:{enabled:true,pause:4e3}};e.fn.EasingSlider=function(){return this.each(function(){new e.EasingSlider(this)})};e(document).ready(function(){e(".easingslider").EasingSlider()})})(jQuery)
|
js/slideshow.js
DELETED
@@ -1,633 +0,0 @@
|
|
1 |
-
;(function($) {
|
2 |
-
|
3 |
-
/** Main plugin object */
|
4 |
-
$.EasingSliderLite = function(el) {
|
5 |
-
|
6 |
-
/** Core variables */
|
7 |
-
var base = this,
|
8 |
-
o;
|
9 |
-
|
10 |
-
/** Cache the slideshow elements */
|
11 |
-
base.el = el;
|
12 |
-
base.$el = $(base.el);
|
13 |
-
base.$viewport = base.$el.find('.easingsliderlite-viewport');
|
14 |
-
base.$container = base.$viewport.find('.easingsliderlite-slides-container');
|
15 |
-
base.$slides = base.$container.find('.easingsliderlite-slide');
|
16 |
-
base.$images = base.$slides.find('.easingsliderlite-image');
|
17 |
-
|
18 |
-
/** Get the plugin options */
|
19 |
-
base.options = o = $.extend({}, $.EasingSliderLite.defaults, $.parseJSON(base.$el.attr('data-options')));
|
20 |
-
|
21 |
-
/** State variables */
|
22 |
-
base.current = 0;
|
23 |
-
base.previous = 0;
|
24 |
-
base.count = base.$slides.length;
|
25 |
-
base.width = o.dimensions.width;
|
26 |
-
base.height = o.dimensions.height;
|
27 |
-
|
28 |
-
/** Store our data for external use */
|
29 |
-
base.$el.data('easingsliderlite', base);
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Constructor
|
33 |
-
*
|
34 |
-
* @author Matthew Ruddy
|
35 |
-
* @since 2.0
|
36 |
-
*/
|
37 |
-
base.initialize = function() {
|
38 |
-
|
39 |
-
/** Remove inline CSS display property from container */
|
40 |
-
base.$container.css({ 'display': '' });
|
41 |
-
|
42 |
-
/** Detect CSS3 support */
|
43 |
-
base.useCSS3 = ( o.general.enableCSS3 ) ? base._supportsCSS3() : false;
|
44 |
-
if ( base.useCSS3 )
|
45 |
-
base.$el.addClass('use-css3');
|
46 |
-
|
47 |
-
/** Setup responsive functionality */
|
48 |
-
if ( o.dimensions.responsive )
|
49 |
-
base._setupResponsive();
|
50 |
-
|
51 |
-
/** Detect touch support and set device click/touch event */
|
52 |
-
base.supportsTouch = ( 'ontouchstart' in document.documentElement && o.general.enableTouch ) ? true : false;
|
53 |
-
base.clickEvent = ( base.supportsTouch ) ? 'touchstart.easingsliderlite' : 'click.easingsliderlite';
|
54 |
-
|
55 |
-
/** Setup navigation elements */
|
56 |
-
if ( o.navigation.arrows )
|
57 |
-
base._setupArrows();
|
58 |
-
if ( o.navigation.pagination )
|
59 |
-
base._setupPagination();
|
60 |
-
|
61 |
-
/** Flag current slide (and queue for slide change) */
|
62 |
-
base.$slides.eq(base.current).addClass('active');
|
63 |
-
base.$el.bind('beforetransition', function() {
|
64 |
-
base.$slides.removeClass('active').eq(base.current).addClass('active');
|
65 |
-
});
|
66 |
-
|
67 |
-
/** Queue playback (if enabled) */
|
68 |
-
if ( o.playback.enabled )
|
69 |
-
base.$el.one('onload', base.startPlayback);
|
70 |
-
|
71 |
-
/** Preload slideshow */
|
72 |
-
base._preload();
|
73 |
-
|
74 |
-
/** Allow custom hooks */
|
75 |
-
base.$el.trigger('initialize', base);
|
76 |
-
|
77 |
-
};
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Detects browser CSS3 support
|
81 |
-
*
|
82 |
-
* @author Matthew Ruddy
|
83 |
-
* @since 2.0
|
84 |
-
*/
|
85 |
-
base._supportsCSS3 = function() {
|
86 |
-
|
87 |
-
var element = document.createElement('div'),
|
88 |
-
props = [ 'perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective' ];
|
89 |
-
for ( var i in props ) {
|
90 |
-
if ( typeof element.style[ props[ i ] ] !== 'undefined' ) {
|
91 |
-
base.vendorPrefix = props[i].replace('Perspective', '').toLowerCase();
|
92 |
-
return true;
|
93 |
-
}
|
94 |
-
}
|
95 |
-
return false;
|
96 |
-
|
97 |
-
};
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Setup responsive functionality
|
101 |
-
*
|
102 |
-
* @author Matthew Ruddy
|
103 |
-
* @since 2.0
|
104 |
-
*/
|
105 |
-
base._setupResponsive = function() {
|
106 |
-
|
107 |
-
/** Responsive indicator class */
|
108 |
-
base.$el.addClass('is-responsive');
|
109 |
-
|
110 |
-
/** Resize slideshow on window resize */
|
111 |
-
$(window).bind('resize.easingsliderlite', function(event, force) {
|
112 |
-
|
113 |
-
/** Queue custom resize end event */
|
114 |
-
clearTimeout(base.resizeEnd);
|
115 |
-
base.resizeEnd = setTimeout(function() {
|
116 |
-
$(window).trigger('resizeend');
|
117 |
-
delete base.resizeEnd;
|
118 |
-
}, 50);
|
119 |
-
|
120 |
-
/** Get the new slideshow width and height */
|
121 |
-
var width = base.$viewport.outerWidth(),
|
122 |
-
height = base.$viewport.outerHeight();
|
123 |
-
|
124 |
-
/** Bail if slideshow width hasn't changed */
|
125 |
-
if ( width === base.width && !force )
|
126 |
-
return;
|
127 |
-
|
128 |
-
/** Save new dimensions */
|
129 |
-
base.width = width;
|
130 |
-
base.height = height;
|
131 |
-
|
132 |
-
/** Prevent transitions from triggering & reset container positioning */
|
133 |
-
if ( o.transitions.effect == 'slide' ) {
|
134 |
-
|
135 |
-
/** Apply our CSS changes */
|
136 |
-
var properties = {};
|
137 |
-
if ( base.useCSS3 ) {
|
138 |
-
properties[ '-'+ base.vendorPrefix +'-transition-duration' ] = '0ms';
|
139 |
-
properties[ '-'+ base.vendorPrefix +'-transform' ] = 'translate3d(-'+ ( base.current * base.width ) +'px, 0, 0)';
|
140 |
-
}
|
141 |
-
else
|
142 |
-
properties['left'] = '-'+ ( base.current * base.width ) +'px';
|
143 |
-
base.$container.css(properties);
|
144 |
-
|
145 |
-
/** Queue transition duration reset */
|
146 |
-
$(window).one('resizeend', function() {
|
147 |
-
properties[ '-'+ base.vendorPrefix +'-transition-duration' ] = o.transitions.duration +'ms';
|
148 |
-
base.$container.css(properties);
|
149 |
-
});
|
150 |
-
|
151 |
-
}
|
152 |
-
|
153 |
-
/** Resize the slides */
|
154 |
-
base.$slides.css({ 'width': width +'px', 'height': height +'px' });
|
155 |
-
|
156 |
-
});
|
157 |
-
|
158 |
-
/** Trigger a resize now */
|
159 |
-
$(window).trigger('resize.easingsliderlite', true);
|
160 |
-
|
161 |
-
};
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Sets up the arrow navigation
|
165 |
-
*
|
166 |
-
* @author Matthew Ruddy
|
167 |
-
* @since 2.0
|
168 |
-
*/
|
169 |
-
base._setupArrows = function() {
|
170 |
-
|
171 |
-
/** Get and display the navigation */
|
172 |
-
var $next = $('.easingsliderlite-next'),
|
173 |
-
$prev = $('.easingsliderlite-prev'),
|
174 |
-
$arrows = $().add($next).add($prev);
|
175 |
-
|
176 |
-
/** Bind click events */
|
177 |
-
$next.bind(base.clickEvent, function(event) {
|
178 |
-
base.nextSlide();
|
179 |
-
return false;
|
180 |
-
});
|
181 |
-
$prev.bind(base.clickEvent, function(event) {
|
182 |
-
base.prevSlide();
|
183 |
-
return false;
|
184 |
-
});
|
185 |
-
|
186 |
-
/** Visibility & hover styling */
|
187 |
-
if ( o.navigation.arrows_hover )
|
188 |
-
$arrows.addClass('has-hover');
|
189 |
-
else {
|
190 |
-
base.$el.one('onload', function() {
|
191 |
-
$arrows.css({ 'opacity': 1 });
|
192 |
-
});
|
193 |
-
}
|
194 |
-
|
195 |
-
/** Trigger custom actions */
|
196 |
-
base.$el.trigger('setuparrows', base);
|
197 |
-
|
198 |
-
};
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Sets up the pagination navigation
|
202 |
-
*
|
203 |
-
* @author Matthew Ruddy
|
204 |
-
* @since 2.0
|
205 |
-
*/
|
206 |
-
base._setupPagination = function() {
|
207 |
-
|
208 |
-
/** Get & display the navigation */
|
209 |
-
var $pagination = $('.easingsliderlite-pagination'),
|
210 |
-
$icons = $pagination.children('div');
|
211 |
-
|
212 |
-
/** Bind click events */
|
213 |
-
$icons.bind(base.clickEvent, function(event) {
|
214 |
-
base.goToSlide($(this).index());
|
215 |
-
return false;
|
216 |
-
});
|
217 |
-
|
218 |
-
/** Set current icon now & on slide change */
|
219 |
-
$icons.eq(base.current).addClass('active').removeClass('inactive');
|
220 |
-
base.$el.bind('beforetransition', function() {
|
221 |
-
$icons.removeClass('active').addClass('inactive').eq(base.current).addClass('active').removeClass('inactive');
|
222 |
-
});
|
223 |
-
|
224 |
-
/** Visibility & hover styling */
|
225 |
-
if ( o.navigation.pagination_hover )
|
226 |
-
$pagination.addClass('has-hover');
|
227 |
-
else {
|
228 |
-
base.$el.one('onload', function() {
|
229 |
-
$pagination.css({ 'opacity': 1 });
|
230 |
-
});
|
231 |
-
}
|
232 |
-
|
233 |
-
/** Trigger custom actions */
|
234 |
-
base.$el.trigger('setuppagination', base);
|
235 |
-
|
236 |
-
};
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Preloads the slideshows images
|
240 |
-
*
|
241 |
-
* @author Matthew Ruddy
|
242 |
-
* @since 2.0
|
243 |
-
*/
|
244 |
-
base._preload = function() {
|
245 |
-
|
246 |
-
/** Preloaded image count */
|
247 |
-
var count = 0;
|
248 |
-
|
249 |
-
/** Complete function run after image is preloaded */
|
250 |
-
var loadComplete = function() {
|
251 |
-
|
252 |
-
count++;
|
253 |
-
if ( count >= base.count )
|
254 |
-
base.$el.find('.easingsliderlite-preload').animate({ 'opacity': 0 }, { duration: 400, complete: function() {
|
255 |
-
$(this).remove();
|
256 |
-
base.$el.trigger('onload');
|
257 |
-
}});
|
258 |
-
|
259 |
-
};
|
260 |
-
|
261 |
-
/** Loop through and preload each image. Doesn't stop on failure, just continues instead */
|
262 |
-
base.$images.each(function(index, image) {
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Create a virtual image element. We set its src after event handler is registered.
|
266 |
-
* We have to do this to prevent IE bugs (it doesn't always fire the onload event if image are loaded (from cache) before the event is bound)
|
267 |
-
*/
|
268 |
-
preloadImage = new Image();
|
269 |
-
|
270 |
-
/** Bind preload functions. Still continues if a preload fails */
|
271 |
-
preloadImage.onload = loadComplete;
|
272 |
-
preloadImage.onerror = loadComplete;
|
273 |
-
|
274 |
-
/** Set image src attribute */
|
275 |
-
preloadImage.src = image.src;
|
276 |
-
|
277 |
-
});
|
278 |
-
|
279 |
-
};
|
280 |
-
|
281 |
-
/**
|
282 |
-
* Transitions the slideshow
|
283 |
-
*
|
284 |
-
* @author Matthew Ruddy
|
285 |
-
* @since 2.0
|
286 |
-
*/
|
287 |
-
base._transition = function() {
|
288 |
-
|
289 |
-
/** Trigger before transition actions */
|
290 |
-
base._beforeTransition();
|
291 |
-
|
292 |
-
/** Queue after transition actions (takes place after all transitions occur, not just one) */
|
293 |
-
clearTimeout(base.afterTransition);
|
294 |
-
base.afterTransition = setTimeout(function() {
|
295 |
-
|
296 |
-
/** Run functon */
|
297 |
-
base._afterTransition();
|
298 |
-
|
299 |
-
/** Delete timeout variable */
|
300 |
-
delete base.afterTransition;
|
301 |
-
|
302 |
-
}, o.transitions.duration);
|
303 |
-
|
304 |
-
/** Do appropriate transition */
|
305 |
-
if ( o.transitions.effect == 'slide' ) {
|
306 |
-
|
307 |
-
/** Do CSS3 transition if supported */
|
308 |
-
if ( base.useCSS3 ) {
|
309 |
-
|
310 |
-
/** Get the properties to transition */
|
311 |
-
var properties = {};
|
312 |
-
properties[ '-'+ base.vendorPrefix +'-transition-duration' ] = o.transitions.duration;
|
313 |
-
properties[ '-'+ base.vendorPrefix +'-transform' ] = 'translate3d(-'+ ( base.width * base.current ) +'px, 0, 0)';
|
314 |
-
|
315 |
-
/** Do the CSS3 transition */
|
316 |
-
base.$container.css(properties);
|
317 |
-
|
318 |
-
}
|
319 |
-
else {
|
320 |
-
/** Otherwise fallback to jQuery/Zepto animate */
|
321 |
-
base.$container.animate({ 'left': '-'+ ( base.width * base.current ) +'px' }, o.transitions.duration);
|
322 |
-
}
|
323 |
-
|
324 |
-
}
|
325 |
-
else if ( o.transitions.effect == 'fade' ) {
|
326 |
-
|
327 |
-
/** Prevent from triggering fade transition on the currently visible slide */
|
328 |
-
if ( base.current === base.previous )
|
329 |
-
return;
|
330 |
-
|
331 |
-
/** Z-index order increment */
|
332 |
-
base.order = ( base.order ) ? base.order+1 : 1;
|
333 |
-
|
334 |
-
/** Do some CSS resetting after all fade transitions have occurred */
|
335 |
-
base.$el.unbind('aftertransition._transition').one('aftertransition._transition', function() {
|
336 |
-
|
337 |
-
/** Resets CSS for each slide after fade transition has ended */
|
338 |
-
base.$slides.each(function(index) {
|
339 |
-
var restore = ( index === base.current ) ? { 'z-index': '' } : { 'opacity': 0, 'display': 'none', 'z-index': '' };
|
340 |
-
$(this).css(restore);
|
341 |
-
});
|
342 |
-
|
343 |
-
/** Delete variables */
|
344 |
-
delete base.order;
|
345 |
-
delete base.animationClear;
|
346 |
-
|
347 |
-
});
|
348 |
-
|
349 |
-
/** Only do jQuery animate for this transition. CSS3 opacity effects mke no performance difference */
|
350 |
-
base.$slides.eq(base.current).css({ 'opacity': '0', 'display': 'block', 'z-index': base.order }).animate({ 'opacity': '1' }, o.transitions.duration);
|
351 |
-
|
352 |
-
}
|
353 |
-
else {
|
354 |
-
/** Allow for custom transitions */
|
355 |
-
base.$el.trigger('transition', base, o.transitions.effect );
|
356 |
-
}
|
357 |
-
|
358 |
-
};
|
359 |
-
|
360 |
-
/**
|
361 |
-
* Executed before slide transition
|
362 |
-
*
|
363 |
-
* @author Matthew Ruddy
|
364 |
-
* @since 2.0
|
365 |
-
*/
|
366 |
-
base._beforeTransition = function() {
|
367 |
-
|
368 |
-
/** Clear playback timer */
|
369 |
-
if ( o.playback.enabled )
|
370 |
-
clearTimeout(base.playbackTimer);
|
371 |
-
|
372 |
-
/** Trigger actions */
|
373 |
-
base.$el.trigger('beforetransition', base);
|
374 |
-
|
375 |
-
};
|
376 |
-
|
377 |
-
/**
|
378 |
-
* Executed after slide transition
|
379 |
-
*
|
380 |
-
* @author Matthew Ruddy
|
381 |
-
* @since 2.0
|
382 |
-
*/
|
383 |
-
base._afterTransition = function() {
|
384 |
-
|
385 |
-
/** Restart playback (if enabled) */
|
386 |
-
if ( o.playback.enabled )
|
387 |
-
base.startPlayback({ silent: true });
|
388 |
-
|
389 |
-
/** Trigger actions */
|
390 |
-
base.$el.trigger('aftertransition', base);
|
391 |
-
|
392 |
-
};
|
393 |
-
|
394 |
-
/**
|
395 |
-
* Starts slideshow automatic playback
|
396 |
-
*
|
397 |
-
* @author Matthew Ruddy
|
398 |
-
* @since 2.0
|
399 |
-
*/
|
400 |
-
base.startPlayback = function(options) {
|
401 |
-
|
402 |
-
/** Extend options */
|
403 |
-
options = $.extend({}, { silent: false }, options);
|
404 |
-
|
405 |
-
/** Alter slideshow playback setting */
|
406 |
-
if ( !o.playback.enabled )
|
407 |
-
o.playback.enabled = true;
|
408 |
-
|
409 |
-
/** Runtime variable */
|
410 |
-
base.runtime = new Date();
|
411 |
-
|
412 |
-
/** Get pause time */
|
413 |
-
base.pauseTime = o.playback.pause;
|
414 |
-
|
415 |
-
/** Start automatic playback */
|
416 |
-
base.playbackTimer = setTimeout(function() {
|
417 |
-
base.nextSlide();
|
418 |
-
}, base.pauseTime);
|
419 |
-
|
420 |
-
/** Trigger actions */
|
421 |
-
if ( !options.silent )
|
422 |
-
base.$el.trigger('startplayback', base);
|
423 |
-
|
424 |
-
};
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Ends slideshow automatic playback
|
428 |
-
*
|
429 |
-
* @author Matthew Ruddy
|
430 |
-
* @since 2.0
|
431 |
-
*/
|
432 |
-
base.endPlayback = function(options) {
|
433 |
-
|
434 |
-
/** Extend options */
|
435 |
-
options = $.extend({}, { silent: false }, options);
|
436 |
-
|
437 |
-
/** Alter slideshow playback setting */
|
438 |
-
if ( o.playback.enabled )
|
439 |
-
o.playback.enabled = false;
|
440 |
-
|
441 |
-
/** Clear playback timer */
|
442 |
-
clearTimeout(base.playbackTimer);
|
443 |
-
|
444 |
-
/** Trigger actions */
|
445 |
-
if ( !options.silent )
|
446 |
-
base.$el.trigger('endplayback', base);
|
447 |
-
|
448 |
-
};
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Pauses slideshow automatic playback
|
452 |
-
*
|
453 |
-
* @author Matthew Ruddy
|
454 |
-
* @since 2.0
|
455 |
-
*/
|
456 |
-
base.pausePlayback = function(options) {
|
457 |
-
|
458 |
-
/** Extend options */
|
459 |
-
options = $.extend({}, { silent: false }, options);
|
460 |
-
|
461 |
-
/** Clear playback timer */
|
462 |
-
clearTimeout(base.playbackTimer);
|
463 |
-
|
464 |
-
/** Calculate runtime left */
|
465 |
-
base.runtime = Math.ceil( new Date() - base.runtime );
|
466 |
-
|
467 |
-
/** Trigger actions */
|
468 |
-
if ( !options.silent )
|
469 |
-
base.$el.trigger('pauseplayback', base);
|
470 |
-
|
471 |
-
};
|
472 |
-
|
473 |
-
/**
|
474 |
-
* Resumes slideshow automatic playback
|
475 |
-
*
|
476 |
-
* @author Matthew Ruddy
|
477 |
-
* @since 2.0
|
478 |
-
*/
|
479 |
-
base.resumePlayback = function(options) {
|
480 |
-
|
481 |
-
/** Extend options */
|
482 |
-
options = $.extend({}, { silent: false }, options);
|
483 |
-
|
484 |
-
/** Calculate playback time remaining */
|
485 |
-
base.pauseTime = Math.ceil( base.pauseTime - base.runtime );
|
486 |
-
|
487 |
-
/** Reset runtime */
|
488 |
-
base.runtime = new Date();
|
489 |
-
|
490 |
-
/** Resume automatic playback */
|
491 |
-
base.playbackTimer = setTimeout(function() {
|
492 |
-
base.nextSlide();
|
493 |
-
}, base.pauseTime);
|
494 |
-
|
495 |
-
/** Trigger actions */
|
496 |
-
if ( !options.silent )
|
497 |
-
base.$el.trigger('resumeplayback', base);
|
498 |
-
|
499 |
-
};
|
500 |
-
|
501 |
-
/**
|
502 |
-
* Transitions to the next slide
|
503 |
-
*
|
504 |
-
* @author Matthew Ruddy
|
505 |
-
* @since 2.0
|
506 |
-
*/
|
507 |
-
base.nextSlide = function(options) {
|
508 |
-
|
509 |
-
/** Extend options */
|
510 |
-
options = $.extend({}, { silent: false }, options);
|
511 |
-
|
512 |
-
/** Get the next slide and transition the slideshow */
|
513 |
-
base.previous = base.current;
|
514 |
-
base.current = ( base.current == ( base.count-1 ) ) ? 0 : ( base.current+1 );
|
515 |
-
base._transition( base.current, base.previous );
|
516 |
-
|
517 |
-
/** Trigger actions */
|
518 |
-
if ( !options.silent )
|
519 |
-
base.$el.trigger('nextslide', base);
|
520 |
-
|
521 |
-
};
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Transitions to the previous slide
|
525 |
-
*
|
526 |
-
* @author Matthew Ruddy
|
527 |
-
* @since 2.0
|
528 |
-
*/
|
529 |
-
base.prevSlide = function(options) {
|
530 |
-
|
531 |
-
/** Extend options */
|
532 |
-
options = $.extend({}, { silent: false }, options);
|
533 |
-
|
534 |
-
/** Get the previous slide and transition the slideshow */
|
535 |
-
base.previous = base.current;
|
536 |
-
base.current = ( base.current == 0 ) ? ( base.count-1 ) : ( base.current-1 );
|
537 |
-
base._transition( base.current, base.previous );
|
538 |
-
|
539 |
-
/** Trigger actions */
|
540 |
-
if ( !options.silent )
|
541 |
-
base.$el.trigger('prevslide', base);
|
542 |
-
|
543 |
-
};
|
544 |
-
|
545 |
-
/**
|
546 |
-
* Transitions to a specified slide
|
547 |
-
*
|
548 |
-
* @author Matthew Ruddy
|
549 |
-
* @since 2.0
|
550 |
-
*/
|
551 |
-
base.goToSlide = function(eq, options) {
|
552 |
-
|
553 |
-
/** Extend options */
|
554 |
-
options = $.extend({}, { silent: false }, options);
|
555 |
-
|
556 |
-
/** Bail if specified slide doesn't exist */
|
557 |
-
if ( base.$slides.eq(eq).length == 0 )
|
558 |
-
return;
|
559 |
-
|
560 |
-
/** Transition to the slide */
|
561 |
-
base.previous = base.current;
|
562 |
-
base.current = eq;
|
563 |
-
base._transition( base.current, base.previous, true );
|
564 |
-
|
565 |
-
/** Trigger actions */
|
566 |
-
if ( !options.silent )
|
567 |
-
base.$el.trigger('gotoslide', base, eq);
|
568 |
-
|
569 |
-
};
|
570 |
-
|
571 |
-
/** Quick a dirty hack for allowing users to override plugin methods with their own */
|
572 |
-
base = $.extend({}, base, $.EasingSliderLite.extensions);
|
573 |
-
|
574 |
-
/** Initialize the plugin */
|
575 |
-
base.initialize();
|
576 |
-
|
577 |
-
};
|
578 |
-
|
579 |
-
/**
|
580 |
-
* Plugin defaults settings
|
581 |
-
*
|
582 |
-
* @author Matthew Ruddy
|
583 |
-
* @since 2.0
|
584 |
-
*/
|
585 |
-
$.EasingSliderLite.defaults = {
|
586 |
-
general: {
|
587 |
-
enableCSS3: true
|
588 |
-
},
|
589 |
-
navigation: {
|
590 |
-
arrows: true,
|
591 |
-
arrows_hover: true,
|
592 |
-
arrows_position: 'inside',
|
593 |
-
pagination: true,
|
594 |
-
pagination_hover: true,
|
595 |
-
pagination_position: 'inside',
|
596 |
-
pagination_location: 'bottom-left'
|
597 |
-
},
|
598 |
-
dimensions: {
|
599 |
-
width: 500,
|
600 |
-
height: 200,
|
601 |
-
responsive: true
|
602 |
-
},
|
603 |
-
transitions: {
|
604 |
-
effect: 'slide',
|
605 |
-
duration: 500
|
606 |
-
},
|
607 |
-
playback: {
|
608 |
-
enabled: false,
|
609 |
-
pause: 1000
|
610 |
-
}
|
611 |
-
};
|
612 |
-
|
613 |
-
/**
|
614 |
-
* Plugin method extensions
|
615 |
-
*
|
616 |
-
* @author Matthew Ruddy
|
617 |
-
* @since 2.0
|
618 |
-
*/
|
619 |
-
$.EasingSliderLite.extensions = {};
|
620 |
-
|
621 |
-
/** Initiates the plugin on each element */
|
622 |
-
$.fn.EasingSliderLite = function() {
|
623 |
-
return this.each(function() {
|
624 |
-
new $.EasingSliderLite(this);
|
625 |
-
});
|
626 |
-
};
|
627 |
-
|
628 |
-
/** Let's go! */
|
629 |
-
$(document).ready(function() {
|
630 |
-
$('.easingsliderlite').EasingSliderLite();
|
631 |
-
});
|
632 |
-
|
633 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/slideshow.min.js
DELETED
@@ -1,2 +0,0 @@
|
|
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("onload",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,i){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&&!i){return}c.width=g;c.height=e;if(d.transitions.effect=="slide"){var f={};if(c.useCSS3){f["-"+c.vendorPrefix+"-transition-duration"]="0ms";f["-"+c.vendorPrefix+"-transform"]="translate3d(-"+(c.current*c.width)+"px, 0, 0)"}else{f.left="-"+(c.current*c.width)+"px"}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",true)};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("onload",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("onload",function(){e.css({opacity:1})})}c.$el.trigger("setuppagination",c)};c._preload=function(){var f=0;var e=function(){f++;if(f>=c.count){c.$el.find(".easingsliderlite-preload").animate({opacity:0},{duration:400,complete:function(){a(this).remove();c.$el.trigger("onload")}})}};c.$images.each(function(g,h){preloadImage=new Image();preloadImage.onload=e;preloadImage.onerror=e;preloadImage.src=h.src})};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)+"px"},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();
|
2 |
-
c.pauseTime=d.playback.pause;c.playbackTimer=setTimeout(function(){c.nextSlide()},c.pauseTime);if(!e.silent){c.$el.trigger("startplayback",c)}};c.endPlayback=function(e){e=a.extend({},{silent:false},e);if(d.playback.enabled){d.playback.enabled=false}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);
|
|
|
|
languages/easing-slider.pot
ADDED
@@ -0,0 +1,1070 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Easing Slider\n"
|
4 |
+
"POT-Creation-Date: 2015-01-12 10:12-0000\n"
|
5 |
+
"PO-Revision-Date: 2015-01-12 10:12-0000\n"
|
6 |
+
"Last-Translator: Matthew Ruddy <support@easingslider.com>\n"
|
7 |
+
"Language-Team: Easing Slider <support@easingslider.com>\n"
|
8 |
+
"Language: en_GB\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.4\n"
|
13 |
+
"X-Poedit-Basepath: ../\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n;_x\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: backbone/edit-slide.php:10
|
19 |
+
msgid "Edit Original"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: backbone/edit-slide.php:11
|
23 |
+
msgid "Replace"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: backbone/edit-slide.php:31
|
27 |
+
msgid "Link Settings"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: backbone/edit-slide.php:34
|
31 |
+
msgid "Link To"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: backbone/edit-slide.php:37
|
35 |
+
msgid "None"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: backbone/edit-slide.php:40
|
39 |
+
msgid "Custom URL"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: backbone/edit-slide.php:44
|
43 |
+
msgid "Media File"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: backbone/edit-slide.php:47
|
47 |
+
msgid "Attachment Page"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: backbone/edit-slide.php:51
|
51 |
+
msgid "Image URL"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: backbone/edit-slide.php:67
|
55 |
+
msgid "Image Settings"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: backbone/edit-slide.php:70
|
59 |
+
msgid "Title Attribute"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: backbone/edit-slide.php:75
|
63 |
+
msgid "Alternative Text"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: easing-slider.php:236 includes/class-es-editor-pages.php:60
|
67 |
+
#: includes/class-es-menu.php:58 includes/class-es-menu.php:59
|
68 |
+
msgid "Sliders"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: includes/class-es-customizer-notice.php:73
|
72 |
+
#, php-format
|
73 |
+
msgid ""
|
74 |
+
"The Easing Slider \"Customizer\" functionality will soon be removed from "
|
75 |
+
"this plugin and made available as an extension. If you use the \"Customize\" "
|
76 |
+
"panel, download and activate the free extension <a href=\"%s\" target="
|
77 |
+
"\"_blank\">here</a> to prevents any disruptions. <a href=\"%s\">Dismiss</a>."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: includes/class-es-customizer.php:58 includes/class-es-customizer.php:59
|
81 |
+
msgid "Customize"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: includes/class-es-customizer.php:191
|
85 |
+
msgid "You need to create some sliders to use the customizer."
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: includes/class-es-editor-pages.php:61
|
89 |
+
msgid "All Sliders"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: includes/class-es-editor-pages.php:85 partials/edit-slider.php:15
|
93 |
+
msgid "Add New Slider"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: includes/class-es-editor-pages.php:86 partials/edit-slider.php:13
|
97 |
+
#: partials/list-sliders.php:5
|
98 |
+
msgid "Add New"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: includes/class-es-editor-pages.php:139
|
102 |
+
msgid "Are you sure you wish to do this? This cannot be reversed."
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: includes/class-es-editor-pages.php:141
|
106 |
+
msgid "Are you sure you wish to delete this slide? This cannot be reversed."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: includes/class-es-editor-pages.php:142
|
110 |
+
msgid ""
|
111 |
+
"Are you sure you wish to delete all of this slider's images? This cannot be "
|
112 |
+
"reversed."
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: includes/class-es-editor-pages.php:144
|
116 |
+
msgid "Add Images to Slider"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: includes/class-es-editor-pages.php:145
|
120 |
+
msgid "Insert into slider"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: includes/class-es-editor-pages.php:146
|
124 |
+
msgid "Use this image"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: includes/class-es-editor-pages.php:147
|
128 |
+
msgid "Are you sure you wish to discard changes?"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: includes/class-es-editor-pages.php:181
|
132 |
+
msgid "Sliders per page"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: includes/class-es-editor-pages.php:299
|
136 |
+
msgid "Slider has been saved successfully."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: includes/class-es-extensions-page.php:57
|
140 |
+
#: includes/class-es-extensions-page.php:58
|
141 |
+
msgid "Extensions"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: includes/class-es-extensions-page.php:108
|
145 |
+
msgid "Visual Customizer"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: includes/class-es-extensions-page.php:110
|
149 |
+
#: includes/class-es-extensions-page.php:116
|
150 |
+
#: includes/class-es-extensions-page.php:122
|
151 |
+
#: includes/class-es-extensions-page.php:128
|
152 |
+
#: includes/class-es-extensions-page.php:134
|
153 |
+
#: includes/class-es-extensions-page.php:140
|
154 |
+
msgid ""
|
155 |
+
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi inventore "
|
156 |
+
"corporis a omnis placeat cum, quam modi repellat incidunt, corrupti enim "
|
157 |
+
"voluptate iusto unde sapiente labore suscipit tenetur voluptatem. Debitis."
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: includes/class-es-extensions-page.php:114
|
161 |
+
msgid "HTML Captions"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: includes/class-es-extensions-page.php:120
|
165 |
+
msgid "Touch & Swipe"
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: includes/class-es-extensions-page.php:126
|
169 |
+
msgid "Lightbox"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: includes/class-es-extensions-page.php:132
|
173 |
+
msgid "Images from URL"
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: includes/class-es-extensions-page.php:138
|
177 |
+
msgid "Featured Content"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: includes/class-es-image-resizer.php:32
|
181 |
+
msgid "No image URL has been entered."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: includes/class-es-legacy.php:163
|
185 |
+
msgid ""
|
186 |
+
"Looks like you've forgotten to add a slideshow ID to this shortcode. Oh dear!"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: includes/class-es-settings-page.php:57
|
190 |
+
msgid "Edit Settings"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: includes/class-es-settings-page.php:58
|
194 |
+
msgid "Settings"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: includes/class-es-settings-page.php:108
|
198 |
+
msgid "General"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: includes/class-es-settings-page.php:109
|
202 |
+
msgid "Licenses"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: includes/class-es-settings-page.php:171
|
206 |
+
msgid "Settings have been saved successfully."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: includes/class-es-shortcode.php:53
|
210 |
+
msgid "Please select a slider"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: includes/class-es-shortcode.php:67
|
214 |
+
msgid "Add a slider"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: includes/class-es-shortcode.php:68
|
218 |
+
msgid "Select a slider to insert from the box below."
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: includes/class-es-shortcode.php:73
|
222 |
+
msgid "Select a slider"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: includes/class-es-shortcode.php:83
|
226 |
+
msgid "Insert Slider"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: includes/class-es-shortcode.php:84 partials/customizer.php:8
|
230 |
+
msgid "Close"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/class-es-shortcode.php:114
|
234 |
+
msgid "Add a Slider"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: includes/class-es-shortcode.php:115
|
238 |
+
msgid " Add Slider"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: includes/class-es-shortcode.php:147
|
242 |
+
#, php-format
|
243 |
+
msgid ""
|
244 |
+
"<p><strong>The slider specified (ID #%s) could not be found.</strong></p>"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: includes/class-es-slider.php:460
|
248 |
+
msgid "Slide"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: includes/class-es-slider.php:461
|
252 |
+
msgid "Fade"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: includes/class-es-slider.php:607
|
256 |
+
msgid "(no title)"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/class-es-sliders-list-table.php:49
|
260 |
+
msgid "ID"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: includes/class-es-sliders-list-table.php:50
|
264 |
+
msgid "Title"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: includes/class-es-sliders-list-table.php:51
|
268 |
+
msgid "Author"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: includes/class-es-sliders-list-table.php:52
|
272 |
+
msgid "Date"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: includes/class-es-sliders-list-table.php:53
|
276 |
+
msgid "Shortcode"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: includes/class-es-sliders-list-table.php:176
|
280 |
+
msgid "Duplicate"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: includes/class-es-sliders-list-table.php:177
|
284 |
+
msgid "Delete"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: includes/class-es-sliders-list-table.php:243
|
288 |
+
#, php-format
|
289 |
+
msgid "%s - Copy"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: includes/class-es-sliders-list-table.php:338
|
293 |
+
#, php-format
|
294 |
+
msgid "%s ago"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: includes/class-es-sliders-list-table.php:344
|
298 |
+
msgid "Y/m/d"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: includes/class-es-sliders-list-table.php:348
|
302 |
+
msgid "Published"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: includes/class-es-sliders-list-table.php:388
|
306 |
+
msgid "No sliders found."
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: includes/class-es-update-manager.php:160
|
310 |
+
msgid ""
|
311 |
+
"The license key registration service is temporarily unavailable. Please try "
|
312 |
+
"again later."
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: includes/class-es-update-manager.php:218
|
316 |
+
msgid ""
|
317 |
+
"Your license could not be deactivated. Please contact support to have it "
|
318 |
+
"deactivated correctly."
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: includes/class-es-update-manager.php:260
|
322 |
+
#, php-format
|
323 |
+
msgid "\"%s\" License has been registered successfully."
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: includes/class-es-update-manager.php:296
|
327 |
+
#, php-format
|
328 |
+
msgid "\"%s\" License has been deactivated successfully."
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: includes/class-es-update-manager.php:329
|
332 |
+
#, php-format
|
333 |
+
msgid "\"%s\" License Key"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: includes/class-es-update-manager.php:338
|
337 |
+
msgid "Deactivate"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: includes/class-es-welcome-pages.php:26
|
341 |
+
#: includes/class-es-welcome-pages.php:27
|
342 |
+
msgid "Welcome to Easing Slider"
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: includes/class-es-welcome-pages.php:35
|
346 |
+
#: includes/class-es-welcome-pages.php:36
|
347 |
+
msgid "Getting started with Easing Slider"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: includes/class-es-welcome-pages.php:44
|
351 |
+
#: includes/class-es-welcome-pages.php:45
|
352 |
+
msgid "The people that build Easing Slider"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: includes/class-es-welcome-pages.php:80
|
356 |
+
msgid "What's New"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: includes/class-es-welcome-pages.php:81
|
360 |
+
msgid "Getting Started"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: includes/class-es-welcome-pages.php:82
|
364 |
+
msgid "Credits"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: includes/class-es-widget.php:27
|
368 |
+
msgid "Slider"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: includes/class-es-widget.php:28
|
372 |
+
msgid "Display a slider using a widget"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: includes/class-es-widget.php:104
|
376 |
+
msgid "Title:"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: includes/class-es-widget.php:108
|
380 |
+
msgid "Select Slider:"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: includes/class-es-widget.php:110
|
384 |
+
msgid "— Select —"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: includes/class-es-widget.php:112
|
388 |
+
#, php-format
|
389 |
+
msgid " (ID #%s)"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/helpers.php:180
|
393 |
+
#, php-format
|
394 |
+
msgid ""
|
395 |
+
"Please rate <strong>Easing Slider</strong> <a href=\"%1$s\" target=\"_blank"
|
396 |
+
"\">★★★★★</a> on <a href=\"%1$s\" target="
|
397 |
+
"\"_blank\">WordPress.org</a> to help us keep this plugin free. Thank you "
|
398 |
+
"from the Easing Slider team!"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: includes/helpers.php:180
|
402 |
+
msgid "http://wordpress.org/support/view/plugin-reviews/easing-slider?filter=5"
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: partials/customizer.php:5
|
406 |
+
msgid "Save"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: partials/customizer.php:11
|
410 |
+
msgid "Back"
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: partials/customizer.php:18
|
414 |
+
#, php-format
|
415 |
+
msgid "You are customizing <strong class=\"theme-name\">%s</strong>"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: partials/customizer.php:20
|
419 |
+
msgid "Change to another slider"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: partials/customizer.php:32 partials/edit-slider_sidebar.php:148
|
423 |
+
msgid "Next & Previous Arrows"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: partials/customizer.php:36
|
427 |
+
msgid "\"Next\" Arrow Image"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: partials/customizer.php:42
|
431 |
+
msgid "\"Previous\" Arrow Image"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: partials/customizer.php:48 partials/customizer.php:102
|
435 |
+
msgid "Width"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: partials/customizer.php:54
|
439 |
+
msgid "Height"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: partials/customizer.php:62 partials/edit-slider_sidebar.php:216
|
443 |
+
msgid "Pagination Icons"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: partials/customizer.php:66
|
447 |
+
msgid "\"Inactive\" Image"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: partials/customizer.php:72
|
451 |
+
msgid "\"Active\" Image"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: partials/customizer.php:78
|
455 |
+
msgid "Icon Width"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: partials/customizer.php:84
|
459 |
+
msgid "Icon Height"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: partials/customizer.php:92
|
463 |
+
msgid "Border"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: partials/customizer.php:96
|
467 |
+
msgid "Color"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: partials/customizer.php:108
|
471 |
+
msgid "Radius"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: partials/customizer.php:116
|
475 |
+
msgid "Drop Shadow"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: partials/customizer.php:120
|
479 |
+
msgid "Display a Drop Shadow"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: partials/customizer.php:121 partials/edit-slider_sidebar.php:179
|
483 |
+
#: partials/edit-slider_sidebar.php:247
|
484 |
+
msgid "True"
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: partials/customizer.php:122 partials/edit-slider_sidebar.php:182
|
488 |
+
#: partials/edit-slider_sidebar.php:250
|
489 |
+
msgid "False"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: partials/customizer.php:127
|
493 |
+
msgid "Shadow Image"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: partials/customizer.php:138
|
497 |
+
msgid "Collapse Sidebar"
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: partials/customizer.php:140
|
501 |
+
msgid "Collapse"
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: partials/discover-extensions.php:3
|
505 |
+
msgid "Extensions "
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: partials/discover-extensions.php:6
|
509 |
+
msgid "Browse All"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: partials/discover-extensions.php:10
|
513 |
+
msgid "These extensions provide additional functionality to Easing Slider."
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: partials/discover-extensions.php:19
|
517 |
+
msgid "Get this extension"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: partials/edit-settings.php:37
|
521 |
+
msgid "Save Settings"
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: partials/edit-settings_general.php:4
|
525 |
+
msgid "Image Resizing"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: partials/edit-settings_general.php:8 partials/edit-slider_sidebar.php:163
|
529 |
+
#: partials/edit-slider_sidebar.php:231 partials/edit-slider_sidebar.php:307
|
530 |
+
msgid "Enable"
|
531 |
+
msgstr ""
|
532 |
+
|
533 |
+
#: partials/edit-settings_general.php:13 partials/edit-slider_sidebar.php:166
|
534 |
+
#: partials/edit-slider_sidebar.php:234 partials/edit-slider_sidebar.php:310
|
535 |
+
msgid "Disable"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: partials/edit-settings_general.php:16
|
539 |
+
msgid ""
|
540 |
+
"Enable or disable the image resizing functionality. Disable this if you do "
|
541 |
+
"not want the slide images to be resized."
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: partials/edit-settings_general.php:25
|
545 |
+
msgid "Asset Loading"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: partials/edit-settings_general.php:29
|
549 |
+
msgid "Compatibility (header)"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: partials/edit-settings_general.php:34
|
553 |
+
msgid "Optimized (footer)"
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: partials/edit-settings_general.php:37
|
557 |
+
msgid ""
|
558 |
+
"This option controls where the plugin's scripts and styling are loaded. "
|
559 |
+
"\"Compatibility\" will load them in the page header, which is less "
|
560 |
+
"performant but also less likely to suffer conflicts with other plugins. "
|
561 |
+
"\"Optimized\" conditionally loads CSS and JS in the page footer, which is "
|
562 |
+
"better for performance, but more likely to encounter errors. We recommend "
|
563 |
+
"trying \"Optimized\" and reverting back if you encounter any issues."
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: partials/edit-settings_general.php:43
|
567 |
+
msgid "Data Settings"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: partials/edit-settings_general.php:48
|
571 |
+
msgid "Remove data on uninstall?"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: partials/edit-settings_general.php:53
|
575 |
+
msgid ""
|
576 |
+
"Check this box if you would like Easing Slider to completely remove all of "
|
577 |
+
"its data when the plugin is deleted."
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: partials/edit-settings_general.php:56
|
581 |
+
msgid ""
|
582 |
+
"Be careful before enabling this option, as the data cannot be recovered once "
|
583 |
+
"it has been deleted."
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: partials/edit-settings_general.php:62
|
587 |
+
msgid "Installation Settings"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: partials/edit-settings_general.php:67
|
591 |
+
msgid "PHP Version"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: partials/edit-settings_general.php:72
|
595 |
+
msgid "MySQL Version"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: partials/edit-settings_general.php:77
|
599 |
+
msgid "WordPress Version"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: partials/edit-settings_general.php:82
|
603 |
+
msgid "Plugin Version"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: partials/edit-settings_licenses.php:1
|
607 |
+
#, php-format
|
608 |
+
msgid ""
|
609 |
+
"Below you can register your extension licenses. This is required to enable "
|
610 |
+
"extension updates. You can browse all available extensions <a href=\"%s"
|
611 |
+
"\">here</a>."
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: partials/edit-slider.php:12
|
615 |
+
msgid "Edit Slider"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: partials/edit-slider.php:23
|
619 |
+
msgid "Name:"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: partials/edit-slider.php:24
|
623 |
+
msgid "Enter a slider name"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: partials/edit-slider.php:25
|
627 |
+
msgid "Select All"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: partials/edit-slider.php:31
|
631 |
+
msgid "Randomize the slide order"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: partials/edit-slider.php:33
|
635 |
+
msgid "Add Slides"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: partials/edit-slider.php:34
|
639 |
+
msgid "Bulk Select"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: partials/edit-slider.php:35
|
643 |
+
msgid "Cancel Selection"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: partials/edit-slider.php:36
|
647 |
+
msgid "Delete Selected"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: partials/edit-slider_sidebar.php:11
|
651 |
+
msgid "Publish"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: partials/edit-slider_sidebar.php:24
|
655 |
+
#, php-format
|
656 |
+
msgid "Published on: <b>%s</b>"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: partials/edit-slider_sidebar.php:26
|
660 |
+
msgid "Not published yet."
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#: partials/edit-slider_sidebar.php:41
|
664 |
+
msgid "Update"
|
665 |
+
msgstr ""
|
666 |
+
|
667 |
+
#: partials/edit-slider_sidebar.php:51
|
668 |
+
msgid "Dimensions"
|
669 |
+
msgstr ""
|
670 |
+
|
671 |
+
#: partials/edit-slider_sidebar.php:64
|
672 |
+
msgid "Width:"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: partials/edit-slider_sidebar.php:70
|
676 |
+
msgid "Height:"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: partials/edit-slider_sidebar.php:74
|
680 |
+
msgid "Slideshow \"width\" and \"height\" values (in pixels)."
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: partials/edit-slider_sidebar.php:81
|
684 |
+
msgid "Make this slideshow responsive."
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
+
#: partials/edit-slider_sidebar.php:84
|
688 |
+
msgid ""
|
689 |
+
"Check this option to make this slideshow responsive. If enabled, the \"width"
|
690 |
+
"\" and \"height\" values above will act as maximums."
|
691 |
+
msgstr ""
|
692 |
+
|
693 |
+
#: partials/edit-slider_sidebar.php:100
|
694 |
+
msgid "Transitions"
|
695 |
+
msgstr ""
|
696 |
+
|
697 |
+
#: partials/edit-slider_sidebar.php:113
|
698 |
+
msgid "Effect:"
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: partials/edit-slider_sidebar.php:121
|
702 |
+
msgid "Choose the transition effect you would like to use."
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: partials/edit-slider_sidebar.php:128
|
706 |
+
msgid "Duration:"
|
707 |
+
msgstr ""
|
708 |
+
|
709 |
+
#: partials/edit-slider_sidebar.php:132
|
710 |
+
msgid "Sets the duration (in milliseconds) for the slideshow transition."
|
711 |
+
msgstr ""
|
712 |
+
|
713 |
+
#: partials/edit-slider_sidebar.php:160
|
714 |
+
msgid "Arrows:"
|
715 |
+
msgstr ""
|
716 |
+
|
717 |
+
#: partials/edit-slider_sidebar.php:170
|
718 |
+
msgid "Toggles the next and previous slide arrows."
|
719 |
+
msgstr ""
|
720 |
+
|
721 |
+
#: partials/edit-slider_sidebar.php:176 partials/edit-slider_sidebar.php:244
|
722 |
+
msgid "On Hover:"
|
723 |
+
msgstr ""
|
724 |
+
|
725 |
+
#: partials/edit-slider_sidebar.php:186
|
726 |
+
msgid ""
|
727 |
+
"Set to \"True\" to only show the arrows when the user hovers over the "
|
728 |
+
"slideshow."
|
729 |
+
msgstr ""
|
730 |
+
|
731 |
+
#: partials/edit-slider_sidebar.php:193 partials/edit-slider_sidebar.php:261
|
732 |
+
msgid "Position:"
|
733 |
+
msgstr ""
|
734 |
+
|
735 |
+
#: partials/edit-slider_sidebar.php:195 partials/edit-slider_sidebar.php:263
|
736 |
+
msgid "Inside"
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: partials/edit-slider_sidebar.php:196 partials/edit-slider_sidebar.php:264
|
740 |
+
msgid "Outside"
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: partials/edit-slider_sidebar.php:200
|
744 |
+
msgid "Select a position for the arrows."
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: partials/edit-slider_sidebar.php:228
|
748 |
+
msgid "Pagination:"
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: partials/edit-slider_sidebar.php:238
|
752 |
+
msgid ""
|
753 |
+
"Enable/Disable the Pagination Icons. Each icon represents a slide in their "
|
754 |
+
"respective order."
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: partials/edit-slider_sidebar.php:254
|
758 |
+
msgid ""
|
759 |
+
"Set to \"True\" to only show the pagination when the user hovers over the "
|
760 |
+
"slideshow."
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: partials/edit-slider_sidebar.php:267
|
764 |
+
msgid "Top Left"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: partials/edit-slider_sidebar.php:268
|
768 |
+
msgid "Top Right"
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: partials/edit-slider_sidebar.php:269
|
772 |
+
msgid "Top Center"
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: partials/edit-slider_sidebar.php:270
|
776 |
+
msgid "Bottom Left"
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: partials/edit-slider_sidebar.php:271
|
780 |
+
msgid "Bottom Right"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: partials/edit-slider_sidebar.php:272
|
784 |
+
msgid "Bottom Center"
|
785 |
+
msgstr ""
|
786 |
+
|
787 |
+
#: partials/edit-slider_sidebar.php:276
|
788 |
+
msgid "Select a position for the pagination icons."
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: partials/edit-slider_sidebar.php:292
|
792 |
+
msgid "Automatic Playback"
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: partials/edit-slider_sidebar.php:304
|
796 |
+
msgid "Playback:"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: partials/edit-slider_sidebar.php:314
|
800 |
+
msgid "Enable/Disable slideshow automatic playback."
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: partials/edit-slider_sidebar.php:321
|
804 |
+
msgid "Pause Duration:"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: partials/edit-slider_sidebar.php:325
|
808 |
+
msgid ""
|
809 |
+
"Sets the duration (in milliseconds) for the pause between slide transitions."
|
810 |
+
msgstr ""
|
811 |
+
|
812 |
+
#: partials/list-sliders.php:3
|
813 |
+
msgid "Sliders "
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: partials/list-sliders.php:9
|
817 |
+
#, php-format
|
818 |
+
msgid "Search results for “%s”"
|
819 |
+
msgstr ""
|
820 |
+
|
821 |
+
#: partials/list-sliders.php:27
|
822 |
+
msgid "Search Sliders"
|
823 |
+
msgstr ""
|
824 |
+
|
825 |
+
#: partials/welcome.php:2
|
826 |
+
#, php-format
|
827 |
+
msgid "Welcome to Easing Slider %s"
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#: partials/welcome.php:3
|
831 |
+
#, php-format
|
832 |
+
msgid ""
|
833 |
+
"Thank you for updating to the latest version! Easing Slider %s is ready to "
|
834 |
+
"help you create beautiful sliders easily, quickly and for free!"
|
835 |
+
msgstr ""
|
836 |
+
|
837 |
+
#: partials/welcome.php:4
|
838 |
+
#, php-format
|
839 |
+
msgid "Version %s"
|
840 |
+
msgstr ""
|
841 |
+
|
842 |
+
#: partials/welcome_about.php:2
|
843 |
+
msgid "Check out the awesome all new Easing Slider"
|
844 |
+
msgstr ""
|
845 |
+
|
846 |
+
#: partials/welcome_about.php:3
|
847 |
+
#, php-format
|
848 |
+
msgid ""
|
849 |
+
"We've completely rebuilt Easing Slider from the ground up to be a more "
|
850 |
+
"stable, modern, easy to use solution for creating sliders on your WordPress "
|
851 |
+
"blog. There's loads of new features, some of which described below. For more "
|
852 |
+
"information on the changes, <a href=\"%s\" target=\"_blank\">click here</a>."
|
853 |
+
msgstr ""
|
854 |
+
|
855 |
+
#: partials/welcome_about.php:9
|
856 |
+
msgid "List Screenshot"
|
857 |
+
msgstr ""
|
858 |
+
|
859 |
+
#: partials/welcome_about.php:10
|
860 |
+
msgid "Unlimited Sliders"
|
861 |
+
msgstr ""
|
862 |
+
|
863 |
+
#: partials/welcome_about.php:11
|
864 |
+
msgid ""
|
865 |
+
"Create as many sliders as you like, Easing Slider is no longer limited to "
|
866 |
+
"just one slider. We're now using our own custom post type, a significant "
|
867 |
+
"improvement for developers."
|
868 |
+
msgstr ""
|
869 |
+
|
870 |
+
#: partials/welcome_about.php:15
|
871 |
+
msgid "Interface Screenshot"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: partials/welcome_about.php:16
|
875 |
+
msgid "Simple Interface"
|
876 |
+
msgstr ""
|
877 |
+
|
878 |
+
#: partials/welcome_about.php:17
|
879 |
+
msgid ""
|
880 |
+
"The admin interface has been completely revamped to be easier, yet more "
|
881 |
+
"powerful. The new look admin is instantly familiar, similar in style to the "
|
882 |
+
"new WordPress Media Library."
|
883 |
+
msgstr ""
|
884 |
+
|
885 |
+
#: partials/welcome_about.php:24
|
886 |
+
msgid "Introducing Extensions"
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: partials/welcome_about.php:25
|
890 |
+
msgid ""
|
891 |
+
"A vast selection of extensions will soon be available, extending the "
|
892 |
+
"functionality of Easing Slider beyond what's ever been possible before. View "
|
893 |
+
"them <a href=\"admin.php?page=easingslider_discover_extensions\">here</a>."
|
894 |
+
msgstr ""
|
895 |
+
|
896 |
+
#: partials/welcome_about.php:29
|
897 |
+
msgid "CSS3 Animations"
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#: partials/welcome_about.php:30
|
901 |
+
msgid ""
|
902 |
+
"The plugin now relies entirely on modern CSS3 animations. This ensures "
|
903 |
+
"smooth transitions, with graceful fallbacks for older browsers."
|
904 |
+
msgstr ""
|
905 |
+
|
906 |
+
#: partials/welcome_about.php:34
|
907 |
+
msgid "Developer Friendly"
|
908 |
+
msgstr ""
|
909 |
+
|
910 |
+
#: partials/welcome_about.php:35
|
911 |
+
msgid ""
|
912 |
+
"Our entirely new infrastructure provides developers with more power than "
|
913 |
+
"ever. More actions, filters, and extensions bring unlimited potential."
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: partials/welcome_about.php:41
|
917 |
+
msgid "More to come"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#: partials/welcome_about.php:42
|
921 |
+
msgid ""
|
922 |
+
"This update is just the beginning - the future will bring even more "
|
923 |
+
"improvements to Easing Slider. We have plans for dozens of extensions "
|
924 |
+
"that'll extend functionality far beyond what was capable before, ensuring "
|
925 |
+
"Easing Slider remains the best slider plugin for WordPress."
|
926 |
+
msgstr ""
|
927 |
+
|
928 |
+
#: partials/welcome_about.php:46
|
929 |
+
msgid "Return to Easing Slider"
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: partials/welcome_credits.php:2
|
933 |
+
msgid "Want to contribute to Easing Slider? Here's how you can."
|
934 |
+
msgstr ""
|
935 |
+
|
936 |
+
#: partials/welcome_credits.php:6
|
937 |
+
#, php-format
|
938 |
+
msgid ""
|
939 |
+
"Until now, Easing Slider has been developed solely by <a href=\"%s\" target="
|
940 |
+
"\"_blank\">me</a>, Matthew Ruddy, but it's time for this to change."
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#: partials/welcome_credits.php:8
|
944 |
+
#, php-format
|
945 |
+
msgid ""
|
946 |
+
"Now, Easing Slider's official channel of development will be managed through "
|
947 |
+
"<a href=\"%s\" target=\"_blank\">Github</a>, where I hope to encourage "
|
948 |
+
"involvement from other developers who have a vision for Easing Slider as "
|
949 |
+
"strong as my own."
|
950 |
+
msgstr ""
|
951 |
+
|
952 |
+
#: partials/welcome_credits.php:10
|
953 |
+
#, php-format
|
954 |
+
msgid ""
|
955 |
+
"Whether you've encountered a simple bug and want to provide a fix, or you "
|
956 |
+
"wish to tackle some enhancements or new features, please don't hesitate to "
|
957 |
+
"<a href=\"%s\" target=\"_blank\">get involved</a>. Even if you can't code, "
|
958 |
+
"your feedback is greated appreciated and really important to us, so <a href="
|
959 |
+
"\"%s\" target=\"_blank\">get in touch</a>."
|
960 |
+
msgstr ""
|
961 |
+
|
962 |
+
#: partials/welcome_credits.php:12
|
963 |
+
#, php-format
|
964 |
+
msgid ""
|
965 |
+
"Hopefully soon this page will be vividly decorated with contributors %s."
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: partials/welcome_credits.php:15
|
969 |
+
msgid "Proudly Built By:"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: partials/welcome_credits.php:19 partials/welcome_credits.php:20
|
973 |
+
msgid "Matthew Ruddy"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: partials/welcome_credits.php:21
|
977 |
+
msgid "Just an average guy"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: partials/welcome_credits.php:26
|
981 |
+
msgid "Contribute on Github"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: partials/welcome_credits.php:27
|
985 |
+
msgid "Contact Us"
|
986 |
+
msgstr ""
|
987 |
+
|
988 |
+
#: partials/welcome_getting-started.php:2
|
989 |
+
msgid ""
|
990 |
+
"Use the tips below to get started using Easing Slider. It's super quick and "
|
991 |
+
"easy!"
|
992 |
+
msgstr ""
|
993 |
+
|
994 |
+
#: partials/welcome_getting-started.php:8
|
995 |
+
msgid "Creating Your First Slider"
|
996 |
+
msgstr ""
|
997 |
+
|
998 |
+
#: partials/welcome_getting-started.php:10
|
999 |
+
msgid "Sliders → Add New"
|
1000 |
+
msgstr ""
|
1001 |
+
|
1002 |
+
#: partials/welcome_getting-started.php:11
|
1003 |
+
msgid ""
|
1004 |
+
"The \"Sliders\" menu is your access point for all aspects of Easing Slider. "
|
1005 |
+
"Simply click \"Add New\" to create your first slider and start adding slides."
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: partials/welcome_getting-started.php:13
|
1009 |
+
msgid "Adding Slides"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: partials/welcome_getting-started.php:14
|
1013 |
+
#, php-format
|
1014 |
+
msgid ""
|
1015 |
+
"Click the \"Add Slides\" button to add image slides from the WordPress Media "
|
1016 |
+
"Library. Other slide types can be purchased from our vast array of "
|
1017 |
+
"extensions <a href=\"%s\">found here</a>."
|
1018 |
+
msgstr ""
|
1019 |
+
|
1020 |
+
#: partials/welcome_getting-started.php:18
|
1021 |
+
msgid "Welcome Screenshot"
|
1022 |
+
msgstr ""
|
1023 |
+
|
1024 |
+
#: partials/welcome_getting-started.php:25
|
1025 |
+
msgid "Displaying A Slider"
|
1026 |
+
msgstr ""
|
1027 |
+
|
1028 |
+
#: partials/welcome_getting-started.php:29
|
1029 |
+
msgid "Shortcode Screenshot"
|
1030 |
+
msgstr ""
|
1031 |
+
|
1032 |
+
#: partials/welcome_getting-started.php:30
|
1033 |
+
msgid "In a post"
|
1034 |
+
msgstr ""
|
1035 |
+
|
1036 |
+
#: partials/welcome_getting-started.php:36
|
1037 |
+
msgid "PHP Function Screenshot"
|
1038 |
+
msgstr ""
|
1039 |
+
|
1040 |
+
#: partials/welcome_getting-started.php:42
|
1041 |
+
msgid "Widget Screenshot"
|
1042 |
+
msgstr ""
|
1043 |
+
|
1044 |
+
#: partials/welcome_getting-started.php:51
|
1045 |
+
msgid "Need help?"
|
1046 |
+
msgstr ""
|
1047 |
+
|
1048 |
+
#: partials/welcome_getting-started.php:55
|
1049 |
+
msgid "Helpful Documentation"
|
1050 |
+
msgstr ""
|
1051 |
+
|
1052 |
+
#: partials/welcome_getting-started.php:56
|
1053 |
+
#, php-format
|
1054 |
+
msgid ""
|
1055 |
+
"We have documentation available covering everything from <a href=\"%s"
|
1056 |
+
"\">Getting Started</a> to our <a href=\"%s\">Developer API</a>. New "
|
1057 |
+
"documents and tutorials are added daily."
|
1058 |
+
msgstr ""
|
1059 |
+
|
1060 |
+
#: partials/welcome_getting-started.php:60
|
1061 |
+
msgid "Awesome Support"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: partials/welcome_getting-started.php:61
|
1065 |
+
#, php-format
|
1066 |
+
msgid ""
|
1067 |
+
"We work hard to ensure every user gets the best support possible. If you've "
|
1068 |
+
"encountered a problem or have a question, don't hesitate to <a href=\"%s"
|
1069 |
+
"\">contact us</a>."
|
1070 |
+
msgstr ""
|
languages/easingsliderlite-ar.mo
DELETED
Binary file
|
languages/easingsliderlite.pot
DELETED
@@ -1,660 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Easing Slider \"Lite\"\n"
|
4 |
-
"POT-Creation-Date: 2014-04-27 14:56-0000\n"
|
5 |
-
"PO-Revision-Date: 2014-04-27 14:56-0000\n"
|
6 |
-
"Last-Translator: \n"
|
7 |
-
"Language-Team: \n"
|
8 |
-
"Language: en_GB\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.6.4\n"
|
13 |
-
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
-
"X-Poedit-SearchPath-1: .\n"
|
19 |
-
|
20 |
-
#: ../easingsliderlite.php:392
|
21 |
-
msgid "Unknown"
|
22 |
-
msgstr ""
|
23 |
-
|
24 |
-
#: ../easingsliderlite.php:517 ../easingsliderlite.php:518
|
25 |
-
#: ../easingsliderlite.php:575 ../includes/Widget.php:19
|
26 |
-
msgid "Slideshow"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: ../easingsliderlite.php:528 ../easingsliderlite.php:529
|
30 |
-
#: ../easingsliderlite.php:585 ../templates/editslideshow.php:8
|
31 |
-
msgid "Edit Slideshow"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: ../easingsliderlite.php:536
|
35 |
-
msgid "Customizer"
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: ../easingsliderlite.php:537 ../easingsliderlite.php:593
|
39 |
-
msgid "Customize"
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: ../easingsliderlite.php:544 ../templates/editsettings.php:7
|
43 |
-
msgid "Edit Settings"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: ../easingsliderlite.php:545 ../easingsliderlite.php:601
|
47 |
-
msgid "Settings"
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: ../easingsliderlite.php:640 ../easingsliderlite.php:660
|
51 |
-
msgid "Add a slideshow"
|
52 |
-
msgstr ""
|
53 |
-
|
54 |
-
#: ../easingsliderlite.php:640
|
55 |
-
msgid " Add Slideshow"
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
-
#: ../easingsliderlite.php:660
|
59 |
-
msgid "Add Slideshow"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: ../easingsliderlite.php:733 ../easingsliderlite.php:769
|
63 |
-
#: ../easingsliderlite.php:817
|
64 |
-
msgid "Security check has failed. Save has been prevented. Please try again."
|
65 |
-
msgstr ""
|
66 |
-
|
67 |
-
#: ../easingsliderlite.php:751
|
68 |
-
msgid "Slideshow has been <strong>saved</strong> successfully."
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: ../easingsliderlite.php:799
|
72 |
-
msgid "Security check has failed. Reset has been prevented. Please try again."
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: ../easingsliderlite.php:808
|
76 |
-
msgid "Plugin has been reset successfully."
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: ../easingsliderlite.php:828
|
80 |
-
msgid "Settings have been <strong>saved</strong> successfully."
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: ../easingsliderlite.php:989
|
84 |
-
msgid "Are you sure you wish to do this? This cannot be reversed."
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: ../easingsliderlite.php:990
|
88 |
-
msgid "Are you sure you wish to delete this image? This cannot be reversed."
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: ../easingsliderlite.php:991
|
92 |
-
msgid ""
|
93 |
-
"Are you sure you wish to delete all of this slideshows images? This cannot "
|
94 |
-
"be reversed."
|
95 |
-
msgstr ""
|
96 |
-
|
97 |
-
#: ../easingsliderlite.php:993
|
98 |
-
msgid "Add Images to Slideshow"
|
99 |
-
msgstr ""
|
100 |
-
|
101 |
-
#: ../easingsliderlite.php:994
|
102 |
-
msgid "Insert into slideshow"
|
103 |
-
msgstr ""
|
104 |
-
|
105 |
-
#: ../easingsliderlite.php:995
|
106 |
-
msgid "Use this image"
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: ../easingsliderlite.php:996
|
110 |
-
msgid "Are you sure you wish to discard changes?"
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: ../includes/Legacy.php:129
|
114 |
-
msgid "Security check has failed. Import has been prevented. Please try again."
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: ../includes/Legacy.php:137
|
118 |
-
msgid "Easing Slider settings have been imported."
|
119 |
-
msgstr ""
|
120 |
-
|
121 |
-
#: ../includes/Legacy.php:155
|
122 |
-
msgid ""
|
123 |
-
"Security check has failed. Removal has been prevented. Please try again."
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
#: ../includes/Legacy.php:173
|
127 |
-
msgid "Easing Slider settings have been permanently deleted!"
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
#: ../includes/Legacy.php:193
|
131 |
-
msgid "Legacy Settings Detected"
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
#: ../includes/Legacy.php:195
|
135 |
-
msgid "Click the button below to import your settings from Easing Slider v1.x"
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: ../includes/Legacy.php:199
|
139 |
-
msgid "Import your old settings"
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: ../includes/Legacy.php:200
|
143 |
-
msgid "Import my v1.x Easing Slider settings."
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: ../includes/Legacy.php:219 ../includes/Legacy.php:228
|
147 |
-
msgid "Legacy Settings"
|
148 |
-
msgstr ""
|
149 |
-
|
150 |
-
#: ../includes/Legacy.php:230
|
151 |
-
msgid "Import v1.x Settings"
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
#: ../includes/Legacy.php:231
|
155 |
-
msgid "Remove v1.x Settings"
|
156 |
-
msgstr ""
|
157 |
-
|
158 |
-
#: ../includes/Legacy.php:232
|
159 |
-
msgid ""
|
160 |
-
"These buttons allow you to import and remove your old Easing Slider v1.x "
|
161 |
-
"settings. Only remove them if you are sure you will not be downgrading the "
|
162 |
-
"plugin in the future."
|
163 |
-
msgstr ""
|
164 |
-
|
165 |
-
#: ../includes/Resize.php:22
|
166 |
-
msgid "No image URL has been entered."
|
167 |
-
msgstr ""
|
168 |
-
|
169 |
-
#: ../includes/Widget.php:20
|
170 |
-
msgid "Display a slideshow using a widget"
|
171 |
-
msgstr ""
|
172 |
-
|
173 |
-
#: ../includes/Widget.php:71 ../templates/editslideshow-slide.php:33
|
174 |
-
msgid "Title"
|
175 |
-
msgstr ""
|
176 |
-
|
177 |
-
#: ../templates/customizer.php:32
|
178 |
-
msgid "Save"
|
179 |
-
msgstr ""
|
180 |
-
|
181 |
-
#: ../templates/customizer.php:34
|
182 |
-
msgid "Close"
|
183 |
-
msgstr ""
|
184 |
-
|
185 |
-
#: ../templates/customizer.php:40
|
186 |
-
msgid ""
|
187 |
-
"You are customizing <strong class=\"theme-name\">Easing Slider \"Lite\"</"
|
188 |
-
"strong>"
|
189 |
-
msgstr ""
|
190 |
-
|
191 |
-
#: ../templates/customizer.php:46 ../templates/editslideshow-sidebar.php:110
|
192 |
-
msgid "Next & Previous Arrows"
|
193 |
-
msgstr ""
|
194 |
-
|
195 |
-
#: ../templates/customizer.php:50
|
196 |
-
msgid "\"Next\" Arrow Image"
|
197 |
-
msgstr ""
|
198 |
-
|
199 |
-
#: ../templates/customizer.php:56
|
200 |
-
msgid "\"Previous\" Arrow Image"
|
201 |
-
msgstr ""
|
202 |
-
|
203 |
-
#: ../templates/customizer.php:62 ../templates/customizer.php:116
|
204 |
-
msgid "Width"
|
205 |
-
msgstr ""
|
206 |
-
|
207 |
-
#: ../templates/customizer.php:68
|
208 |
-
msgid "Height"
|
209 |
-
msgstr ""
|
210 |
-
|
211 |
-
#: ../templates/customizer.php:76 ../templates/editslideshow-sidebar.php:163
|
212 |
-
msgid "Pagination Icons"
|
213 |
-
msgstr ""
|
214 |
-
|
215 |
-
#: ../templates/customizer.php:80
|
216 |
-
msgid "\"Inactive\" Image"
|
217 |
-
msgstr ""
|
218 |
-
|
219 |
-
#: ../templates/customizer.php:86
|
220 |
-
msgid "\"Active\" Image"
|
221 |
-
msgstr ""
|
222 |
-
|
223 |
-
#: ../templates/customizer.php:92
|
224 |
-
msgid "Icon Width"
|
225 |
-
msgstr ""
|
226 |
-
|
227 |
-
#: ../templates/customizer.php:98
|
228 |
-
msgid "Icon Height"
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
#: ../templates/customizer.php:106
|
232 |
-
msgid "Border"
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
#: ../templates/customizer.php:110
|
236 |
-
msgid "Color"
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: ../templates/customizer.php:122
|
240 |
-
msgid "Radius"
|
241 |
-
msgstr ""
|
242 |
-
|
243 |
-
#: ../templates/customizer.php:131
|
244 |
-
msgid "Drop Shadow"
|
245 |
-
msgstr ""
|
246 |
-
|
247 |
-
#: ../templates/customizer.php:135
|
248 |
-
msgid "Display a Drop Shadow"
|
249 |
-
msgstr ""
|
250 |
-
|
251 |
-
#: ../templates/customizer.php:136 ../templates/editslideshow-sidebar.php:133
|
252 |
-
#: ../templates/editslideshow-sidebar.php:186
|
253 |
-
msgid "True"
|
254 |
-
msgstr ""
|
255 |
-
|
256 |
-
#: ../templates/customizer.php:137 ../templates/editslideshow-sidebar.php:136
|
257 |
-
#: ../templates/editslideshow-sidebar.php:189
|
258 |
-
msgid "False"
|
259 |
-
msgstr ""
|
260 |
-
|
261 |
-
#: ../templates/customizer.php:142
|
262 |
-
msgid "Shadow Image"
|
263 |
-
msgstr ""
|
264 |
-
|
265 |
-
#: ../templates/customizer.php:154
|
266 |
-
msgid "Collapse Sidebar"
|
267 |
-
msgstr ""
|
268 |
-
|
269 |
-
#: ../templates/customizer.php:156
|
270 |
-
msgid "Collapse"
|
271 |
-
msgstr ""
|
272 |
-
|
273 |
-
#: ../templates/editsettings.php:20
|
274 |
-
msgid "General Settings"
|
275 |
-
msgstr ""
|
276 |
-
|
277 |
-
#: ../templates/editsettings.php:24
|
278 |
-
msgid "Image Resizing"
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: ../templates/editsettings.php:27 ../templates/editslideshow-sidebar.php:118
|
282 |
-
#: ../templates/editslideshow-sidebar.php:171
|
283 |
-
#: ../templates/editslideshow-sidebar.php:232
|
284 |
-
msgid "Enable"
|
285 |
-
msgstr ""
|
286 |
-
|
287 |
-
#: ../templates/editsettings.php:30 ../templates/editslideshow-sidebar.php:121
|
288 |
-
#: ../templates/editslideshow-sidebar.php:174
|
289 |
-
#: ../templates/editslideshow-sidebar.php:235
|
290 |
-
msgid "Disable"
|
291 |
-
msgstr ""
|
292 |
-
|
293 |
-
#: ../templates/editsettings.php:32
|
294 |
-
msgid ""
|
295 |
-
"Enable or disable the plugins image resizing functionality. Disable this if "
|
296 |
-
"you do not want the slide images to be resized."
|
297 |
-
msgstr ""
|
298 |
-
|
299 |
-
#: ../templates/editsettings.php:37
|
300 |
-
msgid "Output JS"
|
301 |
-
msgstr ""
|
302 |
-
|
303 |
-
#: ../templates/editsettings.php:40 ../templates/editsettings.php:56
|
304 |
-
msgid "Header"
|
305 |
-
msgstr ""
|
306 |
-
|
307 |
-
#: ../templates/editsettings.php:43 ../templates/editsettings.php:59
|
308 |
-
msgid "Footer"
|
309 |
-
msgstr ""
|
310 |
-
|
311 |
-
#: ../templates/editsettings.php:46 ../templates/editsettings.php:62
|
312 |
-
msgid "Off"
|
313 |
-
msgstr ""
|
314 |
-
|
315 |
-
#: ../templates/editsettings.php:48
|
316 |
-
msgid ""
|
317 |
-
"Settings for Javascript output. Scripts loaded in the \"Footer\" are only "
|
318 |
-
"when they are needed. This decreases page loading times but is prone to "
|
319 |
-
"errors."
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#: ../templates/editsettings.php:53
|
323 |
-
msgid "Output CSS"
|
324 |
-
msgstr ""
|
325 |
-
|
326 |
-
#: ../templates/editsettings.php:64
|
327 |
-
msgid ""
|
328 |
-
"Settings for CSS output. Styles loaded in the \"Footer\" will invalidate the "
|
329 |
-
"HTML, but will prevent them from loading when not needed."
|
330 |
-
msgstr ""
|
331 |
-
|
332 |
-
#: ../templates/editsettings.php:72 ../templates/editsettings.php:78
|
333 |
-
msgid "Reset Plugin"
|
334 |
-
msgstr ""
|
335 |
-
|
336 |
-
#: ../templates/editsettings.php:76
|
337 |
-
msgid "Plugin Settings"
|
338 |
-
msgstr ""
|
339 |
-
|
340 |
-
#: ../templates/editsettings.php:79
|
341 |
-
msgid ""
|
342 |
-
"Click this button to reset the plugin to its default settings. This cannot "
|
343 |
-
"be reversed, so be sure before you do this!"
|
344 |
-
msgstr ""
|
345 |
-
|
346 |
-
#: ../templates/editsettings.php:87
|
347 |
-
msgid "Installation Settings"
|
348 |
-
msgstr ""
|
349 |
-
|
350 |
-
#: ../templates/editsettings.php:91
|
351 |
-
msgid "PHP Version"
|
352 |
-
msgstr ""
|
353 |
-
|
354 |
-
#: ../templates/editsettings.php:96
|
355 |
-
msgid "MySQL Version"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: ../templates/editsettings.php:101
|
359 |
-
msgid "WordPress Version"
|
360 |
-
msgstr ""
|
361 |
-
|
362 |
-
#: ../templates/editsettings.php:106
|
363 |
-
msgid "Plugin Version"
|
364 |
-
msgstr ""
|
365 |
-
|
366 |
-
#: ../templates/editsettings.php:120
|
367 |
-
msgid "Save Settings"
|
368 |
-
msgstr ""
|
369 |
-
|
370 |
-
#: ../templates/editslideshow-media-details.php:3
|
371 |
-
msgid "Image Details"
|
372 |
-
msgstr ""
|
373 |
-
|
374 |
-
#: ../templates/editslideshow-media-details.php:30
|
375 |
-
msgid "Edit Image"
|
376 |
-
msgstr ""
|
377 |
-
|
378 |
-
#: ../templates/editslideshow-media-details.php:31
|
379 |
-
msgid "Refresh"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: ../templates/editslideshow-media-details.php:36
|
383 |
-
msgid "Delete Permanently"
|
384 |
-
msgstr ""
|
385 |
-
|
386 |
-
#: ../templates/editslideshow-sidebar.php:4
|
387 |
-
msgid "Easing Slider, Go Pro!"
|
388 |
-
msgstr ""
|
389 |
-
|
390 |
-
#: ../templates/editslideshow-sidebar.php:10
|
391 |
-
msgid "Rocket Galleries for WordPress"
|
392 |
-
msgstr ""
|
393 |
-
|
394 |
-
#: ../templates/editslideshow-sidebar.php:19
|
395 |
-
msgid "Manage Slides"
|
396 |
-
msgstr ""
|
397 |
-
|
398 |
-
#: ../templates/editslideshow-sidebar.php:23
|
399 |
-
msgid "Add Images"
|
400 |
-
msgstr ""
|
401 |
-
|
402 |
-
#: ../templates/editslideshow-sidebar.php:24
|
403 |
-
msgid "Delete Images"
|
404 |
-
msgstr ""
|
405 |
-
|
406 |
-
#: ../templates/editslideshow-sidebar.php:30
|
407 |
-
msgid "Randomize the slideshow order."
|
408 |
-
msgstr ""
|
409 |
-
|
410 |
-
#: ../templates/editslideshow-sidebar.php:41
|
411 |
-
msgid "Dimensions"
|
412 |
-
msgstr ""
|
413 |
-
|
414 |
-
#: ../templates/editslideshow-sidebar.php:47
|
415 |
-
msgid "Width:"
|
416 |
-
msgstr ""
|
417 |
-
|
418 |
-
#: ../templates/editslideshow-sidebar.php:53
|
419 |
-
msgid "Height:"
|
420 |
-
msgstr ""
|
421 |
-
|
422 |
-
#: ../templates/editslideshow-sidebar.php:57
|
423 |
-
msgid "Slideshow \"width\" and \"height\" values (in pixels)."
|
424 |
-
msgstr ""
|
425 |
-
|
426 |
-
#: ../templates/editslideshow-sidebar.php:64
|
427 |
-
msgid "Make this slideshow responsive."
|
428 |
-
msgstr ""
|
429 |
-
|
430 |
-
#: ../templates/editslideshow-sidebar.php:67
|
431 |
-
msgid ""
|
432 |
-
"Check this option to make this slideshow responsive. If enabled, the \"width"
|
433 |
-
"\" and \"height\" values above will act as maximums."
|
434 |
-
msgstr ""
|
435 |
-
|
436 |
-
#: ../templates/editslideshow-sidebar.php:77
|
437 |
-
msgid "Transitions"
|
438 |
-
msgstr ""
|
439 |
-
|
440 |
-
#: ../templates/editslideshow-sidebar.php:83
|
441 |
-
msgid "Effect:"
|
442 |
-
msgstr ""
|
443 |
-
|
444 |
-
#: ../templates/editslideshow-sidebar.php:85
|
445 |
-
msgid "Slide"
|
446 |
-
msgstr ""
|
447 |
-
|
448 |
-
#: ../templates/editslideshow-sidebar.php:86
|
449 |
-
msgid "Fade"
|
450 |
-
msgstr ""
|
451 |
-
|
452 |
-
#: ../templates/editslideshow-sidebar.php:90
|
453 |
-
msgid "Choose the transition effect you would like to use."
|
454 |
-
msgstr ""
|
455 |
-
|
456 |
-
#: ../templates/editslideshow-sidebar.php:96
|
457 |
-
msgid "Duration:"
|
458 |
-
msgstr ""
|
459 |
-
|
460 |
-
#: ../templates/editslideshow-sidebar.php:100
|
461 |
-
msgid "Sets the duration (in milliseconds) for the slideshow transition."
|
462 |
-
msgstr ""
|
463 |
-
|
464 |
-
#: ../templates/editslideshow-sidebar.php:115
|
465 |
-
msgid "Arrows:"
|
466 |
-
msgstr ""
|
467 |
-
|
468 |
-
#: ../templates/editslideshow-sidebar.php:125
|
469 |
-
msgid "Toggles the next and previous slide arrows."
|
470 |
-
msgstr ""
|
471 |
-
|
472 |
-
#: ../templates/editslideshow-sidebar.php:130
|
473 |
-
#: ../templates/editslideshow-sidebar.php:183
|
474 |
-
msgid "On Hover:"
|
475 |
-
msgstr ""
|
476 |
-
|
477 |
-
#: ../templates/editslideshow-sidebar.php:140
|
478 |
-
msgid ""
|
479 |
-
"Set to \"True\" to only show the arrows when the user hovers over the "
|
480 |
-
"slideshow."
|
481 |
-
msgstr ""
|
482 |
-
|
483 |
-
#: ../templates/editslideshow-sidebar.php:146
|
484 |
-
#: ../templates/editslideshow-sidebar.php:199
|
485 |
-
msgid "Position:"
|
486 |
-
msgstr ""
|
487 |
-
|
488 |
-
#: ../templates/editslideshow-sidebar.php:148
|
489 |
-
#: ../templates/editslideshow-sidebar.php:201
|
490 |
-
msgid "Inside"
|
491 |
-
msgstr ""
|
492 |
-
|
493 |
-
#: ../templates/editslideshow-sidebar.php:149
|
494 |
-
#: ../templates/editslideshow-sidebar.php:202
|
495 |
-
msgid "Outside"
|
496 |
-
msgstr ""
|
497 |
-
|
498 |
-
#: ../templates/editslideshow-sidebar.php:153
|
499 |
-
msgid "Select a position for the arrows."
|
500 |
-
msgstr ""
|
501 |
-
|
502 |
-
#: ../templates/editslideshow-sidebar.php:168
|
503 |
-
msgid "Pagination:"
|
504 |
-
msgstr ""
|
505 |
-
|
506 |
-
#: ../templates/editslideshow-sidebar.php:178
|
507 |
-
msgid ""
|
508 |
-
"Enable/Disable the Pagination Icons. Each icon represents a slide in their "
|
509 |
-
"respective order."
|
510 |
-
msgstr ""
|
511 |
-
|
512 |
-
#: ../templates/editslideshow-sidebar.php:193
|
513 |
-
msgid ""
|
514 |
-
"Set to \"True\" to only show the pagination when the user hovers over the "
|
515 |
-
"slideshow."
|
516 |
-
msgstr ""
|
517 |
-
|
518 |
-
#: ../templates/editslideshow-sidebar.php:205
|
519 |
-
msgid "Top Left"
|
520 |
-
msgstr ""
|
521 |
-
|
522 |
-
#: ../templates/editslideshow-sidebar.php:206
|
523 |
-
msgid "Top Right"
|
524 |
-
msgstr ""
|
525 |
-
|
526 |
-
#: ../templates/editslideshow-sidebar.php:207
|
527 |
-
msgid "Top Center"
|
528 |
-
msgstr ""
|
529 |
-
|
530 |
-
#: ../templates/editslideshow-sidebar.php:208
|
531 |
-
msgid "Bottom Left"
|
532 |
-
msgstr ""
|
533 |
-
|
534 |
-
#: ../templates/editslideshow-sidebar.php:209
|
535 |
-
msgid "Bottom Right"
|
536 |
-
msgstr ""
|
537 |
-
|
538 |
-
#: ../templates/editslideshow-sidebar.php:210
|
539 |
-
msgid "Bottom Center"
|
540 |
-
msgstr ""
|
541 |
-
|
542 |
-
#: ../templates/editslideshow-sidebar.php:214
|
543 |
-
msgid "Select a position for the pagination icons."
|
544 |
-
msgstr ""
|
545 |
-
|
546 |
-
#: ../templates/editslideshow-sidebar.php:224
|
547 |
-
msgid "Automatic Playback"
|
548 |
-
msgstr ""
|
549 |
-
|
550 |
-
#: ../templates/editslideshow-sidebar.php:229
|
551 |
-
msgid "Playback:"
|
552 |
-
msgstr ""
|
553 |
-
|
554 |
-
#: ../templates/editslideshow-sidebar.php:239
|
555 |
-
msgid "Enable/Disable slideshow automatic playback."
|
556 |
-
msgstr ""
|
557 |
-
|
558 |
-
#: ../templates/editslideshow-sidebar.php:245
|
559 |
-
msgid "Pause Duration:"
|
560 |
-
msgstr ""
|
561 |
-
|
562 |
-
#: ../templates/editslideshow-sidebar.php:249
|
563 |
-
msgid ""
|
564 |
-
"Sets the duration (in milliseconds) for the pause between slide transitions."
|
565 |
-
msgstr ""
|
566 |
-
|
567 |
-
#: ../templates/editslideshow-slide.php:7
|
568 |
-
msgid "Edit a Slide: #{{ data.id }}"
|
569 |
-
msgstr ""
|
570 |
-
|
571 |
-
#: ../templates/editslideshow-slide.php:19
|
572 |
-
msgid "Change Image"
|
573 |
-
msgstr ""
|
574 |
-
|
575 |
-
#: ../templates/editslideshow-slide.php:23
|
576 |
-
msgid "Link URL"
|
577 |
-
msgstr ""
|
578 |
-
|
579 |
-
#: ../templates/editslideshow-slide.php:26
|
580 |
-
msgid "Open link same tab/window"
|
581 |
-
msgstr ""
|
582 |
-
|
583 |
-
#: ../templates/editslideshow-slide.php:27
|
584 |
-
msgid "Open link in new tab/window"
|
585 |
-
msgstr ""
|
586 |
-
|
587 |
-
#: ../templates/editslideshow-slide.php:29
|
588 |
-
msgid "Enter a URL to link this slide to another page."
|
589 |
-
msgstr ""
|
590 |
-
|
591 |
-
#: ../templates/editslideshow-slide.php:35
|
592 |
-
msgid "Enter a value for the image \"title\" attribute."
|
593 |
-
msgstr ""
|
594 |
-
|
595 |
-
#: ../templates/editslideshow-slide.php:39
|
596 |
-
msgid "Alt Text"
|
597 |
-
msgstr ""
|
598 |
-
|
599 |
-
#: ../templates/editslideshow-slide.php:41
|
600 |
-
msgid "Enter a value for the image \"alt\" text attribute."
|
601 |
-
msgstr ""
|
602 |
-
|
603 |
-
#: ../templates/editslideshow-slide.php:50
|
604 |
-
msgid "Apply Changes"
|
605 |
-
msgstr ""
|
606 |
-
|
607 |
-
#: ../templates/editslideshow-welcome.php:21
|
608 |
-
msgid "Dismiss"
|
609 |
-
msgstr ""
|
610 |
-
|
611 |
-
#: ../templates/editslideshow-welcome.php:23
|
612 |
-
msgid "Welcome to Easing Slider \"Lite\""
|
613 |
-
msgstr ""
|
614 |
-
|
615 |
-
#: ../templates/editslideshow-welcome.php:25
|
616 |
-
msgid ""
|
617 |
-
"Thanks for upgrading to Easing Slider \"Lite\". Here are some links to get "
|
618 |
-
"you clued up on the new plugin."
|
619 |
-
msgstr ""
|
620 |
-
|
621 |
-
#: ../templates/editslideshow-welcome.php:29
|
622 |
-
msgid "Get Started"
|
623 |
-
msgstr ""
|
624 |
-
|
625 |
-
#: ../templates/editslideshow-welcome.php:30
|
626 |
-
msgid "View the Documentation"
|
627 |
-
msgstr ""
|
628 |
-
|
629 |
-
#: ../templates/editslideshow-welcome.php:34
|
630 |
-
msgid "Need some help?"
|
631 |
-
msgstr ""
|
632 |
-
|
633 |
-
#: ../templates/editslideshow-welcome.php:36
|
634 |
-
msgid "Displaying a Slideshow"
|
635 |
-
msgstr ""
|
636 |
-
|
637 |
-
#: ../templates/editslideshow-welcome.php:37
|
638 |
-
msgid "Frequently Asked Questions"
|
639 |
-
msgstr ""
|
640 |
-
|
641 |
-
#: ../templates/editslideshow-welcome.php:38
|
642 |
-
msgid "Support Forums"
|
643 |
-
msgstr ""
|
644 |
-
|
645 |
-
#: ../templates/editslideshow.php:62
|
646 |
-
msgid "Save Slideshow"
|
647 |
-
msgstr ""
|
648 |
-
|
649 |
-
#: ../templates/slideshow.php:12
|
650 |
-
msgid ""
|
651 |
-
"<p style=\"background-color: #ffebe8; border: 1px solid #c00; border-radius: "
|
652 |
-
"4px; padding: 8px !important;\">The slideshow does not appear to exist. Oh "
|
653 |
-
"dear! Please try contacting support.</p>"
|
654 |
-
msgstr ""
|
655 |
-
|
656 |
-
#: ../templates/slideshow.php:19
|
657 |
-
msgid ""
|
658 |
-
"<p style=\"background-color: #ffebe8; border: 1px solid #c00; border-radius: "
|
659 |
-
"4px; padding: 8px !important;\">This slideshow contains no slides. Uh oh!"
|
660 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
partials/customizer.php
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="customize-container" class="customize-container">
|
2 |
+
<div class="wp-full-overlay expanded">
|
3 |
+
<form id="customize-controls" action="admin.php?page=<?php echo $page; if ( isset( $_GET['edit'] ) ) { echo "&edit={$_GET['edit']}"; } ?>" method="post" class="wrap wp-full-overlay-sidebar">
|
4 |
+
<div id="customize-header-actions" class="wp-full-overlay-header">
|
5 |
+
<input type="submit" name="save" id="save" class="button button-primary save" value="<?php _e( 'Save', 'easingslider' ); ?>" />
|
6 |
+
<span class="spinner"></span>
|
7 |
+
<a class="customize-controls-close" href="admin.php?page=easingslider_edit_sliders">
|
8 |
+
<span class="screen-reader-text"><?php _e( 'Close', 'easingslider' ); ?></span>
|
9 |
+
</a>
|
10 |
+
<span class="control-panel-back" tabindex="-1">
|
11 |
+
<span class="screen-reader-text"><?php _e( 'Back', 'easingslider' ); ?></span>
|
12 |
+
</span>
|
13 |
+
</div>
|
14 |
+
|
15 |
+
<div class="wp-full-overlay-sidebar-content" tabindex="-1">
|
16 |
+
<div id="customize-info" class="accordion-section customize-section">
|
17 |
+
<div class="accordion-section-title customize-section-title" aria-label="Theme Customizer Options" tabindex="0">
|
18 |
+
<span class="preview-notice"><?php printf( __( 'You are customizing <strong class="theme-name">%s</strong>', 'easingslider' ), $slider->post_title ); ?></span>
|
19 |
+
<p>
|
20 |
+
<span class="preview-notice"><?php _e( 'Change to another slider', 'easingslider' ); ?></span>
|
21 |
+
<select name="slider_id" id="change-slider" class="widefat">
|
22 |
+
<?php foreach ( $sliders as $_slider ) : ?>
|
23 |
+
<option value="<?php echo esc_attr( $_slider->ID ); ?>" <?php selected( $slider->ID, $_slider->ID ); ?>><?php echo esc_html( $_slider->post_title ); ?></option>
|
24 |
+
<?php endforeach; ?>
|
25 |
+
</select>
|
26 |
+
</p>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<div id="customize-theme-controls" class="accordion-container">
|
30 |
+
<ul>
|
31 |
+
<li class="control-section accordion-section customize-section">
|
32 |
+
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Next & Previous Arrows', 'easingslider' ); ?></h3>
|
33 |
+
<ul class="accordion-section-content customize-section-content">
|
34 |
+
<li class="customize-control customize-control-text">
|
35 |
+
<label>
|
36 |
+
<span class="customize-control-title"><?php _e( '"Next" Arrow Image', 'easingslider' ); ?></span>
|
37 |
+
<input type="text" name="arrows[next]" data-selector=".easingslider-next" data-property="background-image" value="<?php echo esc_attr( $slider->customizations->arrows->next ); ?>">
|
38 |
+
</label>
|
39 |
+
</li>
|
40 |
+
<li class="customize-control customize-control-text">
|
41 |
+
<label>
|
42 |
+
<span class="customize-control-title"><?php _e( '"Previous" Arrow Image', 'easingslider' ); ?></span>
|
43 |
+
<input type="text" name="arrows[prev]" data-selector=".easingslider-prev" data-property="background-image" value="<?php echo esc_attr( $slider->customizations->arrows->prev ); ?>">
|
44 |
+
</label>
|
45 |
+
</li>
|
46 |
+
<li class="customize-control customize-control-text">
|
47 |
+
<label>
|
48 |
+
<span class="customize-control-title"><?php _e( 'Width', 'easingslider' ); ?></span>
|
49 |
+
<input type="number" min="0" step="1" name="arrows[width]" style="width: 90%" data-selector=".easingslider-arrows" data-property="width" value="<?php echo esc_attr( $slider->customizations->arrows->width ); ?>"> px
|
50 |
+
</label>
|
51 |
+
</li>
|
52 |
+
<li class="customize-control customize-control-text">
|
53 |
+
<label>
|
54 |
+
<span class="customize-control-title"><?php _e( 'Height', 'easingslider' ); ?></span>
|
55 |
+
<input type="number" min="0" step="1" name="arrows[height]" style="width: 90%" data-selector=".easingslider-arrows" data-property="height" value="<?php echo esc_attr( $slider->customizations->arrows->height ); ?>"> px
|
56 |
+
</label>
|
57 |
+
</li>
|
58 |
+
</ul>
|
59 |
+
</li>
|
60 |
+
|
61 |
+
<li class="control-section accordion-section customize-section">
|
62 |
+
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Pagination Icons', 'easingslider' ); ?></h3>
|
63 |
+
<ul class="accordion-section-content customize-section-content">
|
64 |
+
<li class="customize-control customize-control-text">
|
65 |
+
<label>
|
66 |
+
<span class="customize-control-title"><?php _e( '"Inactive" Image', 'easingslider' ); ?></span>
|
67 |
+
<input type="text" name="pagination[inactive]" data-selector=".easingslider-icon" data-property="background-image" value="<?php echo esc_attr( $slider->customizations->pagination->inactive ); ?>">
|
68 |
+
</label>
|
69 |
+
</li>
|
70 |
+
<li class="customize-control customize-control-text">
|
71 |
+
<label>
|
72 |
+
<span class="customize-control-title"><?php _e( '"Active" Image', 'easingslider' ); ?></span>
|
73 |
+
<input type="text" name="pagination[active]" data-selector=".easingslider-icon.active" data-property="background-image" value="<?php echo esc_attr( $slider->customizations->pagination->active ); ?>">
|
74 |
+
</label>
|
75 |
+
</li>
|
76 |
+
<li class="customize-control customize-control-text">
|
77 |
+
<label>
|
78 |
+
<span class="customize-control-title"><?php _e( 'Icon Width', 'easingslider' ); ?></span>
|
79 |
+
<input type="number" min="0" step="1" name="pagination[width]" style="width: 90%" data-selector=".easingslider-icon" data-property="width" value="<?php echo esc_attr( $slider->customizations->pagination->width ); ?>"> px
|
80 |
+
</label>
|
81 |
+
</li>
|
82 |
+
<li class="customize-control customize-control-text">
|
83 |
+
<label>
|
84 |
+
<span class="customize-control-title"><?php _e( 'Icon Height', 'easingslider' ); ?></span>
|
85 |
+
<input type="number" min="0" step="1" name="pagination[height]" style="width: 90%" data-selector=".easingslider-icon" data-property="height" value="<?php echo esc_attr( $slider->customizations->pagination->height ); ?>"> px
|
86 |
+
</label>
|
87 |
+
</li>
|
88 |
+
</ul>
|
89 |
+
</li>
|
90 |
+
|
91 |
+
<li class="control-section accordion-section customize-section">
|
92 |
+
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Border', 'easingslider' ); ?></h3>
|
93 |
+
<ul class="accordion-section-content customize-section-content">
|
94 |
+
<li class="customize-control customize-control-text">
|
95 |
+
<label>
|
96 |
+
<span class="customize-control-title"><?php _e( 'Color', 'easingslider' ); ?></span>
|
97 |
+
<input type="text" name="border[color]" class="color-picker-hex" data-selector=".easingslider" data-property="border-color" data-default="#000" value="<?php echo esc_attr( $slider->customizations->border->color ); ?>">
|
98 |
+
</label>
|
99 |
+
</li>
|
100 |
+
<li class="customize-control customize-control-text">
|
101 |
+
<label>
|
102 |
+
<span class="customize-control-title"><?php _e( 'Width', 'easingslider' ); ?></span>
|
103 |
+
<input type="number" min="0" step="1" name="border[width]" style="width: 90%" data-selector=".easingslider" data-property="border-width" value="<?php echo esc_attr( $slider->customizations->border->width ); ?>"> px
|
104 |
+
</label>
|
105 |
+
</li>
|
106 |
+
<li class="customize-control customize-control-text">
|
107 |
+
<label>
|
108 |
+
<span class="customize-control-title"><?php _e( 'Radius', 'easingslider' ); ?></span>
|
109 |
+
<input type="number" min="0" step="1" name="border[radius]" style="width: 90%" data-selector=".easingslider" data-property="border-radius" value="<?php echo esc_attr( $slider->customizations->border->radius ); ?>"> px
|
110 |
+
</label>
|
111 |
+
</li>
|
112 |
+
</ul>
|
113 |
+
</li>
|
114 |
+
|
115 |
+
<li class="control-section accordion-section customize-section">
|
116 |
+
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Drop Shadow', 'easingslider' ); ?></h3>
|
117 |
+
<ul class="accordion-section-content customize-section-content">
|
118 |
+
<li class="customize-control customize-control-text">
|
119 |
+
<label>
|
120 |
+
<span class="customize-control-title"><?php _e( 'Display a Drop Shadow', 'easingslider' ); ?></span>
|
121 |
+
<label for="shadow-enabled-true"><input type="radio" name="shadow[enabled]" id="shadow-enabled-true" data-selector=".easingslider-shadow" data-property="display" value="true" style="margin: 0 3px 0 0;" <?php checked( $slider->customizations->shadow->enabled, true ); ?>><?php _e( 'True', 'easingslider' ); ?></label>
|
122 |
+
<label for="shadow-enabled-false"><input type="radio" name="shadow[enabled]" id="shadow-enabled-false" data-selector=".easingslider-shadow" data-property="display" value="false" style="margin: 0 3px 0 20px;" <?php checked( $slider->customizations->shadow->enabled, false ); ?>><?php _e( 'False', 'easingslider' ); ?></label>
|
123 |
+
</label>
|
124 |
+
</li>
|
125 |
+
<li class="customize-control customize-control-text">
|
126 |
+
<label>
|
127 |
+
<span class="customize-control-title"><?php _e( 'Shadow Image', 'easingslider' ); ?></span>
|
128 |
+
<input type="text" name="shadow[image]" data-selector=".easingslider-shadow img" data-property="src" value="<?php echo esc_attr( $slider->customizations->shadow->image ); ?>">
|
129 |
+
</label>
|
130 |
+
</li>
|
131 |
+
</ul>
|
132 |
+
</li>
|
133 |
+
</ul>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<div id="customize-footer-actions" class="wp-full-overlay-footer">
|
138 |
+
<a href="#" class="collapse-sidebar button-secondary" title="<?php _e( 'Collapse Sidebar', 'easingslider' ); ?>">
|
139 |
+
<span class="collapse-sidebar-arrow"></span>
|
140 |
+
<span class="collapse-sidebar-label"><?php _e( 'Collapse', 'easingslider' ); ?></span>
|
141 |
+
</a>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
<input type="hidden" name="id" value="<?php echo esc_attr( $slider->ID ); ?>">
|
145 |
+
<input type="hidden" name="customizations" id="customizations" value="">
|
146 |
+
<?php /** This ensures that the JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?>
|
147 |
+
<script type="text/javascript">document.getElementById('customizations').value = '<?php echo addslashes( json_encode( null ) ); ?>';</script>
|
148 |
+
</form>
|
149 |
+
|
150 |
+
<div id="customize-preview" class="wp-full-overlay-main" style="position: relative;">
|
151 |
+
<?php
|
152 |
+
/**
|
153 |
+
* Display the slider
|
154 |
+
*/
|
155 |
+
if ( function_exists( 'easingslider' ) ) {
|
156 |
+
easingslider( $slider->ID );
|
157 |
+
}
|
158 |
+
?>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
</div>
|
partials/discover-extensions.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<h2>
|
3 |
+
<?php _e( 'Extensions ', 'easingslider' ); ?>
|
4 |
+
|
5 |
+
<a href="http://easingslider.com/extensions" target="_blank" class="add-new-h2">
|
6 |
+
<?php _e( 'Browse All', 'easingslider' ); ?>
|
7 |
+
</a>
|
8 |
+
</h2>
|
9 |
+
|
10 |
+
<p><?php _e( 'These extensions provide additional functionality to Easing Slider.', 'easingslider' ); ?></p>
|
11 |
+
|
12 |
+
<?php foreach ( $extensions as $extension ) : ?>
|
13 |
+
<div class="extension">
|
14 |
+
<a href="<?php echo esc_attr( $extension->link ); ?>" title="<?php echo esc_attr( $extension->title ); ?>">
|
15 |
+
<img src="<?php echo esc_attr( $extension->image ); ?>" class="attachment-showcase wp-post-image" alt="<?php echo esc_attr( $extension->title ); ?>" title="<?php echo esc_attr( $extension->title ); ?>" />
|
16 |
+
</a>
|
17 |
+
<h3 class="extension-title"><?php echo esc_html( $extension->title ); ?></h3>
|
18 |
+
<p><?php echo esc_attr( $extension->content ); ?></p>
|
19 |
+
<a href="<?php echo esc_attr( $extension->link ); ?>" title="<?php echo esc_attr( $extension->title ); ?>" class="button-primary"><?php _e( 'Get this extension', 'easingslider' ); ?></a>
|
20 |
+
</div>
|
21 |
+
<?php endforeach; ?>
|
22 |
+
</div>
|
partials/edit-settings.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<h2 class="nav-tab-wrapper">
|
3 |
+
<?php foreach ( $tabs as $slug => $label ) : ?>
|
4 |
+
<a href="admin.php?page=<?php echo $page; ?>&tab=<?php echo esc_attr( $slug ); ?>" class="nav-tab <?php echo ( $current_tab == $slug ) ? 'nav-tab-active' : ''; ?>"><?php echo esc_html( $label ); ?></a>
|
5 |
+
<?php endforeach; ?>
|
6 |
+
</h2>
|
7 |
+
|
8 |
+
<form name="post" action="admin.php?page=<?php echo $page; ?>&tab=<?php echo $current_tab; ?>" method="post">
|
9 |
+
<?php
|
10 |
+
/**
|
11 |
+
* Security nonce field
|
12 |
+
*/
|
13 |
+
wp_nonce_field( 'save' );
|
14 |
+
?>
|
15 |
+
|
16 |
+
<div class="main-panel">
|
17 |
+
<?php
|
18 |
+
/**
|
19 |
+
* Before panel action
|
20 |
+
*/
|
21 |
+
do_action( "easingslider_before_{$current_tab}_settings", $settings );
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Load the appropriate tab subview, or trigger an action if otherwise.
|
25 |
+
* This approach allows extensions to add their own "Settings" panels.
|
26 |
+
*/
|
27 |
+
easingslider_partial_or_action( "edit-settings_{$current_tab}", $settings );
|
28 |
+
|
29 |
+
/**
|
30 |
+
* After panel action
|
31 |
+
*/
|
32 |
+
do_action( "easingslider_after_{$current_tab}_settings", $settings );
|
33 |
+
?>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<p class="submit">
|
37 |
+
<input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Settings', 'easingslider' ); ?>">
|
38 |
+
</p>
|
39 |
+
</form>
|
40 |
+
</div>
|
partials/edit-settings_general.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<table class="form-table">
|
2 |
+
<tbody>
|
3 |
+
<tr>
|
4 |
+
<th scope="row"><?php _e( 'Image Resizing', 'easingslider' ); ?></th>
|
5 |
+
<td>
|
6 |
+
<label for="image_resizing_true">
|
7 |
+
<input type="radio" name="settings[image_resizing]" id="image_resizing_true" value="true" <?php checked( $settings->image_resizing, true ); ?>>
|
8 |
+
<span><?php _e( 'Enable', 'easingslider' ); ?></span>
|
9 |
+
</label>
|
10 |
+
|
11 |
+
<label for="image_resizing_false">
|
12 |
+
<input type="radio" name="settings[image_resizing]" id="image_resizing_false" value="false" <?php checked( $settings->image_resizing, false ); ?>>
|
13 |
+
<span><?php _e( 'Disable', 'easingslider' ); ?></span>
|
14 |
+
</label>
|
15 |
+
|
16 |
+
<p class="description"><?php _e( 'Enable or disable the image resizing functionality. Disable this if you do not want the slide images to be resized.', 'easingslider' ); ?></p>
|
17 |
+
</td>
|
18 |
+
</tr>
|
19 |
+
</tbody>
|
20 |
+
</table>
|
21 |
+
|
22 |
+
<table class="form-table">
|
23 |
+
<tbody>
|
24 |
+
<tr>
|
25 |
+
<th scope="row"><?php _e( 'Asset Loading', 'easingslider' ); ?></th>
|
26 |
+
<td>
|
27 |
+
<label for="assets_header">
|
28 |
+
<input type="radio" name="settings[load_assets]" id="assets_header" value="header" <?php checked( $settings->load_assets, 'header' ); ?>>
|
29 |
+
<span><?php _e( 'Compatibility (header)', 'easingslider' ); ?></span>
|
30 |
+
</label>
|
31 |
+
|
32 |
+
<label for="assets_footer">
|
33 |
+
<input type="radio" name="settings[load_assets]" id="assets_footer" value="footer" <?php checked( $settings->load_assets, 'footer' ); ?>>
|
34 |
+
<span><?php _e( 'Optimized (footer)', 'easingslider' ); ?></span>
|
35 |
+
</label>
|
36 |
+
|
37 |
+
<p class="description"><?php _e( 'This option controls where the plugin\'s scripts and styling are loaded. "Compatibility" will load them in the page header, which is less performant but also less likely to suffer conflicts with other plugins. "Optimized" conditionally loads CSS and JS in the page footer, which is better for performance, but more likely to encounter errors. We recommend trying "Optimized" and reverting back if you encounter any issues.', 'easingslider' ); ?></p>
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
</tbody>
|
41 |
+
</table>
|
42 |
+
|
43 |
+
<hr><h3><?php _e( 'Data Settings', 'easingslider' ); ?></h3>
|
44 |
+
|
45 |
+
<table class="form-table">
|
46 |
+
<tbody>
|
47 |
+
<tr>
|
48 |
+
<th scope="row"><?php _e( 'Remove data on uninstall?', 'easingslider' ); ?></th>
|
49 |
+
<td>
|
50 |
+
<label for="remove_data">
|
51 |
+
<input type="hidden" name="settings[remove_data]" value="false">
|
52 |
+
<input type="checkbox" name="settings[remove_data]" id="remove_data" value="true" <?php checked( $settings->remove_data, true ); ?>>
|
53 |
+
<span style="display: inline;"><?php _e( 'Check this box if you would like Easing Slider to completely remove all of its data when the plugin is deleted.', 'easingslider' ); ?></span>
|
54 |
+
</label>
|
55 |
+
|
56 |
+
<p class="description"><?php _e( 'Be careful before enabling this option, as the data cannot be recovered once it has been deleted.', 'easingslider' ); ?></p>
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
</tbody>
|
60 |
+
</table>
|
61 |
+
|
62 |
+
<hr><h3><?php _e( 'Installation Settings', 'easingslider' ); ?></h3>
|
63 |
+
|
64 |
+
<table class="form-table">
|
65 |
+
<tbody>
|
66 |
+
<tr>
|
67 |
+
<th scope="row"><?php _e( 'PHP Version', 'easingslider' ); ?></th>
|
68 |
+
<td><?php echo phpversion(); ?></td>
|
69 |
+
</tr>
|
70 |
+
|
71 |
+
<tr>
|
72 |
+
<th scope="row"><?php _e( 'MySQL Version', 'easingslider' ); ?></th>
|
73 |
+
<td><?php global $wpdb; echo $wpdb->get_var( 'SELECT VERSION()' ); ?></td>
|
74 |
+
</tr>
|
75 |
+
|
76 |
+
<tr>
|
77 |
+
<th scope="row"><?php _e( 'WordPress Version', 'easingslider' ); ?></th>
|
78 |
+
<td><?php global $wp_version; echo $wp_version; ?></td>
|
79 |
+
</tr>
|
80 |
+
|
81 |
+
<tr>
|
82 |
+
<th scope="row"><?php _e( 'Plugin Version', 'easingslider' ); ?></th>
|
83 |
+
<td><?php echo Easing_Slider::$version; ?></td>
|
84 |
+
</tr>
|
85 |
+
</tbody>
|
86 |
+
</table>
|
partials/edit-settings_licenses.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p style="padding-top: 10px;"><?php printf( __( 'Below you can register your extension licenses. This is required to enable extension updates. You can browse all available extensions <a href="%s">here</a>.', 'easingslider' ), admin_url( 'admin.php?page=easingslider_discover_extensions' ) ); ?></p>
|
2 |
+
|
3 |
+
<table class="form-table">
|
4 |
+
<tbody>
|
5 |
+
<?php
|
6 |
+
/**
|
7 |
+
* Print license settings fields
|
8 |
+
*/
|
9 |
+
do_action( 'easingslider_print_license_fields' );
|
10 |
+
?>
|
11 |
+
</tbody>
|
12 |
+
</table>
|
partials/edit-slider.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<form id="slider" name="slider" action="admin.php?page=<?php echo $page; if ( isset( $_GET['edit'] ) ) { echo "&edit={$_GET['edit']}"; } ?>" method="post">
|
3 |
+
<?php
|
4 |
+
/**
|
5 |
+
* Security nonce field
|
6 |
+
*/
|
7 |
+
wp_nonce_field( 'save' );
|
8 |
+
?>
|
9 |
+
|
10 |
+
<h2>
|
11 |
+
<?php if ( isset( $_GET['edit'] ) ) : ?>
|
12 |
+
<?php _e( 'Edit Slider', 'easingslider' ); ?>
|
13 |
+
<a href="admin.php?page=easingslider_publish_slider" class="add-new-h2"><?php _e( 'Add New', 'easingslider' ); ?></a>
|
14 |
+
<?php else : ?>
|
15 |
+
<?php _e( 'Add New Slider', 'easingslider' ); ?>
|
16 |
+
<?php endif; ?>
|
17 |
+
</h2>
|
18 |
+
|
19 |
+
<div class="clearfix">
|
20 |
+
<div class="toolbar-container">
|
21 |
+
<div class="media-toolbar wp-filter">
|
22 |
+
<div class="media-toolbar-secondary title-form">
|
23 |
+
<label for="post_title"><?php _e( 'Name:', 'easingslider' ); ?></label>
|
24 |
+
<input type="text" name="post_title" id="post_title" autocomplete="off" placeholder="<?php _e( 'Enter a slider name', 'easingslider' ); ?>" value="<?php echo esc_attr( $slider->post_title ); ?>">
|
25 |
+
<a href="#" id="select-all" class="button media-button button-large hidden"><?php _e( 'Select All', 'easingslider' ); ?></a>
|
26 |
+
</div>
|
27 |
+
|
28 |
+
<div class="media-toolbar-primary">
|
29 |
+
<label for="randomize" class="randomize">
|
30 |
+
<input type="hidden" name="general[randomize]" value="false">
|
31 |
+
<input type="checkbox" id="randomize" name="general[randomize]" value="true" <?php checked( $slider->general->randomize, true ); ?>><span style="display: inline;"><?php _e( 'Randomize the slide order', 'easingslider' ); ?></span>
|
32 |
+
</label>
|
33 |
+
<a href="#" id="add-slides" class="button media-button button-primary button-large"><?php _e( 'Add Slides', 'easingslider' ); ?></a>
|
34 |
+
<a href="#" id="bulk-select" class="button media-button button-large select-mode-toggle-button"><?php _e( 'Bulk Select', 'easingslider' ); ?></a>
|
35 |
+
<a href="#" id="cancel-select" class="button media-button button-large select-mode-toggle-button hidden"><?php _e( 'Cancel Selection', 'easingslider' ); ?></a>
|
36 |
+
<a href="#" id="delete-slides" class="button media-button button-primary button-large hidden"><?php _e( 'Delete Selected', 'easingslider' ); ?></a>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<div class="settings-container">
|
42 |
+
<?php
|
43 |
+
/**
|
44 |
+
* Keep our settings sidebar in a separate file for clarity. Woohoo!
|
45 |
+
*/
|
46 |
+
require 'edit-slider_sidebar.php';
|
47 |
+
?>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<div class="slides-container">
|
51 |
+
<div class="media-frame wp-core-ui mode-grid hide-menu">
|
52 |
+
<div class="media-frame-content" data-columns="5">
|
53 |
+
<div id="slides-browser" class="attachments-browser hide-sidebar">
|
54 |
+
<?php
|
55 |
+
/**
|
56 |
+
* Slides are dynamically added using Backbone.js here.
|
57 |
+
*/
|
58 |
+
?>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
|
65 |
+
<?php
|
66 |
+
/**
|
67 |
+
* This ensures that the slide's JSON is encoded correctly.
|
68 |
+
* Using PHP JSON encode can cause magic quote issues.
|
69 |
+
*/
|
70 |
+
?>
|
71 |
+
<script type="text/javascript">var slides = '<?php echo addslashes( json_encode( $slider->slides ) ); ?>';</script>
|
72 |
+
</form>
|
73 |
+
</div>
|
partials/edit-slider_sidebar.php
ADDED
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Allow for additional boxes
|
4 |
+
*/
|
5 |
+
do_action( 'easingslider_before_edit_slider_sidebar', $slider );
|
6 |
+
?>
|
7 |
+
|
8 |
+
<!-- Publish -->
|
9 |
+
<div class="widgets-holder-wrap fixed">
|
10 |
+
<div class="sidebar-name">
|
11 |
+
<h3><?php _e( 'Publish', 'easingslider' ); ?></h3>
|
12 |
+
</div>
|
13 |
+
<div class="sidebar-content widgets-sortables clearfix">
|
14 |
+
<?php
|
15 |
+
/**
|
16 |
+
* Allow for additional options
|
17 |
+
*/
|
18 |
+
do_action( 'easingslider_publish_metabox_top', $slider );
|
19 |
+
?>
|
20 |
+
|
21 |
+
<div class="misc-pub-section curtime misc-pub-curtime">
|
22 |
+
<span id="timestamp">
|
23 |
+
<?php if ( ! empty( $slider->ID ) ) : ?>
|
24 |
+
<?php printf( __( 'Published on: <b>%s</b>', 'easingslider' ), date( 'M j, Y @ G:i', strtotime( $slider->post_date ) ) ); ?>
|
25 |
+
<?php else : ?>
|
26 |
+
<?php printf( __( 'Not published yet.', 'easingslider' ) ); ?>
|
27 |
+
<?php endif; ?>
|
28 |
+
</span>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
<?php
|
32 |
+
/**
|
33 |
+
* Allow for additional options
|
34 |
+
*/
|
35 |
+
do_action( 'easingslider_publish_metabox_bottom', $slider );
|
36 |
+
?>
|
37 |
+
</div>
|
38 |
+
<div id="major-publishing-actions">
|
39 |
+
<div id="publishing-action">
|
40 |
+
<span class="spinner"></span>
|
41 |
+
<input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" disabled="disabled" value="<?php _e( 'Update', 'easingslider' ); ?>">
|
42 |
+
</div>
|
43 |
+
<div class="clear"></div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<!-- Dimensions -->
|
48 |
+
<div class="widgets-holder-wrap">
|
49 |
+
<div class="sidebar-name">
|
50 |
+
<div class="sidebar-name-arrow"></div>
|
51 |
+
<h3><?php _e( 'Dimensions', 'easingslider' ); ?></h3>
|
52 |
+
</div>
|
53 |
+
<div class="sidebar-content widgets-sortables clearfix">
|
54 |
+
<?php
|
55 |
+
/**
|
56 |
+
* Allow for additional options
|
57 |
+
*/
|
58 |
+
do_action( 'easingslider_dimensions_metabox_top', $slider );
|
59 |
+
?>
|
60 |
+
|
61 |
+
<div class="dimension-settings">
|
62 |
+
<div class="field half">
|
63 |
+
<label for="width">
|
64 |
+
<span><?php _e( 'Width:', 'easingslider' ); ?></span>
|
65 |
+
<input type="number" name="dimensions[width]" id="width" value="<?php echo esc_attr( $slider->dimensions->width ); ?>">
|
66 |
+
</label>
|
67 |
+
</div>
|
68 |
+
<div class="field half">
|
69 |
+
<label for="height">
|
70 |
+
<span><?php _e( 'Height:', 'easingslider' ); ?></span>
|
71 |
+
<input type="number" name="dimensions[height]" id="height" value="<?php echo esc_attr( $slider->dimensions->height ); ?>">
|
72 |
+
</label>
|
73 |
+
</div>
|
74 |
+
<p class="description"><?php _e( 'Slideshow "width" and "height" values (in pixels).', 'easingslider' ); ?></p>
|
75 |
+
</div>
|
76 |
+
|
77 |
+
<div>
|
78 |
+
<div class="field">
|
79 |
+
<label for="responsive">
|
80 |
+
<input type="hidden" name="dimensions[responsive]" value="false">
|
81 |
+
<input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $slider->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this slideshow responsive.', 'easingslider' ); ?></span>
|
82 |
+
</label>
|
83 |
+
</div>
|
84 |
+
<p class="description"><?php _e( 'Check this option to make this slideshow responsive. If enabled, the "width" and "height" values above will act as maximums.', 'easingslider' ); ?></p>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<?php
|
88 |
+
/**
|
89 |
+
* Allow for additional options
|
90 |
+
*/
|
91 |
+
do_action( 'easingslider_dimensions_metabox_bottom', $slider );
|
92 |
+
?>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<!-- Transitions -->
|
97 |
+
<div class="widgets-holder-wrap closed">
|
98 |
+
<div class="sidebar-name">
|
99 |
+
<div class="sidebar-name-arrow"></div>
|
100 |
+
<h3><?php _e( 'Transitions', 'easingslider' ); ?></h3>
|
101 |
+
</div>
|
102 |
+
<div class="sidebar-content widgets-sortables clearfix" style="display: none;">
|
103 |
+
<?php
|
104 |
+
/**
|
105 |
+
* Allow for additional options
|
106 |
+
*/
|
107 |
+
do_action( 'easingslider_transitions_metabox_top', $slider );
|
108 |
+
?>
|
109 |
+
|
110 |
+
<div>
|
111 |
+
<div class="field">
|
112 |
+
<label for="effect">
|
113 |
+
<span><?php _e( 'Effect:', 'easingslider' ); ?></span>
|
114 |
+
<select name="transitions[effect]" id="effect">
|
115 |
+
<?php foreach ( $slider->get_transitions() as $transition => $label ) : ?>
|
116 |
+
<option value="<?php echo esc_attr( $transition ); ?>" <?php selected( $slider->transitions->effect, $transition ); ?>><?php echo esc_html( $label ); ?></option>
|
117 |
+
<?php endforeach; ?>
|
118 |
+
</select>
|
119 |
+
</label>
|
120 |
+
</div>
|
121 |
+
<p class="description"><?php _e( 'Choose the transition effect you would like to use.', 'easingslider' ); ?></p>
|
122 |
+
</div>
|
123 |
+
<div class="divider"></div>
|
124 |
+
|
125 |
+
<div>
|
126 |
+
<div class="field">
|
127 |
+
<label for="duration">
|
128 |
+
<span><?php _e( 'Duration:', 'easingslider' ); ?></span>
|
129 |
+
<input type="number" name="transitions[duration]" id="duration" value="<?php echo esc_attr( $slider->transitions->duration ); ?>">
|
130 |
+
</label>
|
131 |
+
</div>
|
132 |
+
<p class="description"><?php _e( 'Sets the duration (in milliseconds) for the slideshow transition.', 'easingslider' ); ?></p>
|
133 |
+
</div>
|
134 |
+
|
135 |
+
<?php
|
136 |
+
/**
|
137 |
+
* Allow for additional options
|
138 |
+
*/
|
139 |
+
do_action( 'easingslider_transitions_metabox_bottom', $slider );
|
140 |
+
?>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
<!-- Next & Previous Arrows -->
|
145 |
+
<div class="widgets-holder-wrap closed">
|
146 |
+
<div class="sidebar-name">
|
147 |
+
<div class="sidebar-name-arrow"></div>
|
148 |
+
<h3><?php _e( 'Next & Previous Arrows', 'easingslider' ); ?></h3>
|
149 |
+
</div>
|
150 |
+
<div class="sidebar-content widgets-sortables" style="display: none;">
|
151 |
+
<?php
|
152 |
+
/**
|
153 |
+
* Allow for additional options
|
154 |
+
*/
|
155 |
+
do_action( 'easingslider_arrows_metabox_top', $slider );
|
156 |
+
?>
|
157 |
+
|
158 |
+
<div>
|
159 |
+
<div class="radio clearfix">
|
160 |
+
<span><?php _e( 'Arrows:', 'easingslider' ); ?></span>
|
161 |
+
<div class="buttons">
|
162 |
+
<label for="arrows-enable"><input type="radio" name="navigation[arrows]" id="arrows-enable" value="true" <?php checked( $slider->navigation->arrows, true ); ?>>
|
163 |
+
<span><?php _e( 'Enable', 'easingslider' ); ?></span>
|
164 |
+
</label>
|
165 |
+
<label for="arrows-disable"><input type="radio" name="navigation[arrows]" id="arrows-disable" value="false" <?php checked( $slider->navigation->arrows, false ); ?>>
|
166 |
+
<span><?php _e( 'Disable', 'easingslider' ); ?></span>
|
167 |
+
</label>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
<p class="description"><?php _e( 'Toggles the next and previous slide arrows.', 'easingslider' ); ?></p>
|
171 |
+
</div>
|
172 |
+
<div class="divider"></div>
|
173 |
+
|
174 |
+
<div>
|
175 |
+
<div class="radio clearfix">
|
176 |
+
<span><?php _e( 'On Hover:', 'easingslider' ); ?></span>
|
177 |
+
<div class="buttons">
|
178 |
+
<label for="arrows-hover-true"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-true" value="true" <?php checked( $slider->navigation->arrows_hover, true ); ?>>
|
179 |
+
<span><?php _e( 'True', 'easingslider' ); ?></span>
|
180 |
+
</label>
|
181 |
+
<label for="arrows-hover-false"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-false" value="false" <?php checked( $slider->navigation->arrows_hover, false ); ?>>
|
182 |
+
<span><?php _e( 'False', 'easingslider' ); ?></span>
|
183 |
+
</label>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
<p class="description"><?php _e( 'Set to "True" to only show the arrows when the user hovers over the slideshow.', 'easingslider' ); ?></p>
|
187 |
+
</div>
|
188 |
+
<div class="divider"></div>
|
189 |
+
|
190 |
+
<div>
|
191 |
+
<div class="field">
|
192 |
+
<label for="arrows_position">
|
193 |
+
<span><?php _e( 'Position:', 'easingslider' ); ?></span>
|
194 |
+
<select name="navigation[arrows_position]" id="arrows_position">
|
195 |
+
<option value="inside" <?php selected( $slider->navigation->arrows_position, 'inside' ); ?>><?php _e( 'Inside', 'easingslider' ); ?></option>
|
196 |
+
<option value="outside" <?php selected( $slider->navigation->arrows_position, 'outside' ); ?>><?php _e( 'Outside', 'easingslider' ); ?></option>
|
197 |
+
</select>
|
198 |
+
</label>
|
199 |
+
</div>
|
200 |
+
<p class="description"><?php _e( 'Select a position for the arrows.', 'easingslider' ); ?></p>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
<?php
|
204 |
+
/**
|
205 |
+
* Allow for additional options
|
206 |
+
*/
|
207 |
+
do_action( 'easingslider_arrows_metabox_bottom', $slider );
|
208 |
+
?>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<!-- Pagination Icons -->
|
213 |
+
<div class="widgets-holder-wrap closed">
|
214 |
+
<div class="sidebar-name">
|
215 |
+
<div class="sidebar-name-arrow"></div>
|
216 |
+
<h3><?php _e( 'Pagination Icons', 'easingslider' ); ?></h3>
|
217 |
+
</div>
|
218 |
+
<div class="sidebar-content widgets-sortables" style="display: none;">
|
219 |
+
<?php
|
220 |
+
/**
|
221 |
+
* Allow for additional options
|
222 |
+
*/
|
223 |
+
do_action( 'easingslider_pagination_metabox_top', $slider );
|
224 |
+
?>
|
225 |
+
|
226 |
+
<div>
|
227 |
+
<div class="radio clearfix">
|
228 |
+
<span><?php _e( 'Pagination:', 'easingslider' ); ?></span>
|
229 |
+
<div class="buttons">
|
230 |
+
<label for="pagination-enable"><input type="radio" name="navigation[pagination]" id="pagination-enable" value="true" <?php checked( $slider->navigation->pagination, true ); ?>>
|
231 |
+
<span><?php _e( 'Enable', 'easingslider' ); ?></span>
|
232 |
+
</label>
|
233 |
+
<label for="pagination-disable"><input type="radio" name="navigation[pagination]" id="pagination-disable" value="false" <?php checked( $slider->navigation->pagination, false ); ?>>
|
234 |
+
<span><?php _e( 'Disable', 'easingslider' ); ?></span>
|
235 |
+
</label>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
<p class="description"><?php _e( 'Enable/Disable the Pagination Icons. Each icon represents a slide in their respective order.', 'easingslider' ); ?></p>
|
239 |
+
</div>
|
240 |
+
<div class="divider"></div>
|
241 |
+
|
242 |
+
<div>
|
243 |
+
<div class="radio clearfix">
|
244 |
+
<span><?php _e( 'On Hover:', 'easingslider' ); ?></span>
|
245 |
+
<div class="buttons">
|
246 |
+
<label for="pagination-hover-true"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-true" value="true" <?php checked( $slider->navigation->pagination_hover, true ); ?>>
|
247 |
+
<span><?php _e( 'True', 'easingslider' ); ?></span>
|
248 |
+
</label>
|
249 |
+
<label for="pagination-hover-false"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-false" value="false" <?php checked( $slider->navigation->pagination_hover, false ); ?>>
|
250 |
+
<span><?php _e( 'False', 'easingslider' ); ?></span>
|
251 |
+
</label>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
+
<p class="description"><?php _e( 'Set to "True" to only show the pagination when the user hovers over the slideshow.', 'easingslider' ); ?></p>
|
255 |
+
</div>
|
256 |
+
<div class="divider"></div>
|
257 |
+
|
258 |
+
<div>
|
259 |
+
<div class="field">
|
260 |
+
<label for="pagination_position">
|
261 |
+
<span><?php _e( 'Position:', 'easingslider' ); ?></span>
|
262 |
+
<select name="navigation[pagination_position]" id="pagination_position" style="width: 45%; float: left;">
|
263 |
+
<option value="inside" <?php selected( $slider->navigation->pagination_position, 'inside' ); ?>><?php _e( 'Inside', 'easingslider' ); ?></option>
|
264 |
+
<option value="outside" <?php selected( $slider->navigation->pagination_position, 'outside' ); ?>><?php _e( 'Outside', 'easingslider' ); ?></option>
|
265 |
+
</select>
|
266 |
+
<select name="navigation[pagination_location]" id="pagination_location" style="width: 45%; float: left; margin-left: 10px;">
|
267 |
+
<option value="top-left" <?php selected( $slider->navigation->pagination_location, 'top-left' ); ?>><?php _e( 'Top Left', 'easingslider' ); ?></option>
|
268 |
+
<option value="top-right" <?php selected( $slider->navigation->pagination_location, 'top-right' ); ?>><?php _e( 'Top Right', 'easingslider' ); ?></option>
|
269 |
+
<option value="top-center" <?php selected( $slider->navigation->pagination_location, 'top-center' ); ?>><?php _e( 'Top Center', 'easingslider' ); ?></option>
|
270 |
+
<option value="bottom-left" <?php selected( $slider->navigation->pagination_location, 'bottom-left' ); ?>><?php _e( 'Bottom Left', 'easingslider' ); ?></option>
|
271 |
+
<option value="bottom-right" <?php selected( $slider->navigation->pagination_location, 'bottom-right' ); ?>><?php _e( 'Bottom Right', 'easingslider' ); ?></option>
|
272 |
+
<option value="bottom-center" <?php selected( $slider->navigation->pagination_location, 'bottom-center' ); ?>><?php _e( 'Bottom Center', 'easingslider' ); ?></option>
|
273 |
+
</select>
|
274 |
+
</label>
|
275 |
+
</div>
|
276 |
+
<p class="description"><?php _e( 'Select a position for the pagination icons.', 'easingslider' ); ?></p>
|
277 |
+
</div>
|
278 |
+
|
279 |
+
<?php
|
280 |
+
/**
|
281 |
+
* Allow for additional options
|
282 |
+
*/
|
283 |
+
do_action( 'easingslider_pagination_metabox_bottom', $slider );
|
284 |
+
?>
|
285 |
+
</div>
|
286 |
+
</div>
|
287 |
+
|
288 |
+
<!-- Playback -->
|
289 |
+
<div class="widgets-holder-wrap closed">
|
290 |
+
<div class="sidebar-name">
|
291 |
+
<div class="sidebar-name-arrow"></div>
|
292 |
+
<h3><?php _e( 'Automatic Playback', 'easingslider' ); ?></h3>
|
293 |
+
</div>
|
294 |
+
<div class="sidebar-content widgets-sortables" style="display: none;">
|
295 |
+
<?php
|
296 |
+
/**
|
297 |
+
* Allow for additional options
|
298 |
+
*/
|
299 |
+
do_action( 'easingslider_playback_metabox_top', $slider );
|
300 |
+
?>
|
301 |
+
|
302 |
+
<div>
|
303 |
+
<div class="radio clearfix">
|
304 |
+
<span><?php _e( 'Playback:', 'easingslider' ); ?></span>
|
305 |
+
<div class="buttons">
|
306 |
+
<label for="playback-enable"><input type="radio" name="playback[enabled]" id="playback-enable" value="true" <?php checked( $slider->playback->enabled, true ); ?>>
|
307 |
+
<span><?php _e( 'Enable', 'easingslider' ); ?></span>
|
308 |
+
</label>
|
309 |
+
<label for="playback-disable"><input type="radio" name="playback[enabled]" id="playback-disable" value="false" <?php checked( $slider->playback->enabled, false ); ?>>
|
310 |
+
<span><?php _e( 'Disable', 'easingslider' ); ?></span>
|
311 |
+
</label>
|
312 |
+
</div>
|
313 |
+
</div>
|
314 |
+
<p class="description"><?php _e( 'Enable/Disable slideshow automatic playback.', 'easingslider' ); ?></p>
|
315 |
+
</div>
|
316 |
+
<div class="divider"></div>
|
317 |
+
|
318 |
+
<div>
|
319 |
+
<div class="field">
|
320 |
+
<label for="playback_pause">
|
321 |
+
<span><?php _e( 'Pause Duration:', 'easingslider' ); ?></span>
|
322 |
+
<input type="number" name="playback[pause]" id="playback_pause" value="<?php echo esc_attr( $slider->playback->pause ); ?>">
|
323 |
+
</label>
|
324 |
+
</div>
|
325 |
+
<p class="description"><?php _e( 'Sets the duration (in milliseconds) for the pause between slide transitions.', 'easingslider' ); ?></p>
|
326 |
+
</div>
|
327 |
+
|
328 |
+
<?php
|
329 |
+
/**
|
330 |
+
* Allow for additional options
|
331 |
+
*/
|
332 |
+
do_action( 'easingslider_playback_metabox_bottom', $slider );
|
333 |
+
?>
|
334 |
+
</div>
|
335 |
+
</div>
|
336 |
+
|
337 |
+
<?php
|
338 |
+
/**
|
339 |
+
* Allow for additional boxes
|
340 |
+
*/
|
341 |
+
do_action( 'easingslider_after_edit_slider_sidebar', $slider );
|
342 |
+
?>
|
partials/list-sliders.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
<h2>
|
3 |
+
<?php _e( 'Sliders ', 'easingslider' ); ?>
|
4 |
+
<a href="admin.php?page=easingslider_publish_slider" class="add-new-h2">
|
5 |
+
<?php _e( 'Add New', 'easingslider' ); ?>
|
6 |
+
</a>
|
7 |
+
|
8 |
+
<?php if ( isset( $_GET['s'] ) && ! empty( $_GET['s'] ) ) : ?>
|
9 |
+
<span class="subtitle"><?php printf( __( 'Search results for “%s”', 'easingslider' ), $_GET['s'] ); ?></span>
|
10 |
+
<?php endif; ?>
|
11 |
+
</h2>
|
12 |
+
|
13 |
+
<?php
|
14 |
+
/**
|
15 |
+
* Prepare the sliders list table items
|
16 |
+
*/
|
17 |
+
$list_table->prepare_items();
|
18 |
+
?>
|
19 |
+
|
20 |
+
<form id="sliders-list" method="get">
|
21 |
+
<input type="hidden" name="page" value="<?php echo $_GET['page']; ?>" />
|
22 |
+
|
23 |
+
<?php
|
24 |
+
/**
|
25 |
+
* Display a search input, allowing us to search through our sliders list.
|
26 |
+
*/
|
27 |
+
$list_table->search_box( __( 'Search Sliders', 'easingslider' ), 'search_id' );
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Display the list table
|
31 |
+
*/
|
32 |
+
$list_table->display();
|
33 |
+
?>
|
34 |
+
</form>
|
35 |
+
</div>
|
partials/welcome.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap about-wrap">
|
2 |
+
<h1><?php printf( __( 'Welcome to Easing Slider %s', 'easingslider' ), $version ); ?></h1>
|
3 |
+
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Easing Slider %s is ready to help you create beautiful sliders easily, quickly and for free!', 'easingslider' ), $version ); ?></div>
|
4 |
+
<div class="easingslider-badge"><?php printf( __( 'Version %s', 'easingslider' ), $version ); ?></div>
|
5 |
+
|
6 |
+
<h2 class="nav-tab-wrapper">
|
7 |
+
<?php foreach ( $tabs as $slug => $tab ) : ?>
|
8 |
+
<a href="index.php?page=easingslider-<?php echo $tab['slug']; ?>" class="nav-tab <?php echo ( $current_tab == $slug ) ? 'nav-tab-active' : ''; ?>"><?php echo esc_html( $tab['title'] ); ?></a>
|
9 |
+
<?php endforeach; ?>
|
10 |
+
</h2>
|
11 |
+
|
12 |
+
<?php
|
13 |
+
/**
|
14 |
+
* Load the appropraite subview
|
15 |
+
*/
|
16 |
+
require plugin_dir_path( __FILE__ ) . "welcome_{$current_tab}.php";
|
17 |
+
?>
|
18 |
+
</div>
|
partials/welcome_about.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="changelog headline-feature">
|
2 |
+
<h2 class="about-headline-callout"><?php _e( 'Check out the awesome all new Easing Slider', 'easingslider' ); ?></h2>
|
3 |
+
<p class="about-text"><?php printf( __( 'We\'ve completely rebuilt Easing Slider from the ground up to be a more stable, modern, easy to use solution for creating sliders on your WordPress blog. There\'s loads of new features, some of which described below. For more information on the changes, <a href="%s" target="_blank">click here</a>.', 'easingslider' ), 'http://easingslider.com/2015/01/new-year-new-easing-slider/' ); ?></p>
|
4 |
+
</div>
|
5 |
+
|
6 |
+
<div class="changelog">
|
7 |
+
<div class="feature-section col two-col">
|
8 |
+
<div class="col-1">
|
9 |
+
<img src="<?php echo "{$image_dir}/list-screenshot.jpg"; ?>" alt="<?php _e( 'List Screenshot', 'easingslider' ); ?>" class="list-screenshot">
|
10 |
+
<h3><?php _e( 'Unlimited Sliders', 'easingslider' ); ?></h3>
|
11 |
+
<p><?php _e( 'Create as many sliders as you like, Easing Slider is no longer limited to just one slider. We\'re now using our own custom post type, a significant improvement for developers.', 'easingslider' ); ?></p>
|
12 |
+
</div>
|
13 |
+
|
14 |
+
<div class="col-2 last-feature">
|
15 |
+
<img src="<?php echo "{$image_dir}/interface-screenshot.jpg"; ?>" alt="<?php _e( 'Interface Screenshot', 'easingslider' ); ?>" class="interface-screenshot">
|
16 |
+
<h3><?php _e( 'Simple Interface', 'easingslider' ); ?></h3>
|
17 |
+
<p><?php _e( 'The admin interface has been completely revamped to be easier, yet more powerful. The new look admin is instantly familiar, similar in style to the new WordPress Media Library.', 'easingslider' ); ?></p>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<hr>
|
21 |
+
|
22 |
+
<div class="feature-section col three-col">
|
23 |
+
<div class="col-1">
|
24 |
+
<h4><?php _e( 'Introducing Extensions', 'easingslider' ); ?></h4>
|
25 |
+
<p><?php _e( 'A vast selection of extensions will soon be available, extending the functionality of Easing Slider beyond what\'s ever been possible before. View them <a href="admin.php?page=easingslider_discover_extensions">here</a>.', 'easingslider' ); ?></p>
|
26 |
+
</div>
|
27 |
+
|
28 |
+
<div class="col-2">
|
29 |
+
<h4><?php _e( 'CSS3 Animations', 'easingslider' ); ?></h4>
|
30 |
+
<p><?php _e( 'The plugin now relies entirely on modern CSS3 animations. This ensures smooth transitions, with graceful fallbacks for older browsers.', 'easingslider' ); ?></p>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<div class="col-3 last-feature">
|
34 |
+
<h4><?php _e( 'Developer Friendly', 'easingslider' ); ?></h4>
|
35 |
+
<p><?php _e( 'Our entirely new infrastructure provides developers with more power than ever. More actions, filters, and extensions bring unlimited potential.', 'easingslider' ); ?></p>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
<hr>
|
39 |
+
|
40 |
+
<div class="feature-section">
|
41 |
+
<h4><?php _e( 'More to come', 'easingslider' ); ?></h4>
|
42 |
+
<p><?php _e( 'This update is just the beginning - the future will bring even more improvements to Easing Slider. We have plans for dozens of extensions that\'ll extend functionality far beyond what was capable before, ensuring Easing Slider remains the best slider plugin for WordPress.', 'easingslider' ); ?></p>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div class="return-to-dashboard">
|
46 |
+
<a href="<?php echo admin_url( 'admin.php?page=easingslider_edit_sliders' ); ?>"><?php _e( 'Return to Easing Slider', 'easingslider' ); ?></a>
|
47 |
+
</div>
|
48 |
+
</div>
|
partials/welcome_credits.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="changelog headline-feature">
|
2 |
+
<h2 class="about-headline-callout credits-headline"><?php _e( 'Want to contribute to Easing Slider? Here\'s how you can.', 'easingslider' ); ?></h2>
|
3 |
+
</div>
|
4 |
+
|
5 |
+
<div class="changelog" style="margin-bottom: 10px;">
|
6 |
+
<p><?php printf( __( 'Until now, Easing Slider has been developed solely by <a href="%s" target="_blank">me</a>, Matthew Ruddy, but it\'s time for this to change.', 'easingslider' ), 'http://matthewruddy.com' ); ?></p>
|
7 |
+
|
8 |
+
<p><?php printf( __( 'Now, Easing Slider\'s official channel of development will be managed through <a href="%s" target="_blank">Github</a>, where I hope to encourage involvement from other developers who have a vision for Easing Slider as strong as my own.', 'easingslider' ), 'https://github.com/easingslider/easing-slider' ); ?></p>
|
9 |
+
|
10 |
+
<p><?php printf( __( 'Whether you\'ve encountered a simple bug and want to provide a fix, or you wish to tackle some enhancements or new features, please don\'t hesitate to <a href="%s" target="_blank">get involved</a>. Even if you can\'t code, your feedback is greated appreciated and really important to us, so <a href="%s" target="_blank">get in touch</a>.', 'easingslider'), 'https://github.com/easingslider/easing-slider', 'http://easingslider.com/support' ); ?></p>
|
11 |
+
|
12 |
+
<p><?php printf( __( 'Hopefully soon this page will be vividly decorated with contributors %s.', 'easingslider' ), '<span class="dashicons dashicons-smiley"></span>' ); ?></p>
|
13 |
+
</div>
|
14 |
+
|
15 |
+
<h4 class="wp-people-group"><?php _e( 'Proudly Built By:', 'easingslider' ); ?></h4>
|
16 |
+
|
17 |
+
<ul class="wp-people-group " id="wp-people-group-project-leaders">
|
18 |
+
<li class="wp-person" id="wp-person-ryan">
|
19 |
+
<a href="http://profiles.wordpress.org/matthewruddy"><img src="https://secure.gravatar.com/avatar/3989ea0bb66e20f7694d93c148fc8563?s=80&d=monsterid&r=g" class="gravatar" alt="<?php _e( 'Matthew Ruddy', 'easingslider' ); ?>"></a>
|
20 |
+
<a class="web" href="http://profiles.wordpress.org/matthewruddy"><?php _e( 'Matthew Ruddy', 'easingslider' ); ?></a>
|
21 |
+
<span class="title"><?php _e( 'Just an average guy', 'easingslider' ); ?></span>
|
22 |
+
</li>
|
23 |
+
</ul>
|
24 |
+
|
25 |
+
<div class="return-to-dashboard">
|
26 |
+
<a href="https://github.com/easingslider/easing-slider" target="_blank"><?php _e( 'Contribute on Github', 'easingslider' ); ?></a> ·
|
27 |
+
<a href="http://easingslider.com/support" target="_blank"><?php _e( 'Contact Us', 'easingslider' ); ?></a>
|
28 |
+
</div>
|
partials/welcome_getting-started.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p class="about-description">
|
2 |
+
<?php _e( 'Use the tips below to get started using Easing Slider. It\'s super quick and easy!', 'easingslider' ); ?>
|
3 |
+
</p>
|
4 |
+
|
5 |
+
<div class="changelog">
|
6 |
+
<div class="feature-section col two-col">
|
7 |
+
<div class="col-1">
|
8 |
+
<h3><?php _e( 'Creating Your First Slider', 'easingslider' ); ?></h3>
|
9 |
+
|
10 |
+
<h4><a href="<?php echo admin_url( 'admin.php?page=easingslider_edit_sliders' ); ?>"><?php _e( 'Sliders → Add New', 'easingslider' ); ?></a></h4>
|
11 |
+
<p><?php _e( 'The "Sliders" menu is your access point for all aspects of Easing Slider. Simply click "Add New" to create your first slider and start adding slides.', 'easingslider' ); ?></p>
|
12 |
+
|
13 |
+
<h4><?php _e( 'Adding Slides', 'easingslider' ); ?></h4>
|
14 |
+
<p><?php printf( __( 'Click the "Add Slides" button to add image slides from the WordPress Media Library. Other slide types can be purchased from our vast array of extensions <a href="%s">found here</a>.', 'easingslider' ), 'http://easingslider.com/extensions' ); ?></p>
|
15 |
+
</div>
|
16 |
+
|
17 |
+
<div class="col-2 last-feature">
|
18 |
+
<img src="<?php echo "{$image_dir}/welcome-screenshot.jpg"; ?>" alt="<?php _e( 'Welcome Screenshot', 'easingslider' ); ?>" class="welcome-screenshot">
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
<hr>
|
23 |
+
|
24 |
+
<div class="changelog">
|
25 |
+
<h3><?php _e( 'Displaying A Slider', 'easingslider' ); ?></h3>
|
26 |
+
|
27 |
+
<div class="feature-section col three-col">
|
28 |
+
<div class="col-1">
|
29 |
+
<img src="<?php echo "{$image_dir}/shortcode-screenshot.jpg"; ?>" alt="<?php _e( 'Shortcode Screenshot', 'easingslider' ); ?>" class="shortcode-screenshot">
|
30 |
+
<h4><?php _e( 'In a post', 'easingslider' ); ?></h4>
|
31 |
+
<p>Use the "Add Slider" button within the post editor to add a slider to a post or page. For reference, the shortcode can be found below. Be sure to replace the numeric ID (1) with the ID of the slider you wish to show.</p>
|
32 |
+
<code>[easingslider id="1"]</code>
|
33 |
+
</div>
|
34 |
+
|
35 |
+
<div class="col-2">
|
36 |
+
<img src="<?php echo "{$image_dir}/function-screenshot.jpg"; ?>" alt="<?php _e( 'PHP Function Screenshot', 'easingslider' ); ?>" class="function-screenshot">
|
37 |
+
<h4>PHP Function</h4>
|
38 |
+
<p>You can also display a slider inside a theme file using the PHP function below. Again, be sure to replace the numeric ID (1) with the desired slider ID.</p>
|
39 |
+
<code><?php if ( function_exists( 'easingslider' ) ) { easingslider( 1 ); } ?></code>
|
40 |
+
</div>
|
41 |
+
<div class="col-3 last-feature">
|
42 |
+
<img src="<?php echo "{$image_dir}/widget-screenshot.jpg"; ?>" alt="<?php _e( 'Widget Screenshot', 'easingslider' ); ?>" class="widget-screenshot">
|
43 |
+
<h4>Widget</h4>
|
44 |
+
<p>Easing Slider provides a widget that you can place in any widgetized area of your site and select exactly which form you would like displayed in that space.</p>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<hr>
|
49 |
+
|
50 |
+
<div class="changelog">
|
51 |
+
<h3><?php _e( 'Need help?', 'easingslider' ); ?></h3>
|
52 |
+
|
53 |
+
<div class="feature-section col two-col">
|
54 |
+
<div class="col-1">
|
55 |
+
<h4><?php _e( 'Helpful Documentation', 'easingslider' ); ?></h4>
|
56 |
+
<p><?php printf( __( 'We have documentation available covering everything from <a href="%s">Getting Started</a> to our <a href="%s">Developer API</a>. New documents and tutorials are added daily.', 'easingslider' ), 'http://easingslider.com/docs/installation', 'http://easingslider.com/docs/developer-api' ); ?></p>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<div class="col-2 last-feature">
|
60 |
+
<h4><?php _e( 'Awesome Support', 'easingslider' ); ?></h4>
|
61 |
+
<p><?php printf( __( 'We work hard to ensure every user gets the best support possible. If you\'ve encountered a problem or have a question, don\'t hesitate to <a href="%s">contact us</a>.', 'easingslider' ), 'http://easingslider.com/support' ); ?></p>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
</div>
|
readme.txt
CHANGED
@@ -1,34 +1,34 @@
|
|
1 |
-
=== Easing Slider
|
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:
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
-
Easing Slider
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
Easing Slider
|
14 |
|
15 |
* Fully responsive & mobile ready
|
16 |
-
* Lightweight, weighing just 16kb minified including styling
|
17 |
* Bulk image uploading, integrated with new WordPress Media Library
|
18 |
-
* CSS3 transitions for ultra smooth
|
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/
|
26 |
|
27 |
-
Throughly tested on iPhone, iPad and multiple Android devices, Easing Slider
|
28 |
|
29 |
-
We've also integrated the new WordPress Media Library workflow to provide a better media management experience. Bulk uploading images to your slider is now easy, requiring just a few clicks.
|
30 |
|
31 |
-
Last but not least, we've left plenty of opportunity for custom plugin modifications using the WordPress Action & Filter APIs. You can completely create your own external functionality, or
|
32 |
|
33 |
== Installation ==
|
34 |
|
@@ -36,23 +36,17 @@ Last but not least, we've left plenty of opportunity for custom plugin modificat
|
|
36 |
To display the slider, you can use any of the following methods.
|
37 |
|
38 |
**In a post/page:**
|
39 |
-
Simply insert the shortcode below into the post/page to display the slider
|
40 |
|
41 |
-
`[
|
42 |
|
43 |
**Function in template files (via php):**
|
44 |
-
To insert the slider into your theme, add the following code to the appropriate theme file
|
45 |
|
46 |
-
`<?php if ( function_exists( "
|
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 slider 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.
|
@@ -63,20 +57,27 @@ If the slider works when it is the only plugin active, you're experiencing a plu
|
|
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
|
67 |
|
68 |
-
This is easy. When
|
69 |
|
70 |
== Screenshots ==
|
71 |
|
72 |
-
1.
|
73 |
-
2. "Edit
|
74 |
-
3.
|
75 |
-
4.
|
76 |
-
5.
|
|
|
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
80 |
= 2.1.4.3 =
|
81 |
* Fixed issues with customizer and JSON encoding.
|
82 |
|
1 |
+
=== Easing Slider ===
|
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: 4.0
|
6 |
+
Tested up to: 4.2
|
7 |
+
Stable tag: 2.2
|
8 |
|
9 |
+
Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Easing Slider is an extremely easy to use slider plugin for WordPress. It is built to be lightweight and simple, enabling you to create beautiful sliders quickly and efficiently. It comes with many great features, some of which include:
|
14 |
|
15 |
* Fully responsive & mobile ready
|
|
|
16 |
* Bulk image uploading, integrated with new WordPress Media Library
|
17 |
+
* CSS3 transitions for ultra smooth transitions
|
18 |
* Navigation arrows & pagination
|
19 |
* Preloading functionality on page load
|
20 |
* A visual editor for customizing basic styling
|
21 |
* Developer friendly with built-in Javascript events
|
22 |
+
* Dozens of extensions that greatly enhance plugin functionality
|
23 |
* Lots of actions & filters for custom functionality
|
24 |
|
25 |
+
<a href="http://easingslider.com/extensions">Easing Slider has many great extensions that can vastly enhance the plugin's functionality. Click here for more.</a>
|
26 |
|
27 |
+
Throughly tested on iPhone, iPad and multiple Android devices, Easing Slider is the perfect solution for mobile sliders. We've used CSS3 animation to ensure ultra smooth transitions on supported devices, with graceful fallbacks for older browsers. The scripts and styling are 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. Similar to the Media Library, the learning curve and minimal and the admin interface feels instantly recognisable. Bulk uploading images to your slider is now easy, requiring just a few clicks.
|
30 |
|
31 |
+
Last but not least, we've left plenty of opportunity for custom plugin modifications using the WordPress Action & Filter APIs. You can completely create your own external functionality, or purchase <a href="http://easingslider.com/extensions">one of our extensions</a> to avail of pre-built additional features.
|
32 |
|
33 |
== Installation ==
|
34 |
|
36 |
To display the slider, you can use any of the following methods.
|
37 |
|
38 |
**In a post/page:**
|
39 |
+
Simply insert the shortcode below into the post/page to display the slider. Be sure to replace the "1" with the ID of the slider you wish to display.
|
40 |
|
41 |
+
`[easingslider id="1"]`
|
42 |
|
43 |
**Function in template files (via php):**
|
44 |
+
To insert the slider into your theme, add the following code to the appropriate theme file. As above, replace the "1" with the ID of the slider you wish to display.
|
45 |
|
46 |
+
`<?php if ( function_exists( "easingslider" ) ) { easingslider( 1 ); } ?>`
|
47 |
|
48 |
== Frequently Asked Questions ==
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
= My slider continually loads. What's wrong? =
|
51 |
|
52 |
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.
|
57 |
|
58 |
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.
|
59 |
|
60 |
+
= How can I edit a slide? =
|
61 |
|
62 |
+
This is easy. When editing a slider in the "All Sliders" admin area, simply click an individual slide thumbnail and it's settings panel will appear.
|
63 |
|
64 |
== Screenshots ==
|
65 |
|
66 |
+
1. "All Sliders" admin page. This is where you manage your sliders.
|
67 |
+
2. Preview of the "Edit Slider" panel.
|
68 |
+
3. Modal window for managing the settings of an individual slide.
|
69 |
+
4. Preview of the plugin "Settings" admin page.
|
70 |
+
5. "Customize" admin page, which allows you to customize the styling of a slider.
|
71 |
+
6. Browse available extensions for Easing Slider from the "Extensions" admin page.
|
72 |
+
7. A preview of a slider. This is how is should appear on your WordPress site (may differ based on your settings).
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 2.2 =
|
77 |
+
* Users can now have unlimited sliders (no longer limited to one).
|
78 |
+
* New admin interface makes managing your sliders easier and quicker, and provides users with enhanced media management.
|
79 |
+
* Under the hood, the plugin has been completely rebuilt to be faster, more extensible and future proof.
|
80 |
+
|
81 |
= 2.1.4.3 =
|
82 |
* Fixed issues with customizer and JSON encoding.
|
83 |
|
templates/customizer.php
DELETED
@@ -1,182 +0,0 @@
|
|
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 = 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="accordion-section customize-section">
|
39 |
-
<div class="accordion-section-title 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" class="accordion-container">
|
44 |
-
<ul>
|
45 |
-
<li class="control-section accordion-section customize-section">
|
46 |
-
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Next & Previous Arrows', 'easingsliderlite' ); ?></h3>
|
47 |
-
<ul class="accordion-section-content 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 accordion-section customize-section">
|
76 |
-
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Pagination Icons', 'easingsliderlite' ); ?></h3>
|
77 |
-
<ul class="accordion-section-content 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 accordion-section customize-section">
|
106 |
-
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Border', 'easingsliderlite' ); ?></h3>
|
107 |
-
<ul class="accordion-section-content 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 accordion-section customize-section">
|
131 |
-
<h3 class="accordion-section-title customize-section-title" tabindex="0" title=""><?php _e( 'Drop Shadow', 'easingsliderlite' ); ?></h3>
|
132 |
-
<ul class="accordion-section-content 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 addslashes( 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
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/** Get the plugin settings */
|
3 |
-
$settings = $s = get_option( 'easingsliderlite_settings' );
|
4 |
-
?>
|
5 |
-
<div class="wrap">
|
6 |
-
<div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
|
7 |
-
<h2><?php _e( 'Edit Settings', 'easingsliderlite' ); ?></h2>
|
8 |
-
<form name="post" action="admin.php?page=easingsliderlite_edit_settings" method="post">
|
9 |
-
<?php
|
10 |
-
|
11 |
-
/** Security nonce fields */
|
12 |
-
wp_nonce_field( "easingsliderlite-save_{$_GET['page']}", "easingsliderlite-save_{$_GET['page']}", false );
|
13 |
-
wp_nonce_field( "easingsliderlite-reset_{$_GET['page']}", "easingsliderlite-reset_{$_GET['page']}", false );
|
14 |
-
|
15 |
-
/** Before actions */
|
16 |
-
do_action( 'easingsliderlite_settings_before', $s, $_GET['page'] );
|
17 |
-
|
18 |
-
?>
|
19 |
-
<div class="main-panel">
|
20 |
-
<h3><?php _e( 'General Settings', 'easingsliderlite' ); ?></h3>
|
21 |
-
<table class="form-table main-settings">
|
22 |
-
<tbody>
|
23 |
-
<tr valign="top">
|
24 |
-
<th scope="row"><label for="resizing"><?php _e( 'Image Resizing', 'easingsliderlite' ); ?></label></th>
|
25 |
-
<td>
|
26 |
-
<label for="resizing_true">
|
27 |
-
<input type="radio" name="settings[resizing]" id="resizing_true" value="true" <?php checked( $s['resizing'], true ); ?>><span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
|
28 |
-
</label>
|
29 |
-
<label for="resizing_false">
|
30 |
-
<input type="radio" name="settings[resizing]" id="resizing_false" value="false" <?php checked( $s['resizing'], false ); ?>><span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
|
31 |
-
</label>
|
32 |
-
<p class="description"><?php _e( 'Enable or disable the plugins image resizing functionality. Disable this if you do not want the slide images to be resized.', 'easingsliderlite' ); ?></p>
|
33 |
-
</td>
|
34 |
-
</tr>
|
35 |
-
|
36 |
-
<tr valign="top">
|
37 |
-
<th scope="row"><label for="load_scripts"><?php _e( 'Output JS', 'easingsliderlite' ); ?></label></th>
|
38 |
-
<td>
|
39 |
-
<label for="load_scripts_header">
|
40 |
-
<input type="radio" name="settings[load_scripts]" id="load_scripts_header" value="header" <?php checked( $s['load_scripts'], 'header' ); ?>><span><?php _e( 'Header', 'easingsliderlite' ); ?></span>
|
41 |
-
</label>
|
42 |
-
<label for="load_scripts_footer">
|
43 |
-
<input type="radio" name="settings[load_scripts]" id="load_scripts_footer" value="footer" <?php checked( $s['load_scripts'], 'footer' ); ?>><span><?php _e( 'Footer', 'easingsliderlite' ); ?></span>
|
44 |
-
</label>
|
45 |
-
<label for="load_scripts_off">
|
46 |
-
<input type="radio" name="settings[load_scripts]" id="load_scripts_off" value="false" <?php checked( $s['load_scripts'], false ); ?>><span><?php _e( 'Off', 'easingsliderlite' ); ?></span>
|
47 |
-
</label>
|
48 |
-
<p class="description"><?php _e( 'Settings for Javascript output. Scripts loaded in the "Footer" are only when they are needed. This decreases page loading times but is prone to errors.', 'easingsliderlite' ); ?></p>
|
49 |
-
</td>
|
50 |
-
</tr>
|
51 |
-
|
52 |
-
<tr valign="top">
|
53 |
-
<th scope="row"><label for="load_styles"><?php _e( 'Output CSS', 'easingsliderlite' ); ?></label></th>
|
54 |
-
<td>
|
55 |
-
<label for="load_styles_header">
|
56 |
-
<input type="radio" name="settings[load_styles]" id="load_styles_header" value="header" <?php checked( $s['load_styles'], 'header' ); ?>><span><?php _e( 'Header', 'easingsliderlite' ); ?></span>
|
57 |
-
</label>
|
58 |
-
<label for="load_styles_footer">
|
59 |
-
<input type="radio" name="settings[load_styles]" id="load_styles_footer" value="footer" <?php checked( $s['load_styles'], 'footer' ); ?>><span><?php _e( 'Footer', 'easingsliderlite' ); ?></span>
|
60 |
-
</label>
|
61 |
-
<label for="load_styles_off">
|
62 |
-
<input type="radio" name="settings[load_styles]" id="load_styles_off" value="false" <?php checked( $s['load_styles'], false ); ?>><span><?php _e( 'Off', 'easingsliderlite' ); ?></span>
|
63 |
-
</label>
|
64 |
-
<p class="description"><?php _e( 'Settings for CSS output. Styles loaded in the "Footer" will invalidate the HTML, but will prevent them from loading when not needed.', 'easingsliderlite' ); ?></p>
|
65 |
-
</td>
|
66 |
-
</tr>
|
67 |
-
</tbody>
|
68 |
-
</table>
|
69 |
-
|
70 |
-
<div class="divider"></div>
|
71 |
-
|
72 |
-
<h3><?php _e( 'Reset Plugin', 'easingsliderlite' ); ?></h3>
|
73 |
-
<table class="form-table main-settings">
|
74 |
-
<tbody>
|
75 |
-
<tr valign="top">
|
76 |
-
<th scope="row"><label for="reset"><?php _e( 'Plugin Settings', 'easingsliderlite' ); ?></label></th>
|
77 |
-
<td>
|
78 |
-
<input type="submit" name="reset" class="button button-secondary warn" value="<?php _e( 'Reset Plugin', 'easingsliderlite' ); ?>">
|
79 |
-
<p class="description"><?php _e( 'Click this button to reset the plugin to its default settings. This cannot be reversed, so be sure before you do this!', 'easingsliderlite' ); ?></p>
|
80 |
-
</td>
|
81 |
-
</tr>
|
82 |
-
</tbody>
|
83 |
-
</table>
|
84 |
-
|
85 |
-
<div class="divider"></div>
|
86 |
-
|
87 |
-
<h3><?php _e( 'Installation Settings', 'easingsliderlite' ); ?></h3>
|
88 |
-
<table class="form-table main-settings">
|
89 |
-
<tbody>
|
90 |
-
<tr valign="top">
|
91 |
-
<th scope="row"><?php _e( 'PHP Version', 'easingsliderlite' ); ?></th>
|
92 |
-
<td><?php echo phpversion(); ?></td>
|
93 |
-
</tr>
|
94 |
-
|
95 |
-
<tr valign="top">
|
96 |
-
<th scope="row"><?php _e( 'MySQL Version', 'easingsliderlite' ); ?></th>
|
97 |
-
<td><?php echo mysql_get_server_info(); ?></td>
|
98 |
-
</tr>
|
99 |
-
|
100 |
-
<tr valign="top">
|
101 |
-
<th scope="row"><?php _e( 'WordPress Version', 'easingsliderlite' ); ?></th>
|
102 |
-
<td><?php global $wp_version; echo $wp_version; ?></td>
|
103 |
-
</tr>
|
104 |
-
|
105 |
-
<tr valign="top">
|
106 |
-
<th scope="row"><?php _e( 'Plugin Version', 'easingsliderlite' ); ?></th>
|
107 |
-
<td><?php echo EasingSliderLite::$version; ?></td>
|
108 |
-
</tr>
|
109 |
-
</tbody>
|
110 |
-
</table>
|
111 |
-
|
112 |
-
<div class="divider"></div>
|
113 |
-
|
114 |
-
<?php
|
115 |
-
/** After actions */
|
116 |
-
do_action( 'easingsliderlite_settings_after', $s, $_GET['page'] );
|
117 |
-
?>
|
118 |
-
|
119 |
-
<p class="submit">
|
120 |
-
<input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Settings', 'easingsliderlite' ); ?>">
|
121 |
-
</p>
|
122 |
-
</div>
|
123 |
-
</form>
|
124 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/editslideshow-media-details.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<!-- Backbone template -->
|
2 |
-
<h3>
|
3 |
-
<?php _e( 'Image Details', 'easingsliderlite' ); ?>
|
4 |
-
<span class="settings-save-status">
|
5 |
-
<span class="spinner"></span>
|
6 |
-
<span class="saved"><?php esc_html_e( 'Saved.', 'easingsliderlite' ); ?></span>
|
7 |
-
</span>
|
8 |
-
</h3>
|
9 |
-
|
10 |
-
<div class="attachment-info">
|
11 |
-
<div class="thumbnail" style="max-width: none; max-height: 220px;">
|
12 |
-
<# if ( data.uploading ) { #>
|
13 |
-
<div class="media-progress-bar"><div></div></div>
|
14 |
-
<# } else if ( 'image' === data.type ) { #>
|
15 |
-
<img src="{{ data.size.url }}" draggable="false" style="max-width: none; max-height: 220px;" />
|
16 |
-
<# } else { #>
|
17 |
-
<img src="{{ data.icon }}" class="icon" draggable="false" />
|
18 |
-
<# } #>
|
19 |
-
</div>
|
20 |
-
<div class="details">
|
21 |
-
<div class="filename">{{ data.filename }}</div>
|
22 |
-
<div class="uploaded">{{ data.dateFormatted }}</div>
|
23 |
-
|
24 |
-
<# if ( 'image' === data.type && ! data.uploading ) { #>
|
25 |
-
<# if ( data.width && data.height ) { #>
|
26 |
-
<div class="dimensions">{{ data.width }} × {{ data.height }}</div>
|
27 |
-
<# } #>
|
28 |
-
|
29 |
-
<# if ( data.can.save ) { #>
|
30 |
-
<a class="edit-attachment" href="{{ data.editLink }}&image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>
|
31 |
-
<a class="refresh-attachment" href="#"><?php _e( 'Refresh' ); ?></a>
|
32 |
-
<# } #>
|
33 |
-
<# } #>
|
34 |
-
|
35 |
-
<# if ( ! data.uploading && data.can.remove ) { #>
|
36 |
-
<a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
|
37 |
-
<# } #>
|
38 |
-
|
39 |
-
<div class="compat-meta">
|
40 |
-
<# if ( data.compat && data.compat.meta ) { #>
|
41 |
-
{{{ data.compat.meta }}}
|
42 |
-
<# } #>
|
43 |
-
</div>
|
44 |
-
</div>
|
45 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/editslideshow-sidebar.php
DELETED
@@ -1,253 +0,0 @@
|
|
1 |
-
<?php if ( !apply_filters( 'easingsliderlite_hide_advert', __return_false() ) ) : ?>
|
2 |
-
<div style="margin-bottom: 15px;">
|
3 |
-
<a href="http://easingslider.com/upgrade-to-pro" target="_blank">
|
4 |
-
<img src="<?php echo plugins_url( dirname( plugin_basename( EasingSliderLite::get_file() ) ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'banner-easingsliderpro.png'; ?>" width="285" height="100" alt="<?php _e( 'Need more slideshow? Click here.', 'easingsliderlite' ); ?>" />
|
5 |
-
</a>
|
6 |
-
</div>
|
7 |
-
|
8 |
-
<div style="margin-bottom: 15px;">
|
9 |
-
<a href="http://rocketgalleries.com/" target="_blank">
|
10 |
-
<img src="<?php echo plugins_url( dirname( plugin_basename( EasingSliderLite::get_file() ) ) ) . DIRECTORY_SEPARATOR .'images'. DIRECTORY_SEPARATOR .'banner-rocketgalleries.png'; ?>" width="285" height="100" alt="<?php _e( 'Rocket Galleries for WordPress', 'easingsliderlite' ); ?>" />
|
11 |
-
</a>
|
12 |
-
</div>
|
13 |
-
<?php endif; ?>
|
14 |
-
|
15 |
-
<!-- Manage Slides -->
|
16 |
-
<div class="widgets-holder-wrap exclude">
|
17 |
-
<div class="sidebar-name">
|
18 |
-
<div class="sidebar-name-arrow"></div>
|
19 |
-
<h3><?php _e( 'Manage Slides', 'easingsliderlite' ); ?></h3>
|
20 |
-
</div>
|
21 |
-
<div class="sidebar-content widgets-sortables clearfix">
|
22 |
-
<div class="hide-if-no-js manage-slides-buttons wp-media-buttons" style="margin-top: 1em;">
|
23 |
-
<a href="#" id="add-image" class="button button-secondary add-image" data-editor="content" title="<?php _e( 'Add Images', 'easingsliderlite' ); ?>"><span class="wp-media-buttons-icon" style="margin-top: 1px;"></span> <?php _e( 'Add Images', 'easingsliderlite' ); ?></a>
|
24 |
-
<a href="#" id="delete-images" class="button button-secondary delete-images" title="<?php _e( 'Delete Images', 'easingsliderlite' ); ?>"><span class="wp-media-buttons-icon" style="margin-top: 1px;"></span> <?php _e( 'Delete Images', 'easingsliderlite' ); ?></a>
|
25 |
-
<?php do_action( 'easingsliderlite_manage_slides_buttons', $s ); ?>
|
26 |
-
</div>
|
27 |
-
<div class="field">
|
28 |
-
<label for="randomize">
|
29 |
-
<input type="hidden" name="general[randomize]" value="">
|
30 |
-
<input type="checkbox" id="randomize" name="general[randomize]" value="true" <?php checked( $s->general->randomize, true ); ?>><span style="display: inline;"><?php _e( 'Randomize the slideshow order.', 'easingsliderlite' ); ?></span>
|
31 |
-
</label>
|
32 |
-
</div>
|
33 |
-
<?php do_action( 'easingsliderlite_manage_slides_metabox', $s ); ?>
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
|
37 |
-
<!-- Dimensions -->
|
38 |
-
<div class="widgets-holder-wrap" <?php if ( (bool) apply_filters( 'easingsliderlite_hide_dimensions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
|
39 |
-
<div class="sidebar-name">
|
40 |
-
<div class="sidebar-name-arrow"></div>
|
41 |
-
<h3><?php _e( 'Dimensions', 'easingsliderlite' ); ?></h3>
|
42 |
-
</div>
|
43 |
-
<div class="sidebar-content widgets-sortables clearfix">
|
44 |
-
<div class="dimension-settings">
|
45 |
-
<div class="field">
|
46 |
-
<label for="width">
|
47 |
-
<span><?php _e( 'Width:', 'easingsliderlite' ); ?></span>
|
48 |
-
<input type="number" name="dimensions[width]" id="width" value="<?php echo esc_attr( $s->dimensions->width ); ?>">
|
49 |
-
</label>
|
50 |
-
</div>
|
51 |
-
<div class="field">
|
52 |
-
<label for="height">
|
53 |
-
<span><?php _e( 'Height:', 'easingsliderlite' ); ?></span>
|
54 |
-
<input type="number" name="dimensions[height]" id="height" value="<?php echo esc_attr( $s->dimensions->height ); ?>">
|
55 |
-
</label>
|
56 |
-
</div>
|
57 |
-
<p class="description"><?php _e( 'Slideshow "width" and "height" values (in pixels).', 'easingsliderlite' ); ?></p>
|
58 |
-
</div>
|
59 |
-
<div class="divider"></div>
|
60 |
-
<div>
|
61 |
-
<div class="field">
|
62 |
-
<label for="responsive">
|
63 |
-
<input type="hidden" name="dimensions[responsive]" value="">
|
64 |
-
<input type="checkbox" name="dimensions[responsive]" id="responsive" value="true" <?php checked( $s->dimensions->responsive, true ); ?>><span style="display: inline;"><?php _e( 'Make this slideshow responsive.', 'easingsliderlite' ); ?></span>
|
65 |
-
</label>
|
66 |
-
</div>
|
67 |
-
<p class="description"><?php _e( 'Check this option to make this slideshow responsive. If enabled, the "width" and "height" values above will act as maximums.', 'easingsliderlite' ); ?></p>
|
68 |
-
</div>
|
69 |
-
<?php do_action( 'easingsliderlite_dimensions_metabox', $s ); ?>
|
70 |
-
</div>
|
71 |
-
</div>
|
72 |
-
|
73 |
-
<!-- Transitions -->
|
74 |
-
<div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_transitions_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
|
75 |
-
<div class="sidebar-name">
|
76 |
-
<div class="sidebar-name-arrow"></div>
|
77 |
-
<h3><?php _e( 'Transitions', 'easingsliderlite' ); ?></h3>
|
78 |
-
</div>
|
79 |
-
<div class="sidebar-content widgets-sortables clearfix" style="display: none;">
|
80 |
-
<div>
|
81 |
-
<div class="field">
|
82 |
-
<label for="effect">
|
83 |
-
<span><?php _e( 'Effect:', 'easingsliderlite' ); ?></span>
|
84 |
-
<select name="transitions[effect]" id="effect">
|
85 |
-
<option value="slide" <?php selected( $s->transitions->effect, 'slide' ); ?>><?php _e( 'Slide', 'easingsliderlite' ); ?></option>
|
86 |
-
<option value="fade" <?php selected( $s->transitions->effect, 'fade' ); ?>><?php _e( 'Fade', 'easingsliderlite' ); ?></option>
|
87 |
-
</select>
|
88 |
-
</label>
|
89 |
-
</div>
|
90 |
-
<p class="description"><?php _e( 'Choose the transition effect you would like to use.', 'easingsliderlite' ); ?></p>
|
91 |
-
</div>
|
92 |
-
<div class="divider"></div>
|
93 |
-
<div>
|
94 |
-
<div class="field">
|
95 |
-
<label for="duration">
|
96 |
-
<span><?php _e( 'Duration:', 'easingsliderlite' ); ?></span>
|
97 |
-
<input type="number" name="transitions[duration]" id="duration" value="<?php echo esc_attr( $s->transitions->duration ); ?>">
|
98 |
-
</label>
|
99 |
-
</div>
|
100 |
-
<p class="description"><?php _e( 'Sets the duration (in milliseconds) for the slideshow transition.', 'easingsliderlite' ); ?></p>
|
101 |
-
</div>
|
102 |
-
<?php do_action( 'easingsliderlite_transitions_metabox', $s ); ?>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
|
106 |
-
<!-- Next & Previous Arrows -->
|
107 |
-
<div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_arrows_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
|
108 |
-
<div class="sidebar-name">
|
109 |
-
<div class="sidebar-name-arrow"></div>
|
110 |
-
<h3><?php _e( 'Next & Previous Arrows', 'easingsliderlite' ); ?></h3>
|
111 |
-
</div>
|
112 |
-
<div class="sidebar-content widgets-sortables" style="display: none;">
|
113 |
-
<div>
|
114 |
-
<div class="radio clearfix">
|
115 |
-
<span><?php _e( 'Arrows:', 'easingsliderlite' ); ?></span>
|
116 |
-
<div class="buttons">
|
117 |
-
<label for="arrows-enable"><input type="radio" name="navigation[arrows]" id="arrows-enable" value="true" <?php checked( $s->navigation->arrows, true ); ?>>
|
118 |
-
<span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
|
119 |
-
</label>
|
120 |
-
<label for="arrows-disable"><input type="radio" name="navigation[arrows]" id="arrows-disable" value="false" <?php checked( $s->navigation->arrows, false ); ?>>
|
121 |
-
<span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
|
122 |
-
</label>
|
123 |
-
</div>
|
124 |
-
</div>
|
125 |
-
<p class="description"><?php _e( 'Toggles the next and previous slide arrows.', 'easingsliderlite' ); ?></p>
|
126 |
-
</div>
|
127 |
-
<div class="divider"></div>
|
128 |
-
<div>
|
129 |
-
<div class="radio clearfix">
|
130 |
-
<span><?php _e( 'On Hover:', 'easingsliderlite' ); ?></span>
|
131 |
-
<div class="buttons">
|
132 |
-
<label for="arrows-hover-true"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-true" value="true" <?php checked( $s->navigation->arrows_hover, true ); ?>>
|
133 |
-
<span><?php _e( 'True', 'easingsliderlite' ); ?></span>
|
134 |
-
</label>
|
135 |
-
<label for="arrows-hover-false"><input type="radio" name="navigation[arrows_hover]" id="arrows-hover-false" value="false" <?php checked( $s->navigation->arrows_hover, false ); ?>>
|
136 |
-
<span><?php _e( 'False', 'easingsliderlite' ); ?></span>
|
137 |
-
</label>
|
138 |
-
</div>
|
139 |
-
</div>
|
140 |
-
<p class="description"><?php _e( 'Set to "True" to only show the arrows when the user hovers over the slideshow.', 'easingsliderlite' ); ?></p>
|
141 |
-
</div>
|
142 |
-
<div class="divider"></div>
|
143 |
-
<div>
|
144 |
-
<div class="field">
|
145 |
-
<label for="arrows_position">
|
146 |
-
<span><?php _e( 'Position:', 'easingsliderlite' ); ?></span>
|
147 |
-
<select name="navigation[arrows_position]" id="arrows_position">
|
148 |
-
<option value="inside" <?php selected( $s->navigation->arrows_position, 'inside' ); ?>><?php _e( 'Inside', 'easingsliderlite' ); ?></option>
|
149 |
-
<option value="outside" <?php selected( $s->navigation->arrows_position, 'outside' ); ?>><?php _e( 'Outside', 'easingsliderlite' ); ?></option>
|
150 |
-
</select>
|
151 |
-
</label>
|
152 |
-
</div>
|
153 |
-
<p class="description"><?php _e( 'Select a position for the arrows.', 'easingsliderlite' ); ?></p>
|
154 |
-
</div>
|
155 |
-
<?php do_action( 'easingsliderlite_arrows_metabox', $s ); ?>
|
156 |
-
</div>
|
157 |
-
</div>
|
158 |
-
|
159 |
-
<!-- Pagination Icons -->
|
160 |
-
<div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_pagination_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
|
161 |
-
<div class="sidebar-name">
|
162 |
-
<div class="sidebar-name-arrow"></div>
|
163 |
-
<h3><?php _e( 'Pagination Icons', 'easingsliderlite' ); ?></h3>
|
164 |
-
</div>
|
165 |
-
<div class="sidebar-content widgets-sortables" style="display: none;">
|
166 |
-
<div>
|
167 |
-
<div class="radio clearfix">
|
168 |
-
<span><?php _e( 'Pagination:', 'easingsliderlite' ); ?></span>
|
169 |
-
<div class="buttons">
|
170 |
-
<label for="pagination-enable"><input type="radio" name="navigation[pagination]" id="pagination-enable" value="true" <?php checked( $s->navigation->pagination, true ); ?>>
|
171 |
-
<span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
|
172 |
-
</label>
|
173 |
-
<label for="pagination-disable"><input type="radio" name="navigation[pagination]" id="pagination-disable" value="false" <?php checked( $s->navigation->pagination, false ); ?>>
|
174 |
-
<span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
|
175 |
-
</label>
|
176 |
-
</div>
|
177 |
-
</div>
|
178 |
-
<p class="description"><?php _e( 'Enable/Disable the Pagination Icons. Each icon represents a slide in their respective order.', 'easingsliderlite' ); ?></p>
|
179 |
-
</div>
|
180 |
-
<div class="divider"></div>
|
181 |
-
<div>
|
182 |
-
<div class="radio clearfix">
|
183 |
-
<span><?php _e( 'On Hover:', 'easingsliderlite' ); ?></span>
|
184 |
-
<div class="buttons">
|
185 |
-
<label for="pagination-hover-true"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-true" value="true" <?php checked( $s->navigation->pagination_hover, true ); ?>>
|
186 |
-
<span><?php _e( 'True', 'easingsliderlite' ); ?></span>
|
187 |
-
</label>
|
188 |
-
<label for="pagination-hover-false"><input type="radio" name="navigation[pagination_hover]" id="pagination-hover-false" value="false" <?php checked( $s->navigation->pagination_hover, false ); ?>>
|
189 |
-
<span><?php _e( 'False', 'easingsliderlite' ); ?></span>
|
190 |
-
</label>
|
191 |
-
</div>
|
192 |
-
</div>
|
193 |
-
<p class="description"><?php _e( 'Set to "True" to only show the pagination when the user hovers over the slideshow.', 'easingsliderlite' ); ?></p>
|
194 |
-
</div>
|
195 |
-
<div class="divider"></div>
|
196 |
-
<div>
|
197 |
-
<div class="field">
|
198 |
-
<label for="pagination_position">
|
199 |
-
<span><?php _e( 'Position:', 'easingsliderlite' ); ?></span>
|
200 |
-
<select name="navigation[pagination_position]" id="pagination_position" style="width: 45%; float: left;">
|
201 |
-
<option value="inside" <?php selected( $s->navigation->pagination_position, 'inside' ); ?>><?php _e( 'Inside', 'easingsliderlite' ); ?></option>
|
202 |
-
<option value="outside" <?php selected( $s->navigation->pagination_position, 'outside' ); ?>><?php _e( 'Outside', 'easingsliderlite' ); ?></option>
|
203 |
-
</select>
|
204 |
-
<select name="navigation[pagination_location]" id="pagination_location" style="width: 45%; float: left; margin-left: 10px;">
|
205 |
-
<option value="top-left" <?php selected( $s->navigation->pagination_location, 'top-left' ); ?>><?php _e( 'Top Left', 'easingsliderlite' ); ?></option>
|
206 |
-
<option value="top-right" <?php selected( $s->navigation->pagination_location, 'top-right' ); ?>><?php _e( 'Top Right', 'easingsliderlite' ); ?></option>
|
207 |
-
<option value="top-center" <?php selected( $s->navigation->pagination_location, 'top-center' ); ?>><?php _e( 'Top Center', 'easingsliderlite' ); ?></option>
|
208 |
-
<option value="bottom-left" <?php selected( $s->navigation->pagination_location, 'bottom-left' ); ?>><?php _e( 'Bottom Left', 'easingsliderlite' ); ?></option>
|
209 |
-
<option value="bottom-right" <?php selected( $s->navigation->pagination_location, 'bottom-right' ); ?>><?php _e( 'Bottom Right', 'easingsliderlite' ); ?></option>
|
210 |
-
<option value="bottom-center" <?php selected( $s->navigation->pagination_location, 'bottom-center' ); ?>><?php _e( 'Bottom Center', 'easingsliderlite' ); ?></option>
|
211 |
-
</select>
|
212 |
-
</label>
|
213 |
-
</div>
|
214 |
-
<p class="description"><?php _e( 'Select a position for the pagination icons.', 'easingsliderlite' ); ?></p>
|
215 |
-
</div>
|
216 |
-
<?php do_action( 'easingsliderlite_pagination_metabox', $s ); ?>
|
217 |
-
</div>
|
218 |
-
</div>
|
219 |
-
|
220 |
-
<!-- Playback -->
|
221 |
-
<div class="widgets-holder-wrap closed" <?php if ( apply_filters( 'easingsliderlite_hide_playback_metabox', __return_false() ) ) echo 'style="display: none;"'; ?>>
|
222 |
-
<div class="sidebar-name">
|
223 |
-
<div class="sidebar-name-arrow"></div>
|
224 |
-
<h3><?php _e( 'Automatic Playback', 'easingsliderlite' ); ?></h3>
|
225 |
-
</div>
|
226 |
-
<div class="sidebar-content widgets-sortables" style="display: none;">
|
227 |
-
<div>
|
228 |
-
<div class="radio clearfix">
|
229 |
-
<span><?php _e( 'Playback:', 'easingsliderlite' ); ?></span>
|
230 |
-
<div class="buttons">
|
231 |
-
<label for="playback-enable"><input type="radio" name="playback[enabled]" id="playback-enable" value="true" <?php checked( $s->playback->enabled, true ); ?>>
|
232 |
-
<span><?php _e( 'Enable', 'easingsliderlite' ); ?></span>
|
233 |
-
</label>
|
234 |
-
<label for="playback-disable"><input type="radio" name="playback[enabled]" id="playback-disable" value="false" <?php checked( $s->playback->enabled, false ); ?>>
|
235 |
-
<span><?php _e( 'Disable', 'easingsliderlite' ); ?></span>
|
236 |
-
</label>
|
237 |
-
</div>
|
238 |
-
</div>
|
239 |
-
<p class="description"><?php _e( 'Enable/Disable slideshow automatic playback.', 'easingsliderlite' ); ?></p>
|
240 |
-
</div>
|
241 |
-
<div class="divider"></div>
|
242 |
-
<div>
|
243 |
-
<div class="field">
|
244 |
-
<label for="playback_pause">
|
245 |
-
<span><?php _e( 'Pause Duration:', 'easingsliderlite' ); ?></span>
|
246 |
-
<input type="number" name="playback[pause]" id="playback_pause" value="<?php echo esc_attr( $s->playback->pause ); ?>">
|
247 |
-
</label>
|
248 |
-
</div>
|
249 |
-
<p class="description"><?php _e( 'Sets the duration (in milliseconds) for the pause between slide transitions.', 'easingsliderlite' ); ?></p>
|
250 |
-
</div>
|
251 |
-
<?php do_action( 'easingsliderlite_playback_metabox', $s ); ?>
|
252 |
-
</div>
|
253 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/editslideshow-slide.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<!-- Backbone template -->
|
2 |
-
<div class="editslideview media-modal wp-core-ui">
|
3 |
-
<a class="media-modal-close" href="#" title="Close"><span class="media-modal-icon"></span></a>
|
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>
|
11 |
-
|
12 |
-
<div class="media-frame-content" style="top: 45px;">
|
13 |
-
<div class="media-main media-embed">
|
14 |
-
<div id="general" class="media-tab">
|
15 |
-
<div class="embed-link-settings" style="top: 0;">
|
16 |
-
<div class="thumbnail">
|
17 |
-
<# var thumbnail = data.sizes.large || data.sizes.medium || data.sizes.thumbnail || { url: data.url }; #>
|
18 |
-
<img src="{{ thumbnail.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="<?php _e( 'Change Image', 'easingsliderlite' ); ?>"><span class="wp-media-buttons-icon"></span> <?php _e( 'Change Image', 'easingsliderlite' ); ?></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>
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
-
</div>
|
47 |
-
<div class="media-frame-toolbar">
|
48 |
-
<div class="media-toolbar">
|
49 |
-
<div class="media-toolbar-primary">
|
50 |
-
<a href="#" class="button media-button button-primary button-large media-button-select media-modal-save"><?php _e( 'Apply Changes', 'easingsliderlite' ); ?></a>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
</div>
|
55 |
-
</div>
|
56 |
-
</div>
|
57 |
-
<div class="media-modal-backdrop"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/editslideshow-thumbnail.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<# var thumbnail = data.sizes.thumbnail || data.sizes.medium || data.sizes.large || data.sizes.full || { url: data.url } #>
|
2 |
-
|
3 |
-
<div class="thumbnail" data-id="{{ data.id }}">
|
4 |
-
<a href="#" class="delete-button"></a>
|
5 |
-
<img src="{{ thumbnail.url }}" alt="{{ data.alt }}" />
|
6 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
templates/editslideshow-welcome.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/** Display the panel */
|
4 |
-
if ( get_option( 'easingsliderlite_disable_welcome_panel' ) == false ) :
|
5 |
-
|
6 |
-
/** URL references */
|
7 |
-
$links = array(
|
8 |
-
'get-started' => 'http://wordpress.org/extend/plugins/easing-slider/installation/',
|
9 |
-
'display-slideshow' => 'http://wordpress.org/extend/plugins/easing-slider/installation/#display',
|
10 |
-
'faqs' => 'http://wordpress.org/extend/plugins/easing-slider/faq/',
|
11 |
-
'support-forums' => 'http://wordpress.org/support/plugin/easing-slider',
|
12 |
-
);
|
13 |
-
|
14 |
-
?>
|
15 |
-
<div id="easingsliderlite-welcome-message" class="welcome-panel">
|
16 |
-
<?php
|
17 |
-
/** Before actions */
|
18 |
-
do_action( 'easingsliderlite_welcome_panel_before' );
|
19 |
-
?>
|
20 |
-
|
21 |
-
<a href="admin.php?page=easingsliderlite_edit_slideshow&disable_welcome_panel=true" class="welcome-panel-close"><?php _e( 'Dismiss', 'easingsliderlite' ); ?></a>
|
22 |
-
<div class="welcome-panel-content">
|
23 |
-
<h3><?php _e( 'Welcome to Easing Slider "Lite"', 'easingsliderlite' ); ?></h3>
|
24 |
-
<p class="about-description">
|
25 |
-
<?php _e( 'Thanks for upgrading to Easing Slider "Lite". Here are some links to get you clued up on the new plugin.', 'easingsliderlite' ); ?>
|
26 |
-
</p>
|
27 |
-
<div class="welcome-panel-column-container">
|
28 |
-
<div class="welcome-panel-column">
|
29 |
-
<h4><?php _e( 'Get Started', 'easingsliderlite' ); ?></h4>
|
30 |
-
<a class="button button-primary button-hero" href="<?php echo $links['get-started']; ?>"><?php _e( 'View the Documentation', 'easingsliderlite' ); ?></a>
|
31 |
-
</div>
|
32 |
-
|
33 |
-
<div class="welcome-panel-column">
|
34 |
-
<h4><?php _e( 'Need some help?', 'easingsliderlite' ); ?></h4>
|
35 |
-
<ul>
|
36 |
-
<li><a href='<?php echo $links['display-slideshow']; ?>'><?php _e( 'Displaying a Slideshow', 'easingsliderlite' ); ?></a></li>
|
37 |
-
<li><a href='<?php echo $links['faqs']; ?>'><?php _e( 'Frequently Asked Questions', 'easingsliderlite' ); ?></a></li>
|
38 |
-
<li><a href='<?php echo $links['support-forums']; ?>'><?php _e( 'Support Forums', 'easingsliderlite' ); ?></a></li>
|
39 |
-
</ul>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
|
44 |
-
<?php
|
45 |
-
/** After actions */
|
46 |
-
do_action( 'easingsliderlite_welcome_panel_after' );
|
47 |
-
?>
|
48 |
-
</div>
|
49 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/editslideshow.php
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/** Get the slideshow */
|
3 |
-
$slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
|
4 |
-
?>
|
5 |
-
<div class="wrap">
|
6 |
-
<form name="post" action="admin.php?page=easingsliderlite_edit_slideshow" method="post">
|
7 |
-
<div id="icon-edit" class="icon32 icon32-posts-post"><br></div>
|
8 |
-
<h2><?php _e( 'Edit Slideshow', 'easingsliderlite' ); ?></h2>
|
9 |
-
<?php
|
10 |
-
|
11 |
-
/** Display welcome message */
|
12 |
-
require 'editslideshow-welcome.php';
|
13 |
-
|
14 |
-
/** Security nonce field */
|
15 |
-
wp_nonce_field( "easingsliderlite-save_easingsliderlite_edit_slideshow", "easingsliderlite-save_easingsliderlite_edit_slideshow", false );
|
16 |
-
|
17 |
-
?>
|
18 |
-
<div class="main-panel">
|
19 |
-
<div class="clearfix">
|
20 |
-
<div class="thumbnails-container">
|
21 |
-
<div class="inner clearfix">
|
22 |
-
<?php
|
23 |
-
/** We display the current slides anyway using PHP (rather than Javascript) to avoid any rendering delays */
|
24 |
-
if ( $s->slides ) {
|
25 |
-
foreach ( $s->slides as $slide ) {
|
26 |
-
|
27 |
-
/** Pretty rebust set of fallbacks for the slide thumbnail! Shouldn't ever fail. */
|
28 |
-
if (isset($slide->sizes->thumbnail)) {
|
29 |
-
$thumbnail = $slide->sizes->thumbnail->url;
|
30 |
-
}
|
31 |
-
else if (isset($slide->sizes->small)) {
|
32 |
-
$thumbnail = $slide->sizes->small->url;
|
33 |
-
}
|
34 |
-
else if (isset($slide->sizes->medium)) {
|
35 |
-
$thumbnail = $slide->sizes->medium->url;
|
36 |
-
}
|
37 |
-
else if (isset($slide->sizes->large)) {
|
38 |
-
$thumbnail = $slide->sizes->large->url;
|
39 |
-
}
|
40 |
-
else if (isset($slide->sizes->full)) {
|
41 |
-
$thumbnail = $slide->sizes->full->url;
|
42 |
-
}
|
43 |
-
else {
|
44 |
-
$thumbnail = $slide->url;
|
45 |
-
}
|
46 |
-
|
47 |
-
echo "<div class='thumbnail' data-id='{$slide->id}'><a href='#' class='delete-button'></a><img src='{$thumbnail}' alt='{$slide->alt}' /></div>";
|
48 |
-
|
49 |
-
}
|
50 |
-
}
|
51 |
-
?>
|
52 |
-
</div>
|
53 |
-
</div>
|
54 |
-
<div class="settings-container">
|
55 |
-
<?php require 'editslideshow-sidebar.php'; ?>
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
<div class="divider"></div>
|
59 |
-
|
60 |
-
<input type="hidden" name="author" value="<?php echo esc_attr( $s->author ); ?>">
|
61 |
-
<input type="hidden" name="slides" id="slideshow-images" value="">
|
62 |
-
<input type="submit" name="save" class="button button-primary button-large" id="save" accesskey="p" value="<?php _e( 'Save Slideshow', 'easingsliderlite' ); ?>">
|
63 |
-
<?php /** This ensures that the slide's JSON is encoded correctly. Using PHP JSON encode can cause magic quote issues */ ?>
|
64 |
-
<script type="text/javascript">document.getElementById('slideshow-images').value = '<?php echo addslashes( json_encode( $s->slides ) ); ?>';</script>
|
65 |
-
</div>
|
66 |
-
</form>
|
67 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/slideshow.php
DELETED
@@ -1,146 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/** Get the slideshow */
|
4 |
-
$slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
|
5 |
-
|
6 |
-
/** Get customizations */
|
7 |
-
$customizations = $c = 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' ) )
|
12 |
-
_e( '<p style="background-color: #ffebe8; border: 1px solid #c00; border-radius: 4px; padding: 8px !important;">The slideshow does not appear to exist. Oh dear! Please try contacting support.</p>', 'easingsliderlite' );
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
|
16 |
-
/** Bail if there are no slides to display */
|
17 |
-
if ( count( $slideshow->slides ) == 0 ) {
|
18 |
-
if ( current_user_can( 'easingsliderlite_edit_slideshow' ) )
|
19 |
-
_e( '<p style="background-color: #ffebe8; border: 1px solid #c00; border-radius: 4px; padding: 8px !important;">This slideshow contains no slides. Uh oh!', 'easingsliderlite' );
|
20 |
-
return;
|
21 |
-
}
|
22 |
-
|
23 |
-
/** Get plugin settings */
|
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 )
|
36 |
-
$slideshow_styles = "max-width: {$s->dimensions->width}px; max-height: {$s->dimensions->height}px";
|
37 |
-
else
|
38 |
-
$slideshow_styles = "width: {$s->dimensions->width}px; height: {$s->dimensions->height}px";
|
39 |
-
$slideshow_styles = apply_filters( 'easingsliderlite_slideshow_styles', $slideshow_styles, $s );
|
40 |
-
$slideshow_options = json_encode(
|
41 |
-
array(
|
42 |
-
'dimensions' => $s->dimensions,
|
43 |
-
'transitions' => $s->transitions,
|
44 |
-
'navigation' => $s->navigation,
|
45 |
-
'playback' => $s->playback
|
46 |
-
)
|
47 |
-
);
|
48 |
-
|
49 |
-
/** Dynamically calculcated viewport height */
|
50 |
-
$viewport_height = ( 100 * ( $s->dimensions->height / $s->dimensions->width ) );
|
51 |
-
$viewport_styles = "padding-top: {$viewport_height}% !important;";
|
52 |
-
$viewport_styles = apply_filters( 'easingsliderlite_viewport_styles', $viewport_styles, $s );
|
53 |
-
|
54 |
-
/** Slide container styles */
|
55 |
-
$container_width = ( $s->transitions->effect == 'slide' ) ? ( 100 * ( count( $s->slides )+2 ) ) : '100';
|
56 |
-
$container_styles = "display: none; width: {$container_width}%;";
|
57 |
-
$container_styles = apply_filters( 'easingsliderlite_container_styles', $container_styles, $s );
|
58 |
-
|
59 |
-
/** Add viewport height when using 'fade' transition */
|
60 |
-
if ( $s->transitions->effect == 'fade' )
|
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
|
68 |
-
/** Randomize the slides if set to do so */
|
69 |
-
if ( $s->general->randomize )
|
70 |
-
shuffle( $s->slides );
|
71 |
-
?>
|
72 |
-
<?php foreach ( $s->slides as $index => $slide ) : ?>
|
73 |
-
<?php
|
74 |
-
|
75 |
-
/** Get slide styles */
|
76 |
-
$slide_styles = $slideshow_styles;
|
77 |
-
if ( $s->transitions->effect == 'fade' && $index > 0 )
|
78 |
-
$slide_styles .= " opacity: 0; display: none;";
|
79 |
-
|
80 |
-
/** Apply filter for custom styles */
|
81 |
-
$slide_styles = apply_filters( 'easingsliderlite_slide_styles', $slide_styles, $slide, $s );
|
82 |
-
|
83 |
-
/** Image array */
|
84 |
-
$image = array( 'url' => $slide->url, 'width' => $s->dimensions->width, 'height' => $s->dimensions->height );
|
85 |
-
|
86 |
-
/** Resize the image (if enabled) */
|
87 |
-
if ( $settings['resizing'] ) {
|
88 |
-
$resized_image = ESL_Resize::resize( $slide->url, $s->dimensions->width, $s->dimensions->height, true, false );
|
89 |
-
if ( !is_wp_error( $resized_image ) )
|
90 |
-
$image = $resized_image;
|
91 |
-
}
|
92 |
-
|
93 |
-
?>
|
94 |
-
<div class="easingsliderlite-slide" style="<?php echo $slide_styles; ?>">
|
95 |
-
<?php if ( !empty( $slide->link ) ) { ?><a href="<?php echo esc_attr( $slide->link ); ?>" target="<?php echo esc_attr( $slide->linkTarget ); ?>"><?php } ?>
|
96 |
-
<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 ); ?>" />
|
97 |
-
<?php if ( !empty( $slide->link ) ) { ?></a><?php } ?>
|
98 |
-
</div>
|
99 |
-
<?php endforeach; ?>
|
100 |
-
</div>
|
101 |
-
</div>
|
102 |
-
|
103 |
-
<div class="easingsliderlite-preload"></div>
|
104 |
-
|
105 |
-
<?php if ( $s->navigation->arrows && !has_action( 'easingsliderlite_arrows' ) ) : ?>
|
106 |
-
<div class="easingsliderlite-arrows easingsliderlite-next <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
|
107 |
-
<div class="easingsliderlite-arrows easingsliderlite-prev <?php echo esc_attr( $s->navigation->arrows_position ); ?>"></div>
|
108 |
-
<?php else : do_action( 'easingsliderlite_arrows', $s, $c ); endif; ?>
|
109 |
-
|
110 |
-
<?php if ( $s->navigation->pagination && !has_action( 'easingsliderlite_pagination' ) ) : ?>
|
111 |
-
<div class="easingsliderlite-pagination <?php echo esc_attr( $s->navigation->pagination_position ) .' '. esc_attr( $s->navigation->pagination_location ); ?>">
|
112 |
-
<?php foreach ( $s->slides as $index => $slide ) : ?>
|
113 |
-
<div class="easingsliderlite-icon inactive"></div>
|
114 |
-
<?php endforeach; ?>
|
115 |
-
</div>
|
116 |
-
<?php else : do_action( 'easingsliderlite_pagination', $s, $c ); endif; ?>
|
117 |
-
|
118 |
-
<?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 */ ?>
|
119 |
-
<?php if ( current_user_can( 'easingsliderlite_edit_slideshow' ) && apply_filters( 'easingsliderlite_edit_slideshow_icon', __return_true() ) ) : ?>
|
120 |
-
<a href="<?php echo admin_url( "admin.php?page=easingsliderlite_edit_slideshow" ); ?>" style="position: absolute; top: -15px; left: -15px; z-index: 50;">
|
121 |
-
<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;" />
|
122 |
-
</a>
|
123 |
-
<?php endif; ?>
|
124 |
-
</div>
|
125 |
-
|
126 |
-
<?php
|
127 |
-
/** Display the slideshow shadow */
|
128 |
-
if ( !apply_filters( 'easingsliderlite_disable_shadow', __return_false() ) ) :
|
129 |
-
|
130 |
-
/** Get the inline styling */
|
131 |
-
$styles = ( $c->shadow->enable ) ? 'display: block; ' : 'display: none; ';
|
132 |
-
$styles .= ( $s->dimensions->responsive ) ? "max-width: {$s->dimensions->width}px; " : "width: {$s->dimensions->width}px; ";
|
133 |
-
$styles .= ( $c->border->width !== 0 ) ? "margin-left: {$c->border->width}px;" : '';
|
134 |
-
|
135 |
-
/** Print the shadow */
|
136 |
-
if ( !has_action( 'easingsliderlite_shadow' ) ) :
|
137 |
-
echo "<div class='easingsliderlite-shadow' style='{$styles}'>";
|
138 |
-
if ( $c->shadow->enable )
|
139 |
-
echo "<img src='{$c->shadow->image}' alt='' />";
|
140 |
-
echo "</div>";
|
141 |
-
else :
|
142 |
-
do_action( 'easingsliderlite_shadow', $s, $c );
|
143 |
-
endif;
|
144 |
-
|
145 |
-
endif;
|
146 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|