Version Description
- New shortcode: menu
- New shortcode: subpages
- New shortcode: siblings
- Some admin fixes
- New button attribute - class
- New button attribute - target
- Different tabs styles (1 old + 1 new)
Download this release
Release Info
Developer | gn_themes |
Plugin | Shortcodes Ultimate |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 2.0.0
- css/style.css +34 -5
- languages/shortcodes-ultimate-ru_RU.mo +0 -0
- languages/shortcodes-ultimate-ru_RU.po +29 -21
- lib/admin.php +24 -9
- lib/shortcodes.php +88 -3
- readme.txt +25 -5
- shortcodes-ultimate.php +4 -1
css/style.css
CHANGED
@@ -172,13 +172,14 @@
|
|
172 |
|
173 |
/* Tabs */
|
174 |
.su-tabs { margin: 0 0 1.5em 0 }
|
175 |
-
|
|
|
176 |
padding: 5px 5px 0 5px;
|
177 |
margin: 0;
|
178 |
height: 40px;
|
179 |
background: #e5e5e5;
|
180 |
}
|
181 |
-
.su-tabs-nav span {
|
182 |
display: block;
|
183 |
float: left;
|
184 |
padding: 0 20px;
|
@@ -191,15 +192,43 @@
|
|
191 |
border-left: 1px solid #fff;
|
192 |
background: #f1f1f1;
|
193 |
}
|
194 |
-
.su-tabs-nav span:hover { background: #fff }
|
195 |
-
.su-tabs-nav span.su-tabs-current { background: #fff }
|
196 |
-
.su-tabs-pane {
|
197 |
padding: 15px;
|
198 |
border-right: 5px solid #e5e5e5;
|
199 |
border-bottom: 5px solid #e5e5e5;
|
200 |
border-left: 5px solid #e5e5e5;
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
/* Lists */
|
204 |
.su-list ul {
|
205 |
list-style-type: none;
|
172 |
|
173 |
/* Tabs */
|
174 |
.su-tabs { margin: 0 0 1.5em 0 }
|
175 |
+
|
176 |
+
.su-tabs-style-1 .su-tabs-nav {
|
177 |
padding: 5px 5px 0 5px;
|
178 |
margin: 0;
|
179 |
height: 40px;
|
180 |
background: #e5e5e5;
|
181 |
}
|
182 |
+
.su-tabs-style-1 .su-tabs-nav span {
|
183 |
display: block;
|
184 |
float: left;
|
185 |
padding: 0 20px;
|
192 |
border-left: 1px solid #fff;
|
193 |
background: #f1f1f1;
|
194 |
}
|
195 |
+
.su-tabs-style-1 .su-tabs-nav span:hover { background: #fff }
|
196 |
+
.su-tabs-style-1 .su-tabs-nav span.su-tabs-current { background: #fff }
|
197 |
+
.su-tabs-style-1 .su-tabs-pane {
|
198 |
padding: 15px;
|
199 |
border-right: 5px solid #e5e5e5;
|
200 |
border-bottom: 5px solid #e5e5e5;
|
201 |
border-left: 5px solid #e5e5e5;
|
202 |
}
|
203 |
|
204 |
+
.su-tabs-style-2 .su-tabs-nav {
|
205 |
+
padding: 5px 5px 0 5px;
|
206 |
+
margin: 0;
|
207 |
+
height: 40px;
|
208 |
+
background: #222;
|
209 |
+
}
|
210 |
+
.su-tabs-style-2 .su-tabs-nav span {
|
211 |
+
display: block;
|
212 |
+
float: left;
|
213 |
+
padding: 0 20px;
|
214 |
+
height: 39px;
|
215 |
+
line-height: 39px;
|
216 |
+
margin-right: 5px;
|
217 |
+
cursor: pointer;
|
218 |
+
border-top: 1px solid #fff;
|
219 |
+
border-right: 1px solid #fff;
|
220 |
+
border-left: 1px solid #fff;
|
221 |
+
background: #f1f1f1;
|
222 |
+
}
|
223 |
+
.su-tabs-style-2 .su-tabs-nav span:hover { background: #fff }
|
224 |
+
.su-tabs-style-2 .su-tabs-nav span.su-tabs-current { background: #fff }
|
225 |
+
.su-tabs-style-2 .su-tabs-pane {
|
226 |
+
padding: 15px;
|
227 |
+
border-right: 5px solid #222;
|
228 |
+
border-bottom: 5px solid #222;
|
229 |
+
border-left: 5px solid #222;
|
230 |
+
}
|
231 |
+
|
232 |
/* Lists */
|
233 |
.su-list ul {
|
234 |
list-style-type: none;
|
languages/shortcodes-ultimate-ru_RU.mo
CHANGED
Binary file
|
languages/shortcodes-ultimate-ru_RU.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: gn_themes\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2011-05-
|
6 |
-
"PO-Revision-Date: 2011-05-
|
7 |
"Last-Translator: Vladimir Anokhin <ano.vladimir@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -14,29 +14,29 @@ msgstr ""
|
|
14 |
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
"X-Poedit-SearchPath-0: .\n"
|
16 |
|
17 |
-
#: shortcodes-ultimate.php:
|
18 |
#: lib/admin.php:23
|
19 |
msgid "Shortcodes Ultimate"
|
20 |
msgstr "Шорткоды"
|
21 |
|
22 |
-
#: shortcodes-ultimate.php:
|
23 |
msgid "Vladimir Anokhin"
|
24 |
msgstr "Владимир Анохин"
|
25 |
|
26 |
-
#: shortcodes-ultimate.php:
|
27 |
msgid "Provides support for many easy to use shortcodes"
|
28 |
msgstr "Предоставляет поддержку множества полезных шорткодов"
|
29 |
|
30 |
-
#: shortcodes-ultimate.php:
|
31 |
msgid "Settings"
|
32 |
msgstr "Настройки"
|
33 |
|
34 |
-
#: shortcodes-ultimate.php:
|
35 |
#: lib/admin.php:57
|
36 |
msgid "Settings saved"
|
37 |
msgstr "Настройки сохранены"
|
38 |
|
39 |
-
#: shortcodes-ultimate.php:
|
40 |
#: lib/admin.php:87
|
41 |
msgid "Custom CSS saved"
|
42 |
msgstr "Произвольные стили сохранены"
|
@@ -162,11 +162,10 @@ msgstr "Пример использования"
|
|
162 |
#: lib/admin.php:137
|
163 |
#: lib/admin.php:142
|
164 |
#: lib/admin.php:147
|
165 |
-
#: lib/admin.php:152
|
166 |
#: lib/admin.php:157
|
167 |
#: lib/admin.php:177
|
168 |
#: lib/admin.php:182
|
169 |
-
#: lib/admin.php:
|
170 |
msgid "Content"
|
171 |
msgstr "Содержимое"
|
172 |
|
@@ -179,7 +178,7 @@ msgid "Tab content"
|
|
179 |
msgstr "Содержимое вкладки"
|
180 |
|
181 |
#: lib/admin.php:122
|
182 |
-
#: lib/shortcodes.php:
|
183 |
msgid "Spoiler title"
|
184 |
msgstr "Скрытый текст"
|
185 |
|
@@ -190,8 +189,10 @@ msgstr "Скрытый текст"
|
|
190 |
#: lib/admin.php:126
|
191 |
#: lib/admin.php:156
|
192 |
#: lib/admin.php:161
|
|
|
193 |
#: lib/admin.php:196
|
194 |
#: lib/admin.php:206
|
|
|
195 |
msgid "optional"
|
196 |
msgstr "необяз."
|
197 |
|
@@ -216,7 +217,7 @@ msgid "icon size"
|
|
216 |
msgstr "размер иконки"
|
217 |
|
218 |
#: lib/admin.php:172
|
219 |
-
#: lib/shortcodes.php:
|
220 |
msgid "Service name"
|
221 |
msgstr "Название услуги"
|
222 |
|
@@ -232,42 +233,49 @@ msgstr "Заголовок блока"
|
|
232 |
msgid "List item"
|
233 |
msgstr "Элемент списка"
|
234 |
|
235 |
-
#: lib/admin.php:
|
236 |
msgid "add this to last columns"
|
237 |
msgstr "добавьте к каждой последней колонке"
|
238 |
|
239 |
-
#: lib/admin.php:
|
240 |
msgid "Plain table"
|
241 |
msgstr "Простая таблица"
|
242 |
|
243 |
-
#: lib/admin.php:
|
244 |
msgid "From CSV"
|
245 |
msgstr "Из CSV-файла"
|
246 |
|
247 |
-
#: lib/admin.php:
|
248 |
msgid "1 second"
|
249 |
msgstr "1 секунда"
|
250 |
|
251 |
-
#: lib/admin.php:
|
252 |
msgid "See filter IDs"
|
253 |
msgstr "Смотреть ID фильтров"
|
254 |
|
255 |
-
#: lib/shortcodes.php:
|
256 |
msgid "Top"
|
257 |
msgstr "Вверх"
|
258 |
|
259 |
-
#: lib/shortcodes.php:
|
260 |
msgid "This is box title"
|
261 |
msgstr "Заголовок блока"
|
262 |
|
263 |
-
#: lib/shortcodes.php:
|
264 |
msgid "Please specify media url"
|
265 |
msgstr "Укажите ссылку на медиа"
|
266 |
|
267 |
-
#: lib/shortcodes.php:
|
268 |
msgid "no attached images, or only one attached image"
|
269 |
msgstr "не найдены загруженные изображения, или изображение всего одно"
|
270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
#~ msgid "Support links"
|
272 |
#~ msgstr "Полезные ссылки"
|
273 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: gn_themes\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-05-11 02:23+0300\n"
|
6 |
+
"PO-Revision-Date: 2011-05-11 02:24+0300\n"
|
7 |
"Last-Translator: Vladimir Anokhin <ano.vladimir@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
14 |
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
"X-Poedit-SearchPath-0: .\n"
|
16 |
|
17 |
+
#: shortcodes-ultimate.php:162
|
18 |
#: lib/admin.php:23
|
19 |
msgid "Shortcodes Ultimate"
|
20 |
msgstr "Шорткоды"
|
21 |
|
22 |
+
#: shortcodes-ultimate.php:162
|
23 |
msgid "Vladimir Anokhin"
|
24 |
msgstr "Владимир Анохин"
|
25 |
|
26 |
+
#: shortcodes-ultimate.php:162
|
27 |
msgid "Provides support for many easy to use shortcodes"
|
28 |
msgstr "Предоставляет поддержку множества полезных шорткодов"
|
29 |
|
30 |
+
#: shortcodes-ultimate.php:246
|
31 |
msgid "Settings"
|
32 |
msgstr "Настройки"
|
33 |
|
34 |
+
#: shortcodes-ultimate.php:259
|
35 |
#: lib/admin.php:57
|
36 |
msgid "Settings saved"
|
37 |
msgstr "Настройки сохранены"
|
38 |
|
39 |
+
#: shortcodes-ultimate.php:264
|
40 |
#: lib/admin.php:87
|
41 |
msgid "Custom CSS saved"
|
42 |
msgstr "Произвольные стили сохранены"
|
162 |
#: lib/admin.php:137
|
163 |
#: lib/admin.php:142
|
164 |
#: lib/admin.php:147
|
|
|
165 |
#: lib/admin.php:157
|
166 |
#: lib/admin.php:177
|
167 |
#: lib/admin.php:182
|
168 |
+
#: lib/admin.php:202
|
169 |
msgid "Content"
|
170 |
msgstr "Содержимое"
|
171 |
|
178 |
msgstr "Содержимое вкладки"
|
179 |
|
180 |
#: lib/admin.php:122
|
181 |
+
#: lib/shortcodes.php:82
|
182 |
msgid "Spoiler title"
|
183 |
msgstr "Скрытый текст"
|
184 |
|
189 |
#: lib/admin.php:126
|
190 |
#: lib/admin.php:156
|
191 |
#: lib/admin.php:161
|
192 |
+
#: lib/admin.php:191
|
193 |
#: lib/admin.php:196
|
194 |
#: lib/admin.php:206
|
195 |
+
#: lib/admin.php:216
|
196 |
msgid "optional"
|
197 |
msgstr "необяз."
|
198 |
|
217 |
msgstr "размер иконки"
|
218 |
|
219 |
#: lib/admin.php:172
|
220 |
+
#: lib/shortcodes.php:300
|
221 |
msgid "Service name"
|
222 |
msgstr "Название услуги"
|
223 |
|
233 |
msgid "List item"
|
234 |
msgstr "Элемент списка"
|
235 |
|
236 |
+
#: lib/admin.php:201
|
237 |
msgid "add this to last columns"
|
238 |
msgstr "добавьте к каждой последней колонке"
|
239 |
|
240 |
+
#: lib/admin.php:207
|
241 |
msgid "Plain table"
|
242 |
msgstr "Простая таблица"
|
243 |
|
244 |
+
#: lib/admin.php:207
|
245 |
msgid "From CSV"
|
246 |
msgstr "Из CSV-файла"
|
247 |
|
248 |
+
#: lib/admin.php:216
|
249 |
msgid "1 second"
|
250 |
msgstr "1 секунда"
|
251 |
|
252 |
+
#: lib/admin.php:221
|
253 |
msgid "See filter IDs"
|
254 |
msgstr "Смотреть ID фильтров"
|
255 |
|
256 |
+
#: lib/shortcodes.php:100
|
257 |
msgid "Top"
|
258 |
msgstr "Вверх"
|
259 |
|
260 |
+
#: lib/shortcodes.php:318
|
261 |
msgid "This is box title"
|
262 |
msgstr "Заголовок блока"
|
263 |
|
264 |
+
#: lib/shortcodes.php:367
|
265 |
msgid "Please specify media url"
|
266 |
msgstr "Укажите ссылку на медиа"
|
267 |
|
268 |
+
#: lib/shortcodes.php:491
|
269 |
msgid "no attached images, or only one attached image"
|
270 |
msgstr "не найдены загруженные изображения, или изображение всего одно"
|
271 |
|
272 |
+
#: lib/shortcodes.php:602
|
273 |
+
msgid "This menu doesn't exists, or has no elements"
|
274 |
+
msgstr "Такое меню не существует, или в нем нет ни одного элемента"
|
275 |
+
|
276 |
+
#~ msgid "Specify menu name and add elements to menu"
|
277 |
+
#~ msgstr "Укажите имя меню, или добавьте элементы в укзанное меню"
|
278 |
+
|
279 |
#~ msgid "Support links"
|
280 |
#~ msgstr "Полезные ссылки"
|
281 |
|
lib/admin.php
CHANGED
@@ -111,10 +111,10 @@
|
|
111 |
<td>align="left|center|none|right"</td>
|
112 |
<td>[frame align="center"] <img src="image.jpg" alt="" /> [/frame]</td>
|
113 |
</tr>
|
114 |
-
<tr>
|
115 |
<td>tabs, tab</td>
|
116 |
-
<td>title</td>
|
117 |
-
<td>[tabs] [tab title="<?php _e( 'Tab name', 'shortcodes-ultimate' ); ?>"] <?php _e( 'Tab content', 'shortcodes-ultimate' ); ?> [/tab] [/tabs]</td>
|
118 |
</tr>
|
119 |
<tr>
|
120 |
<td>spoiler</td>
|
@@ -146,19 +146,19 @@
|
|
146 |
<td>bg="#HEX"<br/>color="#HEX"</td>
|
147 |
<td>[highlight bg="#fc0" color="#000"] <?php _e( 'Content', 'shortcodes-ultimate' ); ?> [/highlight]</td>
|
148 |
</tr>
|
149 |
-
<tr
|
150 |
<td>bloginfo</td>
|
151 |
<td>option<br/><a href="http://codex.wordpress.org/Function_Reference/get_bloginfo#Parameters" target="_blank"><?php _e( 'See available values', 'shortcodes-ultimate' ); ?></a></td>
|
152 |
-
<td>[
|
153 |
</tr>
|
154 |
-
<tr
|
155 |
<td>permalink</td>
|
156 |
-
<td>p - post/page ID<br/>
|
157 |
<td>[permalink p=52]<br/>[permalink p="52" target="blank"] <?php _e( 'Content', 'shortcodes-ultimate' ); ?> [/permalink]</td>
|
158 |
</tr>
|
159 |
-
<tr>
|
160 |
<td>button</td>
|
161 |
-
<td>link<br/>color="#HEX"<br/>size="1-12"<br/>style="1|2|3|4"<br/>dark (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)<br/>square (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)<br/>icon (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)</td>
|
162 |
<td>[button link="#" color="#b00" size="3" style="3" dark="1" square="1" icon="image.png"] <?php _e( 'Button text', 'shortcodes-ultimate' ); ?> [/button]</td>
|
163 |
</tr>
|
164 |
<tr>
|
@@ -186,6 +186,21 @@
|
|
186 |
<td>style="star|arrow|check|cross|thumbs|link|gear|time|note|plus|guard|event|idea|settings|twitter"</td>
|
187 |
<td>[list style="check"] <ul> <li> <?php _e( 'List item', 'shortcodes-ultimate' ); ?> </li> </ul> [/list]</td>
|
188 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
<tr>
|
190 |
<td>column</td>
|
191 |
<td>size="1-2|1-3|1-4|1-5|1-6|2-3|3-4|2-5|3-5|4-5|5-6"<br/>last (<?php _e( 'add this to last columns', 'shortcodes-ultimate' ); ?>)</td>
|
111 |
<td>align="left|center|none|right"</td>
|
112 |
<td>[frame align="center"] <img src="image.jpg" alt="" /> [/frame]</td>
|
113 |
</tr>
|
114 |
+
<tr class="su-new-shortcode">
|
115 |
<td>tabs, tab</td>
|
116 |
+
<td>style="1|2" (tabs)<br/>title (tab)</td>
|
117 |
+
<td>[tabs style="1"] [tab title="<?php _e( 'Tab name', 'shortcodes-ultimate' ); ?>"] <?php _e( 'Tab content', 'shortcodes-ultimate' ); ?> [/tab] [/tabs]</td>
|
118 |
</tr>
|
119 |
<tr>
|
120 |
<td>spoiler</td>
|
146 |
<td>bg="#HEX"<br/>color="#HEX"</td>
|
147 |
<td>[highlight bg="#fc0" color="#000"] <?php _e( 'Content', 'shortcodes-ultimate' ); ?> [/highlight]</td>
|
148 |
</tr>
|
149 |
+
<tr>
|
150 |
<td>bloginfo</td>
|
151 |
<td>option<br/><a href="http://codex.wordpress.org/Function_Reference/get_bloginfo#Parameters" target="_blank"><?php _e( 'See available values', 'shortcodes-ultimate' ); ?></a></td>
|
152 |
+
<td>[bloginfo option="name"]<br/>[bloginfo option="ver"]</td>
|
153 |
</tr>
|
154 |
+
<tr>
|
155 |
<td>permalink</td>
|
156 |
+
<td>p - post/page ID<br/>target="self|blank" (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)</td>
|
157 |
<td>[permalink p=52]<br/>[permalink p="52" target="blank"] <?php _e( 'Content', 'shortcodes-ultimate' ); ?> [/permalink]</td>
|
158 |
</tr>
|
159 |
+
<tr class="su-new-shortcode">
|
160 |
<td>button</td>
|
161 |
+
<td>link<br/>color="#HEX"<br/>size="1-12"<br/>style="1|2|3|4"<br/>dark (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)<br/>square (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)<br/>icon (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)<br/>class (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)<br/>target="self|blank"</td>
|
162 |
<td>[button link="#" color="#b00" size="3" style="3" dark="1" square="1" icon="image.png"] <?php _e( 'Button text', 'shortcodes-ultimate' ); ?> [/button]</td>
|
163 |
</tr>
|
164 |
<tr>
|
186 |
<td>style="star|arrow|check|cross|thumbs|link|gear|time|note|plus|guard|event|idea|settings|twitter"</td>
|
187 |
<td>[list style="check"] <ul> <li> <?php _e( 'List item', 'shortcodes-ultimate' ); ?> </li> </ul> [/list]</td>
|
188 |
</tr>
|
189 |
+
<tr class="su-new-shortcode">
|
190 |
+
<td>menu</td>
|
191 |
+
<td>name</td>
|
192 |
+
<td>[menu name="Main menu"]</td>
|
193 |
+
</tr>
|
194 |
+
<tr class="su-new-shortcode">
|
195 |
+
<td>subpages</td>
|
196 |
+
<td>depth (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)</td>
|
197 |
+
<td>[subpages]<br/>[subpages depth="2"]</td>
|
198 |
+
</tr>
|
199 |
+
<tr class="su-new-shortcode">
|
200 |
+
<td>siblings</td>
|
201 |
+
<td>depth (<?php _e( 'optional', 'shortcodes-ultimate' ); ?>)</td>
|
202 |
+
<td>[siblings]<br/>[siblings depth="2"]</td>
|
203 |
+
</tr>
|
204 |
<tr>
|
205 |
<td>column</td>
|
206 |
<td>size="1-2|1-3|1-4|1-5|1-6|2-3|3-4|2-5|3-5|4-5|5-6"<br/>last (<?php _e( 'add this to last columns', 'shortcodes-ultimate' ); ?>)</td>
|
lib/shortcodes.php
CHANGED
@@ -38,6 +38,10 @@
|
|
38 |
* @return string Output html
|
39 |
*/
|
40 |
function su_tabs( $atts, $content ) {
|
|
|
|
|
|
|
|
|
41 |
$GLOBALS['tab_count'] = 0;
|
42 |
|
43 |
do_shortcode( $content );
|
@@ -47,7 +51,7 @@
|
|
47 |
$tabs[] = '<span>' . $tab['title'] . '</span>';
|
48 |
$panes[] = '<div class="su-tabs-pane">' . $tab['content'] . '</div>';
|
49 |
}
|
50 |
-
$return = '<div class="su-tabs"><div class="su-tabs-nav">' . implode( '', $tabs ) . '</div><div class="su-tabs-panes">' . implode( "\n", $panes ) . '</div></div>';
|
51 |
}
|
52 |
return $return;
|
53 |
}
|
@@ -205,6 +209,8 @@
|
|
205 |
'style' => 1,
|
206 |
'size' => 3,
|
207 |
'icon' => false,
|
|
|
|
|
208 |
), $atts ) );
|
209 |
|
210 |
$styles = array(
|
@@ -262,7 +268,9 @@
|
|
262 |
|
263 |
$icon_image = ( $icon ) ? '<img src="' . $icon . '" alt="' . htmlspecialchars( $content ) . '" style="' . $img_style . '" /> ' : '';
|
264 |
|
265 |
-
|
|
|
|
|
266 |
}
|
267 |
|
268 |
/**
|
@@ -505,7 +513,7 @@
|
|
505 |
}
|
506 |
|
507 |
/**
|
508 |
-
* Shortcode:
|
509 |
*
|
510 |
* @param string $content
|
511 |
* @return string Output html
|
@@ -518,4 +526,81 @@
|
|
518 |
return get_bloginfo( $option );
|
519 |
}
|
520 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
?>
|
38 |
* @return string Output html
|
39 |
*/
|
40 |
function su_tabs( $atts, $content ) {
|
41 |
+
extract( shortcode_atts( array(
|
42 |
+
'style' => 1
|
43 |
+
), $atts ) );
|
44 |
+
|
45 |
$GLOBALS['tab_count'] = 0;
|
46 |
|
47 |
do_shortcode( $content );
|
51 |
$tabs[] = '<span>' . $tab['title'] . '</span>';
|
52 |
$panes[] = '<div class="su-tabs-pane">' . $tab['content'] . '</div>';
|
53 |
}
|
54 |
+
$return = '<div class="su-tabs su-tabs-style-' . $style . '"><div class="su-tabs-nav">' . implode( '', $tabs ) . '</div><div class="su-tabs-panes">' . implode( "\n", $panes ) . '</div></div>';
|
55 |
}
|
56 |
return $return;
|
57 |
}
|
209 |
'style' => 1,
|
210 |
'size' => 3,
|
211 |
'icon' => false,
|
212 |
+
'class' => 'su-button-class',
|
213 |
+
'target' => false
|
214 |
), $atts ) );
|
215 |
|
216 |
$styles = array(
|
268 |
|
269 |
$icon_image = ( $icon ) ? '<img src="' . $icon . '" alt="' . htmlspecialchars( $content ) . '" style="' . $img_style . '" /> ' : '';
|
270 |
|
271 |
+
$target = ( $target ) ? ' target="_' . $target . '"' : '';
|
272 |
+
|
273 |
+
return '<a href="' . $link . '" class="su-button su-button-style-' . $style . ' ' . $class . '" style="' . $link_style . '"' . $target . '><span style="' . $span_style . '">' . $icon_image . $content . '</span></a>';
|
274 |
}
|
275 |
|
276 |
/**
|
513 |
}
|
514 |
|
515 |
/**
|
516 |
+
* Shortcode: bloginfo
|
517 |
*
|
518 |
* @param string $content
|
519 |
* @return string Output html
|
526 |
return get_bloginfo( $option );
|
527 |
}
|
528 |
|
529 |
+
/**
|
530 |
+
* Shortcode: subpages
|
531 |
+
*
|
532 |
+
* @param string $content
|
533 |
+
* @return string Output html
|
534 |
+
*/
|
535 |
+
function su_subpages_shortcode( $atts, $content = null ) {
|
536 |
+
extract( shortcode_atts( array(
|
537 |
+
'depth' => 1
|
538 |
+
), $atts ) );
|
539 |
+
|
540 |
+
global $post;
|
541 |
+
|
542 |
+
$return = wp_list_pages( array(
|
543 |
+
'title_li' => '',
|
544 |
+
'echo' => 0,
|
545 |
+
'child_of' => get_the_ID(),
|
546 |
+
'depth' => $depth
|
547 |
+
) );
|
548 |
+
|
549 |
+
return ( $return ) ? '<ul class="su-subpages">' . $return . '</ul>' : false;
|
550 |
+
}
|
551 |
+
|
552 |
+
/**
|
553 |
+
* Shortcode: siblings pages
|
554 |
+
*
|
555 |
+
* @param string $content
|
556 |
+
* @return string Output html
|
557 |
+
*/
|
558 |
+
function su_siblings_shortcode( $atts, $content = null ) {
|
559 |
+
extract( shortcode_atts( array(
|
560 |
+
'depth' => 1
|
561 |
+
), $atts ) );
|
562 |
+
|
563 |
+
global $post;
|
564 |
+
|
565 |
+
$return = wp_list_pages( array(
|
566 |
+
'title_li' => '',
|
567 |
+
'echo' => 0,
|
568 |
+
'child_of' => $post->post_parent,
|
569 |
+
'depth' => $depth,
|
570 |
+
'exclude' => $post->ID
|
571 |
+
) );
|
572 |
+
|
573 |
+
return ( $return ) ? '<ul class="su-siblings">' . $return . '</ul>' : false;
|
574 |
+
}
|
575 |
+
|
576 |
+
/**
|
577 |
+
* Shortcode: menu
|
578 |
+
*
|
579 |
+
* @param string $content
|
580 |
+
* @return string Output html
|
581 |
+
*/
|
582 |
+
function su_menu_shortcode( $atts, $content = null ) {
|
583 |
+
extract( shortcode_atts( array(
|
584 |
+
'name' => 1
|
585 |
+
), $atts ) );
|
586 |
+
|
587 |
+
$return = wp_nav_menu( array(
|
588 |
+
'echo' => false,
|
589 |
+
'menu' => $name,
|
590 |
+
'container' => false,
|
591 |
+
'fallback_cb' => 'su_menu_shortcode_fb_cb'
|
592 |
+
) );
|
593 |
+
|
594 |
+
return ( $name ) ? $return : false;
|
595 |
+
}
|
596 |
+
|
597 |
+
/**
|
598 |
+
* Fallback callback function for menu shortcode
|
599 |
+
*
|
600 |
+
* @return string Text message
|
601 |
+
*/
|
602 |
+
function su_menu_shortcode_fb_cb() {
|
603 |
+
return __( 'This menu doesn\'t exists, or has no elements', 'shortcodes-ultimate' );
|
604 |
+
}
|
605 |
+
|
606 |
?>
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: gn_themes
|
3 |
Donate link: http://ilovecode.ru/
|
4 |
-
Tags: shortcode, shortcodes, short code, shortcodes, tab, tabs, button, buttons, jquery, box, boxes, toggle, spoiler, column, columns, services, service, pullquote, list, lists, frame, images, image, links, fancy, fancy link, fancy links, fancy buttons, jquery tabs, accordeon, slider, nivo, nivo slider, plugin, admin, photoshop, gallery
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.2
|
7 |
-
Stable tag:
|
8 |
|
9 |
Provides support for multiple useful shortcodes
|
10 |
|
@@ -12,8 +12,13 @@ Provides support for multiple useful shortcodes
|
|
12 |
== Description ==
|
13 |
|
14 |
= In this version =
|
15 |
-
* New shortcode:
|
16 |
-
* New shortcode:
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
With this plugin you can easily add buttons, dividers, spacers, boxes, notes and much more
|
19 |
= Complete list of available shortcodes =
|
@@ -26,11 +31,16 @@ With this plugin you can easily add buttons, dividers, spacers, boxes, notes and
|
|
26 |
* Quote
|
27 |
* Pullquote
|
28 |
* Highlight
|
|
|
|
|
29 |
* Button
|
30 |
* Fancy link
|
31 |
* Service
|
32 |
* Box
|
33 |
* Note
|
|
|
|
|
|
|
34 |
* List
|
35 |
* Column
|
36 |
* Table
|
@@ -61,15 +71,25 @@ Upgrade normally via your Wordpress admin -> Plugins panel.
|
|
61 |
|
62 |
1. Heading, spoiler, tabs, quote, button.
|
63 |
2. Box, note, divider (top), list.
|
|
|
64 |
|
65 |
== Frequently Asked Questions ==
|
66 |
|
67 |
= Complete list of supported shortcodes =
|
68 |
-
|
69 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
= 1.9.0 =
|
74 |
* New shortcode: permalink
|
75 |
* New shortcode: bloginfo
|
1 |
=== Plugin Name ===
|
2 |
Contributors: gn_themes
|
3 |
Donate link: http://ilovecode.ru/
|
4 |
+
Tags: shortcode, shortcodes, short code, shortcodes, tab, tabs, button, buttons, jquery, box, boxes, toggle, spoiler, column, columns, services, service, pullquote, list, lists, frame, images, image, links, fancy, fancy link, fancy links, fancy buttons, jquery tabs, accordeon, slider, nivo, nivo slider, plugin, admin, photoshop, gallery, bloginfo, list pages, sub pages, navigation, siblings pages, children pages, permalink, permalinks
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.2
|
7 |
+
Stable tag: 2.0.0
|
8 |
|
9 |
Provides support for multiple useful shortcodes
|
10 |
|
12 |
== Description ==
|
13 |
|
14 |
= In this version =
|
15 |
+
* New shortcode: menu
|
16 |
+
* New shortcode: subpages
|
17 |
+
* New shortcode: siblings
|
18 |
+
* Some admin fixes
|
19 |
+
* New button attribute - class
|
20 |
+
* New button attribute - target
|
21 |
+
* Different tabs styles (1 old + 1 new)
|
22 |
|
23 |
With this plugin you can easily add buttons, dividers, spacers, boxes, notes and much more
|
24 |
= Complete list of available shortcodes =
|
31 |
* Quote
|
32 |
* Pullquote
|
33 |
* Highlight
|
34 |
+
* Permalink
|
35 |
+
* Bloginfo
|
36 |
* Button
|
37 |
* Fancy link
|
38 |
* Service
|
39 |
* Box
|
40 |
* Note
|
41 |
+
* Menu
|
42 |
+
* Subpages
|
43 |
+
* Siblings
|
44 |
* List
|
45 |
* Column
|
46 |
* Table
|
71 |
|
72 |
1. Heading, spoiler, tabs, quote, button.
|
73 |
2. Box, note, divider (top), list.
|
74 |
+
3. List styles.
|
75 |
|
76 |
== Frequently Asked Questions ==
|
77 |
|
78 |
= Complete list of supported shortcodes =
|
79 |
+
See your dashboard
|
80 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 2.0.0 =
|
85 |
+
* New shortcode: menu
|
86 |
+
* New shortcode: subpages
|
87 |
+
* New shortcode: siblings
|
88 |
+
* Some admin fixes
|
89 |
+
* New button attribute - class
|
90 |
+
* New button attribute - target
|
91 |
+
* Different tabs styles (1 old + 1 new)
|
92 |
+
|
93 |
= 1.9.0 =
|
94 |
* New shortcode: permalink
|
95 |
* New shortcode: bloginfo
|
shortcodes-ultimate.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: Shortcodes Ultimate
|
5 |
Plugin URI: http://ilovecode.ru/?p=122
|
6 |
-
Version:
|
7 |
Author: Vladimir Anokhin
|
8 |
Author URI: http://ilovecode.ru/
|
9 |
Description: Provides support for many easy to use shortcodes
|
@@ -115,6 +115,9 @@
|
|
115 |
add_shortcode( su_compatibility_mode_prefix() . 'nivo_slider', 'su_nivo_slider_shortcode' );
|
116 |
add_shortcode( su_compatibility_mode_prefix() . 'permalink', 'su_permalink_shortcode' );
|
117 |
add_shortcode( su_compatibility_mode_prefix() . 'bloginfo', 'su_bloginfo_shortcode' );
|
|
|
|
|
|
|
118 |
}
|
119 |
|
120 |
add_action( 'init', 'su_plugin_init' );
|
3 |
/*
|
4 |
Plugin Name: Shortcodes Ultimate
|
5 |
Plugin URI: http://ilovecode.ru/?p=122
|
6 |
+
Version: 2.0.0
|
7 |
Author: Vladimir Anokhin
|
8 |
Author URI: http://ilovecode.ru/
|
9 |
Description: Provides support for many easy to use shortcodes
|
115 |
add_shortcode( su_compatibility_mode_prefix() . 'nivo_slider', 'su_nivo_slider_shortcode' );
|
116 |
add_shortcode( su_compatibility_mode_prefix() . 'permalink', 'su_permalink_shortcode' );
|
117 |
add_shortcode( su_compatibility_mode_prefix() . 'bloginfo', 'su_bloginfo_shortcode' );
|
118 |
+
add_shortcode( su_compatibility_mode_prefix() . 'subpages', 'su_subpages_shortcode' );
|
119 |
+
add_shortcode( su_compatibility_mode_prefix() . 'siblings', 'su_siblings_shortcode' );
|
120 |
+
add_shortcode( su_compatibility_mode_prefix() . 'menu', 'su_menu_shortcode' );
|
121 |
}
|
122 |
|
123 |
add_action( 'init', 'su_plugin_init' );
|