Version Description
- Fixed post thumbnail registration conflicts.
- Added support for custom slideshow loop.
- Fixed navigation for multiple slideshows.
- Improved support for transparent images.
- Fixed slideshow layout issues.
- Updated French translation.
Download this release
Release Info
Developer | jleuze |
Plugin | Meteor Slides |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.1
- css/meteor-slides-admin.css +7 -0
- css/meteor-slides.css +34 -5
- js/slideshow.js +7 -16
- languages/meteor-slides-fr_FR.mo +0 -0
- languages/meteor-slides-fr_FR.po +57 -58
- meteor-slides-plugin.php +231 -190
- meteor-slides-settings.php +135 -70
- meteor-slideshow.php +68 -20
- readme.txt +34 -19
css/meteor-slides-admin.css
CHANGED
@@ -2,4 +2,11 @@
|
|
2 |
|
3 |
#wpwrap #icon-edit {
|
4 |
background: url('../images/slides-icon-32x32.png') no-repeat top left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
}
|
2 |
|
3 |
#wpwrap #icon-edit {
|
4 |
background: url('../images/slides-icon-32x32.png') no-repeat top left;
|
5 |
+
}
|
6 |
+
|
7 |
+
#edit-slug-box,
|
8 |
+
#message a,
|
9 |
+
#preview-action,
|
10 |
+
.row-actions .view {
|
11 |
+
display: none;
|
12 |
}
|
css/meteor-slides.css
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
-
/*
|
2 |
|
3 |
Copy "meteor-slides.css" from "/meteor-slides/css/" to your theme's directory to replace
|
4 |
the plugin's default stylesheet.
|
5 |
|
6 |
If you have navigation enabled, be sure to copy the "buttons.png", "next.png",
|
7 |
-
and "prev.png" files to your theme's images folder
|
8 |
-
|
|
|
|
|
|
|
9 |
*/
|
10 |
|
|
|
|
|
|
|
11 |
.meteor-slides {
|
12 |
margin: 0;
|
13 |
overflow: hidden;
|
@@ -16,7 +22,8 @@
|
|
16 |
z-index: 1;
|
17 |
}
|
18 |
|
19 |
-
.navpaged,
|
|
|
20 |
padding: 0 0 15px 0;
|
21 |
}
|
22 |
|
@@ -25,6 +32,9 @@
|
|
25 |
padding: 0;
|
26 |
}
|
27 |
|
|
|
|
|
|
|
28 |
#meteor-slideshow .slide {
|
29 |
display: none;
|
30 |
margin: 0;
|
@@ -48,13 +58,29 @@
|
|
48 |
padding: 0;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
#meteor-slideshow ul.meteor-nav {
|
52 |
-
display: none;
|
53 |
list-style: none;
|
54 |
margin: 0;
|
55 |
padding: 0;
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
ul.meteor-nav li {
|
59 |
display: inline;
|
60 |
list-style: none;
|
@@ -95,6 +121,9 @@ ul.meteor-nav li {
|
|
95 |
background: url('../images/next.png') no-repeat center right;
|
96 |
}
|
97 |
|
|
|
|
|
|
|
98 |
.meteor-buttons {
|
99 |
bottom: 0px;
|
100 |
left: 46%;
|
1 |
+
/* Stylesheet for the Meteor Slides 1.3.1 slideshow
|
2 |
|
3 |
Copy "meteor-slides.css" from "/meteor-slides/css/" to your theme's directory to replace
|
4 |
the plugin's default stylesheet.
|
5 |
|
6 |
If you have navigation enabled, be sure to copy the "buttons.png", "next.png",
|
7 |
+
and "prev.png" files to your theme's images folder and update the image paths below,
|
8 |
+
or create new graphics to replace them.
|
9 |
+
|
10 |
+
Learn more about customizing the stylesheet for Meteor Slides:
|
11 |
+
http://www.jleuze.com/plugins/meteor-slides/customizing-the-stylesheet/
|
12 |
*/
|
13 |
|
14 |
+
/* =Slideshow
|
15 |
+
-------------------------------------------------------------- */
|
16 |
+
|
17 |
.meteor-slides {
|
18 |
margin: 0;
|
19 |
overflow: hidden;
|
22 |
z-index: 1;
|
23 |
}
|
24 |
|
25 |
+
.navpaged,
|
26 |
+
.navboth {
|
27 |
padding: 0 0 15px 0;
|
28 |
}
|
29 |
|
32 |
padding: 0;
|
33 |
}
|
34 |
|
35 |
+
/* =Slide
|
36 |
+
-------------------------------------------------------------- */
|
37 |
+
|
38 |
#meteor-slideshow .slide {
|
39 |
display: none;
|
40 |
margin: 0;
|
58 |
padding: 0;
|
59 |
}
|
60 |
|
61 |
+
#meteor-slideshow .slide img[src$='.png'] {
|
62 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)"; /* IE8 */
|
63 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); /* IE7 */
|
64 |
+
zoom: 1;
|
65 |
+
}
|
66 |
+
|
67 |
+
/* =Previous/Next Navigation
|
68 |
+
-------------------------------------------------------------- */
|
69 |
+
|
70 |
#meteor-slideshow ul.meteor-nav {
|
|
|
71 |
list-style: none;
|
72 |
margin: 0;
|
73 |
padding: 0;
|
74 |
}
|
75 |
|
76 |
+
html > body .meteor-slides ul.meteor-nav {
|
77 |
+
display: none;
|
78 |
+
}
|
79 |
+
|
80 |
+
html > body .meteor-slides:hover ul.meteor-nav {
|
81 |
+
display: block;
|
82 |
+
}
|
83 |
+
|
84 |
ul.meteor-nav li {
|
85 |
display: inline;
|
86 |
list-style: none;
|
121 |
background: url('../images/next.png') no-repeat center right;
|
122 |
}
|
123 |
|
124 |
+
/* =Paged Navigation
|
125 |
+
-------------------------------------------------------------- */
|
126 |
+
|
127 |
.meteor-buttons {
|
128 |
bottom: 0px;
|
129 |
left: 46%;
|
js/slideshow.js
CHANGED
@@ -14,21 +14,11 @@ var $slidetransition = meteorslidessettings.meteorslideshowtransition;
|
|
14 |
|
15 |
$j(document).ready(function() {
|
16 |
|
17 |
-
$j('.meteor-nav a
|
18 |
|
19 |
-
$j('.slide,.meteor-nav').css('width', $slidewidth);
|
20 |
|
21 |
$j('.slides').css('overflow', 'visible');
|
22 |
-
|
23 |
-
$j(".meteor-slides").hover(function() {
|
24 |
-
|
25 |
-
$j("ul.meteor-nav").css('display', 'block');
|
26 |
-
|
27 |
-
}, function() {
|
28 |
-
|
29 |
-
$j("ul.meteor-nav").css('display', 'none');
|
30 |
-
|
31 |
-
});
|
32 |
|
33 |
$j('.slides').cycle({
|
34 |
|
@@ -39,10 +29,11 @@ $j(document).ready(function() {
|
|
39 |
speed: $slidespeed,
|
40 |
timeout: $slidetimeout,
|
41 |
pause: '1',
|
42 |
-
prev:
|
43 |
-
next:
|
44 |
-
pager:
|
45 |
-
pagerEvent: 'click'
|
|
|
46 |
|
47 |
});
|
48 |
|
14 |
|
15 |
$j(document).ready(function() {
|
16 |
|
17 |
+
$j('.meteor-slides,.slides,.meteor-nav a').css('height', $slideheight);
|
18 |
|
19 |
+
$j('.meteor-slides,.slide,.meteor-nav').css('width', $slidewidth);
|
20 |
|
21 |
$j('.slides').css('overflow', 'visible');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
$j('.slides').cycle({
|
24 |
|
29 |
speed: $slidespeed,
|
30 |
timeout: $slidetimeout,
|
31 |
pause: '1',
|
32 |
+
prev: '#meteor-prev',
|
33 |
+
next: '#meteor-next',
|
34 |
+
pager: '#meteor-buttons',
|
35 |
+
pagerEvent: 'click',
|
36 |
+
cleartypeNoBg: 'true'
|
37 |
|
38 |
});
|
39 |
|
languages/meteor-slides-fr_FR.mo
CHANGED
Binary file
|
languages/meteor-slides-fr_FR.po
CHANGED
@@ -20,23 +20,23 @@ msgstr ""
|
|
20 |
|
21 |
#: meteor-slides-plugin.php:78
|
22 |
msgid "Slides"
|
23 |
-
msgstr "
|
24 |
|
25 |
#: meteor-slides-plugin.php:79
|
26 |
msgid "Slide"
|
27 |
-
msgstr "
|
28 |
|
29 |
#: meteor-slides-plugin.php:80
|
30 |
msgid "Add New"
|
31 |
-
msgstr "
|
32 |
|
33 |
#: meteor-slides-plugin.php:81
|
34 |
msgid "Add New Slide"
|
35 |
-
msgstr "
|
36 |
|
37 |
#: meteor-slides-plugin.php:82
|
38 |
msgid "Edit Slide"
|
39 |
-
msgstr "Modifier
|
40 |
|
41 |
#: meteor-slides-plugin.php:83
|
42 |
msgid "Edit"
|
@@ -44,84 +44,84 @@ msgstr "Modifier"
|
|
44 |
|
45 |
#: meteor-slides-plugin.php:84
|
46 |
msgid "New Slide"
|
47 |
-
msgstr "
|
48 |
|
49 |
#: meteor-slides-plugin.php:85
|
50 |
#: meteor-slides-plugin.php:89
|
51 |
msgid "View Slide"
|
52 |
-
msgstr "Voir
|
53 |
|
54 |
#: meteor-slides-plugin.php:86
|
55 |
msgid "Search Slides"
|
56 |
-
msgstr "Chercher
|
57 |
|
58 |
#: meteor-slides-plugin.php:87
|
59 |
msgid "No slides found"
|
60 |
-
msgstr "
|
61 |
|
62 |
#: meteor-slides-plugin.php:88
|
63 |
msgid "No slides found in Trash"
|
64 |
-
msgstr "
|
65 |
|
66 |
#: meteor-slides-plugin.php:127
|
67 |
msgid "Slideshows"
|
68 |
-
msgstr ""
|
69 |
|
70 |
#: meteor-slides-plugin.php:128
|
71 |
msgid "Slideshow"
|
72 |
-
msgstr ""
|
73 |
|
74 |
#: meteor-slides-plugin.php:129
|
75 |
msgid "Search Slideshows"
|
76 |
-
msgstr ""
|
77 |
|
78 |
#: meteor-slides-plugin.php:130
|
79 |
msgid "Popular Slideshows"
|
80 |
-
msgstr ""
|
81 |
|
82 |
#: meteor-slides-plugin.php:131
|
83 |
msgid "All Slideshows"
|
84 |
-
msgstr ""
|
85 |
|
86 |
#: meteor-slides-plugin.php:132
|
87 |
msgid "Parent Slideshow"
|
88 |
-
msgstr ""
|
89 |
|
90 |
#: meteor-slides-plugin.php:133
|
91 |
msgid "Parent Slideshow:"
|
92 |
-
msgstr ""
|
93 |
|
94 |
#: meteor-slides-plugin.php:134
|
95 |
msgid "Edit Slideshow"
|
96 |
-
msgstr ""
|
97 |
|
98 |
#: meteor-slides-plugin.php:135
|
99 |
msgid "Update Slideshow"
|
100 |
-
msgstr ""
|
101 |
|
102 |
#: meteor-slides-plugin.php:136
|
103 |
msgid "Add New Slideshow"
|
104 |
-
msgstr ""
|
105 |
|
106 |
#: meteor-slides-plugin.php:137
|
107 |
msgid "New Slideshow Name"
|
108 |
-
msgstr ""
|
109 |
|
110 |
#: meteor-slides-plugin.php:159
|
111 |
msgid "Slide Image"
|
112 |
-
msgstr "Image
|
113 |
|
114 |
#: meteor-slides-plugin.php:194
|
115 |
msgid "Add the URL this slide should link to."
|
116 |
-
msgstr "
|
117 |
|
118 |
#: meteor-slides-plugin.php:206
|
119 |
msgid "Slide Link"
|
120 |
-
msgstr "Lien
|
121 |
|
122 |
#: meteor-slides-plugin.php:324
|
123 |
msgid "Slides Settings"
|
124 |
-
msgstr "Réglages
|
125 |
|
126 |
#: meteor-slides-plugin.php:324
|
127 |
msgid "Settings"
|
@@ -129,19 +129,19 @@ msgstr "Réglages"
|
|
129 |
|
130 |
#: meteor-slides-plugin.php:358
|
131 |
msgid "Configure Slideshow"
|
132 |
-
msgstr "Configurer le
|
133 |
|
134 |
#: meteor-slides-plugin.php:360
|
135 |
msgid "Slideshow Quantity"
|
136 |
-
msgstr "Quantité de
|
137 |
|
138 |
#: meteor-slides-plugin.php:362
|
139 |
msgid "Slide Height"
|
140 |
-
msgstr "Hauteur
|
141 |
|
142 |
#: meteor-slides-plugin.php:364
|
143 |
msgid "Slide Width"
|
144 |
-
msgstr "Largeur
|
145 |
|
146 |
#: meteor-slides-plugin.php:366
|
147 |
msgid "Transition Style"
|
@@ -153,15 +153,15 @@ msgstr "Vitesse de transition"
|
|
153 |
|
154 |
#: meteor-slides-plugin.php:370
|
155 |
msgid "Slide Duration"
|
156 |
-
msgstr "Durée
|
157 |
|
158 |
#: meteor-slides-plugin.php:372
|
159 |
msgid "Slideshow Navigation"
|
160 |
-
msgstr ""
|
161 |
|
162 |
#: meteor-slides-plugin.php:605
|
163 |
msgid "Add a slideshow widget to a sidebar"
|
164 |
-
msgstr "
|
165 |
|
166 |
#: meteor-slides-plugin.php:609
|
167 |
msgid "Meteor Slides Widget"
|
@@ -169,15 +169,15 @@ msgstr "Widget Meteor Slide"
|
|
169 |
|
170 |
#: meteor-slides-plugin.php:653
|
171 |
msgid "Title:"
|
172 |
-
msgstr ""
|
173 |
|
174 |
#: meteor-slides-plugin.php:656
|
175 |
msgid "Slideshow:"
|
176 |
-
msgstr ""
|
177 |
|
178 |
#: meteor-slides-plugin.php:659
|
179 |
msgid "Metadata:"
|
180 |
-
msgstr ""
|
181 |
|
182 |
#: meteor-slides-settings.php:7
|
183 |
msgid "Set up your slideshow using the options below."
|
@@ -190,15 +190,15 @@ msgstr ""
|
|
190 |
|
191 |
#: meteor-slides-settings.php:41
|
192 |
msgid "blindX"
|
193 |
-
msgstr ""
|
194 |
|
195 |
#: meteor-slides-settings.php:41
|
196 |
msgid "blindY"
|
197 |
-
msgstr ""
|
198 |
|
199 |
#: meteor-slides-settings.php:41
|
200 |
msgid "blindZ"
|
201 |
-
msgstr ""
|
202 |
|
203 |
#: meteor-slides-settings.php:41
|
204 |
msgid "cover"
|
@@ -218,7 +218,7 @@ msgstr "fondu"
|
|
218 |
|
219 |
#: meteor-slides-settings.php:41
|
220 |
msgid "fadeZoom"
|
221 |
-
msgstr "
|
222 |
|
223 |
#: meteor-slides-settings.php:41
|
224 |
msgid "growX"
|
@@ -234,35 +234,35 @@ msgstr "aucun"
|
|
234 |
|
235 |
#: meteor-slides-settings.php:41
|
236 |
msgid "scrollUp"
|
237 |
-
msgstr "
|
238 |
|
239 |
#: meteor-slides-settings.php:41
|
240 |
msgid "scrollDown"
|
241 |
-
msgstr "
|
242 |
|
243 |
#: meteor-slides-settings.php:41
|
244 |
msgid "scrollLeft"
|
245 |
-
msgstr "
|
246 |
|
247 |
#: meteor-slides-settings.php:41
|
248 |
msgid "scrollRight"
|
249 |
-
msgstr "
|
250 |
|
251 |
#: meteor-slides-settings.php:41
|
252 |
msgid "scrollHorz"
|
253 |
-
msgstr "
|
254 |
|
255 |
#: meteor-slides-settings.php:41
|
256 |
msgid "scrollVert"
|
257 |
-
msgstr "
|
258 |
|
259 |
#: meteor-slides-settings.php:41
|
260 |
msgid "slideX"
|
261 |
-
msgstr ""
|
262 |
|
263 |
#: meteor-slides-settings.php:41
|
264 |
msgid "slideY"
|
265 |
-
msgstr ""
|
266 |
|
267 |
#: meteor-slides-settings.php:41
|
268 |
msgid "shuffle"
|
@@ -270,11 +270,11 @@ msgstr "aléatoire"
|
|
270 |
|
271 |
#: meteor-slides-settings.php:41
|
272 |
msgid "turnUp"
|
273 |
-
msgstr "
|
274 |
|
275 |
#: meteor-slides-settings.php:41
|
276 |
msgid "turnDown"
|
277 |
-
msgstr "
|
278 |
|
279 |
#: meteor-slides-settings.php:41
|
280 |
msgid "turnLeft"
|
@@ -303,19 +303,19 @@ msgstr "secondes"
|
|
303 |
|
304 |
#: meteor-slides-settings.php:83
|
305 |
msgid "None"
|
306 |
-
msgstr ""
|
307 |
|
308 |
#: meteor-slides-settings.php:84
|
309 |
msgid "Previous/Next"
|
310 |
-
msgstr ""
|
311 |
|
312 |
#: meteor-slides-settings.php:85
|
313 |
msgid "Paged"
|
314 |
-
msgstr ""
|
315 |
|
316 |
#: meteor-slides-settings.php:86
|
317 |
msgid "Both"
|
318 |
-
msgstr ""
|
319 |
|
320 |
#: meteor-slides-settings.php:112
|
321 |
msgid "Meteor Slides Settings"
|
@@ -332,20 +332,19 @@ msgstr "Installer Meteor Slide"
|
|
332 |
#: meteor-slides-settings.php:134
|
333 |
#, php-format
|
334 |
msgid "Use %1$s to add this slideshow to your theme, use %2$s to add it to your Post or Page content, or use the Meteor Slides Widget. %3$sMore information%4$s"
|
335 |
-
msgstr "Pour ajouter les diaporamas à votre thème utilisez %1$s,
|
336 |
|
337 |
#: meteor-slides-settings.php:136
|
338 |
#, php-format
|
339 |
msgid "Please %1$spost any questions or problems%2$s in the WordPress.org support forums."
|
340 |
-
msgstr "
|
341 |
|
342 |
#: meteor-slideshow.php:17
|
343 |
#: meteor-slideshow.php:29
|
344 |
msgid "Previous"
|
345 |
-
msgstr ""
|
346 |
|
347 |
#: meteor-slideshow.php:19
|
348 |
#: meteor-slideshow.php:31
|
349 |
msgid "Next"
|
350 |
-
msgstr ""
|
351 |
-
|
20 |
|
21 |
#: meteor-slides-plugin.php:78
|
22 |
msgid "Slides"
|
23 |
+
msgstr "Diapositives"
|
24 |
|
25 |
#: meteor-slides-plugin.php:79
|
26 |
msgid "Slide"
|
27 |
+
msgstr "Diapositive"
|
28 |
|
29 |
#: meteor-slides-plugin.php:80
|
30 |
msgid "Add New"
|
31 |
+
msgstr "Nouvelle Diapositive"
|
32 |
|
33 |
#: meteor-slides-plugin.php:81
|
34 |
msgid "Add New Slide"
|
35 |
+
msgstr "Nouvelle Diapositive"
|
36 |
|
37 |
#: meteor-slides-plugin.php:82
|
38 |
msgid "Edit Slide"
|
39 |
+
msgstr "Modifier une Diapositive"
|
40 |
|
41 |
#: meteor-slides-plugin.php:83
|
42 |
msgid "Edit"
|
44 |
|
45 |
#: meteor-slides-plugin.php:84
|
46 |
msgid "New Slide"
|
47 |
+
msgstr "Nouvelle Diapositive"
|
48 |
|
49 |
#: meteor-slides-plugin.php:85
|
50 |
#: meteor-slides-plugin.php:89
|
51 |
msgid "View Slide"
|
52 |
+
msgstr "Voir la Diapositive"
|
53 |
|
54 |
#: meteor-slides-plugin.php:86
|
55 |
msgid "Search Slides"
|
56 |
+
msgstr "Chercher une Diapositive"
|
57 |
|
58 |
#: meteor-slides-plugin.php:87
|
59 |
msgid "No slides found"
|
60 |
+
msgstr "Aucune diapositive trouvée"
|
61 |
|
62 |
#: meteor-slides-plugin.php:88
|
63 |
msgid "No slides found in Trash"
|
64 |
+
msgstr "Aucune diapositive trouvée dans la corbeille"
|
65 |
|
66 |
#: meteor-slides-plugin.php:127
|
67 |
msgid "Slideshows"
|
68 |
+
msgstr "Diaporamas"
|
69 |
|
70 |
#: meteor-slides-plugin.php:128
|
71 |
msgid "Slideshow"
|
72 |
+
msgstr "Diaporama"
|
73 |
|
74 |
#: meteor-slides-plugin.php:129
|
75 |
msgid "Search Slideshows"
|
76 |
+
msgstr "Rechercher un Diaporama"
|
77 |
|
78 |
#: meteor-slides-plugin.php:130
|
79 |
msgid "Popular Slideshows"
|
80 |
+
msgstr "Diaporamas populaires"
|
81 |
|
82 |
#: meteor-slides-plugin.php:131
|
83 |
msgid "All Slideshows"
|
84 |
+
msgstr "Tous les Diaporamas"
|
85 |
|
86 |
#: meteor-slides-plugin.php:132
|
87 |
msgid "Parent Slideshow"
|
88 |
+
msgstr "Diaporama parent"
|
89 |
|
90 |
#: meteor-slides-plugin.php:133
|
91 |
msgid "Parent Slideshow:"
|
92 |
+
msgstr "Diaporama parent:"
|
93 |
|
94 |
#: meteor-slides-plugin.php:134
|
95 |
msgid "Edit Slideshow"
|
96 |
+
msgstr "Editer le Diaporama"
|
97 |
|
98 |
#: meteor-slides-plugin.php:135
|
99 |
msgid "Update Slideshow"
|
100 |
+
msgstr "Mettre à jour le Diaporama"
|
101 |
|
102 |
#: meteor-slides-plugin.php:136
|
103 |
msgid "Add New Slideshow"
|
104 |
+
msgstr "Nouveau Diaporama"
|
105 |
|
106 |
#: meteor-slides-plugin.php:137
|
107 |
msgid "New Slideshow Name"
|
108 |
+
msgstr "Nouveau nom de Diaporama"
|
109 |
|
110 |
#: meteor-slides-plugin.php:159
|
111 |
msgid "Slide Image"
|
112 |
+
msgstr "Image de Diapositive"
|
113 |
|
114 |
#: meteor-slides-plugin.php:194
|
115 |
msgid "Add the URL this slide should link to."
|
116 |
+
msgstr "Renseignez l'URL vers laquelle cette diapositive doit pointer"
|
117 |
|
118 |
#: meteor-slides-plugin.php:206
|
119 |
msgid "Slide Link"
|
120 |
+
msgstr "Lien de la diapositive"
|
121 |
|
122 |
#: meteor-slides-plugin.php:324
|
123 |
msgid "Slides Settings"
|
124 |
+
msgstr "Réglages de Diapositives"
|
125 |
|
126 |
#: meteor-slides-plugin.php:324
|
127 |
msgid "Settings"
|
129 |
|
130 |
#: meteor-slides-plugin.php:358
|
131 |
msgid "Configure Slideshow"
|
132 |
+
msgstr "Configurer le Diaporama"
|
133 |
|
134 |
#: meteor-slides-plugin.php:360
|
135 |
msgid "Slideshow Quantity"
|
136 |
+
msgstr "Quantité de Diaporamas"
|
137 |
|
138 |
#: meteor-slides-plugin.php:362
|
139 |
msgid "Slide Height"
|
140 |
+
msgstr "Hauteur de la Diapositive"
|
141 |
|
142 |
#: meteor-slides-plugin.php:364
|
143 |
msgid "Slide Width"
|
144 |
+
msgstr "Largeur de la Diapositive"
|
145 |
|
146 |
#: meteor-slides-plugin.php:366
|
147 |
msgid "Transition Style"
|
153 |
|
154 |
#: meteor-slides-plugin.php:370
|
155 |
msgid "Slide Duration"
|
156 |
+
msgstr "Durée de la Diapositive"
|
157 |
|
158 |
#: meteor-slides-plugin.php:372
|
159 |
msgid "Slideshow Navigation"
|
160 |
+
msgstr "Navigation du Diaporama"
|
161 |
|
162 |
#: meteor-slides-plugin.php:605
|
163 |
msgid "Add a slideshow widget to a sidebar"
|
164 |
+
msgstr "Ajouter un Meteor Slide à la barre latérale"
|
165 |
|
166 |
#: meteor-slides-plugin.php:609
|
167 |
msgid "Meteor Slides Widget"
|
169 |
|
170 |
#: meteor-slides-plugin.php:653
|
171 |
msgid "Title:"
|
172 |
+
msgstr "Titre:"
|
173 |
|
174 |
#: meteor-slides-plugin.php:656
|
175 |
msgid "Slideshow:"
|
176 |
+
msgstr "Diaporama:"
|
177 |
|
178 |
#: meteor-slides-plugin.php:659
|
179 |
msgid "Metadata:"
|
180 |
+
msgstr "Matadonnées:"
|
181 |
|
182 |
#: meteor-slides-settings.php:7
|
183 |
msgid "Set up your slideshow using the options below."
|
190 |
|
191 |
#: meteor-slides-settings.php:41
|
192 |
msgid "blindX"
|
193 |
+
msgstr "masqueX"
|
194 |
|
195 |
#: meteor-slides-settings.php:41
|
196 |
msgid "blindY"
|
197 |
+
msgstr "masqueY"
|
198 |
|
199 |
#: meteor-slides-settings.php:41
|
200 |
msgid "blindZ"
|
201 |
+
msgstr "masqueZ"
|
202 |
|
203 |
#: meteor-slides-settings.php:41
|
204 |
msgid "cover"
|
218 |
|
219 |
#: meteor-slides-settings.php:41
|
220 |
msgid "fadeZoom"
|
221 |
+
msgstr "fondu zoom"
|
222 |
|
223 |
#: meteor-slides-settings.php:41
|
224 |
msgid "growX"
|
234 |
|
235 |
#: meteor-slides-settings.php:41
|
236 |
msgid "scrollUp"
|
237 |
+
msgstr "déroulement vers le haut"
|
238 |
|
239 |
#: meteor-slides-settings.php:41
|
240 |
msgid "scrollDown"
|
241 |
+
msgstr "déroulement vers le bas"
|
242 |
|
243 |
#: meteor-slides-settings.php:41
|
244 |
msgid "scrollLeft"
|
245 |
+
msgstr "déroulement vers la gauche"
|
246 |
|
247 |
#: meteor-slides-settings.php:41
|
248 |
msgid "scrollRight"
|
249 |
+
msgstr "déroulement vers la droite"
|
250 |
|
251 |
#: meteor-slides-settings.php:41
|
252 |
msgid "scrollHorz"
|
253 |
+
msgstr "déroulement Hortz"
|
254 |
|
255 |
#: meteor-slides-settings.php:41
|
256 |
msgid "scrollVert"
|
257 |
+
msgstr "déroulement Vert"
|
258 |
|
259 |
#: meteor-slides-settings.php:41
|
260 |
msgid "slideX"
|
261 |
+
msgstr "glissementX"
|
262 |
|
263 |
#: meteor-slides-settings.php:41
|
264 |
msgid "slideY"
|
265 |
+
msgstr "glissementY"
|
266 |
|
267 |
#: meteor-slides-settings.php:41
|
268 |
msgid "shuffle"
|
270 |
|
271 |
#: meteor-slides-settings.php:41
|
272 |
msgid "turnUp"
|
273 |
+
msgstr "Tourner vers le haut"
|
274 |
|
275 |
#: meteor-slides-settings.php:41
|
276 |
msgid "turnDown"
|
277 |
+
msgstr "Tourner vers le bas"
|
278 |
|
279 |
#: meteor-slides-settings.php:41
|
280 |
msgid "turnLeft"
|
303 |
|
304 |
#: meteor-slides-settings.php:83
|
305 |
msgid "None"
|
306 |
+
msgstr "Aucun"
|
307 |
|
308 |
#: meteor-slides-settings.php:84
|
309 |
msgid "Previous/Next"
|
310 |
+
msgstr "Précédent/Suivant"
|
311 |
|
312 |
#: meteor-slides-settings.php:85
|
313 |
msgid "Paged"
|
314 |
+
msgstr "Paginé"
|
315 |
|
316 |
#: meteor-slides-settings.php:86
|
317 |
msgid "Both"
|
318 |
+
msgstr "Les deux"
|
319 |
|
320 |
#: meteor-slides-settings.php:112
|
321 |
msgid "Meteor Slides Settings"
|
332 |
#: meteor-slides-settings.php:134
|
333 |
#, php-format
|
334 |
msgid "Use %1$s to add this slideshow to your theme, use %2$s to add it to your Post or Page content, or use the Meteor Slides Widget. %3$sMore information%4$s"
|
335 |
+
msgstr "Pour ajouter les diaporamas à votre thème utilisez %1$s, pour les 'ajouter au contenu de vos articles ou pages, utilisez %2$s, ou utilisez le Widget Meteor Slides pour rajouter les diaporamas à votre barre latérale. %3$sPlus d'informations%4$s"
|
336 |
|
337 |
#: meteor-slides-settings.php:136
|
338 |
#, php-format
|
339 |
msgid "Please %1$spost any questions or problems%2$s in the WordPress.org support forums."
|
340 |
+
msgstr "Merci de poster %1$s vos questions ou problèmes %2$s dans le forum de support sur Wordpress.org"
|
341 |
|
342 |
#: meteor-slideshow.php:17
|
343 |
#: meteor-slideshow.php:29
|
344 |
msgid "Previous"
|
345 |
+
msgstr "Précédent"
|
346 |
|
347 |
#: meteor-slideshow.php:19
|
348 |
#: meteor-slideshow.php:31
|
349 |
msgid "Next"
|
350 |
+
msgstr "Suivant"
|
|
meteor-slides-plugin.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Meteor Slides
|
4 |
-
Description: Meteor Slides makes it simple to
|
5 |
Plugin URI: http://www.jleuze.com/plugins/meteor-slides
|
6 |
Author: Josh Leuze
|
7 |
Author URI: http://www.jleuze.com/
|
8 |
License: GPL2
|
9 |
-
Version: 1.3
|
10 |
*/
|
11 |
|
12 |
/* Copyright 2010 Josh Leuze (email : mail@jleuze.com)
|
@@ -25,21 +25,86 @@
|
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
28 |
-
// Adds
|
29 |
|
30 |
-
add_action( '
|
|
|
|
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
|
|
|
|
37 |
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
|
|
|
|
40 |
}
|
41 |
|
42 |
-
// Adds featured image functionality for
|
43 |
|
44 |
add_action( 'after_setup_theme', 'meteorslides_featured_image_array', '9999' );
|
45 |
|
@@ -47,18 +112,12 @@
|
|
47 |
|
48 |
global $_wp_theme_features;
|
49 |
|
50 |
-
if( !isset( $_wp_theme_features['post-thumbnails'] ) ) {
|
51 |
|
52 |
$_wp_theme_features['post-thumbnails'] = array( array( 'slide' ) );
|
53 |
|
54 |
}
|
55 |
|
56 |
-
elseif ( true === $_wp_theme_features['post-thumbnails'] ) {
|
57 |
-
|
58 |
-
$_wp_theme_features['post-thumbnails'] = array( array( 'post','page', 'slide' ) );
|
59 |
-
|
60 |
-
}
|
61 |
-
|
62 |
elseif ( is_array( $_wp_theme_features['post-thumbnails'] ) ) {
|
63 |
|
64 |
$_wp_theme_features['post-thumbnails'][0][] = 'slide';
|
@@ -66,86 +125,19 @@
|
|
66 |
}
|
67 |
|
68 |
}
|
69 |
-
|
70 |
-
// Adds slides custom post type
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
function meteorslides_register_slides() {
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
'name' => __('Slides', 'meteor-slides'),
|
79 |
-
'singular_name' => __('Slide', 'meteor-slides'),
|
80 |
-
'add_new' => __('Add New', 'meteor-slides'),
|
81 |
-
'add_new_item' => __('Add New Slide','meteor-slides'),
|
82 |
-
'edit_item' => __('Edit Slide','meteor-slides'),
|
83 |
-
'edit' => __('Edit', 'meteor-slides'),
|
84 |
-
'new_item' => __('New Slide','meteor-slides'),
|
85 |
-
'view_item' => __('View Slide','meteor-slides'),
|
86 |
-
'search_items' => __('Search Slides','meteor-slides'),
|
87 |
-
'not_found' => __('No slides found','meteor-slides'),
|
88 |
-
'not_found_in_trash' => __('No slides found in Trash','meteor-slides'),
|
89 |
-
'view' => __('View Slide','meteor-slides'),
|
90 |
-
'parent_item_colon' => ''
|
91 |
-
|
92 |
-
);
|
93 |
-
|
94 |
-
$args = array(
|
95 |
|
96 |
-
|
97 |
-
'public' => false,
|
98 |
-
'publicly_queryable' => true,
|
99 |
-
'show_ui' => true,
|
100 |
-
'query_var' => 'slides',
|
101 |
-
'rewrite' => true,
|
102 |
-
'capability_type' => 'page',
|
103 |
-
'hierarchical' => false,
|
104 |
-
'supports' => array('title', 'thumbnail'),
|
105 |
-
'menu_icon' => ''. plugins_url('/images/slides-icon-20x20.png', __FILE__)
|
106 |
|
107 |
-
);
|
108 |
-
|
109 |
-
register_post_type( 'slide',$args );
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
add_action( 'init', 'meteorslides_register_taxonomy' );
|
116 |
-
|
117 |
-
function meteorslides_register_taxonomy() {
|
118 |
|
119 |
-
register_taxonomy(
|
120 |
-
|
121 |
-
'slideshow',
|
122 |
-
'slide',
|
123 |
-
array(
|
124 |
-
|
125 |
-
'labels' => array(
|
126 |
-
|
127 |
-
'name' => __('Slideshows','meteor-slides'),
|
128 |
-
'singular_name' => __('Slideshow','meteor-slides'),
|
129 |
-
'search_items' => __('Search Slideshows','meteor-slides'),
|
130 |
-
'popular_items' => __('Popular Slideshows','meteor-slides'),
|
131 |
-
'all_items' => __('All Slideshows','meteor-slides'),
|
132 |
-
'parent_item' => __('Parent Slideshow','meteor-slides'),
|
133 |
-
'parent_item_colon' => __('Parent Slideshow:','meteor-slides'),
|
134 |
-
'edit_item' => __('Edit Slideshow','meteor-slides'),
|
135 |
-
'update_item' => __('Update Slideshow','meteor-slides'),
|
136 |
-
'add_new_item' => __('Add New Slideshow','meteor-slides'),
|
137 |
-
'new_item_name' => __('New Slideshow Name','meteor-slides')
|
138 |
-
|
139 |
-
),
|
140 |
-
|
141 |
-
'hierarchical' => true,
|
142 |
-
'sort' => true,
|
143 |
-
'args' => array('orderby' => 'term_order'),
|
144 |
-
'rewrite' => array('slug' => 'slideshow'),
|
145 |
-
|
146 |
-
)
|
147 |
-
|
148 |
-
);
|
149 |
}
|
150 |
|
151 |
// Customize and move featured image box to main column
|
@@ -159,11 +151,20 @@
|
|
159 |
add_meta_box( 'postimagediv', __('Slide Image','meteor-slides'), 'post_thumbnail_meta_box', 'slide', 'normal', 'high' );
|
160 |
|
161 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
-
// Adds meta box for
|
164 |
|
165 |
add_action( 'admin_menu', 'meteorslides_create_url_meta_box' );
|
166 |
-
add_action( 'save_post', 'meteorslides_save_postdata' );
|
167 |
|
168 |
$meteorslides_new_meta_box =
|
169 |
|
@@ -172,7 +173,7 @@
|
|
172 |
'slide_url' => array(
|
173 |
|
174 |
'name' => 'slide_url',
|
175 |
-
'std'
|
176 |
)
|
177 |
|
178 |
);
|
@@ -181,7 +182,7 @@
|
|
181 |
|
182 |
global $post, $meteorslides_new_meta_box;
|
183 |
|
184 |
-
foreach( $meteorslides_new_meta_box as $meteorslides_meta_box ) {
|
185 |
|
186 |
$meteorslides_meta_box_value = get_post_meta( $post->ID, $meteorslides_meta_box['name'].'_value', true );
|
187 |
|
@@ -201,13 +202,17 @@
|
|
201 |
|
202 |
global $theme_name;
|
203 |
|
204 |
-
if( function_exists('add_meta_box') ) {
|
205 |
|
206 |
add_meta_box( 'meteorslides-url-box', __('Slide Link','meteor-slides'), 'meteorslides_new_meta_box', 'slide', 'normal', 'low' );
|
207 |
|
208 |
}
|
209 |
|
210 |
}
|
|
|
|
|
|
|
|
|
211 |
|
212 |
function meteorslides_save_postdata( $post_id ) {
|
213 |
|
@@ -215,13 +220,13 @@
|
|
215 |
|
216 |
foreach( $meteorslides_new_meta_box as $meteorslides_meta_box ) {
|
217 |
|
218 |
-
if( !isset( $_POST[$meteorslides_meta_box['name'].'_noncename'] ) || !wp_verify_nonce( $_POST[$meteorslides_meta_box['name'].'_noncename'], plugin_basename(__FILE__) ) ) {
|
219 |
|
220 |
return $post_id;
|
221 |
|
222 |
}
|
223 |
|
224 |
-
if( 'page' == $_POST['post_type'] ) {
|
225 |
|
226 |
if( !current_user_can( 'edit_page', $post_id ) )
|
227 |
|
@@ -239,19 +244,19 @@
|
|
239 |
|
240 |
$data = $_POST[$meteorslides_meta_box['name'].'_value'];
|
241 |
|
242 |
-
if( get_post_meta( $post_id, $meteorslides_meta_box['name'].'_value' ) == "" ) {
|
243 |
|
244 |
add_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', $data, true );
|
245 |
|
246 |
}
|
247 |
|
248 |
-
elseif( $data != get_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', true ) ) {
|
249 |
|
250 |
update_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', $data );
|
251 |
|
252 |
}
|
253 |
|
254 |
-
elseif( $data == "" ) {
|
255 |
|
256 |
delete_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', get_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', true ) );
|
257 |
|
@@ -263,17 +268,17 @@
|
|
263 |
|
264 |
// Adds slide image and link to slides column view
|
265 |
|
266 |
-
add_filter(
|
267 |
|
268 |
-
function
|
269 |
|
270 |
$columns = array(
|
271 |
|
272 |
-
'cb'
|
273 |
-
'slide'
|
274 |
-
'title'
|
275 |
'slide-link' => 'Slide Link',
|
276 |
-
'date'
|
277 |
|
278 |
);
|
279 |
|
@@ -281,23 +286,23 @@
|
|
281 |
|
282 |
}
|
283 |
|
284 |
-
add_action(
|
285 |
|
286 |
-
function
|
287 |
|
288 |
global $post;
|
289 |
|
290 |
-
switch ($column) {
|
291 |
|
292 |
-
case
|
293 |
|
294 |
echo the_post_thumbnail('featured-slide-thumb');
|
295 |
|
296 |
break;
|
297 |
|
298 |
-
case 'slide-link':
|
299 |
|
300 |
-
if(get_post_meta($post->ID, "slide_url_value", $single = true) != "") {
|
301 |
|
302 |
echo "<a href='" . get_post_meta($post->ID, "slide_url_value", $single = true) . "'>" . get_post_meta($post->ID, "slide_url_value", $single = true) . "</a>";
|
303 |
|
@@ -305,7 +310,7 @@
|
|
305 |
|
306 |
else {
|
307 |
|
308 |
-
|
309 |
|
310 |
}
|
311 |
|
@@ -321,27 +326,27 @@
|
|
321 |
|
322 |
function meteorslides_menu() {
|
323 |
|
324 |
-
add_submenu_page( 'edit.php?post_type=slide', __('Slides Settings','meteor-slides'), __('Settings','meteor-slides'), 'manage_options', 'slides-settings', 'meteorslides_settings_page' );
|
325 |
-
|
326 |
}
|
327 |
|
328 |
function meteorslides_settings_page() {
|
329 |
-
|
330 |
include( 'meteor-slides-settings.php' );
|
331 |
|
332 |
}
|
333 |
-
|
334 |
// Adds link to settings page on plugins page
|
|
|
|
|
335 |
|
336 |
-
$
|
337 |
-
|
338 |
-
add_filter("plugin_action_links_$plugin", 'meteorslides_settings_link' );
|
339 |
-
|
340 |
-
function meteorslides_settings_link($links) {
|
341 |
-
|
342 |
-
$settings_link = '<a href="edit.php?post_type=slide&page=slides-settings">Settings</a>';
|
343 |
|
344 |
-
|
|
|
|
|
|
|
|
|
345 |
|
346 |
return $links;
|
347 |
|
@@ -349,43 +354,53 @@
|
|
349 |
|
350 |
// Register options for settings page
|
351 |
|
352 |
-
add_action('admin_init', 'meteorslides_register_settings');
|
353 |
|
354 |
-
function meteorslides_register_settings(){
|
355 |
|
356 |
register_setting( 'meteorslides_options', 'meteorslides_options' );
|
357 |
|
358 |
-
add_settings_section('meteorslides_slideshow', __('Configure Slideshow','meteor-slides'), 'meteorslides_section_text', 'meteorslides');
|
359 |
|
360 |
-
add_settings_field('slideshow_quantity', __('Slideshow Quantity','meteor-slides'), 'slideshow_quantity', 'meteorslides', 'meteorslides_slideshow');
|
361 |
|
362 |
-
add_settings_field('slide_height', __('Slide Height','meteor-slides'), 'slide_height', 'meteorslides', 'meteorslides_slideshow');
|
363 |
|
364 |
-
add_settings_field('slide_width', __('Slide Width','meteor-slides'), 'slide_width', 'meteorslides', 'meteorslides_slideshow');
|
365 |
|
366 |
-
add_settings_field('transition_style', __('Transition Style','meteor-slides'), 'transition_style', 'meteorslides', 'meteorslides_slideshow');
|
367 |
|
368 |
-
add_settings_field('transition_speed', __('Transition Speed','meteor-slides'), 'transition_speed', 'meteorslides', 'meteorslides_slideshow');
|
369 |
|
370 |
-
add_settings_field('slide_duration', __('Slide Duration','meteor-slides'), 'slide_duration', 'meteorslides', 'meteorslides_slideshow');
|
371 |
|
372 |
-
add_settings_field('slideshow_navigation', __('Slideshow Navigation','meteor-slides'), 'slideshow_navigation', 'meteorslides', 'meteorslides_slideshow');
|
373 |
|
374 |
}
|
375 |
|
376 |
// Adds default values for options on settings page
|
377 |
|
378 |
-
register_activation_hook(__FILE__, 'meteorslides_default_options');
|
379 |
|
380 |
function meteorslides_default_options() {
|
381 |
|
382 |
-
$tmp = get_option('meteorslides_options');
|
383 |
-
|
384 |
-
if(($tmp['slideshow_quantity']=='')||(!is_array($tmp))) {
|
385 |
|
386 |
-
$arr = array(
|
387 |
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
|
390 |
}
|
391 |
|
@@ -393,61 +408,61 @@
|
|
393 |
|
394 |
// Validates values for options on settings page
|
395 |
|
396 |
-
function meteorslides_options_validate($input) {
|
397 |
|
398 |
-
$options = get_option('meteorslides_options');
|
399 |
|
400 |
-
$options['slideshow_quantity'] = trim($input['slideshow_quantity']);
|
401 |
|
402 |
-
if(!preg_match('/^[0-9]{1,3}$/i', $options['slideshow_quantity'])) {
|
403 |
|
404 |
$options['slideshow_quantity'] = '';
|
405 |
|
406 |
}
|
407 |
|
408 |
-
$options['slide_height'] = trim($input['slide_height']);
|
409 |
|
410 |
-
if(!preg_match('/^[0-9]{1,4}$/i', $options['slide_height'])) {
|
411 |
|
412 |
$options['slide_height'] = '';
|
413 |
|
414 |
}
|
415 |
|
416 |
-
$options['slide_width'] = trim($input['slide_width']);
|
417 |
|
418 |
-
if(!preg_match('/^[0-9]{1,5}$/i', $options['slide_width'])) {
|
419 |
|
420 |
$options['slide_width'] = '';
|
421 |
|
422 |
}
|
423 |
|
424 |
-
$options['transition_style'] = trim($input['transition_style']);
|
425 |
|
426 |
-
if(!preg_match('/^[a-z]{4,20}$/i', $options['transition_style'])) {
|
427 |
|
428 |
$options['transition_style'] = '';
|
429 |
|
430 |
}
|
431 |
|
432 |
-
$options['transition_speed'] = trim($input['transition_speed']);
|
433 |
|
434 |
-
if(!preg_match('/^[0-9]{1,3}$/i', $options['transition_speed'])) {
|
435 |
|
436 |
$options['transition_speed'] = '';
|
437 |
|
438 |
}
|
439 |
|
440 |
-
$options['slide_duration'] = trim($input['slide_duration']);
|
441 |
|
442 |
-
if(!preg_match('/^[0-9]{1,3}$/i', $options['slide_duration'])) {
|
443 |
|
444 |
$options['slide_duration'] = '';
|
445 |
|
446 |
}
|
447 |
|
448 |
-
$options['slideshow_navigation'] = trim($input['slideshow_navigation']);
|
449 |
|
450 |
-
if(!preg_match('/^[a-z]{4,20}$/i', $options['slideshow_navigation'])) {
|
451 |
|
452 |
$options['slideshow_navigation'] = '';
|
453 |
|
@@ -459,23 +474,23 @@
|
|
459 |
|
460 |
// Adds translation support for language files
|
461 |
|
462 |
-
add_action('plugins_loaded', 'meteorslides_localization');
|
463 |
|
464 |
function meteorslides_localization() {
|
465 |
|
466 |
-
load_plugin_textdomain('meteor-slides', false, '/meteor-slides/languages/');
|
467 |
|
468 |
}
|
469 |
|
470 |
-
// Adds CSS for the admin pages
|
471 |
|
472 |
-
add_action('admin_enqueue_scripts', 'meteorslides_admin_css');
|
473 |
|
474 |
function meteorslides_admin_css() {
|
475 |
|
476 |
global $post_type;
|
477 |
|
478 |
-
if ((isset($_GET['post_type']) && $_GET['post_type'] == 'slide') || (isset($post_type) && $post_type == 'slide')) {
|
479 |
|
480 |
wp_enqueue_style( 'meteor-slides-admin', plugins_url('/css/meteor-slides-admin.css', __FILE__), array(), '1.0' );
|
481 |
|
@@ -485,17 +500,17 @@
|
|
485 |
|
486 |
// Adds CSS for the slideshow
|
487 |
|
488 |
-
add_action('wp_enqueue_scripts', 'meteorslides_css');
|
489 |
|
490 |
function meteorslides_css() {
|
491 |
|
492 |
-
if(file_exists(get_stylesheet_directory()."/meteor-slides.css")) {
|
493 |
|
494 |
wp_enqueue_style( 'meteor-slides', get_stylesheet_directory_uri() . '/meteor-slides.css', array(), '1.0' );
|
495 |
|
496 |
}
|
497 |
|
498 |
-
elseif(file_exists(get_template_directory()."/meteor-slides.css")) {
|
499 |
|
500 |
wp_enqueue_style( 'meteor-slides', get_template_directory_uri() . '/meteor-slides.css', array(), '1.0' );
|
501 |
|
@@ -520,17 +535,17 @@
|
|
520 |
if( !is_admin() ) {
|
521 |
|
522 |
wp_enqueue_script( 'jquery' );
|
523 |
-
wp_enqueue_script( 'jquery-cycle', plugins_url('/js/jquery.cycle.all.js', __FILE__), array( 'jquery' ) );
|
524 |
-
wp_enqueue_script( 'jquery-metadata', plugins_url('/js/jquery.metadata.v2.js', __FILE__), array( 'jquery' ) );
|
525 |
-
wp_enqueue_script( 'meteorslides-script', plugins_url('/js/slideshow.js', __FILE__), array( 'jquery', 'jquery-cycle' ) );
|
526 |
wp_localize_script( 'meteorslides-script', 'meteorslidessettings',
|
527 |
|
528 |
array(
|
529 |
|
530 |
-
'meteorslideshowspeed'
|
531 |
-
'meteorslideshowduration'
|
532 |
-
'meteorslideshowheight'
|
533 |
-
'meteorslideshowwidth'
|
534 |
'meteorslideshowtransition' => $options['transition_style']
|
535 |
|
536 |
)
|
@@ -543,9 +558,25 @@
|
|
543 |
|
544 |
// Adds function to load slideshow in theme
|
545 |
|
546 |
-
function meteor_slideshow($slideshow=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
|
548 |
-
|
549 |
|
550 |
}
|
551 |
|
@@ -557,12 +588,12 @@
|
|
557 |
|
558 |
// Adds shortcode to load slideshow in content
|
559 |
|
560 |
-
function meteor_slideshow_shortcode($atts) {
|
561 |
|
562 |
-
extract(shortcode_atts( array (
|
563 |
|
564 |
-
'slideshow' =>
|
565 |
-
'metadata'
|
566 |
|
567 |
), $atts ) );
|
568 |
|
@@ -572,7 +603,7 @@
|
|
572 |
|
573 |
ob_start();
|
574 |
|
575 |
-
meteor_slideshow($slideshow=$slideshow_att, $metadata=$metadata_att);
|
576 |
|
577 |
$meteor_slideshow_content = ob_get_clean();
|
578 |
|
@@ -602,22 +633,25 @@
|
|
602 |
|
603 |
function meteorslides_widget() {
|
604 |
|
605 |
-
$widget_ops = array(
|
|
|
|
|
|
|
|
|
|
|
606 |
|
607 |
$control_ops = array( 'id_base' => 'meteor-slides-widget' );
|
608 |
|
609 |
-
$this->WP_Widget( 'meteor-slides-widget', __('Meteor Slides Widget','meteor-slides'), $widget_ops, $control_ops );
|
610 |
}
|
611 |
|
612 |
function widget( $args, $instance ) {
|
613 |
|
614 |
extract( $args );
|
615 |
|
616 |
-
$title
|
617 |
-
|
618 |
$slideshow_arg = $instance['slideshow'];
|
619 |
-
|
620 |
-
$metadata_arg = $instance['metadata'];
|
621 |
|
622 |
echo $before_widget;
|
623 |
|
@@ -627,7 +661,7 @@
|
|
627 |
|
628 |
}
|
629 |
|
630 |
-
meteor_slideshow($slideshow=$slideshow_arg, $metadata=$metadata_arg);
|
631 |
|
632 |
echo $after_widget;
|
633 |
|
@@ -637,9 +671,9 @@
|
|
637 |
|
638 |
$instance = $old_instance;
|
639 |
|
640 |
-
$instance['title']
|
641 |
$instance['slideshow'] = strip_tags( $new_instance['slideshow'] );
|
642 |
-
$instance['metadata']
|
643 |
|
644 |
return $instance;
|
645 |
|
@@ -647,7 +681,14 @@
|
|
647 |
|
648 |
function form( $instance ) {
|
649 |
|
650 |
-
$defaults = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
651 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
652 |
|
653 |
echo '<p><label for="' . $this->get_field_id( 'title' ) . '">' . __('Title:', 'meteor-slides') . '</label>
|
@@ -662,5 +703,5 @@
|
|
662 |
}
|
663 |
|
664 |
}
|
665 |
-
|
666 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Meteor Slides
|
4 |
+
Description: Meteor Slides makes it simple to create slideshows with WordPress by adding a custom post type for slides.
|
5 |
Plugin URI: http://www.jleuze.com/plugins/meteor-slides
|
6 |
Author: Josh Leuze
|
7 |
Author URI: http://www.jleuze.com/
|
8 |
License: GPL2
|
9 |
+
Version: 1.3.1
|
10 |
*/
|
11 |
|
12 |
/* Copyright 2010 Josh Leuze (email : mail@jleuze.com)
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
28 |
+
// Adds custom post type for Slides
|
29 |
|
30 |
+
add_action( 'init', 'meteorslides_register_slides' );
|
31 |
+
|
32 |
+
function meteorslides_register_slides() {
|
33 |
|
34 |
+
$labels = array(
|
35 |
|
36 |
+
'name' => __( 'Slides', 'meteor-slides' ),
|
37 |
+
'singular_name' => __( 'Slide', 'meteor-slides' ),
|
38 |
+
'add_new' => __( 'Add New', 'meteor-slides' ),
|
39 |
+
'add_new_item' => __( 'Add New Slide', 'meteor-slides' ),
|
40 |
+
'edit_item' => __( 'Edit Slide', 'meteor-slides' ),
|
41 |
+
'edit' => __( 'Edit', 'meteor-slides' ),
|
42 |
+
'new_item' => __( 'New Slide', 'meteor-slides' ),
|
43 |
+
'view_item' => __( 'View Slide', 'meteor-slides' ),
|
44 |
+
'search_items' => __( 'Search Slides', 'meteor-slides' ),
|
45 |
+
'not_found' => __( 'No slides found', 'meteor-slides' ),
|
46 |
+
'not_found_in_trash' => __( 'No slides found in Trash', 'meteor-slides' ),
|
47 |
+
'view' => __( 'View Slide', 'meteor-slides' ),
|
48 |
+
'parent_item_colon' => ''
|
49 |
+
|
50 |
+
);
|
51 |
+
|
52 |
+
$args = array(
|
53 |
+
|
54 |
+
'labels' => $labels,
|
55 |
+
'public' => false,
|
56 |
+
'publicly_queryable' => true,
|
57 |
+
'show_ui' => true,
|
58 |
+
'query_var' => 'slides',
|
59 |
+
'rewrite' => true,
|
60 |
+
'capability_type' => 'page',
|
61 |
+
'hierarchical' => false,
|
62 |
+
'supports' => array( 'title', 'thumbnail' ),
|
63 |
+
'menu_icon' => ''. plugins_url( '/images/slides-icon-20x20.png', __FILE__ )
|
64 |
|
65 |
+
);
|
66 |
+
|
67 |
+
register_post_type( 'slide', $args );
|
68 |
|
69 |
+
}
|
70 |
+
|
71 |
+
// Adds custom taxonomy for Slideshows
|
72 |
+
|
73 |
+
add_action( 'init', 'meteorslides_register_taxonomy' );
|
74 |
+
|
75 |
+
function meteorslides_register_taxonomy() {
|
76 |
+
|
77 |
+
$labels = array(
|
78 |
+
|
79 |
+
'name' => __( 'Slideshows', 'meteor-slides' ),
|
80 |
+
'singular_name' => __( 'Slideshow', 'meteor-slides' ),
|
81 |
+
'search_items' => __( 'Search Slideshows', 'meteor-slides' ),
|
82 |
+
'popular_items' => __( 'Popular Slideshows', 'meteor-slides' ),
|
83 |
+
'all_items' => __( 'All Slideshows', 'meteor-slides' ),
|
84 |
+
'parent_item' => __( 'Parent Slideshow', 'meteor-slides' ),
|
85 |
+
'parent_item_colon' => __( 'Parent Slideshow:', 'meteor-slides' ),
|
86 |
+
'edit_item' => __( 'Edit Slideshow', 'meteor-slides' ),
|
87 |
+
'update_item' => __( 'Update Slideshow', 'meteor-slides' ),
|
88 |
+
'add_new_item' => __( 'Add New Slideshow', 'meteor-slides' ),
|
89 |
+
'new_item_name' => __( 'New Slideshow Name', 'meteor-slides' )
|
90 |
+
|
91 |
+
);
|
92 |
+
|
93 |
+
$args = array(
|
94 |
+
|
95 |
+
'labels' => $labels,
|
96 |
+
'hierarchical' => true,
|
97 |
+
'sort' => true,
|
98 |
+
'args' => array( 'orderby' => 'term_order' ),
|
99 |
+
'rewrite' => array( 'slug' => 'slideshow' )
|
100 |
+
|
101 |
+
);
|
102 |
|
103 |
+
register_taxonomy( 'slideshow', 'slide', $args );
|
104 |
+
|
105 |
}
|
106 |
|
107 |
+
// Adds featured image functionality for Slides
|
108 |
|
109 |
add_action( 'after_setup_theme', 'meteorslides_featured_image_array', '9999' );
|
110 |
|
112 |
|
113 |
global $_wp_theme_features;
|
114 |
|
115 |
+
if ( !isset( $_wp_theme_features['post-thumbnails'] ) ) {
|
116 |
|
117 |
$_wp_theme_features['post-thumbnails'] = array( array( 'slide' ) );
|
118 |
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
elseif ( is_array( $_wp_theme_features['post-thumbnails'] ) ) {
|
122 |
|
123 |
$_wp_theme_features['post-thumbnails'][0][] = 'slide';
|
125 |
}
|
126 |
|
127 |
}
|
|
|
|
|
128 |
|
129 |
+
// Adds featured image size for Slides
|
|
|
|
|
130 |
|
131 |
+
add_action( 'plugins_loaded', 'meteorslides_featured_image' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
function meteorslides_featured_image() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
+
$options = get_option( 'meteorslides_options' );
|
|
|
|
|
136 |
|
137 |
+
add_image_size( 'featured-slide', $options['slide_width'], $options['slide_height'], true );
|
138 |
+
|
139 |
+
add_image_size( 'featured-slide-thumb', 250, 9999 );
|
|
|
|
|
|
|
|
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
// Customize and move featured image box to main column
|
151 |
add_meta_box( 'postimagediv', __('Slide Image','meteor-slides'), 'post_thumbnail_meta_box', 'slide', 'normal', 'high' );
|
152 |
|
153 |
}
|
154 |
+
|
155 |
+
// Remove permalink metabox
|
156 |
+
|
157 |
+
add_action( 'admin_menu', 'meteorslides_remove_permalink_meta_box' );
|
158 |
+
|
159 |
+
function meteorslides_remove_permalink_meta_box() {
|
160 |
+
|
161 |
+
remove_meta_box( 'slugdiv', 'slide', 'core' );
|
162 |
+
|
163 |
+
}
|
164 |
|
165 |
+
// Adds meta box for Slide URL
|
166 |
|
167 |
add_action( 'admin_menu', 'meteorslides_create_url_meta_box' );
|
|
|
168 |
|
169 |
$meteorslides_new_meta_box =
|
170 |
|
173 |
'slide_url' => array(
|
174 |
|
175 |
'name' => 'slide_url',
|
176 |
+
'std' => ''
|
177 |
)
|
178 |
|
179 |
);
|
182 |
|
183 |
global $post, $meteorslides_new_meta_box;
|
184 |
|
185 |
+
foreach ( $meteorslides_new_meta_box as $meteorslides_meta_box ) {
|
186 |
|
187 |
$meteorslides_meta_box_value = get_post_meta( $post->ID, $meteorslides_meta_box['name'].'_value', true );
|
188 |
|
202 |
|
203 |
global $theme_name;
|
204 |
|
205 |
+
if ( function_exists('add_meta_box') ) {
|
206 |
|
207 |
add_meta_box( 'meteorslides-url-box', __('Slide Link','meteor-slides'), 'meteorslides_new_meta_box', 'slide', 'normal', 'low' );
|
208 |
|
209 |
}
|
210 |
|
211 |
}
|
212 |
+
|
213 |
+
// Save and retrieve the Slide URL data
|
214 |
+
|
215 |
+
add_action( 'save_post', 'meteorslides_save_postdata' );
|
216 |
|
217 |
function meteorslides_save_postdata( $post_id ) {
|
218 |
|
220 |
|
221 |
foreach( $meteorslides_new_meta_box as $meteorslides_meta_box ) {
|
222 |
|
223 |
+
if ( !isset( $_POST[$meteorslides_meta_box['name'].'_noncename'] ) || !wp_verify_nonce( $_POST[$meteorslides_meta_box['name'].'_noncename'], plugin_basename(__FILE__) ) ) {
|
224 |
|
225 |
return $post_id;
|
226 |
|
227 |
}
|
228 |
|
229 |
+
if ( 'page' == $_POST['post_type'] ) {
|
230 |
|
231 |
if( !current_user_can( 'edit_page', $post_id ) )
|
232 |
|
244 |
|
245 |
$data = $_POST[$meteorslides_meta_box['name'].'_value'];
|
246 |
|
247 |
+
if ( get_post_meta( $post_id, $meteorslides_meta_box['name'].'_value' ) == "" ) {
|
248 |
|
249 |
add_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', $data, true );
|
250 |
|
251 |
}
|
252 |
|
253 |
+
elseif ( $data != get_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', true ) ) {
|
254 |
|
255 |
update_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', $data );
|
256 |
|
257 |
}
|
258 |
|
259 |
+
elseif ( $data == "" ) {
|
260 |
|
261 |
delete_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', get_post_meta( $post_id, $meteorslides_meta_box['name'].'_value', true ) );
|
262 |
|
268 |
|
269 |
// Adds slide image and link to slides column view
|
270 |
|
271 |
+
add_filter( 'manage_edit-slide_columns', 'meteorslides_edit_columns' );
|
272 |
|
273 |
+
function meteorslides_edit_columns( $columns ) {
|
274 |
|
275 |
$columns = array(
|
276 |
|
277 |
+
'cb' => '<input type="checkbox" />',
|
278 |
+
'slide' => 'Slide Image',
|
279 |
+
'title' => 'Slide Title',
|
280 |
'slide-link' => 'Slide Link',
|
281 |
+
'date' => 'Date'
|
282 |
|
283 |
);
|
284 |
|
286 |
|
287 |
}
|
288 |
|
289 |
+
add_action( 'manage_posts_custom_column', 'meteorslides_custom_columns' );
|
290 |
|
291 |
+
function meteorslides_custom_columns( $column ) {
|
292 |
|
293 |
global $post;
|
294 |
|
295 |
+
switch ( $column ) {
|
296 |
|
297 |
+
case 'slide' :
|
298 |
|
299 |
echo the_post_thumbnail('featured-slide-thumb');
|
300 |
|
301 |
break;
|
302 |
|
303 |
+
case 'slide-link' :
|
304 |
|
305 |
+
if ( get_post_meta($post->ID, "slide_url_value", $single = true) != "" ) {
|
306 |
|
307 |
echo "<a href='" . get_post_meta($post->ID, "slide_url_value", $single = true) . "'>" . get_post_meta($post->ID, "slide_url_value", $single = true) . "</a>";
|
308 |
|
310 |
|
311 |
else {
|
312 |
|
313 |
+
_e('No Link', 'meteor-slides');
|
314 |
|
315 |
}
|
316 |
|
326 |
|
327 |
function meteorslides_menu() {
|
328 |
|
329 |
+
add_submenu_page( 'edit.php?post_type=slide', __('Slides Settings', 'meteor-slides'), __( 'Settings', 'meteor-slides' ), 'manage_options', 'slides-settings', 'meteorslides_settings_page' );
|
330 |
+
|
331 |
}
|
332 |
|
333 |
function meteorslides_settings_page() {
|
334 |
+
|
335 |
include( 'meteor-slides-settings.php' );
|
336 |
|
337 |
}
|
338 |
+
|
339 |
// Adds link to settings page on plugins page
|
340 |
+
|
341 |
+
add_filter( 'plugin_action_links', 'meteorslides_settings_link', 10, 2 );
|
342 |
|
343 |
+
function meteorslides_settings_link( $links, $file ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
|
345 |
+
if ( $file == plugin_basename( dirname(__FILE__).'/meteor-slides-plugin.php' ) ) {
|
346 |
+
|
347 |
+
$links[] = '<a href="edit.php?post_type=slide&page=slides-settings">'.__( 'Settings', 'meteor-slides' ).'</a>';
|
348 |
+
|
349 |
+
}
|
350 |
|
351 |
return $links;
|
352 |
|
354 |
|
355 |
// Register options for settings page
|
356 |
|
357 |
+
add_action( 'admin_init', 'meteorslides_register_settings' );
|
358 |
|
359 |
+
function meteorslides_register_settings() {
|
360 |
|
361 |
register_setting( 'meteorslides_options', 'meteorslides_options' );
|
362 |
|
363 |
+
add_settings_section( 'meteorslides_slideshow', __( 'Configure Slideshow', 'meteor-slides' ), 'meteorslides_section_text', 'meteorslides' );
|
364 |
|
365 |
+
add_settings_field( 'slideshow_quantity', __( 'Slideshow Quantity', 'meteor-slides' ), 'slideshow_quantity', 'meteorslides', 'meteorslides_slideshow' );
|
366 |
|
367 |
+
add_settings_field( 'slide_height', __( 'Slide Height', 'meteor-slides' ), 'slide_height', 'meteorslides', 'meteorslides_slideshow' );
|
368 |
|
369 |
+
add_settings_field( 'slide_width', __( 'Slide Width', 'meteor-slides' ), 'slide_width', 'meteorslides', 'meteorslides_slideshow' );
|
370 |
|
371 |
+
add_settings_field( 'transition_style', __( 'Transition Style', 'meteor-slides' ), 'transition_style', 'meteorslides', 'meteorslides_slideshow' );
|
372 |
|
373 |
+
add_settings_field( 'transition_speed', __( 'Transition Speed', 'meteor-slides' ), 'transition_speed', 'meteorslides', 'meteorslides_slideshow' );
|
374 |
|
375 |
+
add_settings_field( 'slide_duration', __( 'Slide Duration', 'meteor-slides' ), 'slide_duration', 'meteorslides', 'meteorslides_slideshow' );
|
376 |
|
377 |
+
add_settings_field( 'slideshow_navigation', __( 'Slideshow Navigation', 'meteor-slides' ), 'slideshow_navigation', 'meteorslides', 'meteorslides_slideshow' );
|
378 |
|
379 |
}
|
380 |
|
381 |
// Adds default values for options on settings page
|
382 |
|
383 |
+
register_activation_hook( __FILE__, 'meteorslides_default_options' );
|
384 |
|
385 |
function meteorslides_default_options() {
|
386 |
|
387 |
+
$tmp = get_option( 'meteorslides_options' );
|
388 |
+
|
389 |
+
if ( ( $tmp['slideshow_quantity']=='' )||( !is_array( $tmp ) ) ) {
|
390 |
|
391 |
+
$arr = array(
|
392 |
|
393 |
+
'slideshow_quantity' => '5',
|
394 |
+
'slide_height' => '200',
|
395 |
+
'slide_width' => '940',
|
396 |
+
'transition_style' => 'fade',
|
397 |
+
'transition_speed' => '2',
|
398 |
+
'slide_duration' => '5',
|
399 |
+
'slideshow_navigation' => 'navnone'
|
400 |
+
|
401 |
+
);
|
402 |
+
|
403 |
+
update_option( 'meteorslides_options', $arr );
|
404 |
|
405 |
}
|
406 |
|
408 |
|
409 |
// Validates values for options on settings page
|
410 |
|
411 |
+
function meteorslides_options_validate( $input ) {
|
412 |
|
413 |
+
$options = get_option( 'meteorslides_options' );
|
414 |
|
415 |
+
$options['slideshow_quantity'] = trim( $input['slideshow_quantity'] );
|
416 |
|
417 |
+
if ( !preg_match( '/^[0-9]{1,3}$/i', $options['slideshow_quantity'] ) ) {
|
418 |
|
419 |
$options['slideshow_quantity'] = '';
|
420 |
|
421 |
}
|
422 |
|
423 |
+
$options['slide_height'] = trim( $input['slide_height'] );
|
424 |
|
425 |
+
if ( !preg_match( '/^[0-9]{1,4}$/i', $options['slide_height'] ) ) {
|
426 |
|
427 |
$options['slide_height'] = '';
|
428 |
|
429 |
}
|
430 |
|
431 |
+
$options['slide_width'] = trim( $input['slide_width'] );
|
432 |
|
433 |
+
if ( !preg_match( '/^[0-9]{1,5}$/i', $options['slide_width'] ) ) {
|
434 |
|
435 |
$options['slide_width'] = '';
|
436 |
|
437 |
}
|
438 |
|
439 |
+
$options['transition_style'] = trim( $input['transition_style'] );
|
440 |
|
441 |
+
if ( !preg_match( '/^[a-z]{4,20}$/i', $options['transition_style'] ) ) {
|
442 |
|
443 |
$options['transition_style'] = '';
|
444 |
|
445 |
}
|
446 |
|
447 |
+
$options['transition_speed'] = trim( $input['transition_speed'] );
|
448 |
|
449 |
+
if ( !preg_match( '/^[0-9]{1,3}$/i', $options['transition_speed'] ) ) {
|
450 |
|
451 |
$options['transition_speed'] = '';
|
452 |
|
453 |
}
|
454 |
|
455 |
+
$options['slide_duration'] = trim( $input['slide_duration'] );
|
456 |
|
457 |
+
if ( !preg_match( '/^[0-9]{1,3}$/i', $options['slide_duration'] ) ) {
|
458 |
|
459 |
$options['slide_duration'] = '';
|
460 |
|
461 |
}
|
462 |
|
463 |
+
$options['slideshow_navigation'] = trim( $input['slideshow_navigation'] );
|
464 |
|
465 |
+
if ( !preg_match( '/^[a-z]{4,20}$/i', $options['slideshow_navigation'] ) ) {
|
466 |
|
467 |
$options['slideshow_navigation'] = '';
|
468 |
|
474 |
|
475 |
// Adds translation support for language files
|
476 |
|
477 |
+
add_action( 'plugins_loaded', 'meteorslides_localization' );
|
478 |
|
479 |
function meteorslides_localization() {
|
480 |
|
481 |
+
load_plugin_textdomain( 'meteor-slides', false, '/meteor-slides/languages/' );
|
482 |
|
483 |
}
|
484 |
|
485 |
+
// Adds CSS for the Slides admin pages
|
486 |
|
487 |
+
add_action( 'admin_enqueue_scripts', 'meteorslides_admin_css' );
|
488 |
|
489 |
function meteorslides_admin_css() {
|
490 |
|
491 |
global $post_type;
|
492 |
|
493 |
+
if ( ( isset( $_GET['post_type'] ) && $_GET['post_type'] == 'slide' ) || ( isset( $post_type ) && $post_type == 'slide' ) ) {
|
494 |
|
495 |
wp_enqueue_style( 'meteor-slides-admin', plugins_url('/css/meteor-slides-admin.css', __FILE__), array(), '1.0' );
|
496 |
|
500 |
|
501 |
// Adds CSS for the slideshow
|
502 |
|
503 |
+
add_action( 'wp_enqueue_scripts', 'meteorslides_css' );
|
504 |
|
505 |
function meteorslides_css() {
|
506 |
|
507 |
+
if ( file_exists( get_stylesheet_directory()."/meteor-slides.css" ) ) {
|
508 |
|
509 |
wp_enqueue_style( 'meteor-slides', get_stylesheet_directory_uri() . '/meteor-slides.css', array(), '1.0' );
|
510 |
|
511 |
}
|
512 |
|
513 |
+
elseif ( file_exists( get_template_directory()."/meteor-slides.css" ) ) {
|
514 |
|
515 |
wp_enqueue_style( 'meteor-slides', get_template_directory_uri() . '/meteor-slides.css', array(), '1.0' );
|
516 |
|
535 |
if( !is_admin() ) {
|
536 |
|
537 |
wp_enqueue_script( 'jquery' );
|
538 |
+
wp_enqueue_script( 'jquery-cycle', plugins_url( '/js/jquery.cycle.all.js', __FILE__ ), array( 'jquery' ) );
|
539 |
+
wp_enqueue_script( 'jquery-metadata', plugins_url( '/js/jquery.metadata.v2.js', __FILE__ ), array( 'jquery' ) );
|
540 |
+
wp_enqueue_script( 'meteorslides-script', plugins_url( '/js/slideshow.js', __FILE__ ), array( 'jquery', 'jquery-cycle' ) );
|
541 |
wp_localize_script( 'meteorslides-script', 'meteorslidessettings',
|
542 |
|
543 |
array(
|
544 |
|
545 |
+
'meteorslideshowspeed' => $options['transition_speed'] * 1000,
|
546 |
+
'meteorslideshowduration' => $options['slide_duration'] * 1000,
|
547 |
+
'meteorslideshowheight' => $options['slide_height'],
|
548 |
+
'meteorslideshowwidth' => $options['slide_width'],
|
549 |
'meteorslideshowtransition' => $options['transition_style']
|
550 |
|
551 |
)
|
558 |
|
559 |
// Adds function to load slideshow in theme
|
560 |
|
561 |
+
function meteor_slideshow( $slideshow='', $metadata='' ) {
|
562 |
+
|
563 |
+
if ( file_exists( get_stylesheet_directory()."/meteor-slideshow.php" ) ) {
|
564 |
+
|
565 |
+
include( STYLESHEETPATH . '/meteor-slideshow.php' );
|
566 |
+
|
567 |
+
}
|
568 |
+
|
569 |
+
elseif ( file_exists( get_template_directory()."/meteor-slideshow.php" ) ) {
|
570 |
+
|
571 |
+
include( TEMPLATEPATH . '/meteor-slideshow.php' );
|
572 |
+
|
573 |
+
}
|
574 |
+
|
575 |
+
else {
|
576 |
+
|
577 |
+
include( 'meteor-slideshow.php' );
|
578 |
|
579 |
+
}
|
580 |
|
581 |
}
|
582 |
|
588 |
|
589 |
// Adds shortcode to load slideshow in content
|
590 |
|
591 |
+
function meteor_slideshow_shortcode( $atts ) {
|
592 |
|
593 |
+
extract( shortcode_atts( array (
|
594 |
|
595 |
+
'slideshow' => '',
|
596 |
+
'metadata' => '',
|
597 |
|
598 |
), $atts ) );
|
599 |
|
603 |
|
604 |
ob_start();
|
605 |
|
606 |
+
meteor_slideshow( $slideshow=$slideshow_att, $metadata=$metadata_att );
|
607 |
|
608 |
$meteor_slideshow_content = ob_get_clean();
|
609 |
|
633 |
|
634 |
function meteorslides_widget() {
|
635 |
|
636 |
+
$widget_ops = array(
|
637 |
+
|
638 |
+
'classname' => 'meteor-slides-widget',
|
639 |
+
'description' => __( 'Add a slideshow widget to a sidebar', 'meteor-slides' )
|
640 |
+
|
641 |
+
);
|
642 |
|
643 |
$control_ops = array( 'id_base' => 'meteor-slides-widget' );
|
644 |
|
645 |
+
$this->WP_Widget( 'meteor-slides-widget', __( 'Meteor Slides Widget', 'meteor-slides' ), $widget_ops, $control_ops );
|
646 |
}
|
647 |
|
648 |
function widget( $args, $instance ) {
|
649 |
|
650 |
extract( $args );
|
651 |
|
652 |
+
$title = apply_filters( 'widget_title', $instance['title'] );
|
|
|
653 |
$slideshow_arg = $instance['slideshow'];
|
654 |
+
$metadata_arg = $instance['metadata'];
|
|
|
655 |
|
656 |
echo $before_widget;
|
657 |
|
661 |
|
662 |
}
|
663 |
|
664 |
+
meteor_slideshow( $slideshow=$slideshow_arg, $metadata=$metadata_arg );
|
665 |
|
666 |
echo $after_widget;
|
667 |
|
671 |
|
672 |
$instance = $old_instance;
|
673 |
|
674 |
+
$instance['title'] = strip_tags( $new_instance['title'] );
|
675 |
$instance['slideshow'] = strip_tags( $new_instance['slideshow'] );
|
676 |
+
$instance['metadata'] = strip_tags( $new_instance['metadata'] );
|
677 |
|
678 |
return $instance;
|
679 |
|
681 |
|
682 |
function form( $instance ) {
|
683 |
|
684 |
+
$defaults = array(
|
685 |
+
|
686 |
+
'title' => '',
|
687 |
+
'slideshow' => '',
|
688 |
+
'metadata' => ''
|
689 |
+
|
690 |
+
);
|
691 |
+
|
692 |
$instance = wp_parse_args( (array) $instance, $defaults );
|
693 |
|
694 |
echo '<p><label for="' . $this->get_field_id( 'title' ) . '">' . __('Title:', 'meteor-slides') . '</label>
|
703 |
}
|
704 |
|
705 |
}
|
706 |
+
|
707 |
?>
|
meteor-slides-settings.php
CHANGED
@@ -1,107 +1,172 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
function meteorslides_section_text() {
|
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 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
|
51 |
-
|
|
|
|
|
52 |
|
53 |
-
|
54 |
|
55 |
-
|
56 |
|
57 |
-
|
58 |
|
59 |
-
|
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 |
-
$item = array('navnone' => $navnone, 'navprevnext' => $navprevnext, 'navpaged' => $navpaged, 'navboth' => $navboth);
|
91 |
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
|
|
|
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
|
104 |
-
|
105 |
|
106 |
?>
|
107 |
|
@@ -109,30 +174,30 @@
|
|
109 |
|
110 |
<div id="icon-edit" class="icon32"><br /></div>
|
111 |
|
112 |
-
<h2><?php _e('Meteor Slides Settings','meteor-slides'); ?></h2>
|
113 |
|
114 |
<form action="options.php" method="post">
|
115 |
|
116 |
-
<?php
|
117 |
|
118 |
-
settings_fields('meteorslides_options');
|
119 |
|
120 |
-
do_settings_sections('meteorslides');
|
121 |
|
122 |
?>
|
123 |
|
124 |
<p class="submit">
|
125 |
|
126 |
-
<input name="Submit" type="submit" class="button-primary" value="<?php _e('Save Changes','meteor-slides') ?>" />
|
127 |
|
128 |
</p>
|
129 |
|
130 |
</form>
|
131 |
|
132 |
-
<h3><?php _e('Install Slideshow','meteor-slides'); ?></h3>
|
133 |
|
134 |
-
<p><?php printf(__ ('Use %1$s to add this slideshow to your theme, use %2$s to add it to your Post or Page content, or use the Meteor Slides Widget. %3$sMore information%4$s', 'meteor-slides'), "<code><?php if(function_exists('meteor_slideshow')) { meteor_slideshow(); } ?></code>", "<code>[meteor_slideshow]</code>", "<a href='http://www.jleuze.com/plugins/meteor-slides/'>", "</a>")?></p>
|
135 |
|
136 |
-
<p><em><?php printf(__ ('Please %1$spost any questions or problems%2$s in the WordPress.org support forums.', 'meteor-slides'), "<a href='http://wordpress.org/tags/meteor-slides?forum_id=10#postform'>", "</a>")?></em></p>
|
137 |
|
138 |
</div><!-- .wrap -->
|
1 |
<?php
|
2 |
+
|
3 |
+
// Populate the sections and settings of the options page
|
4 |
|
5 |
+
function meteorslides_section_text() {
|
|
|
|
|
6 |
|
7 |
+
echo "<p>". __( 'Set up your slideshow using the options below.', 'meteor-slides' ) ."</p>";
|
8 |
|
9 |
+
}
|
10 |
|
11 |
+
function slideshow_quantity() {
|
12 |
+
|
13 |
+
$slides = __( 'slides', 'meteor-slides' );
|
14 |
+
|
15 |
+
$options = get_option('meteorslides_options');
|
16 |
+
|
17 |
+
echo "<input id='slideshow_quantity' name='meteorslides_options[slideshow_quantity]' size='20' type='text' value='{$options['slideshow_quantity']}' /> $slides";
|
18 |
|
19 |
+
}
|
20 |
|
21 |
+
function slide_height() {
|
22 |
|
23 |
+
$px = __( 'px', 'meteor-slides' );
|
24 |
+
|
25 |
+
$options = get_option('meteorslides_options');
|
26 |
|
27 |
+
echo "<input id='slide_height' name='meteorslides_options[slide_height]' size='20' type='text' value='{$options['slide_height']}' /> $px";
|
28 |
|
29 |
+
}
|
30 |
|
31 |
+
function slide_width() {
|
32 |
|
33 |
+
$px = __( 'px', 'meteor-slides' );
|
34 |
+
|
35 |
+
$options = get_option('meteorslides_options');
|
36 |
|
37 |
+
echo "<input id='slide_width' name='meteorslides_options[slide_width]' size='20' type='text' value='{$options['slide_width']}' /> $px";
|
38 |
|
39 |
+
}
|
40 |
|
41 |
+
function transition_style() {
|
42 |
|
43 |
+
$blindX = __( 'blindX', 'meteor-slides' );
|
44 |
+
$blindY = __( 'blindY', 'meteor-slides' );
|
45 |
+
$blindZ = __( 'blindZ', 'meteor-slides' );
|
46 |
+
$cover = __( 'cover', 'meteor-slides' );
|
47 |
+
$curtainX = __( 'curtainX', 'meteor-slides' );
|
48 |
+
$curtainY = __( 'curtainY', 'meteor-slides' );
|
49 |
+
$fade = __( 'fade', 'meteor-slides' );
|
50 |
+
$fadeZoom = __( 'fadeZoom', 'meteor-slides' );
|
51 |
+
$growX = __( 'growX', 'meteor-slides' );
|
52 |
+
$growY = __( 'growY', 'meteor-slides' );
|
53 |
+
$none = __( 'none', 'meteor-slides' );
|
54 |
+
$scrollUp = __( 'scrollUp', 'meteor-slides' );
|
55 |
+
$scrollDown = __( 'scrollDown', 'meteor-slides' );
|
56 |
+
$scrollLeft = __( 'scrollLeft', 'meteor-slides' );
|
57 |
+
$scrollRight = __( 'scrollRight', 'meteor-slides' );
|
58 |
+
$scrollHorz = __( 'scrollHorz', 'meteor-slides' );
|
59 |
+
$scrollVert = __( 'scrollVert', 'meteor-slides' );
|
60 |
+
$slideX = __( 'slideX', 'meteor-slides' );
|
61 |
+
$slideY = __( 'slideY', 'meteor-slides' );
|
62 |
+
$shuffle = __( 'shuffle', 'meteor-slides' );
|
63 |
+
$turnUp = __( 'turnUp', 'meteor-slides' );
|
64 |
+
$turnDown = __( 'turnDown', 'meteor-slides' );
|
65 |
+
$turnLeft = __( 'turnLeft', 'meteor-slides' );
|
66 |
+
$turnRight = __( 'turnRight', 'meteor-slides' );
|
67 |
+
$uncover = __( 'uncover', 'meteor-slides' );
|
68 |
+
$wipe = __( 'wipe', 'meteor-slides' );
|
69 |
+
$zoom = __( 'zoom', 'meteor-slides' );
|
70 |
+
|
71 |
+
$options = get_option( 'meteorslides_options' );
|
72 |
+
|
73 |
+
$item = array(
|
74 |
|
75 |
+
'blindX' => $blindX,
|
76 |
+
'blindY' => $blindY,
|
77 |
+
'blindZ' => $blindZ,
|
78 |
+
'cover' => $cover,
|
79 |
+
'curtainX' => $curtainX,
|
80 |
+
'curtainY' => $curtainY,
|
81 |
+
'fade' => $fade,
|
82 |
+
'fadeZoom' => $fadeZoom,
|
83 |
+
'growX' => $growX,
|
84 |
+
'growY' => $growY,
|
85 |
+
'none' => $none,
|
86 |
+
'scrollUp' => $scrollUp,
|
87 |
+
'scrollDown' => $scrollDown,
|
88 |
+
'scrollLeft' => $scrollLeft,
|
89 |
+
'scrollRight' => $scrollRight,
|
90 |
+
'scrollHorz' => $scrollHorz,
|
91 |
+
'scrollVert' => $scrollVert,
|
92 |
+
'slideX' => $slideX,
|
93 |
+
'slideY' => $slideY,
|
94 |
+
'shuffle' => $shuffle,
|
95 |
+
'turnUp' => $turnUp,
|
96 |
+
'turnDown' => $turnDown,
|
97 |
+
'turnLeft' => $turnLeft,
|
98 |
+
'turnRight' => $turnRight,
|
99 |
+
'uncover' => $uncover,
|
100 |
+
'wipe' => $wipe,
|
101 |
+
'zoom' => $zoom
|
102 |
+
|
103 |
+
);
|
104 |
|
105 |
+
echo "<select id='transition_style' name='meteorslides_options[transition_style]' style='width:142px;'>";
|
106 |
|
107 |
+
while ( list( $key, $val ) = each( $item ) ) {
|
108 |
+
|
109 |
+
$selected = ( $options['transition_style']==$key ) ? ' selected="selected"' : '';
|
110 |
|
111 |
+
echo "<option value='$key'$selected>$val</option>";
|
112 |
|
113 |
+
}
|
114 |
|
115 |
+
echo "</select>";
|
116 |
|
117 |
+
}
|
118 |
|
119 |
+
function transition_speed() {
|
120 |
|
121 |
+
$seconds = __( 'seconds', 'meteor-slides' );
|
122 |
+
|
123 |
+
$options = get_option( 'meteorslides_options' );
|
124 |
|
125 |
+
echo "<input id='transition_speed' name='meteorslides_options[transition_speed]' size='20' type='text' value='{$options['transition_speed']}' /> $seconds";
|
126 |
|
127 |
+
}
|
128 |
|
129 |
+
function slide_duration() {
|
130 |
|
131 |
+
$seconds = __( 'seconds', 'meteor-slides' );
|
132 |
|
133 |
+
$options = get_option( 'meteorslides_options' );
|
134 |
|
135 |
+
echo "<input id='slide_duration' name='meteorslides_options[slide_duration]' size='20' type='text' value='{$options['slide_duration']}' /> $seconds";
|
136 |
|
137 |
+
}
|
138 |
|
139 |
+
function slideshow_navigation() {
|
140 |
|
141 |
+
$navnone = __( 'None', 'meteor-slides' );
|
142 |
+
$navprevnext = __( 'Previous/Next', 'meteor-slides' );
|
143 |
+
$navpaged = __( 'Paged', 'meteor-slides' );
|
144 |
+
$navboth = __( 'Both', 'meteor-slides' );
|
145 |
|
146 |
+
$options = get_option( 'meteorslides_options' );
|
|
|
|
|
147 |
|
148 |
+
$item = array(
|
149 |
+
|
150 |
+
'navnone' => $navnone,
|
151 |
+
'navprevnext' => $navprevnext,
|
152 |
+
'navpaged' => $navpaged,
|
153 |
+
'navboth' => $navboth
|
154 |
+
|
155 |
+
);
|
156 |
|
157 |
+
echo "<select id='slideshow_navigation' name='meteorslides_options[slideshow_navigation]' style='width:142px;'>";
|
158 |
|
159 |
+
while ( list( $key, $val ) = each( $item ) ) {
|
160 |
+
|
161 |
+
$selected = ( $options['slideshow_navigation']==$key ) ? ' selected="selected"' : '';
|
162 |
|
163 |
+
echo "<option value='$key'$selected>$val</option>";
|
164 |
|
165 |
+
}
|
166 |
|
167 |
+
echo "</select>";
|
168 |
|
169 |
+
}
|
170 |
|
171 |
?>
|
172 |
|
174 |
|
175 |
<div id="icon-edit" class="icon32"><br /></div>
|
176 |
|
177 |
+
<h2><?php _e( 'Meteor Slides Settings', 'meteor-slides' ); ?></h2>
|
178 |
|
179 |
<form action="options.php" method="post">
|
180 |
|
181 |
+
<?php // Adds options to settings page
|
182 |
|
183 |
+
settings_fields( 'meteorslides_options' );
|
184 |
|
185 |
+
do_settings_sections( 'meteorslides' );
|
186 |
|
187 |
?>
|
188 |
|
189 |
<p class="submit">
|
190 |
|
191 |
+
<input name="Submit" type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'meteor-slides' ) ?>" />
|
192 |
|
193 |
</p>
|
194 |
|
195 |
</form>
|
196 |
|
197 |
+
<h3><?php _e( 'Install Slideshow', 'meteor-slides' ); ?></h3>
|
198 |
|
199 |
+
<p><?php printf( __ ( 'Use %1$s to add this slideshow to your theme, use %2$s to add it to your Post or Page content, or use the Meteor Slides Widget. %3$sMore information%4$s', 'meteor-slides'), "<code><?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); } ?></code>", "<code>[meteor_slideshow]</code>", "<a href='http://www.jleuze.com/plugins/meteor-slides/'>", "</a>" )?></p>
|
200 |
|
201 |
+
<p><em><?php printf( __ ( 'Please %1$spost any questions or problems%2$s in the WordPress.org support forums.', 'meteor-slides' ), "<a href='http://wordpress.org/tags/meteor-slides?forum_id=10#postform'>", "</a>" )?></em></p>
|
202 |
|
203 |
</div><!-- .wrap -->
|
meteor-slideshow.php
CHANGED
@@ -1,56 +1,104 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
$options = get_option( 'meteorslides_options' );
|
4 |
|
5 |
$meteornav = $options['slideshow_navigation'];
|
6 |
-
|
7 |
$i = 1;
|
8 |
|
9 |
-
$loop = new WP_Query( array(
|
10 |
|
11 |
-
|
|
|
|
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
<ul class="meteor-nav">
|
16 |
|
17 |
-
<li class="prev"><a href="#"><?php _e('Previous','meteor-slides') ?></a></li>
|
18 |
|
19 |
-
<li class="next"><a href="#"><?php _e('Next','meteor-slides') ?></a></li>
|
20 |
|
21 |
</ul><!-- .meteor-nav -->
|
22 |
|
23 |
-
<div class="meteor-buttons"></div>
|
|
|
|
|
24 |
|
25 |
-
|
26 |
|
27 |
<ul class="meteor-nav">
|
28 |
|
29 |
-
<li class="prev"><a href="#"><?php _e('Previous','meteor-slides') ?></a></li>
|
30 |
|
31 |
-
<li class="next"><a href="#"><?php _e('Next','meteor-slides') ?></a></li>
|
32 |
|
33 |
</ul><!-- .meteor-nav -->
|
34 |
|
35 |
-
<?php
|
36 |
-
|
37 |
-
<div class="meteor-buttons"></div>
|
38 |
|
|
|
|
|
|
|
|
|
39 |
<?php endif; ?>
|
40 |
|
41 |
-
<div class="slides
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
<?php
|
|
|
|
|
44 |
|
45 |
<div id="slide-<?php echo $i; ?>" class="slide">
|
46 |
|
47 |
-
<?php
|
|
|
|
|
48 |
|
49 |
-
<a href="<?php echo get_post_meta($post->ID, "slide_url_value", $single = true); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('featured-slide'); ?></a>
|
50 |
|
51 |
-
<?php
|
|
|
|
|
52 |
|
53 |
-
<?php the_post_thumbnail('featured-slide'); ?>
|
54 |
|
55 |
<?php endif; ?>
|
56 |
|
1 |
+
<?php
|
2 |
+
/* Loop template for the Meteor Slides slideshow
|
3 |
+
|
4 |
+
Copy "meteor-slideshow.php" from "/meteor-slides/" to your theme's directory to replace
|
5 |
+
the plugin's default slideshow loop.
|
6 |
+
|
7 |
+
Learn more about customizing the slideshow template for Meteor Slides:
|
8 |
+
http://www.jleuze.com/plugins/meteor-slides/customizing-the-slideshow-template/
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Settings for slideshow loop
|
12 |
+
|
13 |
+
global $post;
|
14 |
|
15 |
$options = get_option( 'meteorslides_options' );
|
16 |
|
17 |
$meteornav = $options['slideshow_navigation'];
|
18 |
+
|
19 |
$i = 1;
|
20 |
|
21 |
+
$loop = new WP_Query( array(
|
22 |
|
23 |
+
'post_type' => 'slide',
|
24 |
+
'slideshow' => $slideshow,
|
25 |
+
'posts_per_page' => $options['slideshow_quantity']
|
26 |
|
27 |
+
) ); ?>
|
28 |
+
|
29 |
+
<div id="meteor-slideshow" class="meteor-slides <?php echo $meteornav . ' ' . $slideshow; ?>">
|
30 |
+
|
31 |
+
<?php // Adds Previous/Next and Paged navigation
|
32 |
+
|
33 |
+
if ( $meteornav == "navboth" ) : ?>
|
34 |
|
35 |
<ul class="meteor-nav">
|
36 |
|
37 |
+
<li class="prev" id="meteor-prev<?php echo $slideshow; ?>"><a href="#"><?php _e( 'Previous', 'meteor-slides' ) ?></a></li>
|
38 |
|
39 |
+
<li class="next" id="meteor-next<?php echo $slideshow; ?>"><a href="#"><?php _e( 'Next', 'meteor-slides' ) ?></a></li>
|
40 |
|
41 |
</ul><!-- .meteor-nav -->
|
42 |
|
43 |
+
<div class="meteor-buttons" id="meteor-buttons<?php echo $slideshow; ?>"></div>
|
44 |
+
|
45 |
+
<?php // Adds Previous/Next navigation
|
46 |
|
47 |
+
elseif ( $meteornav == "navprevnext" ) : ?>
|
48 |
|
49 |
<ul class="meteor-nav">
|
50 |
|
51 |
+
<li class="prev" id="meteor-prev<?php echo $slideshow; ?>"><a href="#"><?php _e( 'Previous', 'meteor-slides' ) ?></a></li>
|
52 |
|
53 |
+
<li class="next" id="meteor-next<?php echo $slideshow; ?>"><a href="#"><?php _e( 'Next', 'meteor-slides' ) ?></a></li>
|
54 |
|
55 |
</ul><!-- .meteor-nav -->
|
56 |
|
57 |
+
<?php // Adds Paged navigation
|
|
|
|
|
58 |
|
59 |
+
elseif ( $meteornav == "navpaged" ): ?>
|
60 |
+
|
61 |
+
<div class="meteor-buttons" id="meteor-buttons<?php echo $slideshow; ?>"></div>
|
62 |
+
|
63 |
<?php endif; ?>
|
64 |
|
65 |
+
<div class="slides { <?php
|
66 |
+
|
67 |
+
// Adds metadata to slideshow
|
68 |
+
|
69 |
+
if ( !empty( $slideshow ) ) {
|
70 |
+
|
71 |
+
echo "next: '#meteor-next" . $slideshow . "', prev: '#meteor-prev" . $slideshow . "', pager: '#meteor-buttons" . $slideshow . "'";
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( !empty( $metadata ) && !empty( $slideshow ) ) {
|
76 |
+
|
77 |
+
echo ', ';
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
echo $metadata;
|
82 |
+
|
83 |
+
?> }">
|
84 |
|
85 |
+
<?php // Loop which loads the slideshow
|
86 |
+
|
87 |
+
while ( $loop->have_posts() ) : $loop->the_post(); ?>
|
88 |
|
89 |
<div id="slide-<?php echo $i; ?>" class="slide">
|
90 |
|
91 |
+
<?php // Adds slide image with Slide URL link
|
92 |
+
|
93 |
+
if ( get_post_meta( $post->ID, "slide_url_value", $single = true ) != "" ): ?>
|
94 |
|
95 |
+
<a href="<?php echo get_post_meta( $post->ID, "slide_url_value", $single = true ); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail( 'featured-slide' ); ?></a>
|
96 |
|
97 |
+
<?php // Adds slide image
|
98 |
+
|
99 |
+
else: ?>
|
100 |
|
101 |
+
<?php the_post_thumbnail( 'featured-slide' ); ?>
|
102 |
|
103 |
<?php endif; ?>
|
104 |
|
readme.txt
CHANGED
@@ -3,24 +3,22 @@ Contributors: jleuze
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mail%40jleuze%2ecom&item_name=Meteor%20Slides%20Donation&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
|
4 |
Tags: slide, slides, slider, slideshow, image, custom post types, jquery
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.0.
|
7 |
-
Stable tag: 1.3
|
8 |
|
9 |
-
Meteor Slides makes it simple to
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
This screencast shows some of the new features in 1.3, such as adding multiple slideshows, and using metadata. [Watch more screencasts about Meteor Slides.](http://vimeo.com/album/930565 "Watch more screencasts")
|
24 |
|
25 |
[vimeo http://vimeo.com/16270730]
|
26 |
|
@@ -32,13 +30,13 @@ This screencast shows some of the new features in 1.3, such as adding multiple s
|
|
32 |
* **Slideshow metadata:** Customize individual slideshows or configure more [jQuery Cycle options](http://jquery.malsup.com/cycle/options.html "jQuery Cycle Plugin") with the [MetaData jQuery Plugin](http://plugins.jquery.com/project/metadata "MetaData jQuery Plugin").
|
33 |
* **Slideshow transition styles:** blindX, blindY, blindZ, cover, curtainX, curtainY, fade, fadeZoom, growX, growY, none, scrollUp, scrollDown, scrollLeft, scrollRight, scrollHorz, scrollVert, slideX, slideY, turnUp, turnDown, turnLeft, turnRight, uncover, wipe, zoom.
|
34 |
* **Slideshow navigation:** Optional previous/next and/or paged slide navigation.
|
35 |
-
* **Multiple languages:** English, French, Indonesian, Italian, Portuguese, Romanian, Spanish, Turkish.
|
36 |
|
37 |
-
[
|
38 |
|
39 |
== Installation ==
|
40 |
|
41 |
-
1. Upload the **meteor-slides** folder to your **/wp-content/plugins/** directory.
|
42 |
2. Activate the plugin through the Plugins menu in WordPress
|
43 |
3. Use the Settings link or go to Slides -> Settings to access the Meteor Slides settings.
|
44 |
|
@@ -47,9 +45,11 @@ This screencast shows some of the new features in 1.3, such as adding multiple s
|
|
47 |
|
48 |
= Add Slideshow =
|
49 |
|
50 |
-
Use `<?php if(function_exists('meteor_slideshow')) { meteor_slideshow(); } ?>` to add this slideshow to your theme, use `[meteor_slideshow]` to add it to your Post or Page content, or use the Meteor Slides Widget to add it to a sidebar.
|
|
|
|
|
51 |
|
52 |
-
|
53 |
|
54 |
*Please [post any questions or problems](http://wordpress.org/tags/meteor-slides?forum_id=10#postform "Post a question or problem in the forums") in the WordPress.org support forums.*
|
55 |
|
@@ -65,7 +65,7 @@ Make sure to click "Use as featured image" after uploading your image. If the im
|
|
65 |
|
66 |
= How can I switch the order of the slides? =
|
67 |
|
68 |
-
The slides load in the order they were published, you can change the publish date of a slide post to switch the order.
|
69 |
|
70 |
= Why is the slideshow covering up my dropdown menus? =
|
71 |
|
@@ -73,15 +73,19 @@ The `z-index` on the slideshow is higher than the dropdowns, causing them to be
|
|
73 |
|
74 |
= How do I customize the slideshow's CSS stylesheet? =
|
75 |
|
76 |
-
Copy
|
|
|
|
|
|
|
|
|
77 |
|
78 |
= I installed Meteor Slides, and now my theme or plugin's jQuery goodies are broken! =
|
79 |
|
80 |
Your theme or plugin is probably loading an extra copy of jQuery from the theme or plugin, or a third party server. This is unnecessary because WordPress already uses jQuery and it is included in the WordPress install. Meteor Slides loads the version that is within WordPress, to fix this, change your theme or plugin to use the copy of jQuery that comes with WordPress, like this `<?php wp_enqueue_script("jquery"); ?>`.
|
81 |
|
82 |
-
=
|
83 |
|
84 |
-
|
85 |
|
86 |
*Please [post any questions or problems](http://wordpress.org/tags/meteor-slides?forum_id=10#postform "Post a question or problem in the forums") in the WordPress.org support forums.*
|
87 |
|
@@ -96,6 +100,14 @@ Meteor Slides is setup to check for post thumbnail support and create an array w
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
= 1.3 =
|
100 |
* Added custom slideshows taxonomy for multiple slideshows
|
101 |
* Optional slideshow and metadata parameters for template tag and shortcode
|
@@ -135,6 +147,9 @@ Meteor Slides is setup to check for post thumbnail support and create an array w
|
|
135 |
|
136 |
== Upgrade Notice ==
|
137 |
|
|
|
|
|
|
|
138 |
= 1.3 =
|
139 |
Meteor Slides 1.3 adds support for multiple slideshows, the Metadata jQuery plugin for advanced customization, more navigation options, and other small improvements and bug fixes.
|
140 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mail%40jleuze%2ecom&item_name=Meteor%20Slides%20Donation&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
|
4 |
Tags: slide, slides, slider, slideshow, image, custom post types, jquery
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.0.3
|
7 |
+
Stable tag: 1.3.1
|
8 |
|
9 |
+
Meteor Slides makes it simple to create slideshows with WordPress by adding a custom post type for slides.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Easily create slideshows and publish them with a shortcode or widget. The slideshows are powered by [jQuery Cycle](http://jquery.malsup.com/cycle/) and have over twenty transition styles to choose from.
|
14 |
|
15 |
+
= Meteor Slides Homepage =
|
16 |
|
17 |
+
[Visit this plugin's homepage](http://www.jleuze.com/plugins/meteor-slides/ "Meteor Slides Homepage") for documentation, tutorials, and additional videos.
|
18 |
|
19 |
+
= Video Overview =
|
20 |
|
21 |
+
This screencast shows some of the new features in 1.3, such as adding multiple slideshows, and using metadata. [Watch more Meteor Slides videos.](http://vimeo.com/album/930565 "Meteor Slides Videos")
|
|
|
|
|
22 |
|
23 |
[vimeo http://vimeo.com/16270730]
|
24 |
|
30 |
* **Slideshow metadata:** Customize individual slideshows or configure more [jQuery Cycle options](http://jquery.malsup.com/cycle/options.html "jQuery Cycle Plugin") with the [MetaData jQuery Plugin](http://plugins.jquery.com/project/metadata "MetaData jQuery Plugin").
|
31 |
* **Slideshow transition styles:** blindX, blindY, blindZ, cover, curtainX, curtainY, fade, fadeZoom, growX, growY, none, scrollUp, scrollDown, scrollLeft, scrollRight, scrollHorz, scrollVert, slideX, slideY, turnUp, turnDown, turnLeft, turnRight, uncover, wipe, zoom.
|
32 |
* **Slideshow navigation:** Optional previous/next and/or paged slide navigation.
|
33 |
+
* **Multiple languages:** English, French, Indonesian, Italian, Portuguese, Romanian, Spanish, Swedish, Turkish.
|
34 |
|
35 |
+
*[Got a question about Meteor Slides?](http://wordpress.org/tags/meteor-slides?forum_id=10#postform "Post a question in the forums")*
|
36 |
|
37 |
== Installation ==
|
38 |
|
39 |
+
1. Upload the **meteor-slides** folder to your **/wp-content/plugins/** directory or go to Plugins -> Add New from your Dashboard in WordPress.
|
40 |
2. Activate the plugin through the Plugins menu in WordPress
|
41 |
3. Use the Settings link or go to Slides -> Settings to access the Meteor Slides settings.
|
42 |
|
45 |
|
46 |
= Add Slideshow =
|
47 |
|
48 |
+
Use `<?php if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); } ?>` to add this slideshow to your theme, use `[meteor_slideshow]` to add it to your Post or Page content, or use the Meteor Slides Widget to add it to a sidebar.
|
49 |
+
|
50 |
+
= Meteor Slides Documentation =
|
51 |
|
52 |
+
Check out the [Meteor Slides Documentation](http://www.jleuze.com/plugins/meteor-slides/installation/ "Meteor Slides Documentation") for more information on using Meteor Slides, adding slideshows, using metadata, and advanced customization.
|
53 |
|
54 |
*Please [post any questions or problems](http://wordpress.org/tags/meteor-slides?forum_id=10#postform "Post a question or problem in the forums") in the WordPress.org support forums.*
|
55 |
|
65 |
|
66 |
= How can I switch the order of the slides? =
|
67 |
|
68 |
+
The slides load in the order they were published, you can change the publish date of a slide post to switch the order. If you'd like drap-and-drop slide sorting, try a plugin like [Post Types Order](http://wordpress.org/extend/plugins/post-types-order/ "Post Types Order plugin").
|
69 |
|
70 |
= Why is the slideshow covering up my dropdown menus? =
|
71 |
|
73 |
|
74 |
= How do I customize the slideshow's CSS stylesheet? =
|
75 |
|
76 |
+
Copy **meteor-slides.css** from **/meteor-slides/css/** to your theme's directory to replace the plugin's default stylesheet. If you have navigation enabled, be sure to copy the **buttons.png**, **next.png**, and **prev.png** files to your theme's images folder and update the image paths, or create new graphics to replace them. Learn more about [customizing the stylesheet](http://www.jleuze.com/plugins/meteor-slides/customizing-the-stylesheet/ "Meteor Slides Documentation") for Meteor Slides.
|
77 |
+
|
78 |
+
= How do I customize the slideshow's loop template? =
|
79 |
+
|
80 |
+
Copy **meteor-slideshow.php** from **/meteor-slides/** to your theme's directory to replace the plugin's default slideshow loop. Learn more about [customizing the slideshow template](http://www.jleuze.com/plugins/meteor-slides/customizing-the-slideshow-template/ "Meteor Slides Documentation") for Meteor Slides.
|
81 |
|
82 |
= I installed Meteor Slides, and now my theme or plugin's jQuery goodies are broken! =
|
83 |
|
84 |
Your theme or plugin is probably loading an extra copy of jQuery from the theme or plugin, or a third party server. This is unnecessary because WordPress already uses jQuery and it is included in the WordPress install. Meteor Slides loads the version that is within WordPress, to fix this, change your theme or plugin to use the copy of jQuery that comes with WordPress, like this `<?php wp_enqueue_script("jquery"); ?>`.
|
85 |
|
86 |
+
= Meteor Slides is awesome, what can I do to help? =
|
87 |
|
88 |
+
You can help right on this page by rating the plugin or voting for its compatibility with the latest version of WordPress. Blog about Meteor Slides to get the word out, or [visit my blog](http://www.jleuze.com/ "JLeuze.com") to post feedback or just say hi. You could also [translate Meteor Slides](http://www.jleuze.com/plugins/meteor-slides/languages/ "Meteor Slides Languages") into another language or [make a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mail%40jleuze%2ecom&item_name=Meteor%20Slides%20Donation&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8 "Donate").
|
89 |
|
90 |
*Please [post any questions or problems](http://wordpress.org/tags/meteor-slides?forum_id=10#postform "Post a question or problem in the forums") in the WordPress.org support forums.*
|
91 |
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 1.3.1 =
|
104 |
+
* Fixed post thumbnail registration conflicts.
|
105 |
+
* Added support for custom slideshow loop.
|
106 |
+
* Fixed navigation for multiple slideshows.
|
107 |
+
* Improved support for transparent images.
|
108 |
+
* Fixed slideshow layout issues.
|
109 |
+
* Updated French translation.
|
110 |
+
|
111 |
= 1.3 =
|
112 |
* Added custom slideshows taxonomy for multiple slideshows
|
113 |
* Optional slideshow and metadata parameters for template tag and shortcode
|
147 |
|
148 |
== Upgrade Notice ==
|
149 |
|
150 |
+
= 1.3.1 =
|
151 |
+
Meteor Slides 1.3.1 fixes thumbnail registration conflicts, transparent images issues, and navigation for multiple slideshows.
|
152 |
+
|
153 |
= 1.3 =
|
154 |
Meteor Slides 1.3 adds support for multiple slideshows, the Metadata jQuery plugin for advanced customization, more navigation options, and other small improvements and bug fixes.
|
155 |
|