Version Description
Improvements:
* Improved compatibility with fitvid.js;
* Improved appearance of the Show more
and Show less
links of the su_expand
shortcode;
* The new option mute
for su_youtube
and su_youtube_advanced
shortcodes;
* Support for the youtube-nocookie.com
domain in su_youtube
and su_youtube_advanced
shortcodes;
* Support for nested shortcodes in the title
attribute of the su_button
shortcode;
* The new option dnt
(do not track) for the su_vimeo
shortcode, learn more;
* The new option mute
for the su_vimeo
shortcode;
* https support for the su_dailymotion
shortcode;
* New options title
and rel
for the su_permalink
shortcode;
* The su_post
shortcode now support slugs in the post_id
attribute;
* The new option zoom
for su_gmap
.
Changes: * Shortcodes styles merged into a single stylesheet.
Fixes:
* Fixed warning in su_siblings
shortcode.
Release Info
Developer | gn_themes |
Plugin | Shortcodes Ultimate |
Version | 5.0.5 |
Comparing to | |
See all releases |
Code changes from version 5.0.4 to 5.0.5
- admin/class-shortcodes-ultimate-admin-shortcodes.php +2 -2
- admin/partials/settings/fields/css.php +1 -1
- assets/css/cheatsheet.css +0 -88
- assets/css/options-page.css +0 -264
- assets/css/sunrise.css +0 -173
- inc/core/assets.php +8 -16
- inc/core/counters.php +0 -55
- inc/core/data.php +0 -3121
- inc/core/generator-views.php +10 -10
- inc/core/generator.php +224 -124
- inc/core/load.php +0 -58
- inc/core/shortcodes.php +0 -1686
- inc/core/tools.php +0 -481
- includes/class-shortcodes-ultimate-shortcodes.php +116 -0
- includes/class-shortcodes-ultimate.php +45 -4
- includes/config/addon-ids.php +3 -0
- includes/config/animations.php +65 -0
- includes/config/borders.php +11 -0
- includes/config/groups.php +11 -0
- includes/config/icons.php +3 -0
- includes/css/shortcodes.css +2411 -0
- includes/deprecated/class-su-data.php +23 -0
- includes/deprecated/class-su-tools.php +72 -0
- includes/deprecated/functions.php +16 -0
- includes/filters.php +35 -2
- includes/functions-galleries.php +172 -0
- includes/functions-helpers.php +228 -0
- includes/functions-html.php +135 -0
- includes/functions-shortcodes.php +51 -0
- {assets → includes}/images/quote.png +0 -0
- assets/css/box-shortcodes.css → includes/scss/_box-shortcodes.scss +1 -2
- assets/css/content-shortcodes.css → includes/scss/_content-shortcodes.scss +71 -89
- assets/css/galleries-shortcodes.css → includes/scss/_galleries-shortcodes.scss +38 -60
- assets/css/media-shortcodes.css → includes/scss/_media-shortcodes.scss +2 -0
- assets/css/other-shortcodes.css → includes/scss/_other-shortcodes.scss +0 -0
- assets/css/players-shortcodes.css → includes/scss/_players-shortcodes.scss +71 -117
- includes/scss/shortcodes.scss +6 -0
- includes/shortcodes/_all.php +56 -0
- includes/shortcodes/accordion.php +35 -0
- includes/shortcodes/animate.php +71 -0
- includes/shortcodes/audio.php +81 -0
- includes/shortcodes/box.php +103 -0
- includes/shortcodes/button.php +368 -0
- includes/shortcodes/carousel.php +226 -0
- includes/shortcodes/column.php +73 -0
- includes/shortcodes/custom_gallery.php +141 -0
- includes/shortcodes/dailymotion.php +146 -0
- includes/shortcodes/divider.php +99 -0
- includes/shortcodes/document.php +64 -0
- includes/shortcodes/dropcap.php +60 -0
- includes/shortcodes/dummy_image.php +72 -0
- includes/shortcodes/dummy_text.php +64 -0
- includes/shortcodes/expand.php +132 -0
- includes/shortcodes/feed.php +50 -0
- includes/shortcodes/frame.php +47 -0
- includes/shortcodes/gmap.php +88 -0
- includes/shortcodes/guests.php +31 -0
- includes/shortcodes/heading.php +75 -0
- includes/shortcodes/highlight.php +53 -0
- includes/shortcodes/label.php +51 -0
- includes/shortcodes/lightbox.php +60 -0
- includes/shortcodes/lightbox_content.php +114 -0
- includes/shortcodes/list.php +123 -0
- includes/shortcodes/media.php +29 -0
- includes/shortcodes/members.php +75 -0
- includes/shortcodes/menu.php +44 -0
- includes/shortcodes/meta.php +75 -0
- includes/shortcodes/note.php +72 -0
- includes/shortcodes/permalink.php +79 -0
- includes/shortcodes/post.php +113 -0
- includes/shortcodes/posts.php +303 -0
- includes/shortcodes/private.php +33 -0
- includes/shortcodes/pullquote.php +43 -0
- includes/shortcodes/qrcode.php +116 -0
- includes/shortcodes/quote.php +68 -0
- includes/shortcodes/row.php +34 -0
- includes/shortcodes/scheduler.php +154 -0
- includes/shortcodes/screenr.php +34 -0
- includes/shortcodes/service.php +83 -0
- includes/shortcodes/siblings.php +52 -0
- includes/shortcodes/slider.php +204 -0
- includes/shortcodes/spacer.php +42 -0
- includes/shortcodes/spoiler.php +90 -0
- includes/shortcodes/subpages.php +49 -0
- includes/shortcodes/table.php +57 -0
- includes/shortcodes/tabs.php +188 -0
- includes/shortcodes/template.php +34 -0
- includes/shortcodes/tooltip.php +157 -0
- includes/shortcodes/user.php +87 -0
- includes/shortcodes/video.php +114 -0
- includes/shortcodes/vimeo.php +104 -0
- includes/shortcodes/youtube.php +108 -0
- includes/shortcodes/youtube_advanced.php +226 -0
- readme.txt +23 -0
- shortcodes-ultimate.php +3 -7
@@ -183,7 +183,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
183 |
*/
|
184 |
protected function get_shortcodes() {
|
185 |
|
186 |
-
$shortcodes =
|
187 |
|
188 |
foreach ( $shortcodes as $id => $shortcode ) {
|
189 |
|
@@ -258,7 +258,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
258 |
*/
|
259 |
protected function get_groups() {
|
260 |
|
261 |
-
$groups =
|
262 |
$current = ( isset( $_GET['group'] ) ) ? sanitize_title( $_GET['group'] ) : 'all';
|
263 |
$groups['all'] = __( 'All shortcodes', 'shortcodes-ultimate' );
|
264 |
|
183 |
*/
|
184 |
protected function get_shortcodes() {
|
185 |
|
186 |
+
$shortcodes = su_get_all_shortcodes();
|
187 |
|
188 |
foreach ( $shortcodes as $id => $shortcode ) {
|
189 |
|
258 |
*/
|
259 |
protected function get_groups() {
|
260 |
|
261 |
+
$groups = su_get_config( 'groups' );
|
262 |
$current = ( isset( $_GET['group'] ) ) ? sanitize_title( $_GET['group'] ) : 'all';
|
263 |
$groups['all'] = __( 'All shortcodes', 'shortcodes-ultimate' );
|
264 |
|
@@ -15,5 +15,5 @@
|
|
15 |
|
16 |
<ul class="ul-disc">
|
17 |
<li><?php _e( 'See help tab at the top right corner of this page for more information.', 'shortcodes-ultimate' ); ?></li>
|
18 |
-
<li><?php printf( __( 'Open %s file to see default styles.', 'shortcodes-ultimate' ), '<a href="' . $this->plugin_url . '
|
19 |
</ul>
|
15 |
|
16 |
<ul class="ul-disc">
|
17 |
<li><?php _e( 'See help tab at the top right corner of this page for more information.', 'shortcodes-ultimate' ); ?></li>
|
18 |
+
<li><?php printf( __( 'Open %s file to see default styles.', 'shortcodes-ultimate' ), '<a href="' . $this->plugin_url . 'includes/css/shortcodes.css" target="_blank">shortcodes.css</a>' ); ?></li>
|
19 |
</ul>
|
@@ -1,88 +0,0 @@
|
|
1 |
-
#su-cheatsheet-screen table {
|
2 |
-
margin: 30px 0;
|
3 |
-
margin-bottom: 1.11111rem;
|
4 |
-
border: solid 1px #ddd;
|
5 |
-
background: #fff;
|
6 |
-
}
|
7 |
-
#su-cheatsheet-screen table thead {
|
8 |
-
background: #f5f5f5;
|
9 |
-
}
|
10 |
-
#su-cheatsheet-screen table thead tr th,
|
11 |
-
#su-cheatsheet-screen table thead tr td {
|
12 |
-
padding: 0.44444rem 0.55556rem 0.55556rem;
|
13 |
-
color: #222;
|
14 |
-
font-weight: bold;
|
15 |
-
}
|
16 |
-
#su-cheatsheet-screen table tfoot {
|
17 |
-
background: #f5f5f5;
|
18 |
-
}
|
19 |
-
#su-cheatsheet-screen table tfoot tr th,
|
20 |
-
#su-cheatsheet-screen table tfoot tr td {
|
21 |
-
padding: 0.44444rem 0.55556rem 0.55556rem;
|
22 |
-
color: #222;
|
23 |
-
font-weight: bold;
|
24 |
-
}
|
25 |
-
#su-cheatsheet-screen table tr th,
|
26 |
-
#su-cheatsheet-screen table tr td {
|
27 |
-
padding: 0.5rem 0.55556rem;
|
28 |
-
color: #222;
|
29 |
-
text-align: left;
|
30 |
-
}
|
31 |
-
#su-cheatsheet-screen table tr.even,
|
32 |
-
#su-cheatsheet-screen table tr.alt,
|
33 |
-
#su-cheatsheet-screen table tr:nth-of-type(even) {
|
34 |
-
background: #f9f9f9;
|
35 |
-
}
|
36 |
-
#su-cheatsheet-screen table thead tr th,
|
37 |
-
#su-cheatsheet-screen table tfoot tr th,
|
38 |
-
#su-cheatsheet-screen table tfoot tr td,
|
39 |
-
#su-cheatsheet-screen table tbody tr th,
|
40 |
-
#su-cheatsheet-screen table tbody tr td,
|
41 |
-
#su-cheatsheet-screen table tr td {
|
42 |
-
display: table-cell;
|
43 |
-
vertical-align: top;
|
44 |
-
}
|
45 |
-
|
46 |
-
#su-cheatsheet-screen table .su-shortcode-icon {
|
47 |
-
display: inline-block;
|
48 |
-
width: 24px;
|
49 |
-
opacity: 0.5;
|
50 |
-
filter: alpha(opacity=50);
|
51 |
-
}
|
52 |
-
#su-cheatsheet-screen table .su-shortcode-desc {
|
53 |
-
font-size: 0.8em;
|
54 |
-
color: #777;
|
55 |
-
margin: 5px 0 0 0;
|
56 |
-
font-style: normal;
|
57 |
-
}
|
58 |
-
|
59 |
-
#su-cheatsheet-screen table .su-shortcode-attribute {
|
60 |
-
margin-top: 1.5em;
|
61 |
-
color: #666;
|
62 |
-
}
|
63 |
-
#su-cheatsheet-screen table .su-shortcode-attribute:first-child { margin-top: 0; }
|
64 |
-
#su-cheatsheet-screen table .su-shortcode-attribute p { margin: 5px; }
|
65 |
-
#su-cheatsheet-screen table .su-shortcode-attribute strong,
|
66 |
-
#su-cheatsheet-screen table .su-shortcode-attribute em {
|
67 |
-
color: #000;
|
68 |
-
font-style: normal;
|
69 |
-
}
|
70 |
-
#su-cheatsheet-screen table .su-shortcode-attribute strong em {
|
71 |
-
color: #666;
|
72 |
-
font-weight: normal;
|
73 |
-
font-style: normal;
|
74 |
-
}
|
75 |
-
#su-cheatsheet-screen table code {
|
76 |
-
display: block;
|
77 |
-
white-space: pre-wrap;
|
78 |
-
font-family: monospace;
|
79 |
-
}
|
80 |
-
|
81 |
-
body.su-print-cheatsheet #wpadminbar,
|
82 |
-
body.su-print-cheatsheet #adminmenuback,
|
83 |
-
body.su-print-cheatsheet #adminmenuwrap,
|
84 |
-
body.su-print-cheatsheet #wpfooter { display: none; }
|
85 |
-
body.su-print-cheatsheet #wpcontent { margin: 0 0 0 30px; }
|
86 |
-
#su-cheatsheet-print-head { display: none; }
|
87 |
-
body.su-print-cheatsheet #su-cheatsheet-print-head { display: inline-block; }
|
88 |
-
body.su-print-cheatsheet #su-cheatsheet-print { display: none; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,264 +0,0 @@
|
|
1 |
-
.su-clear {
|
2 |
-
height: 0;
|
3 |
-
clear: both;
|
4 |
-
}
|
5 |
-
.su-clearfix:before,
|
6 |
-
.su-clearfix:after {
|
7 |
-
display: table;
|
8 |
-
content: " ";
|
9 |
-
}
|
10 |
-
.su-clearfix:after { clear: both; }
|
11 |
-
|
12 |
-
.su-ajax {
|
13 |
-
min-height: 60px;
|
14 |
-
background-image: url("../images/loading.gif") !important;
|
15 |
-
background-position: 50% 50% !important;
|
16 |
-
background-repeat: no-repeat !important;
|
17 |
-
}
|
18 |
-
.su-ajax * { visibility: hidden; }
|
19 |
-
|
20 |
-
/* About screen */
|
21 |
-
#su-about-screen { }
|
22 |
-
#su-about-screen h1 { margin: 1.5em 0; }
|
23 |
-
#su-about-screen h1 small {
|
24 |
-
display: block;
|
25 |
-
margin: 7px 0 0 20px;
|
26 |
-
color: #aaa;
|
27 |
-
font-weight: normal;
|
28 |
-
font-size: 0.5em;
|
29 |
-
}
|
30 |
-
#su-about-screen .su-about-column {
|
31 |
-
width: 400px;
|
32 |
-
margin-bottom: 1em;
|
33 |
-
float: left;
|
34 |
-
}
|
35 |
-
#su-links {
|
36 |
-
margin-bottom: 1.5em;
|
37 |
-
line-height: 1.6;
|
38 |
-
}
|
39 |
-
#su-links span {
|
40 |
-
display: inline-block;
|
41 |
-
width: 1px;
|
42 |
-
height: 1em;
|
43 |
-
margin: 0 0.5em;
|
44 |
-
border-right: 1px dotted #777;
|
45 |
-
vertical-align: middle;
|
46 |
-
}
|
47 |
-
#su-video {
|
48 |
-
width: 100%;
|
49 |
-
min-width: 200px;
|
50 |
-
max-width: 630px;
|
51 |
-
margin-top: 40px;
|
52 |
-
}
|
53 |
-
#su-video iframe {
|
54 |
-
width: 100%;
|
55 |
-
height: 370px;
|
56 |
-
}
|
57 |
-
|
58 |
-
/* Custom CSS screen */
|
59 |
-
#su-custom-css-screen { }
|
60 |
-
#su-custom-css-screen textarea {
|
61 |
-
width: 100%;
|
62 |
-
border: 1px solid #ccc;
|
63 |
-
}
|
64 |
-
|
65 |
-
.su-custom-css-originals,
|
66 |
-
.su-custom-css-vars {
|
67 |
-
margin: 1.5em 0;
|
68 |
-
line-height: 1.8;
|
69 |
-
}
|
70 |
-
.su-custom-css-originals span {
|
71 |
-
display: inline-block;
|
72 |
-
width: 1px;
|
73 |
-
height: 1em;
|
74 |
-
margin: 0 0.5em;
|
75 |
-
border-right: 1px dotted #777;
|
76 |
-
vertical-align: middle;
|
77 |
-
}
|
78 |
-
|
79 |
-
body.toplevel_page_shortcodes-ultimate .mfp-iframe-scaler iframe { background: #fff; }
|
80 |
-
|
81 |
-
.js #sunrise-field-custom-css-editor { height: 300px; }
|
82 |
-
#sunrise-field-custom-css-editor .ace_scrollbar { overflow-y: auto !important; }
|
83 |
-
|
84 |
-
/* Add-ons screen */
|
85 |
-
#su-addons-screen { margin: 40px 20px; }
|
86 |
-
#su-addons-screen h2 {
|
87 |
-
margin: 0 0 1.2em 0;
|
88 |
-
padding: 0 0 0.8em 0;
|
89 |
-
border-bottom: 1px solid #ddd;
|
90 |
-
color: #666;
|
91 |
-
font-weight: normal;
|
92 |
-
font-size: 2em;
|
93 |
-
}
|
94 |
-
.su-addons-loop { margin-bottom: 40px; }
|
95 |
-
.su-addons-item {
|
96 |
-
position: relative;
|
97 |
-
width: 220px;
|
98 |
-
margin: 0 20px 20px 0;
|
99 |
-
float: left;
|
100 |
-
border: 1px solid #ccc;
|
101 |
-
-webkit-border-radius: 3px;
|
102 |
-
-moz-border-radius: 3px;
|
103 |
-
border-radius: 3px;
|
104 |
-
background: #fafafa;
|
105 |
-
-webkit-box-shadow: 0 2px 4px #ddd;
|
106 |
-
-moz-box-shadow: 0 2px 4px #ddd;
|
107 |
-
box-shadow: 0 2px 4px #ddd;
|
108 |
-
cursor: pointer;
|
109 |
-
-webkit-transition: all .2s;
|
110 |
-
-moz-transition: all .2s;
|
111 |
-
transition: all .2s;
|
112 |
-
}
|
113 |
-
.su-addons-item:hover {
|
114 |
-
top: -5px;
|
115 |
-
border-color: #26779C;
|
116 |
-
background: #fff;
|
117 |
-
-webkit-box-shadow: 0 4px 9px #ccc;
|
118 |
-
-moz-box-shadow: 0 4px 9px #ccc;
|
119 |
-
box-shadow: 0 4px 9px #ccc;
|
120 |
-
}
|
121 |
-
.su-addons-item img {
|
122 |
-
display: block;
|
123 |
-
width: 100%;
|
124 |
-
height: 140px;
|
125 |
-
margin: 0;
|
126 |
-
padding: 0;
|
127 |
-
border: none;
|
128 |
-
border-bottom: 7px solid #ddd;
|
129 |
-
-webkit-border-top-left-radius: 3px;
|
130 |
-
-moz-border-radius-topleft: 3px;
|
131 |
-
border-top-left-radius: 3px;
|
132 |
-
-webkit-border-top-right-radius: 3px;
|
133 |
-
-moz-border-radius-topright: 3px;
|
134 |
-
border-top-right-radius: 3px;
|
135 |
-
background: #eee;
|
136 |
-
}
|
137 |
-
.su-addons-item-content { padding: 15px; }
|
138 |
-
.su-addons-item-content h4 {
|
139 |
-
height: 16px;
|
140 |
-
margin: 0 0 15px 0;
|
141 |
-
overflow: hidden;
|
142 |
-
color: #000;
|
143 |
-
font-weight: bold;
|
144 |
-
font-size: 14px;
|
145 |
-
}
|
146 |
-
.su-addons-item-content p {
|
147 |
-
height: 90px;
|
148 |
-
margin: 15px 0;
|
149 |
-
overflow: hidden;
|
150 |
-
color: #555;
|
151 |
-
font-size: 12px;
|
152 |
-
line-height: 1.5;
|
153 |
-
}
|
154 |
-
.su-addons-item-button {
|
155 |
-
margin-top: 30px;
|
156 |
-
text-align: right;
|
157 |
-
}
|
158 |
-
|
159 |
-
/* Examples screen */
|
160 |
-
#su-examples-screen { margin: 40px 20px; }
|
161 |
-
#su-examples-screen h2 {
|
162 |
-
margin: 0 0 1.2em 0;
|
163 |
-
padding: 0 0 0.8em 0;
|
164 |
-
border-bottom: 1px solid #ddd;
|
165 |
-
color: #666;
|
166 |
-
font-weight: normal;
|
167 |
-
font-size: 2em;
|
168 |
-
}
|
169 |
-
.su-examples-group { margin-bottom: 40px; }
|
170 |
-
.su-examples-item {
|
171 |
-
position: relative;
|
172 |
-
height: 15px;
|
173 |
-
max-width: 700px;
|
174 |
-
margin: 0 0 10px 0;
|
175 |
-
padding: 15px 20px 15px 65px;
|
176 |
-
overflow: hidden;
|
177 |
-
border: 1px solid #ddd;
|
178 |
-
-webkit-border-radius: 3px;
|
179 |
-
-moz-border-radius: 3px;
|
180 |
-
border-radius: 3px;
|
181 |
-
background: #f8f8f8;
|
182 |
-
color: #444;
|
183 |
-
font-size: 13px;
|
184 |
-
line-height: 15px;
|
185 |
-
cursor: pointer;
|
186 |
-
}
|
187 |
-
.su-examples-item:hover {
|
188 |
-
border-color: #53ACD5;
|
189 |
-
background: #fff;
|
190 |
-
color: #26779C;
|
191 |
-
}
|
192 |
-
.su-examples-item i {
|
193 |
-
position: absolute;
|
194 |
-
top: 0;
|
195 |
-
left: 0;
|
196 |
-
display: block;
|
197 |
-
width: 45px;
|
198 |
-
height: 45px;
|
199 |
-
-webkit-border-top-left-radius: 3px;
|
200 |
-
-moz-border-radius-topleft: 3px;
|
201 |
-
border-top-left-radius: 3px;
|
202 |
-
-webkit-border-bottom-left-radius: 3px;
|
203 |
-
-moz-border-radius-bottomleft: 3px;
|
204 |
-
border-bottom-left-radius: 3px;
|
205 |
-
background: #eee;
|
206 |
-
text-align: center;
|
207 |
-
font-size: 17px;
|
208 |
-
line-height: 45px;
|
209 |
-
-webkit-transition: all .2s;
|
210 |
-
-moz-transition: all .2s;
|
211 |
-
transition: all .2s;
|
212 |
-
}
|
213 |
-
.su-examples-item:hover i { font-size: 25px; }
|
214 |
-
#su-examples-window {
|
215 |
-
position: relative;
|
216 |
-
width: 85%;
|
217 |
-
min-height: 60px;
|
218 |
-
max-width: 700px;
|
219 |
-
margin: 28px auto 100px;
|
220 |
-
padding: 20px;
|
221 |
-
-webkit-border-bottom-right-radius: 5px;
|
222 |
-
-moz-border-radius-bottomright: 5px;
|
223 |
-
border-bottom-right-radius: 5px;
|
224 |
-
-webkit-border-bottom-left-radius: 5px;
|
225 |
-
-moz-border-radius-bottomleft: 5px;
|
226 |
-
border-bottom-left-radius: 5px;
|
227 |
-
background: #fff;
|
228 |
-
-webkit-box-shadow: 0 2px 25px #000;
|
229 |
-
-moz-box-shadow: 0 2px 25px #000;
|
230 |
-
box-shadow: 0 2px 25px #000;
|
231 |
-
-webkit-transition: max-width .2s;
|
232 |
-
-moz-transition: max-width .2s;
|
233 |
-
transition: max-width .2s;
|
234 |
-
}
|
235 |
-
.su-examples-error {
|
236 |
-
width: 100%;
|
237 |
-
height: 40px;
|
238 |
-
color: #f03;
|
239 |
-
text-align: center;
|
240 |
-
line-height: 40px;
|
241 |
-
}
|
242 |
-
#su-examples-window h2 {
|
243 |
-
margin: 30px 0 20px;
|
244 |
-
border-bottom: 1px solid #ddd;
|
245 |
-
padding: 0 0 10px 0;
|
246 |
-
font-size: 1.2em;
|
247 |
-
color: #555;
|
248 |
-
}
|
249 |
-
.su-examples-code {
|
250 |
-
margin: 20px 0;
|
251 |
-
}
|
252 |
-
.su-examples-code textarea {
|
253 |
-
display: none;
|
254 |
-
width: 99%;
|
255 |
-
background: #FFFFE0;
|
256 |
-
font-family: Monaco, Consolas, monospace;
|
257 |
-
}
|
258 |
-
|
259 |
-
body.su-mfp-shown .mfp-bg { z-index: 10000 !important; }
|
260 |
-
body.su-mfp-shown .mfp-wrap { z-index: 10001 !important; }
|
261 |
-
body.su-mfp-shown .mfp-preloader { z-index: 10002 !important; }
|
262 |
-
body.su-mfp-shown .mfp-content { z-index: 10003 !important; }
|
263 |
-
body.su-mfp-shown button.mfp-close,
|
264 |
-
body.su-mfp-shown button.mfp-arrow { z-index: 10004 !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,173 +0,0 @@
|
|
1 |
-
/***********************************
|
2 |
-
Common styles
|
3 |
-
***********************************/
|
4 |
-
|
5 |
-
.sunrise-onehalf {
|
6 |
-
float: left;
|
7 |
-
width: 46%;
|
8 |
-
margin: 0 4% 1em 0;
|
9 |
-
}
|
10 |
-
.sunrise-onethird {
|
11 |
-
float: left;
|
12 |
-
width: 31%;
|
13 |
-
margin: 0 2% 1em 0;
|
14 |
-
}
|
15 |
-
.sunrise-clear {
|
16 |
-
display: block;
|
17 |
-
height: 0;
|
18 |
-
overflow: hidden;
|
19 |
-
clear: both;
|
20 |
-
}
|
21 |
-
.sunrise-hidden { display: none }
|
22 |
-
|
23 |
-
|
24 |
-
/***********************************
|
25 |
-
Nav tabs
|
26 |
-
***********************************/
|
27 |
-
|
28 |
-
#sunrise-tabs {}
|
29 |
-
#sunrise-tabs span { cursor: pointer }
|
30 |
-
#sunrise-tabs .nav-tab-active,
|
31 |
-
#sunrise-tabs span:hover { color: #464646 }
|
32 |
-
#sunrise-tabs .nav-tab-active { cursor: default; }
|
33 |
-
h3.sunrise-no-js-tab {
|
34 |
-
margin: 1em 0;
|
35 |
-
padding: 1em;
|
36 |
-
border-top: 2px solid #ccc;
|
37 |
-
border-bottom: 2px solid #ccc;
|
38 |
-
background: #f2f2f2;
|
39 |
-
color: #555;
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
/***********************************
|
44 |
-
Panes
|
45 |
-
***********************************/
|
46 |
-
|
47 |
-
.sunrise-pane {
|
48 |
-
margin: 2em 0;
|
49 |
-
}
|
50 |
-
.js .sunrise-pane {
|
51 |
-
display: none;
|
52 |
-
border: none;
|
53 |
-
}
|
54 |
-
|
55 |
-
|
56 |
-
/***********************************
|
57 |
-
Notices
|
58 |
-
***********************************/
|
59 |
-
|
60 |
-
#sunrise-settings div.sunrise-notice { margin: 1.5em 0; }
|
61 |
-
|
62 |
-
|
63 |
-
/***********************************
|
64 |
-
Inline menus
|
65 |
-
***********************************/
|
66 |
-
|
67 |
-
.sunrise-inline-menu {
|
68 |
-
margin: 1.5em 0;
|
69 |
-
line-height: 1.5em;
|
70 |
-
}
|
71 |
-
.sunrise-inline-menu a {
|
72 |
-
display: inline-block;
|
73 |
-
padding: 0 0.7em;
|
74 |
-
border-right: 1px dotted #ccc;
|
75 |
-
text-decoration: none;
|
76 |
-
line-height: 1.5em;
|
77 |
-
}
|
78 |
-
.sunrise-inline-menu a:hover {
|
79 |
-
text-decoration: underline;
|
80 |
-
}
|
81 |
-
.sunrise-inline-menu a:first-child {
|
82 |
-
padding-left: 0;
|
83 |
-
}
|
84 |
-
.sunrise-inline-menu a:last-child {
|
85 |
-
display: inline-block;
|
86 |
-
padding-right: 0;
|
87 |
-
border-right: none;
|
88 |
-
}
|
89 |
-
|
90 |
-
|
91 |
-
/***********************************
|
92 |
-
Common fields
|
93 |
-
***********************************/
|
94 |
-
|
95 |
-
#sunrise-settings .form-table td,
|
96 |
-
#sunrise-settings .form-table th { padding-bottom: 20px }
|
97 |
-
|
98 |
-
#sunrise-settings .description {
|
99 |
-
display: block;
|
100 |
-
margin-top: 5px;
|
101 |
-
}
|
102 |
-
|
103 |
-
#sunrise-settings textarea {
|
104 |
-
min-width: 200px;
|
105 |
-
}
|
106 |
-
|
107 |
-
.sunrise-checkbox-group label {
|
108 |
-
display: inline-block;
|
109 |
-
margin: 0 0 5px 0;
|
110 |
-
}
|
111 |
-
|
112 |
-
|
113 |
-
/***********************************
|
114 |
-
Color picker
|
115 |
-
***********************************/
|
116 |
-
|
117 |
-
.sunrise-color-picker { position: relative; }
|
118 |
-
.sunrise-color-picker-wheel {
|
119 |
-
position: absolute;
|
120 |
-
top: 100%;
|
121 |
-
left: 0;
|
122 |
-
z-index: 9999;
|
123 |
-
display: none;
|
124 |
-
border: 1px solid #aaa;
|
125 |
-
background: #fff;
|
126 |
-
-webkit-box-shadow: 0 2px 5px #ccc;
|
127 |
-
-moz-box-shadow: 0 2px 5px #ccc;
|
128 |
-
box-shadow: 0 2px 5px #ccc;
|
129 |
-
-webkit-border-radius: 50%;
|
130 |
-
-moz-border-radius: 50%;
|
131 |
-
border-radius: 50%;
|
132 |
-
}
|
133 |
-
.sunrise-color-picker .button img {
|
134 |
-
vertical-align: middle;
|
135 |
-
margin: -3px 4px 0 -4px;
|
136 |
-
}
|
137 |
-
|
138 |
-
|
139 |
-
/***********************************
|
140 |
-
Media manager
|
141 |
-
***********************************/
|
142 |
-
|
143 |
-
.sunrise-media {}
|
144 |
-
.sunrise-media .button img {
|
145 |
-
vertical-align: middle;
|
146 |
-
margin: -3px 4px 0 -4px;
|
147 |
-
}
|
148 |
-
|
149 |
-
|
150 |
-
/***********************************
|
151 |
-
Actions bar
|
152 |
-
***********************************/
|
153 |
-
|
154 |
-
.sunrise-actions-bar {
|
155 |
-
margin-top: 20px;
|
156 |
-
padding: 10px;
|
157 |
-
background: #f5f5f5;
|
158 |
-
border-top: 1px solid #eee;
|
159 |
-
-webkit-border-bottom-right-radius: 5px;
|
160 |
-
-webkit-border-bottom-left-radius: 5px;
|
161 |
-
-moz-border-radius-bottomright: 5px;
|
162 |
-
-moz-border-radius-bottomleft: 5px;
|
163 |
-
border-bottom-right-radius: 5px;
|
164 |
-
border-bottom-left-radius: 5px;
|
165 |
-
}
|
166 |
-
.sunrise-spin,
|
167 |
-
.sunrise-success-tip {
|
168 |
-
display: none;
|
169 |
-
margin-left: 10px;
|
170 |
-
}
|
171 |
-
.sunrise-success-tip { color: #0b0 }
|
172 |
-
.sunrise-spin img,
|
173 |
-
.sunrise-success-tip img { margin: 0 5px -3px 0 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -78,16 +78,6 @@ class Su_Assets {
|
|
78 |
wp_register_script( 'swiper', plugins_url( 'assets/js/swiper.js', SU_PLUGIN_FILE ), array( 'jquery' ), '2.6.1', true );
|
79 |
// jPlayer
|
80 |
wp_register_script( 'jplayer', plugins_url( 'assets/js/jplayer.js', SU_PLUGIN_FILE ), array( 'jquery' ), '2.4.0', true );
|
81 |
-
// Options page
|
82 |
-
wp_register_style( 'su-options-page', plugins_url( 'assets/css/options-page.css', SU_PLUGIN_FILE ), false, SU_PLUGIN_VERSION, 'all' );
|
83 |
-
wp_register_script( 'su-options-page', plugins_url( 'assets/js/options-page.js', SU_PLUGIN_FILE ), array( 'magnific-popup', 'jquery-ui-sortable', 'ace', 'jsrender' ), SU_PLUGIN_VERSION, true );
|
84 |
-
wp_localize_script( 'su-options-page', 'su_options_page', array(
|
85 |
-
'upload_title' => __( 'Choose files', 'shortcodes-ultimate' ),
|
86 |
-
'upload_insert' => __( 'Add selected files', 'shortcodes-ultimate' ),
|
87 |
-
'not_clickable' => __( 'This button is not clickable', 'shortcodes-ultimate' )
|
88 |
-
) );
|
89 |
-
// Cheatsheet
|
90 |
-
wp_register_style( 'su-cheatsheet', plugins_url( 'assets/css/cheatsheet.css', SU_PLUGIN_FILE ), false, SU_PLUGIN_VERSION, 'all' );
|
91 |
// Generator
|
92 |
wp_register_style( 'su-generator', plugins_url( 'assets/css/generator.css', SU_PLUGIN_FILE ), array( 'farbtastic', 'magnific-popup' ), SU_PLUGIN_VERSION, 'all' );
|
93 |
wp_register_script( 'su-generator', plugins_url( 'assets/js/generator.js', SU_PLUGIN_FILE ), array( 'farbtastic', 'magnific-popup', 'qtip' ), SU_PLUGIN_VERSION, true );
|
@@ -102,12 +92,14 @@ class Su_Assets {
|
|
102 |
'hotkey' => get_option( 'su_option_hotkey' )
|
103 |
) );
|
104 |
// Shortcodes stylesheets
|
105 |
-
wp_register_style( 'su-
|
106 |
-
|
107 |
-
wp_register_style( 'su-
|
108 |
-
wp_register_style( 'su-
|
109 |
-
wp_register_style( 'su-
|
110 |
-
wp_register_style( 'su-
|
|
|
|
|
111 |
// RTL stylesheets
|
112 |
wp_register_style( 'su-rtl-shortcodes', self::skin_url( 'rtl-shortcodes.css' ), false, SU_PLUGIN_VERSION, 'all' );
|
113 |
wp_register_style( 'su-rtl-admin', self::skin_url( 'rtl-admin.css' ), false, SU_PLUGIN_VERSION, 'all' );
|
78 |
wp_register_script( 'swiper', plugins_url( 'assets/js/swiper.js', SU_PLUGIN_FILE ), array( 'jquery' ), '2.6.1', true );
|
79 |
// jPlayer
|
80 |
wp_register_script( 'jplayer', plugins_url( 'assets/js/jplayer.js', SU_PLUGIN_FILE ), array( 'jquery' ), '2.4.0', true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
// Generator
|
82 |
wp_register_style( 'su-generator', plugins_url( 'assets/css/generator.css', SU_PLUGIN_FILE ), array( 'farbtastic', 'magnific-popup' ), SU_PLUGIN_VERSION, 'all' );
|
83 |
wp_register_script( 'su-generator', plugins_url( 'assets/js/generator.js', SU_PLUGIN_FILE ), array( 'farbtastic', 'magnific-popup', 'qtip' ), SU_PLUGIN_VERSION, true );
|
92 |
'hotkey' => get_option( 'su_option_hotkey' )
|
93 |
) );
|
94 |
// Shortcodes stylesheets
|
95 |
+
wp_register_style( 'su-shortcodes', su_get_plugin_url() . 'includes/css/shortcodes.css', false, SU_PLUGIN_VERSION, 'all' );
|
96 |
+
// DEPRECATED - Shortcodes stylesheets
|
97 |
+
wp_register_style( 'su-content-shortcodes', '', false, SU_PLUGIN_VERSION, 'all' );
|
98 |
+
wp_register_style( 'su-box-shortcodes', '', false, SU_PLUGIN_VERSION, 'all' );
|
99 |
+
wp_register_style( 'su-media-shortcodes', '', false, SU_PLUGIN_VERSION, 'all' );
|
100 |
+
wp_register_style( 'su-other-shortcodes', '', false, SU_PLUGIN_VERSION, 'all' );
|
101 |
+
wp_register_style( 'su-galleries-shortcodes', '', false, SU_PLUGIN_VERSION, 'all' );
|
102 |
+
wp_register_style( 'su-players-shortcodes', '', false, SU_PLUGIN_VERSION, 'all' );
|
103 |
// RTL stylesheets
|
104 |
wp_register_style( 'su-rtl-shortcodes', self::skin_url( 'rtl-shortcodes.css' ), false, SU_PLUGIN_VERSION, 'all' );
|
105 |
wp_register_style( 'su-rtl-admin', self::skin_url( 'rtl-admin.css' ), false, SU_PLUGIN_VERSION, 'all' );
|
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Su_Counter_Extra_Addon {
|
4 |
-
|
5 |
-
static $option = 'su_counter_extra_addon';
|
6 |
-
|
7 |
-
function __construct() {
|
8 |
-
add_filter( 'su/menu/shortcodes', array( __CLASS__, 'display' ) );
|
9 |
-
add_filter( 'su/menu/addons', array( __CLASS__, 'display' ) );
|
10 |
-
add_action( 'sunrise/page/before', array( __CLASS__, 'disable' ) );
|
11 |
-
}
|
12 |
-
|
13 |
-
public static function display( $title ) {
|
14 |
-
if ( get_option( self::$option ) ) return $title;
|
15 |
-
return sprintf(
|
16 |
-
'%s <span class="update-plugins count-1" title="%s"><span class="update-count">%s</span></span>',
|
17 |
-
$title,
|
18 |
-
__( '1 new add-on for Shortcodes Ultimate', 'shortcodes-ultimate' ),
|
19 |
-
'1'
|
20 |
-
);
|
21 |
-
}
|
22 |
-
|
23 |
-
public static function disable() {
|
24 |
-
if ( $_GET['page'] === 'shortcodes-ultimate-addons' ) update_option( self::$option, true );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
// new Su_Counter_Extra_Addon;
|
29 |
-
|
30 |
-
class Su_Counter_Bundle {
|
31 |
-
|
32 |
-
static $option = 'su_counter_bundle';
|
33 |
-
|
34 |
-
function __construct() {
|
35 |
-
add_filter( 'su/menu/shortcodes', array( __CLASS__, 'display' ) );
|
36 |
-
add_filter( 'su/menu/addons', array( __CLASS__, 'display' ) );
|
37 |
-
add_action( 'sunrise/page/before', array( __CLASS__, 'disable' ) );
|
38 |
-
}
|
39 |
-
|
40 |
-
public static function display( $title ) {
|
41 |
-
if ( get_option( self::$option ) ) return $title;
|
42 |
-
return sprintf(
|
43 |
-
'%s <span class="update-plugins count-1" title="%s"><span class="update-count">%s</span></span>',
|
44 |
-
$title,
|
45 |
-
__( '1 new add-on for Shortcodes Ultimate', 'shortcodes-ultimate' ),
|
46 |
-
'1'
|
47 |
-
);
|
48 |
-
}
|
49 |
-
|
50 |
-
public static function disable() {
|
51 |
-
if ( $_GET['page'] === 'shortcodes-ultimate-addons' ) update_option( self::$option, true );
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
// new Su_Counter_Bundle;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,3121 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class for managing plugin data
|
4 |
-
*/
|
5 |
-
class Su_Data {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Constructor
|
9 |
-
*/
|
10 |
-
function __construct() {}
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Shortcode groups
|
14 |
-
*/
|
15 |
-
public static function groups() {
|
16 |
-
return apply_filters( 'su/data/groups', array(
|
17 |
-
'all' => __( 'All', 'shortcodes-ultimate' ),
|
18 |
-
'content' => __( 'Content', 'shortcodes-ultimate' ),
|
19 |
-
'box' => __( 'Box', 'shortcodes-ultimate' ),
|
20 |
-
'media' => __( 'Media', 'shortcodes-ultimate' ),
|
21 |
-
'gallery' => __( 'Gallery', 'shortcodes-ultimate' ),
|
22 |
-
'data' => __( 'Data', 'shortcodes-ultimate' ),
|
23 |
-
'other' => __( 'Other', 'shortcodes-ultimate' )
|
24 |
-
) );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Border styles
|
29 |
-
*/
|
30 |
-
public static function borders() {
|
31 |
-
return apply_filters( 'su/data/borders', array(
|
32 |
-
'none' => __( 'None', 'shortcodes-ultimate' ),
|
33 |
-
'solid' => __( 'Solid', 'shortcodes-ultimate' ),
|
34 |
-
'dotted' => __( 'Dotted', 'shortcodes-ultimate' ),
|
35 |
-
'dashed' => __( 'Dashed', 'shortcodes-ultimate' ),
|
36 |
-
'double' => __( 'Double', 'shortcodes-ultimate' ),
|
37 |
-
'groove' => __( 'Groove', 'shortcodes-ultimate' ),
|
38 |
-
'ridge' => __( 'Ridge', 'shortcodes-ultimate' )
|
39 |
-
) );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Font-Awesome icons
|
44 |
-
*/
|
45 |
-
public static function icons() {
|
46 |
-
return apply_filters( 'su/data/icons', array( 'address-book', 'address-book-o', 'address-card', 'address-card-o', 'bandcamp', 'bath', 'bathtub', 'drivers-license', 'drivers-license-o', 'eercast', 'envelope-open', 'envelope-open-o', 'etsy', 'free-code-camp', 'grav', 'handshake-o', 'id-badge', 'id-card', 'id-card-o', 'imdb', 'linode', 'meetup', 'microchip', 'podcast', 'quora', 'ravelry', 's15', 'shower', 'snowflake-o', 'superpowers', 'telegram', 'thermometer', 'thermometer-0', 'thermometer-1', 'thermometer-2', 'thermometer-3', 'thermometer-4', 'thermometer-empty', 'thermometer-full', 'thermometer-half', 'thermometer-quarter', 'thermometer-three-quarters', 'times-rectangle', 'times-rectangle-o', 'user-circle', 'user-circle-o', 'user-o', 'vcard', 'vcard-o', 'window-close', 'window-close-o', 'window-maximize', 'window-minimize', 'window-restore', 'wpexplorer', 'adjust', 'american-sign-language-interpreting', 'anchor', 'archive', 'area-chart', 'arrows', 'arrows-h', 'arrows-v', 'asl-interpreting', 'assistive-listening-systems', 'asterisk', 'at', 'audio-description', 'automobile', 'balance-scale', 'ban', 'bank', 'bar-chart', 'bar-chart-o', 'barcode', 'bars', 'battery', 'battery-0', 'battery-1', 'battery-2', 'battery-3', 'battery-4', 'battery-empty', 'battery-full', 'battery-half', 'battery-quarter', 'battery-three-quarters', 'bed', 'beer', 'bell', 'bell-o', 'bell-slash', 'bell-slash-o', 'bicycle', 'binoculars', 'birthday-cake', 'blind', 'bluetooth', 'bluetooth-b', 'bolt', 'bomb', 'book', 'bookmark', 'bookmark-o', 'braille', 'briefcase', 'bug', 'building', 'building-o', 'bullhorn', 'bullseye', 'bus', 'cab', 'calculator', 'calendar', 'calendar-check-o', 'calendar-minus-o', 'calendar-o', 'calendar-plus-o', 'calendar-times-o', 'camera', 'camera-retro', 'car', 'caret-square-o-down', 'caret-square-o-left', 'caret-square-o-right', 'caret-square-o-up', 'cart-arrow-down', 'cart-plus', 'cc', 'certificate', 'check', 'check-circle', 'check-circle-o', 'check-square', 'check-square-o', 'child', 'circle', 'circle-o', 'circle-o-notch', 'circle-thin', 'clock-o', 'clone', 'close', 'cloud', 'cloud-download', 'cloud-upload', 'code', 'code-fork', 'coffee', 'cog', 'cogs', 'comment', 'comment-o', 'commenting', 'commenting-o', 'comments', 'comments-o', 'compass', 'copyright', 'creative-commons', 'credit-card', 'credit-card-alt', 'crop', 'crosshairs', 'cube', 'cubes', 'cutlery', 'dashboard', 'database', 'deaf', 'deafness', 'desktop', 'diamond', 'dot-circle-o', 'download', 'edit', 'ellipsis-h', 'ellipsis-v', 'envelope', 'envelope-o', 'envelope-square', 'eraser', 'exchange', 'exclamation', 'exclamation-circle', 'exclamation-triangle', 'external-link', 'external-link-square', 'eye', 'eye-slash', 'eyedropper', 'fax', 'feed', 'female', 'fighter-jet', 'file-archive-o', 'file-audio-o', 'file-code-o', 'file-excel-o', 'file-image-o', 'file-movie-o', 'file-pdf-o', 'file-photo-o', 'file-picture-o', 'file-powerpoint-o', 'file-sound-o', 'file-video-o', 'file-word-o', 'file-zip-o', 'film', 'filter', 'fire', 'fire-extinguisher', 'flag', 'flag-checkered', 'flag-o', 'flash', 'flask', 'folder', 'folder-o', 'folder-open', 'folder-open-o', 'frown-o', 'futbol-o', 'gamepad', 'gavel', 'gear', 'gears', 'gift', 'glass', 'globe', 'graduation-cap', 'group', 'hand-grab-o', 'hand-lizard-o', 'hand-paper-o', 'hand-peace-o', 'hand-pointer-o', 'hand-rock-o', 'hand-scissors-o', 'hand-spock-o', 'hand-stop-o', 'hard-of-hearing', 'hashtag', 'hdd-o', 'headphones', 'heart', 'heart-o', 'heartbeat', 'history', 'home', 'hotel', 'hourglass', 'hourglass-1', 'hourglass-2', 'hourglass-3', 'hourglass-end', 'hourglass-half', 'hourglass-o', 'hourglass-start', 'i-cursor', 'image', 'inbox', 'industry', 'info', 'info-circle', 'institution', 'key', 'keyboard-o', 'language', 'laptop', 'leaf', 'legal', 'lemon-o', 'level-down', 'level-up', 'life-bouy', 'life-buoy', 'life-ring', 'life-saver', 'lightbulb-o', 'line-chart', 'location-arrow', 'lock', 'low-vision', 'magic', 'magnet', 'mail-forward', 'mail-reply', 'mail-reply-all', 'male', 'map', 'map-marker', 'map-o', 'map-pin', 'map-signs', 'meh-o', 'microphone', 'microphone-slash', 'minus', 'minus-circle', 'minus-square', 'minus-square-o', 'mobile', 'mobile-phone', 'money', 'moon-o', 'mortar-board', 'motorcycle', 'mouse-pointer', 'music', 'navicon', 'newspaper-o', 'object-group', 'object-ungroup', 'paint-brush', 'paper-plane', 'paper-plane-o', 'paw', 'pencil', 'pencil-square', 'pencil-square-o', 'percent', 'phone', 'phone-square', 'photo', 'picture-o', 'pie-chart', 'plane', 'plug', 'plus', 'plus-circle', 'plus-square', 'plus-square-o', 'power-off', 'print', 'puzzle-piece', 'qrcode', 'question', 'question-circle', 'question-circle-o', 'quote-left', 'quote-right', 'random', 'recycle', 'refresh', 'registered', 'remove', 'reorder', 'reply', 'reply-all', 'retweet', 'road', 'rocket', 'rss', 'rss-square', 'search', 'search-minus', 'search-plus', 'send', 'send-o', 'server', 'share', 'share-alt', 'share-alt-square', 'share-square', 'share-square-o', 'shield', 'ship', 'shopping-bag', 'shopping-basket', 'shopping-cart', 'sign-in', 'sign-language', 'sign-out', 'signal', 'signing', 'sitemap', 'sliders', 'smile-o', 'soccer-ball-o', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-amount-asc', 'sort-amount-desc', 'sort-asc', 'sort-desc', 'sort-down', 'sort-numeric-asc', 'sort-numeric-desc', 'sort-up', 'space-shuttle', 'spinner', 'spoon', 'square', 'square-o', 'star', 'star-half', 'star-half-empty', 'star-half-full', 'star-half-o', 'star-o', 'sticky-note', 'sticky-note-o', 'street-view', 'suitcase', 'sun-o', 'support', 'tablet', 'tachometer', 'tag', 'tags', 'tasks', 'taxi', 'television', 'terminal', 'thumb-tack', 'thumbs-down', 'thumbs-o-down', 'thumbs-o-up', 'thumbs-up', 'ticket', 'times', 'times-circle', 'times-circle-o', 'tint', 'toggle-down', 'toggle-left', 'toggle-off', 'toggle-on', 'toggle-right', 'toggle-up', 'trademark', 'trash', 'trash-o', 'tree', 'trophy', 'truck', 'tty', 'tv', 'umbrella', 'universal-access', 'university', 'unlock', 'unlock-alt', 'unsorted', 'upload', 'user', 'user-plus', 'user-secret', 'user-times', 'users', 'video-camera', 'volume-control-phone', 'volume-down', 'volume-off', 'volume-up', 'warning', 'wheelchair', 'wheelchair-alt', 'wifi', 'wrench', 'hand-o-down', 'hand-o-left', 'hand-o-right', 'hand-o-up', 'ambulance', 'subway', 'train', 'genderless', 'intersex', 'mars', 'mars-double', 'mars-stroke', 'mars-stroke-h', 'mars-stroke-v', 'mercury', 'neuter', 'transgender', 'transgender-alt', 'venus', 'venus-double', 'venus-mars', 'file', 'file-o', 'file-text', 'file-text-o', 'cc-amex', 'cc-diners-club', 'cc-discover', 'cc-jcb', 'cc-mastercard', 'cc-paypal', 'cc-stripe', 'cc-visa', 'google-wallet', 'paypal', 'bitcoin', 'btc', 'cny', 'dollar', 'eur', 'euro', 'gbp', 'gg', 'gg-circle', 'ils', 'inr', 'jpy', 'krw', 'rmb', 'rouble', 'rub', 'ruble', 'rupee', 'shekel', 'sheqel', 'try', 'turkish-lira', 'usd', 'viacoin', 'won', 'yen', 'align-center', 'align-justify', 'align-left', 'align-right', 'bold', 'chain', 'chain-broken', 'clipboard', 'columns', 'copy', 'cut', 'dedent', 'files-o', 'floppy-o', 'font', 'header', 'indent', 'italic', 'link', 'list', 'list-alt', 'list-ol', 'list-ul', 'outdent', 'paperclip', 'paragraph', 'paste', 'repeat', 'rotate-left', 'rotate-right', 'save', 'scissors', 'strikethrough', 'subscript', 'superscript', 'table', 'text-height', 'text-width', 'th', 'th-large', 'th-list', 'underline', 'undo', 'unlink', 'angle-double-down', 'angle-double-left', 'angle-double-right', 'angle-double-up', 'angle-down', 'angle-left', 'angle-right', 'angle-up', 'arrow-circle-down', 'arrow-circle-left', 'arrow-circle-o-down', 'arrow-circle-o-left', 'arrow-circle-o-right', 'arrow-circle-o-up', 'arrow-circle-right', 'arrow-circle-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'arrows-alt', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'chevron-circle-down', 'chevron-circle-left', 'chevron-circle-right', 'chevron-circle-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'long-arrow-down', 'long-arrow-left', 'long-arrow-right', 'long-arrow-up', 'backward', 'compress', 'eject', 'expand', 'fast-backward', 'fast-forward', 'forward', 'pause', 'pause-circle', 'pause-circle-o', 'play', 'play-circle', 'play-circle-o', 'step-backward', 'step-forward', 'stop', 'stop-circle', 'stop-circle-o', 'youtube-play', '500px', 'adn', 'amazon', 'android', 'angellist', 'apple', 'behance', 'behance-square', 'bitbucket', 'bitbucket-square', 'black-tie', 'buysellads', 'chrome', 'codepen', 'codiepie', 'connectdevelop', 'contao', 'css3', 'dashcube', 'delicious', 'deviantart', 'digg', 'dribbble', 'dropbox', 'drupal', 'edge', 'empire', 'envira', 'expeditedssl', 'fa', 'facebook', 'facebook-f', 'facebook-official', 'facebook-square', 'firefox', 'first-order', 'flickr', 'font-awesome', 'fonticons', 'fort-awesome', 'forumbee', 'foursquare', 'ge', 'get-pocket', 'git', 'git-square', 'github', 'github-alt', 'github-square', 'gitlab', 'gittip', 'glide', 'glide-g', 'google', 'google-plus', 'google-plus-circle', 'google-plus-official', 'google-plus-square', 'gratipay', 'hacker-news', 'houzz', 'html5', 'instagram', 'internet-explorer', 'ioxhost', 'joomla', 'jsfiddle', 'lastfm', 'lastfm-square', 'leanpub', 'linkedin', 'linkedin-square', 'linux', 'maxcdn', 'meanpath', 'medium', 'mixcloud', 'modx', 'odnoklassniki', 'odnoklassniki-square', 'opencart', 'openid', 'opera', 'optin-monster', 'pagelines', 'pied-piper', 'pied-piper-alt', 'pied-piper-pp', 'pinterest', 'pinterest-p', 'pinterest-square', 'product-hunt', 'qq', 'ra', 'rebel', 'reddit', 'reddit-alien', 'reddit-square', 'renren', 'resistance', 'safari', 'scribd', 'sellsy', 'shirtsinbulk', 'simplybuilt', 'skyatlas', 'skype', 'slack', 'slideshare', 'snapchat', 'snapchat-ghost', 'snapchat-square', 'soundcloud', 'spotify', 'stack-exchange', 'stack-overflow', 'steam', 'steam-square', 'stumbleupon', 'stumbleupon-circle', 'tencent-weibo', 'themeisle', 'trello', 'tripadvisor', 'tumblr', 'tumblr-square', 'twitch', 'twitter', 'twitter-square', 'usb', 'viadeo', 'viadeo-square', 'vimeo', 'vimeo-square', 'vine', 'vk', 'wechat', 'weibo', 'weixin', 'whatsapp', 'wikipedia-w', 'windows', 'wordpress', 'wpbeginner', 'wpforms', 'xing', 'xing-square', 'y-combinator', 'y-combinator-square', 'yahoo', 'yc', 'yc-square', 'yelp', 'yoast', 'youtube', 'youtube-square', 'h-square', 'hospital-o', 'medkit', 'stethoscope', 'user-md', ) );
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Animate.css animations
|
51 |
-
*/
|
52 |
-
public static function animations() {
|
53 |
-
return apply_filters( 'su/data/animations', array( 'flash', 'bounce', 'shake', 'tada', 'swing', 'wobble', 'pulse', 'flip', 'flipInX', 'flipOutX', 'flipInY', 'flipOutY', 'fadeIn', 'fadeInUp', 'fadeInDown', 'fadeInLeft', 'fadeInRight', 'fadeInUpBig', 'fadeInDownBig', 'fadeInLeftBig', 'fadeInRightBig', 'fadeOut', 'fadeOutUp', 'fadeOutDown', 'fadeOutLeft', 'fadeOutRight', 'fadeOutUpBig', 'fadeOutDownBig', 'fadeOutLeftBig', 'fadeOutRightBig', 'slideInDown', 'slideInLeft', 'slideInRight', 'slideOutUp', 'slideOutLeft', 'slideOutRight', 'bounceIn', 'bounceInDown', 'bounceInUp', 'bounceInLeft', 'bounceInRight', 'bounceOut', 'bounceOutDown', 'bounceOutUp', 'bounceOutLeft', 'bounceOutRight', 'rotateIn', 'rotateInDownLeft', 'rotateInDownRight', 'rotateInUpLeft', 'rotateInUpRight', 'rotateOut', 'rotateOutDownLeft', 'rotateOutDownRight', 'rotateOutUpLeft', 'rotateOutUpRight', 'lightSpeedIn', 'lightSpeedOut', 'hinge', 'rollIn', 'rollOut' ) );
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Shortcodes
|
58 |
-
*/
|
59 |
-
public static function shortcodes( $shortcode = false ) {
|
60 |
-
|
61 |
-
$images_url = plugin_dir_url( SU_PLUGIN_FILE ) . 'admin/images/shortcodes/';
|
62 |
-
|
63 |
-
$shortcodes = apply_filters( 'su/data/shortcodes', array(
|
64 |
-
// heading
|
65 |
-
'heading' => array(
|
66 |
-
'name' => __( 'Heading', 'shortcodes-ultimate' ),
|
67 |
-
'type' => 'wrap',
|
68 |
-
'group' => 'content',
|
69 |
-
'atts' => array(
|
70 |
-
'style' => array(
|
71 |
-
'type' => 'select',
|
72 |
-
'values' => array(
|
73 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
74 |
-
),
|
75 |
-
'default' => 'default',
|
76 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
77 |
-
'desc' => __( 'Choose style for this heading', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
78 |
-
),
|
79 |
-
'size' => array(
|
80 |
-
'type' => 'slider',
|
81 |
-
'min' => 7,
|
82 |
-
'max' => 48,
|
83 |
-
'step' => 1,
|
84 |
-
'default' => 13,
|
85 |
-
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
86 |
-
'desc' => __( 'Select heading size (pixels)', 'shortcodes-ultimate' )
|
87 |
-
),
|
88 |
-
'align' => array(
|
89 |
-
'type' => 'select',
|
90 |
-
'values' => array(
|
91 |
-
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
92 |
-
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
93 |
-
'right' => __( 'Right', 'shortcodes-ultimate' )
|
94 |
-
),
|
95 |
-
'default' => 'center',
|
96 |
-
'name' => __( 'Align', 'shortcodes-ultimate' ),
|
97 |
-
'desc' => __( 'Heading text alignment', 'shortcodes-ultimate' )
|
98 |
-
),
|
99 |
-
'margin' => array(
|
100 |
-
'type' => 'slider',
|
101 |
-
'min' => 0,
|
102 |
-
'max' => 200,
|
103 |
-
'step' => 10,
|
104 |
-
'default' => 20,
|
105 |
-
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
106 |
-
'desc' => __( 'Bottom margin (pixels)', 'shortcodes-ultimate' )
|
107 |
-
),
|
108 |
-
'class' => array(
|
109 |
-
'type' => 'extra_css_class',
|
110 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
111 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
112 |
-
'default' => '',
|
113 |
-
),
|
114 |
-
),
|
115 |
-
'content' => __( 'Heading text', 'shortcodes-ultimate' ),
|
116 |
-
'desc' => __( 'Styled heading', 'shortcodes-ultimate' ),
|
117 |
-
'icon' => 'h-square',
|
118 |
-
'image' => $images_url . 'heading.svg',
|
119 |
-
),
|
120 |
-
// tabs
|
121 |
-
'tabs' => array(
|
122 |
-
'name' => __( 'Tabs', 'shortcodes-ultimate' ),
|
123 |
-
'type' => 'wrap',
|
124 |
-
'group' => 'box',
|
125 |
-
'required_child' => 'tab',
|
126 |
-
'atts' => array(
|
127 |
-
'style' => array(
|
128 |
-
'type' => 'select',
|
129 |
-
'values' => array(
|
130 |
-
'default' => __( 'Default', 'shortcodes-ultimate' )
|
131 |
-
),
|
132 |
-
'default' => 'default',
|
133 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
134 |
-
'desc' => __( 'Choose style for this tabs', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
135 |
-
),
|
136 |
-
'active' => array(
|
137 |
-
'type' => 'number',
|
138 |
-
'min' => 1,
|
139 |
-
'max' => 100,
|
140 |
-
'step' => 1,
|
141 |
-
'default' => 1,
|
142 |
-
'name' => __( 'Active tab', 'shortcodes-ultimate' ),
|
143 |
-
'desc' => __( 'Select which tab is open by default', 'shortcodes-ultimate' )
|
144 |
-
),
|
145 |
-
'vertical' => array(
|
146 |
-
'type' => 'bool',
|
147 |
-
'default' => 'no',
|
148 |
-
'name' => __( 'Vertical', 'shortcodes-ultimate' ),
|
149 |
-
'desc' => __( 'Align tabs vertically', 'shortcodes-ultimate' )
|
150 |
-
),
|
151 |
-
'class' => array(
|
152 |
-
'type' => 'extra_css_class',
|
153 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
154 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
155 |
-
'default' => '',
|
156 |
-
),
|
157 |
-
),
|
158 |
-
'content' => array(
|
159 |
-
'id' => 'tab',
|
160 |
-
'number' => 3,
|
161 |
-
),
|
162 |
-
'desc' => __( 'Tabs container', 'shortcodes-ultimate' ),
|
163 |
-
'example' => 'tabs',
|
164 |
-
'icon' => 'list-alt',
|
165 |
-
'image' => $images_url . 'tabs.svg',
|
166 |
-
),
|
167 |
-
// tab
|
168 |
-
'tab' => array(
|
169 |
-
'name' => __( 'Tab', 'shortcodes-ultimate' ),
|
170 |
-
'type' => 'wrap',
|
171 |
-
'group' => 'box',
|
172 |
-
'required_parent' => 'tabs',
|
173 |
-
'atts' => array(
|
174 |
-
'title' => array(
|
175 |
-
'default' => __( 'Tab name', 'shortcodes-ultimate' ),
|
176 |
-
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
177 |
-
'desc' => __( 'Tab title', 'shortcodes-ultimate' )
|
178 |
-
),
|
179 |
-
'disabled' => array(
|
180 |
-
'type' => 'bool',
|
181 |
-
'default' => 'no',
|
182 |
-
'name' => __( 'Disabled', 'shortcodes-ultimate' ),
|
183 |
-
'desc' => __( 'Is this tab disabled', 'shortcodes-ultimate' )
|
184 |
-
),
|
185 |
-
'anchor' => array(
|
186 |
-
'default' => '',
|
187 |
-
'name' => __( 'Anchor', 'shortcodes-ultimate' ),
|
188 |
-
'desc' => __( 'You can use unique anchor for this tab to access it with hash in page url. For example: use <b%value>Hello</b> and then navigate to url like http://example.com/page-url#Hello. This tab will be activated and scrolled in', 'shortcodes-ultimate' )
|
189 |
-
),
|
190 |
-
'url' => array(
|
191 |
-
'default' => '',
|
192 |
-
'name' => __( 'URL', 'shortcodes-ultimate' ),
|
193 |
-
'desc' => __( 'Link tab to any webpage. Use full URL to turn the tab title into link', 'shortcodes-ultimate' )
|
194 |
-
),
|
195 |
-
'target' => array(
|
196 |
-
'type' => 'select',
|
197 |
-
'values' => array(
|
198 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
199 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
200 |
-
),
|
201 |
-
'default' => 'blank',
|
202 |
-
'name' => __( 'Link target', 'shortcodes-ultimate' ),
|
203 |
-
'desc' => __( 'Choose how to open the custom tab link', 'shortcodes-ultimate' )
|
204 |
-
),
|
205 |
-
'class' => array(
|
206 |
-
'type' => 'extra_css_class',
|
207 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
208 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
209 |
-
'default' => '',
|
210 |
-
),
|
211 |
-
),
|
212 |
-
'content' => __( 'Tab content', 'shortcodes-ultimate' ),
|
213 |
-
'desc' => __( 'Single tab', 'shortcodes-ultimate' ),
|
214 |
-
'note' => __( 'Did you know that you need to wrap single tabs with [tabs] shortcode?', 'shortcodes-ultimate' ),
|
215 |
-
'example' => 'tabs',
|
216 |
-
'icon' => 'list-alt',
|
217 |
-
'image' => $images_url . 'tab.svg',
|
218 |
-
),
|
219 |
-
// spoiler
|
220 |
-
'spoiler' => array(
|
221 |
-
'name' => __( 'Spoiler', 'shortcodes-ultimate' ),
|
222 |
-
'type' => 'wrap',
|
223 |
-
'group' => 'box',
|
224 |
-
'atts' => array(
|
225 |
-
'title' => array(
|
226 |
-
'default' => __( 'Spoiler title', 'shortcodes-ultimate' ),
|
227 |
-
'name' => __( 'Title', 'shortcodes-ultimate' ), 'desc' => __( 'Text in spoiler title', 'shortcodes-ultimate' )
|
228 |
-
),
|
229 |
-
'open' => array(
|
230 |
-
'type' => 'bool',
|
231 |
-
'default' => 'no',
|
232 |
-
'name' => __( 'Open', 'shortcodes-ultimate' ),
|
233 |
-
'desc' => __( 'Is spoiler content visible by default', 'shortcodes-ultimate' )
|
234 |
-
),
|
235 |
-
'style' => array(
|
236 |
-
'type' => 'select',
|
237 |
-
'values' => array(
|
238 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
239 |
-
'fancy' => __( 'Fancy', 'shortcodes-ultimate' ),
|
240 |
-
'simple' => __( 'Simple', 'shortcodes-ultimate' )
|
241 |
-
),
|
242 |
-
'default' => 'default',
|
243 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
244 |
-
'desc' => __( 'Choose style for this spoiler', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
245 |
-
),
|
246 |
-
'icon' => array(
|
247 |
-
'type' => 'select',
|
248 |
-
'values' => array(
|
249 |
-
'plus' => __( 'Plus', 'shortcodes-ultimate' ),
|
250 |
-
'plus-circle' => __( 'Plus circle', 'shortcodes-ultimate' ),
|
251 |
-
'plus-square-1' => __( 'Plus square 1', 'shortcodes-ultimate' ),
|
252 |
-
'plus-square-2' => __( 'Plus square 2', 'shortcodes-ultimate' ),
|
253 |
-
'arrow' => __( 'Arrow', 'shortcodes-ultimate' ),
|
254 |
-
'arrow-circle-1' => __( 'Arrow circle 1', 'shortcodes-ultimate' ),
|
255 |
-
'arrow-circle-2' => __( 'Arrow circle 2', 'shortcodes-ultimate' ),
|
256 |
-
'chevron' => __( 'Chevron', 'shortcodes-ultimate' ),
|
257 |
-
'chevron-circle' => __( 'Chevron circle', 'shortcodes-ultimate' ),
|
258 |
-
'caret' => __( 'Caret', 'shortcodes-ultimate' ),
|
259 |
-
'caret-square' => __( 'Caret square', 'shortcodes-ultimate' ),
|
260 |
-
'folder-1' => __( 'Folder 1', 'shortcodes-ultimate' ),
|
261 |
-
'folder-2' => __( 'Folder 2', 'shortcodes-ultimate' )
|
262 |
-
),
|
263 |
-
'default' => 'plus',
|
264 |
-
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
265 |
-
'desc' => __( 'Icons for spoiler', 'shortcodes-ultimate' )
|
266 |
-
),
|
267 |
-
'anchor' => array(
|
268 |
-
'default' => '',
|
269 |
-
'name' => __( 'Anchor', 'shortcodes-ultimate' ),
|
270 |
-
'desc' => __( 'You can use unique anchor for this spoiler to access it with hash in page url. For example: type here <b%value>Hello</b> and then use url like http://example.com/page-url#Hello. This spoiler will be open and scrolled in', 'shortcodes-ultimate' )
|
271 |
-
),
|
272 |
-
'class' => array(
|
273 |
-
'type' => 'extra_css_class',
|
274 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
275 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
276 |
-
'default' => '',
|
277 |
-
),
|
278 |
-
),
|
279 |
-
'content' => __( 'Hidden content', 'shortcodes-ultimate' ),
|
280 |
-
'desc' => __( 'Spoiler with hidden content', 'shortcodes-ultimate' ),
|
281 |
-
'note' => __( 'Did you know that you can wrap multiple spoilers with [accordion] shortcode to create accordion effect?', 'shortcodes-ultimate' ),
|
282 |
-
'example' => 'spoilers',
|
283 |
-
'icon' => 'list-ul',
|
284 |
-
'image' => $images_url . 'spoiler.svg',
|
285 |
-
),
|
286 |
-
// accordion
|
287 |
-
'accordion' => array(
|
288 |
-
'name' => __( 'Accordion', 'shortcodes-ultimate' ),
|
289 |
-
'type' => 'wrap',
|
290 |
-
'group' => 'box',
|
291 |
-
'required_child' => 'spoiler',
|
292 |
-
'atts' => array(
|
293 |
-
'class' => array(
|
294 |
-
'type' => 'extra_css_class',
|
295 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
296 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
297 |
-
'default' => '',
|
298 |
-
),
|
299 |
-
),
|
300 |
-
'content' => array(
|
301 |
-
'id' => 'spoiler',
|
302 |
-
'number' => 3,
|
303 |
-
),
|
304 |
-
'desc' => __( 'Accordion with spoilers', 'shortcodes-ultimate' ),
|
305 |
-
'note' => __( 'Did you know that you can wrap multiple spoilers with [accordion] shortcode to create accordion effect?', 'shortcodes-ultimate' ),
|
306 |
-
'example' => 'spoilers',
|
307 |
-
'icon' => 'list',
|
308 |
-
'image' => $images_url . 'accordion.svg',
|
309 |
-
),
|
310 |
-
// divider
|
311 |
-
'divider' => array(
|
312 |
-
'name' => __( 'Divider', 'shortcodes-ultimate' ),
|
313 |
-
'type' => 'single',
|
314 |
-
'group' => 'content',
|
315 |
-
'atts' => array(
|
316 |
-
'top' => array(
|
317 |
-
'type' => 'bool',
|
318 |
-
'default' => 'yes',
|
319 |
-
'name' => __( 'Show TOP link', 'shortcodes-ultimate' ),
|
320 |
-
'desc' => __( 'Show link to top of the page or not', 'shortcodes-ultimate' )
|
321 |
-
),
|
322 |
-
'text' => array(
|
323 |
-
'values' => array( ),
|
324 |
-
'default' => __( 'Go to top', 'shortcodes-ultimate' ),
|
325 |
-
'name' => __( 'Link text', 'shortcodes-ultimate' ), 'desc' => __( 'Text for the GO TOP link', 'shortcodes-ultimate' )
|
326 |
-
),
|
327 |
-
'style' => array(
|
328 |
-
'type' => 'select',
|
329 |
-
'values' => array(
|
330 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
331 |
-
'dotted' => __( 'Dotted', 'shortcodes-ultimate' ),
|
332 |
-
'dashed' => __( 'Dashed', 'shortcodes-ultimate' ),
|
333 |
-
'double' => __( 'Double', 'shortcodes-ultimate' )
|
334 |
-
),
|
335 |
-
'default' => 'default',
|
336 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
337 |
-
'desc' => __( 'Choose style for this divider', 'shortcodes-ultimate' )
|
338 |
-
),
|
339 |
-
'divider_color' => array(
|
340 |
-
'type' => 'color',
|
341 |
-
'values' => array( ),
|
342 |
-
'default' => '#999999',
|
343 |
-
'name' => __( 'Divider color', 'shortcodes-ultimate' ),
|
344 |
-
'desc' => __( 'Pick the color for divider', 'shortcodes-ultimate' )
|
345 |
-
),
|
346 |
-
'link_color' => array(
|
347 |
-
'type' => 'color',
|
348 |
-
'values' => array( ),
|
349 |
-
'default' => '#999999',
|
350 |
-
'name' => __( 'Link color', 'shortcodes-ultimate' ),
|
351 |
-
'desc' => __( 'Pick the color for TOP link', 'shortcodes-ultimate' )
|
352 |
-
),
|
353 |
-
'size' => array(
|
354 |
-
'type' => 'slider',
|
355 |
-
'min' => 0,
|
356 |
-
'max' => 40,
|
357 |
-
'step' => 1,
|
358 |
-
'default' => 3,
|
359 |
-
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
360 |
-
'desc' => __( 'Height of the divider (in pixels)', 'shortcodes-ultimate' )
|
361 |
-
),
|
362 |
-
'margin' => array(
|
363 |
-
'type' => 'slider',
|
364 |
-
'min' => 0,
|
365 |
-
'max' => 200,
|
366 |
-
'step' => 5,
|
367 |
-
'default' => 15,
|
368 |
-
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
369 |
-
'desc' => __( 'Adjust the top and bottom margins of this divider (in pixels)', 'shortcodes-ultimate' )
|
370 |
-
),
|
371 |
-
'class' => array(
|
372 |
-
'type' => 'extra_css_class',
|
373 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
374 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
375 |
-
'default' => '',
|
376 |
-
),
|
377 |
-
),
|
378 |
-
'desc' => __( 'Content divider with optional TOP link', 'shortcodes-ultimate' ),
|
379 |
-
'icon' => 'ellipsis-h',
|
380 |
-
'image' => $images_url . 'divider.svg',
|
381 |
-
),
|
382 |
-
// spacer
|
383 |
-
'spacer' => array(
|
384 |
-
'name' => __( 'Spacer', 'shortcodes-ultimate' ),
|
385 |
-
'type' => 'single',
|
386 |
-
'group' => 'content other',
|
387 |
-
'atts' => array(
|
388 |
-
'size' => array(
|
389 |
-
'type' => 'slider',
|
390 |
-
'min' => 0,
|
391 |
-
'max' => 800,
|
392 |
-
'step' => 10,
|
393 |
-
'default' => 20,
|
394 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
395 |
-
'desc' => __( 'Height of the spacer in pixels', 'shortcodes-ultimate' )
|
396 |
-
),
|
397 |
-
'class' => array(
|
398 |
-
'type' => 'extra_css_class',
|
399 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
400 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
401 |
-
'default' => '',
|
402 |
-
),
|
403 |
-
),
|
404 |
-
'desc' => __( 'Empty space with adjustable height', 'shortcodes-ultimate' ),
|
405 |
-
'icon' => 'arrows-v',
|
406 |
-
'image' => $images_url . 'spacer.svg',
|
407 |
-
),
|
408 |
-
// highlight
|
409 |
-
'highlight' => array(
|
410 |
-
'name' => __( 'Highlight', 'shortcodes-ultimate' ),
|
411 |
-
'type' => 'wrap',
|
412 |
-
'group' => 'content',
|
413 |
-
'atts' => array(
|
414 |
-
'background' => array(
|
415 |
-
'type' => 'color',
|
416 |
-
'values' => array( ),
|
417 |
-
'default' => '#DDFF99',
|
418 |
-
'name' => __( 'Background', 'shortcodes-ultimate' ),
|
419 |
-
'desc' => __( 'Highlighted text background color', 'shortcodes-ultimate' )
|
420 |
-
),
|
421 |
-
'color' => array(
|
422 |
-
'type' => 'color',
|
423 |
-
'values' => array( ),
|
424 |
-
'default' => '#000000',
|
425 |
-
'name' => __( 'Text color', 'shortcodes-ultimate' ), 'desc' => __( 'Highlighted text color', 'shortcodes-ultimate' )
|
426 |
-
),
|
427 |
-
'class' => array(
|
428 |
-
'type' => 'extra_css_class',
|
429 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
430 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
431 |
-
'default' => '',
|
432 |
-
),
|
433 |
-
),
|
434 |
-
'content' => __( 'Highlighted text', 'shortcodes-ultimate' ),
|
435 |
-
'desc' => __( 'Highlighted text', 'shortcodes-ultimate' ),
|
436 |
-
'icon' => 'pencil',
|
437 |
-
'image' => $images_url . 'highlight.svg',
|
438 |
-
),
|
439 |
-
// label
|
440 |
-
'label' => array(
|
441 |
-
'name' => __( 'Label', 'shortcodes-ultimate' ),
|
442 |
-
'type' => 'wrap',
|
443 |
-
'group' => 'content',
|
444 |
-
'atts' => array(
|
445 |
-
'type' => array(
|
446 |
-
'type' => 'select',
|
447 |
-
'values' => array(
|
448 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
449 |
-
'success' => __( 'Success', 'shortcodes-ultimate' ),
|
450 |
-
'warning' => __( 'Warning', 'shortcodes-ultimate' ),
|
451 |
-
'important' => __( 'Important', 'shortcodes-ultimate' ),
|
452 |
-
'black' => __( 'Black', 'shortcodes-ultimate' ),
|
453 |
-
'info' => __( 'Info', 'shortcodes-ultimate' )
|
454 |
-
),
|
455 |
-
'default' => 'default',
|
456 |
-
'name' => __( 'Type', 'shortcodes-ultimate' ),
|
457 |
-
'desc' => __( 'Style of the label', 'shortcodes-ultimate' )
|
458 |
-
),
|
459 |
-
'class' => array(
|
460 |
-
'type' => 'extra_css_class',
|
461 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
462 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
463 |
-
'default' => '',
|
464 |
-
),
|
465 |
-
),
|
466 |
-
'content' => __( 'Label', 'shortcodes-ultimate' ),
|
467 |
-
'desc' => __( 'Styled label', 'shortcodes-ultimate' ),
|
468 |
-
'icon' => 'tag',
|
469 |
-
'image' => $images_url . 'label.svg',
|
470 |
-
),
|
471 |
-
// quote
|
472 |
-
'quote' => array(
|
473 |
-
'name' => __( 'Quote', 'shortcodes-ultimate' ),
|
474 |
-
'type' => 'wrap',
|
475 |
-
'group' => 'box',
|
476 |
-
'atts' => array(
|
477 |
-
'style' => array(
|
478 |
-
'type' => 'select',
|
479 |
-
'values' => array(
|
480 |
-
'default' => __( 'Default', 'shortcodes-ultimate' )
|
481 |
-
),
|
482 |
-
'default' => 'default',
|
483 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
484 |
-
'desc' => __( 'Choose style for this quote', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
485 |
-
),
|
486 |
-
'cite' => array(
|
487 |
-
'default' => '',
|
488 |
-
'name' => __( 'Cite', 'shortcodes-ultimate' ),
|
489 |
-
'desc' => __( 'Quote author name', 'shortcodes-ultimate' )
|
490 |
-
),
|
491 |
-
'url' => array(
|
492 |
-
'values' => array( ),
|
493 |
-
'default' => '',
|
494 |
-
'name' => __( 'Cite url', 'shortcodes-ultimate' ),
|
495 |
-
'desc' => __( 'Url of the quote author. Leave empty to disable link', 'shortcodes-ultimate' )
|
496 |
-
),
|
497 |
-
'class' => array(
|
498 |
-
'type' => 'extra_css_class',
|
499 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
500 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
501 |
-
'default' => '',
|
502 |
-
),
|
503 |
-
),
|
504 |
-
'content' => __( 'Quote', 'shortcodes-ultimate' ),
|
505 |
-
'desc' => __( 'Blockquote alternative', 'shortcodes-ultimate' ),
|
506 |
-
'icon' => 'quote-right',
|
507 |
-
'image' => $images_url . 'quote.svg',
|
508 |
-
),
|
509 |
-
// pullquote
|
510 |
-
'pullquote' => array(
|
511 |
-
'name' => __( 'Pullquote', 'shortcodes-ultimate' ),
|
512 |
-
'type' => 'wrap',
|
513 |
-
'group' => 'box',
|
514 |
-
'atts' => array(
|
515 |
-
'align' => array(
|
516 |
-
'type' => 'select',
|
517 |
-
'values' => array(
|
518 |
-
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
519 |
-
'right' => __( 'Right', 'shortcodes-ultimate' )
|
520 |
-
),
|
521 |
-
'default' => 'left',
|
522 |
-
'name' => __( 'Align', 'shortcodes-ultimate' ), 'desc' => __( 'Pullquote alignment (float)', 'shortcodes-ultimate' )
|
523 |
-
),
|
524 |
-
'class' => array(
|
525 |
-
'type' => 'extra_css_class',
|
526 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
527 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
528 |
-
'default' => '',
|
529 |
-
),
|
530 |
-
),
|
531 |
-
'content' => __( 'Pullquote', 'shortcodes-ultimate' ),
|
532 |
-
'desc' => __( 'Pullquote', 'shortcodes-ultimate' ),
|
533 |
-
'icon' => 'quote-left',
|
534 |
-
'image' => $images_url . 'pullquote.svg',
|
535 |
-
),
|
536 |
-
// dropcap
|
537 |
-
'dropcap' => array(
|
538 |
-
'name' => __( 'Dropcap', 'shortcodes-ultimate' ),
|
539 |
-
'type' => 'wrap',
|
540 |
-
'group' => 'content',
|
541 |
-
'atts' => array(
|
542 |
-
'style' => array(
|
543 |
-
'type' => 'select',
|
544 |
-
'values' => array(
|
545 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
546 |
-
'flat' => __( 'Flat', 'shortcodes-ultimate' ),
|
547 |
-
'light' => __( 'Light', 'shortcodes-ultimate' ),
|
548 |
-
'simple' => __( 'Simple', 'shortcodes-ultimate' )
|
549 |
-
),
|
550 |
-
'default' => 'default',
|
551 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ), 'desc' => __( 'Dropcap style preset', 'shortcodes-ultimate' )
|
552 |
-
),
|
553 |
-
'size' => array(
|
554 |
-
'type' => 'slider',
|
555 |
-
'min' => 1,
|
556 |
-
'max' => 5,
|
557 |
-
'step' => 1,
|
558 |
-
'default' => 3,
|
559 |
-
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
560 |
-
'desc' => __( 'Choose dropcap size', 'shortcodes-ultimate' )
|
561 |
-
),
|
562 |
-
'class' => array(
|
563 |
-
'type' => 'extra_css_class',
|
564 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
565 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
566 |
-
'default' => '',
|
567 |
-
),
|
568 |
-
),
|
569 |
-
'content' => __( 'D', 'shortcodes-ultimate' ),
|
570 |
-
'desc' => __( 'Dropcap', 'shortcodes-ultimate' ),
|
571 |
-
'icon' => 'bold',
|
572 |
-
'image' => $images_url . 'dropcap.svg',
|
573 |
-
),
|
574 |
-
// frame
|
575 |
-
'frame' => array(
|
576 |
-
'deprecated' => true,
|
577 |
-
'name' => __( 'Frame', 'shortcodes-ultimate' ),
|
578 |
-
'type' => 'wrap',
|
579 |
-
'group' => 'content',
|
580 |
-
'atts' => array(
|
581 |
-
'align' => array(
|
582 |
-
'type' => 'select',
|
583 |
-
'values' => array(
|
584 |
-
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
585 |
-
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
586 |
-
'right' => __( 'Right', 'shortcodes-ultimate' )
|
587 |
-
),
|
588 |
-
'default' => 'left',
|
589 |
-
'name' => __( 'Align', 'shortcodes-ultimate' ),
|
590 |
-
'desc' => __( 'Frame alignment', 'shortcodes-ultimate' )
|
591 |
-
),
|
592 |
-
'class' => array(
|
593 |
-
'default' => '',
|
594 |
-
'name' => __( 'Class', 'shortcodes-ultimate' ),
|
595 |
-
'desc' => __( 'Extra CSS class', 'shortcodes-ultimate' )
|
596 |
-
)
|
597 |
-
),
|
598 |
-
'content' => '<img src="http://lorempixel.com/g/400/200/" />',
|
599 |
-
'desc' => __( 'Styled image frame', 'shortcodes-ultimate' ),
|
600 |
-
'icon' => 'picture-o'
|
601 |
-
),
|
602 |
-
// row
|
603 |
-
'row' => array(
|
604 |
-
'name' => __( 'Columns', 'shortcodes-ultimate' ),
|
605 |
-
'type' => 'wrap',
|
606 |
-
'group' => 'box',
|
607 |
-
'required_child' => 'column',
|
608 |
-
'article' => 'http://docs.getshortcodes.com/article/44-row-column',
|
609 |
-
'atts' => array(
|
610 |
-
'class' => array(
|
611 |
-
'type' => 'extra_css_class',
|
612 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
613 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
614 |
-
'default' => '',
|
615 |
-
),
|
616 |
-
),
|
617 |
-
'content' => array(
|
618 |
-
'id' => 'column',
|
619 |
-
'number' => 2,
|
620 |
-
),
|
621 |
-
'desc' => __( 'Row for flexible columns', 'shortcodes-ultimate' ),
|
622 |
-
'icon' => 'columns',
|
623 |
-
'image' => $images_url . 'row.svg',
|
624 |
-
),
|
625 |
-
// column
|
626 |
-
'column' => array(
|
627 |
-
'name' => __( 'Column', 'shortcodes-ultimate' ),
|
628 |
-
'type' => 'wrap',
|
629 |
-
'group' => 'box',
|
630 |
-
'required_parent' => 'row',
|
631 |
-
'atts' => array(
|
632 |
-
'size' => array(
|
633 |
-
'type' => 'select',
|
634 |
-
'values' => array(
|
635 |
-
'1/1' => __( 'Full width', 'shortcodes-ultimate' ),
|
636 |
-
'1/2' => __( 'One half', 'shortcodes-ultimate' ),
|
637 |
-
'1/3' => __( 'One third', 'shortcodes-ultimate' ),
|
638 |
-
'2/3' => __( 'Two third', 'shortcodes-ultimate' ),
|
639 |
-
'1/4' => __( 'One fourth', 'shortcodes-ultimate' ),
|
640 |
-
'3/4' => __( 'Three fourth', 'shortcodes-ultimate' ),
|
641 |
-
'1/5' => __( 'One fifth', 'shortcodes-ultimate' ),
|
642 |
-
'2/5' => __( 'Two fifth', 'shortcodes-ultimate' ),
|
643 |
-
'3/5' => __( 'Three fifth', 'shortcodes-ultimate' ),
|
644 |
-
'4/5' => __( 'Four fifth', 'shortcodes-ultimate' ),
|
645 |
-
'1/6' => __( 'One sixth', 'shortcodes-ultimate' ),
|
646 |
-
'5/6' => __( 'Five sixth', 'shortcodes-ultimate' )
|
647 |
-
),
|
648 |
-
'default' => '1/2',
|
649 |
-
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
650 |
-
'desc' => __( 'Select column width. This width will be calculated depend page width', 'shortcodes-ultimate' )
|
651 |
-
),
|
652 |
-
'center' => array(
|
653 |
-
'type' => 'bool',
|
654 |
-
'default' => 'no',
|
655 |
-
'name' => __( 'Centered', 'shortcodes-ultimate' ),
|
656 |
-
'desc' => __( 'Is this column centered on the page', 'shortcodes-ultimate' )
|
657 |
-
),
|
658 |
-
'class' => array(
|
659 |
-
'type' => 'extra_css_class',
|
660 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
661 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
662 |
-
'default' => '',
|
663 |
-
),
|
664 |
-
),
|
665 |
-
'content' => __( 'Column content', 'shortcodes-ultimate' ),
|
666 |
-
'desc' => __( 'Flexible and responsive columns', 'shortcodes-ultimate' ),
|
667 |
-
'note' => __( 'Did you know that you need to wrap columns with [row] shortcode?', 'shortcodes-ultimate' ),
|
668 |
-
'example' => 'columns',
|
669 |
-
'icon' => 'columns',
|
670 |
-
'image' => $images_url . 'column.svg',
|
671 |
-
),
|
672 |
-
// list
|
673 |
-
'list' => array(
|
674 |
-
'name' => __( 'List', 'shortcodes-ultimate' ),
|
675 |
-
'type' => 'wrap',
|
676 |
-
'group' => 'content',
|
677 |
-
'atts' => array(
|
678 |
-
'icon' => array(
|
679 |
-
'type' => 'icon',
|
680 |
-
'default' => '',
|
681 |
-
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
682 |
-
'desc' => __( 'You can upload custom icon for this list or pick a built-in icon', 'shortcodes-ultimate' )
|
683 |
-
),
|
684 |
-
'icon_color' => array(
|
685 |
-
'type' => 'color',
|
686 |
-
'default' => '#333333',
|
687 |
-
'name' => __( 'Icon color', 'shortcodes-ultimate' ),
|
688 |
-
'desc' => __( 'This color will be applied to the selected icon. Does not works with uploaded icons', 'shortcodes-ultimate' )
|
689 |
-
),
|
690 |
-
'class' => array(
|
691 |
-
'type' => 'extra_css_class',
|
692 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
693 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
694 |
-
'default' => '',
|
695 |
-
),
|
696 |
-
),
|
697 |
-
'content' => __( "<ul>\n<li>List item</li>\n<li>List item</li>\n<li>List item</li>\n</ul>", 'shortcodes-ultimate' ),
|
698 |
-
'desc' => __( 'Styled unordered list', 'shortcodes-ultimate' ),
|
699 |
-
'icon' => 'list-ol',
|
700 |
-
'image' => $images_url . 'list.svg',
|
701 |
-
),
|
702 |
-
// button
|
703 |
-
'button' => array(
|
704 |
-
'name' => __( 'Button', 'shortcodes-ultimate' ),
|
705 |
-
'type' => 'wrap',
|
706 |
-
'group' => 'content',
|
707 |
-
'atts' => array(
|
708 |
-
'url' => array(
|
709 |
-
'values' => array( ),
|
710 |
-
'default' => get_option( 'home' ),
|
711 |
-
'name' => __( 'Link', 'shortcodes-ultimate' ),
|
712 |
-
'desc' => __( 'Button link', 'shortcodes-ultimate' )
|
713 |
-
),
|
714 |
-
'target' => array(
|
715 |
-
'type' => 'select',
|
716 |
-
'values' => array(
|
717 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
718 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
719 |
-
),
|
720 |
-
'default' => 'self',
|
721 |
-
'name' => __( 'Target', 'shortcodes-ultimate' ),
|
722 |
-
'desc' => __( 'Button link target', 'shortcodes-ultimate' )
|
723 |
-
),
|
724 |
-
'style' => array(
|
725 |
-
'type' => 'select',
|
726 |
-
'values' => array(
|
727 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
728 |
-
'flat' => __( 'Flat', 'shortcodes-ultimate' ),
|
729 |
-
'ghost' => __( 'Ghost', 'shortcodes-ultimate' ),
|
730 |
-
'soft' => __( 'Soft', 'shortcodes-ultimate' ),
|
731 |
-
'glass' => __( 'Glass', 'shortcodes-ultimate' ),
|
732 |
-
'bubbles' => __( 'Bubbles', 'shortcodes-ultimate' ),
|
733 |
-
'noise' => __( 'Noise', 'shortcodes-ultimate' ),
|
734 |
-
'stroked' => __( 'Stroked', 'shortcodes-ultimate' ),
|
735 |
-
'3d' => __( '3D', 'shortcodes-ultimate' )
|
736 |
-
),
|
737 |
-
'default' => 'default',
|
738 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ), 'desc' => __( 'Button background style preset', 'shortcodes-ultimate' )
|
739 |
-
),
|
740 |
-
'background' => array(
|
741 |
-
'type' => 'color',
|
742 |
-
'values' => array( ),
|
743 |
-
'default' => '#2D89EF',
|
744 |
-
'name' => __( 'Background', 'shortcodes-ultimate' ), 'desc' => __( 'Button background color', 'shortcodes-ultimate' )
|
745 |
-
),
|
746 |
-
'color' => array(
|
747 |
-
'type' => 'color',
|
748 |
-
'values' => array( ),
|
749 |
-
'default' => '#FFFFFF',
|
750 |
-
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
751 |
-
'desc' => __( 'Button text color', 'shortcodes-ultimate' )
|
752 |
-
),
|
753 |
-
'size' => array(
|
754 |
-
'type' => 'slider',
|
755 |
-
'min' => 1,
|
756 |
-
'max' => 20,
|
757 |
-
'step' => 1,
|
758 |
-
'default' => 3,
|
759 |
-
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
760 |
-
'desc' => __( 'Button size', 'shortcodes-ultimate' )
|
761 |
-
),
|
762 |
-
'wide' => array(
|
763 |
-
'type' => 'bool',
|
764 |
-
'default' => 'no',
|
765 |
-
'name' => __( 'Fluid', 'shortcodes-ultimate' ), 'desc' => __( 'Fluid buttons has 100% width', 'shortcodes-ultimate' )
|
766 |
-
),
|
767 |
-
'center' => array(
|
768 |
-
'type' => 'bool',
|
769 |
-
'default' => 'no',
|
770 |
-
'name' => __( 'Centered', 'shortcodes-ultimate' ), 'desc' => __( 'Is button centered on the page', 'shortcodes-ultimate' )
|
771 |
-
),
|
772 |
-
'radius' => array(
|
773 |
-
'type' => 'select',
|
774 |
-
'values' => array(
|
775 |
-
'auto' => __( 'Auto', 'shortcodes-ultimate' ),
|
776 |
-
'round' => __( 'Round', 'shortcodes-ultimate' ),
|
777 |
-
'0' => __( 'Square', 'shortcodes-ultimate' ),
|
778 |
-
'5' => '5px',
|
779 |
-
'10' => '10px',
|
780 |
-
'20' => '20px'
|
781 |
-
),
|
782 |
-
'default' => 'auto',
|
783 |
-
'name' => __( 'Radius', 'shortcodes-ultimate' ),
|
784 |
-
'desc' => __( 'Radius of button corners. Auto-radius calculation based on button size', 'shortcodes-ultimate' )
|
785 |
-
),
|
786 |
-
'icon' => array(
|
787 |
-
'type' => 'icon',
|
788 |
-
'default' => '',
|
789 |
-
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
790 |
-
'desc' => __( 'You can upload custom icon for this button or pick a built-in icon', 'shortcodes-ultimate' )
|
791 |
-
),
|
792 |
-
'icon_color' => array(
|
793 |
-
'type' => 'color',
|
794 |
-
'default' => '#FFFFFF',
|
795 |
-
'name' => __( 'Icon color', 'shortcodes-ultimate' ),
|
796 |
-
'desc' => __( 'This color will be applied to the selected icon. Does not works with uploaded icons', 'shortcodes-ultimate' )
|
797 |
-
),
|
798 |
-
'text_shadow' => array(
|
799 |
-
'type' => 'shadow',
|
800 |
-
'default' => 'none',
|
801 |
-
'name' => __( 'Text shadow', 'shortcodes-ultimate' ),
|
802 |
-
'desc' => __( 'Button text shadow', 'shortcodes-ultimate' )
|
803 |
-
),
|
804 |
-
'desc' => array(
|
805 |
-
'default' => '',
|
806 |
-
'name' => __( 'Description', 'shortcodes-ultimate' ),
|
807 |
-
'desc' => __( 'Small description under button text. This option is incompatible with icon.', 'shortcodes-ultimate' )
|
808 |
-
),
|
809 |
-
'onclick' => array(
|
810 |
-
'default' => '',
|
811 |
-
'name' => __( 'onClick', 'shortcodes-ultimate' ),
|
812 |
-
'desc' => __( 'Advanced JavaScript code for onClick action', 'shortcodes-ultimate' )
|
813 |
-
),
|
814 |
-
'rel' => array(
|
815 |
-
'default' => '',
|
816 |
-
'name' => __( 'Rel attribute', 'shortcodes-ultimate' ),
|
817 |
-
'desc' => __( 'Here you can add value for the rel attribute.<br>Example values: <b%value>nofollow</b>, <b%value>lightbox</b>', 'shortcodes-ultimate' )
|
818 |
-
),
|
819 |
-
'title' => array(
|
820 |
-
'default' => '',
|
821 |
-
'name' => __( 'Title attribute', 'shortcodes-ultimate' ),
|
822 |
-
'desc' => __( 'Here you can add value for the title attribute', 'shortcodes-ultimate' )
|
823 |
-
),
|
824 |
-
'id' => array(
|
825 |
-
'default' => '',
|
826 |
-
'name' => __( 'Button ID', 'shortcodes-ultimate' ),
|
827 |
-
'desc' => __( 'Custom value for the ID attribute', 'shortcodes-ultimate' )
|
828 |
-
),
|
829 |
-
'class' => array(
|
830 |
-
'type' => 'extra_css_class',
|
831 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
832 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
833 |
-
'default' => '',
|
834 |
-
),
|
835 |
-
),
|
836 |
-
'content' => __( 'Button text', 'shortcodes-ultimate' ),
|
837 |
-
'desc' => __( 'Styled button', 'shortcodes-ultimate' ),
|
838 |
-
'example' => 'buttons',
|
839 |
-
'icon' => 'heart',
|
840 |
-
'image' => $images_url . 'button.svg',
|
841 |
-
),
|
842 |
-
// service
|
843 |
-
'service' => array(
|
844 |
-
'name' => __( 'Service', 'shortcodes-ultimate' ),
|
845 |
-
'type' => 'wrap',
|
846 |
-
'group' => 'box',
|
847 |
-
'atts' => array(
|
848 |
-
'title' => array(
|
849 |
-
'values' => array( ),
|
850 |
-
'default' => __( 'Service title', 'shortcodes-ultimate' ),
|
851 |
-
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
852 |
-
'desc' => __( 'Service name', 'shortcodes-ultimate' )
|
853 |
-
),
|
854 |
-
'icon' => array(
|
855 |
-
'type' => 'icon',
|
856 |
-
'default' => '',
|
857 |
-
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
858 |
-
'desc' => __( 'You can upload custom icon for this box', 'shortcodes-ultimate' )
|
859 |
-
),
|
860 |
-
'icon_color' => array(
|
861 |
-
'type' => 'color',
|
862 |
-
'default' => '#333333',
|
863 |
-
'name' => __( 'Icon color', 'shortcodes-ultimate' ),
|
864 |
-
'desc' => __( 'This color will be applied to the selected icon. Does not works with uploaded icons', 'shortcodes-ultimate' )
|
865 |
-
),
|
866 |
-
'size' => array(
|
867 |
-
'type' => 'slider',
|
868 |
-
'min' => 10,
|
869 |
-
'max' => 128,
|
870 |
-
'step' => 2,
|
871 |
-
'default' => 32,
|
872 |
-
'name' => __( 'Icon size', 'shortcodes-ultimate' ),
|
873 |
-
'desc' => __( 'Size of the uploaded icon in pixels', 'shortcodes-ultimate' )
|
874 |
-
),
|
875 |
-
'class' => array(
|
876 |
-
'type' => 'extra_css_class',
|
877 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
878 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
879 |
-
'default' => '',
|
880 |
-
),
|
881 |
-
),
|
882 |
-
'content' => __( 'Service description', 'shortcodes-ultimate' ),
|
883 |
-
'desc' => __( 'Service box with title', 'shortcodes-ultimate' ),
|
884 |
-
'icon' => 'check-square-o',
|
885 |
-
'image' => $images_url . 'service.svg',
|
886 |
-
),
|
887 |
-
// box
|
888 |
-
'box' => array(
|
889 |
-
'name' => __( 'Box', 'shortcodes-ultimate' ),
|
890 |
-
'type' => 'wrap',
|
891 |
-
'group' => 'box',
|
892 |
-
'atts' => array(
|
893 |
-
'title' => array(
|
894 |
-
'values' => array( ),
|
895 |
-
'default' => __( 'Box title', 'shortcodes-ultimate' ),
|
896 |
-
'name' => __( 'Title', 'shortcodes-ultimate' ), 'desc' => __( 'Text for the box title', 'shortcodes-ultimate' )
|
897 |
-
),
|
898 |
-
'style' => array(
|
899 |
-
'type' => 'select',
|
900 |
-
'values' => array(
|
901 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
902 |
-
'soft' => __( 'Soft', 'shortcodes-ultimate' ),
|
903 |
-
'glass' => __( 'Glass', 'shortcodes-ultimate' ),
|
904 |
-
'bubbles' => __( 'Bubbles', 'shortcodes-ultimate' ),
|
905 |
-
'noise' => __( 'Noise', 'shortcodes-ultimate' )
|
906 |
-
),
|
907 |
-
'default' => 'default',
|
908 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
909 |
-
'desc' => __( 'Box style preset', 'shortcodes-ultimate' )
|
910 |
-
),
|
911 |
-
'box_color' => array(
|
912 |
-
'type' => 'color',
|
913 |
-
'values' => array( ),
|
914 |
-
'default' => '#333333',
|
915 |
-
'name' => __( 'Color', 'shortcodes-ultimate' ),
|
916 |
-
'desc' => __( 'Color for the box title and borders', 'shortcodes-ultimate' )
|
917 |
-
),
|
918 |
-
'title_color' => array(
|
919 |
-
'type' => 'color',
|
920 |
-
'values' => array( ),
|
921 |
-
'default' => '#FFFFFF',
|
922 |
-
'name' => __( 'Title text color', 'shortcodes-ultimate' ), 'desc' => __( 'Color for the box title text', 'shortcodes-ultimate' )
|
923 |
-
),
|
924 |
-
'radius' => array(
|
925 |
-
'type' => 'slider',
|
926 |
-
'min' => 0,
|
927 |
-
'max' => 20,
|
928 |
-
'step' => 1,
|
929 |
-
'default' => 3,
|
930 |
-
'name' => __( 'Radius', 'shortcodes-ultimate' ),
|
931 |
-
'desc' => __( 'Box corners radius', 'shortcodes-ultimate' )
|
932 |
-
),
|
933 |
-
'class' => array(
|
934 |
-
'type' => 'extra_css_class',
|
935 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
936 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
937 |
-
'default' => '',
|
938 |
-
),
|
939 |
-
),
|
940 |
-
'content' => __( 'Box content', 'shortcodes-ultimate' ),
|
941 |
-
'desc' => __( 'Colored box with caption', 'shortcodes-ultimate' ),
|
942 |
-
'icon' => 'list-alt',
|
943 |
-
'image' => $images_url . 'box.svg',
|
944 |
-
),
|
945 |
-
// note
|
946 |
-
'note' => array(
|
947 |
-
'name' => __( 'Note', 'shortcodes-ultimate' ),
|
948 |
-
'type' => 'wrap',
|
949 |
-
'group' => 'box',
|
950 |
-
'atts' => array(
|
951 |
-
'note_color' => array(
|
952 |
-
'type' => 'color',
|
953 |
-
'values' => array( ),
|
954 |
-
'default' => '#FFFF66',
|
955 |
-
'name' => __( 'Background', 'shortcodes-ultimate' ), 'desc' => __( 'Note background color', 'shortcodes-ultimate' )
|
956 |
-
),
|
957 |
-
'text_color' => array(
|
958 |
-
'type' => 'color',
|
959 |
-
'values' => array( ),
|
960 |
-
'default' => '#333333',
|
961 |
-
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
962 |
-
'desc' => __( 'Note text color', 'shortcodes-ultimate' )
|
963 |
-
),
|
964 |
-
'radius' => array(
|
965 |
-
'type' => 'slider',
|
966 |
-
'min' => 0,
|
967 |
-
'max' => 20,
|
968 |
-
'step' => 1,
|
969 |
-
'default' => 3,
|
970 |
-
'name' => __( 'Radius', 'shortcodes-ultimate' ), 'desc' => __( 'Note corners radius', 'shortcodes-ultimate' )
|
971 |
-
),
|
972 |
-
'class' => array(
|
973 |
-
'type' => 'extra_css_class',
|
974 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
975 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
976 |
-
'default' => '',
|
977 |
-
),
|
978 |
-
),
|
979 |
-
'content' => __( 'Note text', 'shortcodes-ultimate' ),
|
980 |
-
'desc' => __( 'Colored box', 'shortcodes-ultimate' ),
|
981 |
-
'icon' => 'list-alt',
|
982 |
-
'image' => $images_url . 'note.svg',
|
983 |
-
),
|
984 |
-
// expand
|
985 |
-
'expand' => array(
|
986 |
-
'name' => __( 'Expand', 'shortcodes-ultimate' ),
|
987 |
-
'type' => 'wrap',
|
988 |
-
'group' => 'box',
|
989 |
-
'atts' => array(
|
990 |
-
'more_text' => array(
|
991 |
-
'default' => __( 'Show more', 'shortcodes-ultimate' ),
|
992 |
-
'name' => __( 'More text', 'shortcodes-ultimate' ),
|
993 |
-
'desc' => __( 'Enter the text for more link', 'shortcodes-ultimate' )
|
994 |
-
),
|
995 |
-
'less_text' => array(
|
996 |
-
'default' => __( 'Show less', 'shortcodes-ultimate' ),
|
997 |
-
'name' => __( 'Less text', 'shortcodes-ultimate' ),
|
998 |
-
'desc' => __( 'Enter the text for less link', 'shortcodes-ultimate' )
|
999 |
-
),
|
1000 |
-
'height' => array(
|
1001 |
-
'type' => 'slider',
|
1002 |
-
'min' => 0,
|
1003 |
-
'max' => 1000,
|
1004 |
-
'step' => 10,
|
1005 |
-
'default' => 100,
|
1006 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1007 |
-
'desc' => __( 'Height for collapsed state (in pixels)', 'shortcodes-ultimate' )
|
1008 |
-
),
|
1009 |
-
'hide_less' => array(
|
1010 |
-
'type' => 'bool',
|
1011 |
-
'default' => 'no',
|
1012 |
-
'name' => __( 'Hide less link', 'shortcodes-ultimate' ),
|
1013 |
-
'desc' => __( 'This option allows you to hide less link, when the text block has been expanded', 'shortcodes-ultimate' )
|
1014 |
-
),
|
1015 |
-
'text_color' => array(
|
1016 |
-
'type' => 'color',
|
1017 |
-
'values' => array( ),
|
1018 |
-
'default' => '#333333',
|
1019 |
-
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
1020 |
-
'desc' => __( 'Pick the text color', 'shortcodes-ultimate' )
|
1021 |
-
),
|
1022 |
-
'link_color' => array(
|
1023 |
-
'type' => 'color',
|
1024 |
-
'values' => array( ),
|
1025 |
-
'default' => '#0088FF',
|
1026 |
-
'name' => __( 'Link color', 'shortcodes-ultimate' ),
|
1027 |
-
'desc' => __( 'Pick the link color', 'shortcodes-ultimate' )
|
1028 |
-
),
|
1029 |
-
'link_style' => array(
|
1030 |
-
'type' => 'select',
|
1031 |
-
'values' => array(
|
1032 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
1033 |
-
'underlined' => __( 'Underlined', 'shortcodes-ultimate' ),
|
1034 |
-
'dotted' => __( 'Dotted', 'shortcodes-ultimate' ),
|
1035 |
-
'dashed' => __( 'Dashed', 'shortcodes-ultimate' ),
|
1036 |
-
'button' => __( 'Button', 'shortcodes-ultimate' ),
|
1037 |
-
),
|
1038 |
-
'default' => 'default',
|
1039 |
-
'name' => __( 'Link style', 'shortcodes-ultimate' ),
|
1040 |
-
'desc' => __( 'Select the style for more/less link', 'shortcodes-ultimate' )
|
1041 |
-
),
|
1042 |
-
'link_align' => array(
|
1043 |
-
'type' => 'select',
|
1044 |
-
'values' => array(
|
1045 |
-
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
1046 |
-
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
1047 |
-
'right' => __( 'Right', 'shortcodes-ultimate' ),
|
1048 |
-
),
|
1049 |
-
'default' => 'left',
|
1050 |
-
'name' => __( 'Link align', 'shortcodes-ultimate' ),
|
1051 |
-
'desc' => __( 'Select link alignment', 'shortcodes-ultimate' )
|
1052 |
-
),
|
1053 |
-
'more_icon' => array(
|
1054 |
-
'type' => 'icon',
|
1055 |
-
'default' => '',
|
1056 |
-
'name' => __( 'More icon', 'shortcodes-ultimate' ),
|
1057 |
-
'desc' => __( 'Add an icon to the more link', 'shortcodes-ultimate' )
|
1058 |
-
),
|
1059 |
-
'less_icon' => array(
|
1060 |
-
'type' => 'icon',
|
1061 |
-
'default' => '',
|
1062 |
-
'name' => __( 'Less icon', 'shortcodes-ultimate' ),
|
1063 |
-
'desc' => __( 'Add an icon to the less link', 'shortcodes-ultimate' )
|
1064 |
-
),
|
1065 |
-
'class' => array(
|
1066 |
-
'type' => 'extra_css_class',
|
1067 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1068 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1069 |
-
'default' => '',
|
1070 |
-
),
|
1071 |
-
),
|
1072 |
-
'content' => __( 'This text block can be expanded', 'shortcodes-ultimate' ),
|
1073 |
-
'desc' => __( 'Expandable text block', 'shortcodes-ultimate' ),
|
1074 |
-
'icon' => 'sort-amount-asc',
|
1075 |
-
'image' => $images_url . 'expand.svg',
|
1076 |
-
),
|
1077 |
-
// lightbox
|
1078 |
-
'lightbox' => array(
|
1079 |
-
'name' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
1080 |
-
'type' => 'wrap',
|
1081 |
-
'group' => 'gallery',
|
1082 |
-
'possible_sibling' => 'lightbox_content',
|
1083 |
-
'article' => 'http://docs.getshortcodes.com/article/76-how-to-use-lightbox-shortcode',
|
1084 |
-
'atts' => array(
|
1085 |
-
'type' => array(
|
1086 |
-
'type' => 'select',
|
1087 |
-
'values' => array(
|
1088 |
-
'iframe' => __( 'Iframe', 'shortcodes-ultimate' ),
|
1089 |
-
'image' => __( 'Image', 'shortcodes-ultimate' ),
|
1090 |
-
'inline' => __( 'Inline (html content)', 'shortcodes-ultimate' )
|
1091 |
-
),
|
1092 |
-
'default' => 'iframe',
|
1093 |
-
'name' => __( 'Content type', 'shortcodes-ultimate' ),
|
1094 |
-
'desc' => __( 'Select type of the lightbox window content', 'shortcodes-ultimate' )
|
1095 |
-
),
|
1096 |
-
'src' => array(
|
1097 |
-
'default' => '',
|
1098 |
-
'name' => __( 'Content source', 'shortcodes-ultimate' ),
|
1099 |
-
'desc' => __( 'Insert here URL or CSS selector. Use URL for Iframe and Image content types. Use CSS selector for Inline content type.<br />Example values:<br /><b%value>http://www.youtube.com/watch?v=XXXXXXXXX</b> - YouTube video (iframe)<br /><b%value>http://example.com/wp-content/uploads/image.jpg</b> - uploaded image (image)<br /><b%value>http://example.com/</b> - any web page (iframe)<br /><b%value>#my-custom-popup</b> - any HTML content (inline)', 'shortcodes-ultimate' )
|
1100 |
-
),
|
1101 |
-
'class' => array(
|
1102 |
-
'type' => 'extra_css_class',
|
1103 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1104 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1105 |
-
'default' => '',
|
1106 |
-
),
|
1107 |
-
),
|
1108 |
-
'content' => __( 'Click here to open lightbox', 'shortcodes-ultimate' ),
|
1109 |
-
'desc' => __( 'Lightbox window with custom content', 'shortcodes-ultimate' ),
|
1110 |
-
'icon' => 'external-link',
|
1111 |
-
'image' => $images_url . 'lightbox.svg',
|
1112 |
-
),
|
1113 |
-
// lightbox content
|
1114 |
-
'lightbox_content' => array(
|
1115 |
-
'name' => __( 'Lightbox content', 'shortcodes-ultimate' ),
|
1116 |
-
'type' => 'wrap',
|
1117 |
-
'group' => 'gallery',
|
1118 |
-
'required_sibling' => 'lightbox',
|
1119 |
-
'article' => 'http://docs.getshortcodes.com/article/76-how-to-use-lightbox-shortcode',
|
1120 |
-
'atts' => array(
|
1121 |
-
'id' => array(
|
1122 |
-
'default' => '',
|
1123 |
-
'name' => __( 'ID', 'shortcodes-ultimate' ),
|
1124 |
-
'desc' => sprintf( __( 'Enter here the ID from Content source field. %s Example value: %s', 'shortcodes-ultimate' ), '<br>', '<b%value>my-custom-popup</b>' )
|
1125 |
-
),
|
1126 |
-
'width' => array(
|
1127 |
-
'default' => '50%',
|
1128 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1129 |
-
'desc' => sprintf( __( 'Adjust the width for inline content (in pixels or percents). %s Example values: %s, %s, %s', 'shortcodes-ultimate' ), '<br>', '<b%value>300px</b>', '<b%value>600px</b>', '<b%value>90%</b>' )
|
1130 |
-
),
|
1131 |
-
'margin' => array(
|
1132 |
-
'type' => 'slider',
|
1133 |
-
'min' => 0,
|
1134 |
-
'max' => 600,
|
1135 |
-
'step' => 5,
|
1136 |
-
'default' => 40,
|
1137 |
-
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
1138 |
-
'desc' => __( 'Adjust the margin for inline content (in pixels)', 'shortcodes-ultimate' )
|
1139 |
-
),
|
1140 |
-
'padding' => array(
|
1141 |
-
'type' => 'slider',
|
1142 |
-
'min' => 0,
|
1143 |
-
'max' => 600,
|
1144 |
-
'step' => 5,
|
1145 |
-
'default' => 40,
|
1146 |
-
'name' => __( 'Padding', 'shortcodes-ultimate' ),
|
1147 |
-
'desc' => __( 'Adjust the padding for inline content (in pixels)', 'shortcodes-ultimate' )
|
1148 |
-
),
|
1149 |
-
'text_align' => array(
|
1150 |
-
'type' => 'select',
|
1151 |
-
'values' => array(
|
1152 |
-
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
1153 |
-
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
1154 |
-
'right' => __( 'Right', 'shortcodes-ultimate' )
|
1155 |
-
),
|
1156 |
-
'default' => 'center',
|
1157 |
-
'name' => __( 'Text alignment', 'shortcodes-ultimate' ),
|
1158 |
-
'desc' => __( 'Select the text alignment', 'shortcodes-ultimate' )
|
1159 |
-
),
|
1160 |
-
'background' => array(
|
1161 |
-
'type' => 'color',
|
1162 |
-
'default' => '#FFFFFF',
|
1163 |
-
'name' => __( 'Background color', 'shortcodes-ultimate' ),
|
1164 |
-
'desc' => __( 'Pick a background color', 'shortcodes-ultimate' )
|
1165 |
-
),
|
1166 |
-
'color' => array(
|
1167 |
-
'type' => 'color',
|
1168 |
-
'default' => '#333333',
|
1169 |
-
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
1170 |
-
'desc' => __( 'Pick a text color', 'shortcodes-ultimate' )
|
1171 |
-
),
|
1172 |
-
'color' => array(
|
1173 |
-
'type' => 'color',
|
1174 |
-
'default' => '#333333',
|
1175 |
-
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
1176 |
-
'desc' => __( 'Pick a text color', 'shortcodes-ultimate' )
|
1177 |
-
),
|
1178 |
-
'shadow' => array(
|
1179 |
-
'type' => 'shadow',
|
1180 |
-
'default' => '0px 0px 15px #333333',
|
1181 |
-
'name' => __( 'Shadow', 'shortcodes-ultimate' ),
|
1182 |
-
'desc' => __( 'Adjust the shadow for content box', 'shortcodes-ultimate' )
|
1183 |
-
),
|
1184 |
-
'class' => array(
|
1185 |
-
'type' => 'extra_css_class',
|
1186 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1187 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1188 |
-
'default' => '',
|
1189 |
-
),
|
1190 |
-
),
|
1191 |
-
'content' => __( 'Inline content', 'shortcodes-ultimate' ),
|
1192 |
-
'desc' => __( 'Inline content for lightbox', 'shortcodes-ultimate' ),
|
1193 |
-
'icon' => 'external-link',
|
1194 |
-
'image' => $images_url . 'lightbox_content.svg',
|
1195 |
-
),
|
1196 |
-
// tooltip
|
1197 |
-
'tooltip' => array(
|
1198 |
-
'name' => __( 'Tooltip', 'shortcodes-ultimate' ),
|
1199 |
-
'type' => 'wrap',
|
1200 |
-
'group' => 'other',
|
1201 |
-
'atts' => array(
|
1202 |
-
'style' => array(
|
1203 |
-
'type' => 'select',
|
1204 |
-
'values' => array(
|
1205 |
-
'light' => __( 'Basic: Light', 'shortcodes-ultimate' ),
|
1206 |
-
'dark' => __( 'Basic: Dark', 'shortcodes-ultimate' ),
|
1207 |
-
'yellow' => __( 'Basic: Yellow', 'shortcodes-ultimate' ),
|
1208 |
-
'green' => __( 'Basic: Green', 'shortcodes-ultimate' ),
|
1209 |
-
'red' => __( 'Basic: Red', 'shortcodes-ultimate' ),
|
1210 |
-
'blue' => __( 'Basic: Blue', 'shortcodes-ultimate' ),
|
1211 |
-
'youtube' => __( 'Youtube', 'shortcodes-ultimate' ),
|
1212 |
-
'tipsy' => __( 'Tipsy', 'shortcodes-ultimate' ),
|
1213 |
-
'bootstrap' => __( 'Bootstrap', 'shortcodes-ultimate' ),
|
1214 |
-
'jtools' => __( 'jTools', 'shortcodes-ultimate' ),
|
1215 |
-
'tipped' => __( 'Tipped', 'shortcodes-ultimate' ),
|
1216 |
-
'cluetip' => __( 'Cluetip', 'shortcodes-ultimate' ),
|
1217 |
-
),
|
1218 |
-
'default' => 'yellow',
|
1219 |
-
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
1220 |
-
'desc' => __( 'Tooltip window style', 'shortcodes-ultimate' )
|
1221 |
-
),
|
1222 |
-
'position' => array(
|
1223 |
-
'type' => 'select',
|
1224 |
-
'values' => array(
|
1225 |
-
'north' => __( 'Top', 'shortcodes-ultimate' ),
|
1226 |
-
'south' => __( 'Bottom', 'shortcodes-ultimate' ),
|
1227 |
-
'west' => __( 'Left', 'shortcodes-ultimate' ),
|
1228 |
-
'east' => __( 'Right', 'shortcodes-ultimate' )
|
1229 |
-
),
|
1230 |
-
'default' => 'top',
|
1231 |
-
'name' => __( 'Position', 'shortcodes-ultimate' ),
|
1232 |
-
'desc' => __( 'Tooltip position', 'shortcodes-ultimate' )
|
1233 |
-
),
|
1234 |
-
'shadow' => array(
|
1235 |
-
'type' => 'bool',
|
1236 |
-
'default' => 'no',
|
1237 |
-
'name' => __( 'Shadow', 'shortcodes-ultimate' ),
|
1238 |
-
'desc' => __( 'Add shadow to tooltip. This option is only works with basic styes, e.g. blue, green etc.', 'shortcodes-ultimate' )
|
1239 |
-
),
|
1240 |
-
'rounded' => array(
|
1241 |
-
'type' => 'bool',
|
1242 |
-
'default' => 'no',
|
1243 |
-
'name' => __( 'Rounded corners', 'shortcodes-ultimate' ),
|
1244 |
-
'desc' => __( 'Use rounded for tooltip. This option is only works with basic styes, e.g. blue, green etc.', 'shortcodes-ultimate' )
|
1245 |
-
),
|
1246 |
-
'size' => array(
|
1247 |
-
'type' => 'select',
|
1248 |
-
'values' => array(
|
1249 |
-
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
1250 |
-
'1' => 1,
|
1251 |
-
'2' => 2,
|
1252 |
-
'3' => 3,
|
1253 |
-
'4' => 4,
|
1254 |
-
'5' => 5,
|
1255 |
-
'6' => 6,
|
1256 |
-
),
|
1257 |
-
'default' => 'default',
|
1258 |
-
'name' => __( 'Font size', 'shortcodes-ultimate' ),
|
1259 |
-
'desc' => __( 'Tooltip font size', 'shortcodes-ultimate' )
|
1260 |
-
),
|
1261 |
-
'title' => array(
|
1262 |
-
'default' => '',
|
1263 |
-
'name' => __( 'Tooltip title', 'shortcodes-ultimate' ),
|
1264 |
-
'desc' => __( 'Enter title for tooltip window. Leave this field empty to hide the title', 'shortcodes-ultimate' )
|
1265 |
-
),
|
1266 |
-
'content' => array(
|
1267 |
-
'default' => __( 'Tooltip text', 'shortcodes-ultimate' ),
|
1268 |
-
'name' => __( 'Tooltip content', 'shortcodes-ultimate' ),
|
1269 |
-
'desc' => __( 'Enter tooltip content here', 'shortcodes-ultimate' )
|
1270 |
-
),
|
1271 |
-
'behavior' => array(
|
1272 |
-
'type' => 'select',
|
1273 |
-
'values' => array(
|
1274 |
-
'hover' => __( 'Show and hide on mouse hover', 'shortcodes-ultimate' ),
|
1275 |
-
'click' => __( 'Show and hide by mouse click', 'shortcodes-ultimate' ),
|
1276 |
-
'always' => __( 'Always visible', 'shortcodes-ultimate' )
|
1277 |
-
),
|
1278 |
-
'default' => 'hover',
|
1279 |
-
'name' => __( 'Behavior', 'shortcodes-ultimate' ),
|
1280 |
-
'desc' => __( 'Select tooltip behavior', 'shortcodes-ultimate' )
|
1281 |
-
),
|
1282 |
-
'close' => array(
|
1283 |
-
'type' => 'bool',
|
1284 |
-
'default' => 'no',
|
1285 |
-
'name' => __( 'Close button', 'shortcodes-ultimate' ),
|
1286 |
-
'desc' => __( 'Show close button', 'shortcodes-ultimate' )
|
1287 |
-
),
|
1288 |
-
'class' => array(
|
1289 |
-
'type' => 'extra_css_class',
|
1290 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1291 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1292 |
-
'default' => '',
|
1293 |
-
),
|
1294 |
-
),
|
1295 |
-
'content' => __( 'Hover me to open tooltip', 'shortcodes-ultimate' ),
|
1296 |
-
'desc' => __( 'Tooltip window with custom content', 'shortcodes-ultimate' ),
|
1297 |
-
'icon' => 'comment-o',
|
1298 |
-
'image' => $images_url . 'tooltip.svg',
|
1299 |
-
),
|
1300 |
-
// private
|
1301 |
-
'private' => array(
|
1302 |
-
'name' => __( 'Private', 'shortcodes-ultimate' ),
|
1303 |
-
'type' => 'wrap',
|
1304 |
-
'group' => 'other',
|
1305 |
-
'atts' => array(
|
1306 |
-
'class' => array(
|
1307 |
-
'type' => 'extra_css_class',
|
1308 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1309 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1310 |
-
'default' => '',
|
1311 |
-
),
|
1312 |
-
),
|
1313 |
-
'content' => __( 'Private note text', 'shortcodes-ultimate' ),
|
1314 |
-
'desc' => __( 'Private note for post authors', 'shortcodes-ultimate' ),
|
1315 |
-
'icon' => 'lock',
|
1316 |
-
'image' => $images_url . 'private.svg',
|
1317 |
-
),
|
1318 |
-
// youtube
|
1319 |
-
'youtube' => array(
|
1320 |
-
'name' => __( 'YouTube', 'shortcodes-ultimate' ),
|
1321 |
-
'type' => 'single',
|
1322 |
-
'group' => 'media',
|
1323 |
-
'atts' => array(
|
1324 |
-
'url' => array(
|
1325 |
-
'values' => array( ),
|
1326 |
-
'default' => '',
|
1327 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
1328 |
-
'desc' => __( 'Url of YouTube page with video. Ex: http://youtube.com/watch?v=XXXXXX', 'shortcodes-ultimate' )
|
1329 |
-
),
|
1330 |
-
'width' => array(
|
1331 |
-
'type' => 'slider',
|
1332 |
-
'min' => 200,
|
1333 |
-
'max' => 1600,
|
1334 |
-
'step' => 20,
|
1335 |
-
'default' => 600,
|
1336 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1337 |
-
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
1338 |
-
),
|
1339 |
-
'height' => array(
|
1340 |
-
'type' => 'slider',
|
1341 |
-
'min' => 200,
|
1342 |
-
'max' => 1600,
|
1343 |
-
'step' => 20,
|
1344 |
-
'default' => 400,
|
1345 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1346 |
-
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
1347 |
-
),
|
1348 |
-
'responsive' => array(
|
1349 |
-
'type' => 'bool',
|
1350 |
-
'default' => 'yes',
|
1351 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
1352 |
-
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
1353 |
-
),
|
1354 |
-
'autoplay' => array(
|
1355 |
-
'type' => 'bool',
|
1356 |
-
'default' => 'no',
|
1357 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
1358 |
-
'desc' => __( 'Play video automatically when page is loaded', 'shortcodes-ultimate' )
|
1359 |
-
),
|
1360 |
-
'class' => array(
|
1361 |
-
'type' => 'extra_css_class',
|
1362 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1363 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1364 |
-
'default' => '',
|
1365 |
-
),
|
1366 |
-
),
|
1367 |
-
'desc' => __( 'YouTube video', 'shortcodes-ultimate' ),
|
1368 |
-
'example' => 'media',
|
1369 |
-
'icon' => 'youtube-play',
|
1370 |
-
'image' => $images_url . 'youtube.svg',
|
1371 |
-
),
|
1372 |
-
// youtube_advanced
|
1373 |
-
'youtube_advanced' => array(
|
1374 |
-
'name' => __( 'YouTube advanced', 'shortcodes-ultimate' ),
|
1375 |
-
'type' => 'single',
|
1376 |
-
'group' => 'media',
|
1377 |
-
'atts' => array(
|
1378 |
-
'url' => array(
|
1379 |
-
'values' => array( ),
|
1380 |
-
'default' => '',
|
1381 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
1382 |
-
'desc' => __( 'Url of YouTube page with video. Ex: http://youtube.com/watch?v=XXXXXX', 'shortcodes-ultimate' )
|
1383 |
-
),
|
1384 |
-
'playlist' => array(
|
1385 |
-
'default' => '',
|
1386 |
-
'name' => __( 'Playlist', 'shortcodes-ultimate' ),
|
1387 |
-
'desc' => __( 'Value is a comma-separated list of video IDs to play. If you specify a value, the first video that plays will be the VIDEO_ID specified in the URL path, and the videos specified in the playlist parameter will play thereafter', 'shortcodes-ultimate' )
|
1388 |
-
),
|
1389 |
-
'width' => array(
|
1390 |
-
'type' => 'slider',
|
1391 |
-
'min' => 200,
|
1392 |
-
'max' => 1600,
|
1393 |
-
'step' => 20,
|
1394 |
-
'default' => 600,
|
1395 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1396 |
-
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
1397 |
-
),
|
1398 |
-
'height' => array(
|
1399 |
-
'type' => 'slider',
|
1400 |
-
'min' => 200,
|
1401 |
-
'max' => 1600,
|
1402 |
-
'step' => 20,
|
1403 |
-
'default' => 400,
|
1404 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1405 |
-
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
1406 |
-
),
|
1407 |
-
'responsive' => array(
|
1408 |
-
'type' => 'bool',
|
1409 |
-
'default' => 'yes',
|
1410 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
1411 |
-
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
1412 |
-
),
|
1413 |
-
'controls' => array(
|
1414 |
-
'type' => 'select',
|
1415 |
-
'values' => array(
|
1416 |
-
'no' => __( '0 - Hide controls', 'shortcodes-ultimate' ),
|
1417 |
-
'yes' => __( '1 - Show controls', 'shortcodes-ultimate' ),
|
1418 |
-
'alt' => __( '2 - Show controls when playback is started', 'shortcodes-ultimate' )
|
1419 |
-
),
|
1420 |
-
'default' => 'yes',
|
1421 |
-
'name' => __( 'Controls', 'shortcodes-ultimate' ),
|
1422 |
-
'desc' => __( 'This parameter indicates whether the video player controls will display', 'shortcodes-ultimate' )
|
1423 |
-
),
|
1424 |
-
'autohide' => array(
|
1425 |
-
'type' => 'select',
|
1426 |
-
'values' => array(
|
1427 |
-
'no' => __( '0 - Do not hide controls', 'shortcodes-ultimate' ),
|
1428 |
-
'yes' => __( '1 - Hide all controls on mouse out', 'shortcodes-ultimate' ),
|
1429 |
-
'alt' => __( '2 - Hide progress bar on mouse out', 'shortcodes-ultimate' )
|
1430 |
-
),
|
1431 |
-
'default' => 'alt',
|
1432 |
-
'name' => __( 'Autohide', 'shortcodes-ultimate' ),
|
1433 |
-
'desc' => __( 'This parameter indicates whether the video controls will automatically hide after a video begins playing', 'shortcodes-ultimate' )
|
1434 |
-
),
|
1435 |
-
'showinfo' => array(
|
1436 |
-
'type' => 'bool',
|
1437 |
-
'default' => 'yes',
|
1438 |
-
'name' => __( 'Show title bar', 'shortcodes-ultimate' ),
|
1439 |
-
'desc' => __( 'If you set the parameter value to NO, then the player will not display information like the video title and uploader before the video starts playing.', 'shortcodes-ultimate' )
|
1440 |
-
),
|
1441 |
-
'autoplay' => array(
|
1442 |
-
'type' => 'bool',
|
1443 |
-
'default' => 'no',
|
1444 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
1445 |
-
'desc' => __( 'Play video automatically when page is loaded', 'shortcodes-ultimate' )
|
1446 |
-
),
|
1447 |
-
'loop' => array(
|
1448 |
-
'type' => 'bool',
|
1449 |
-
'default' => 'no',
|
1450 |
-
'name' => __( 'Loop', 'shortcodes-ultimate' ),
|
1451 |
-
'desc' => __( 'Setting of YES will cause the player to play the initial video again and again', 'shortcodes-ultimate' )
|
1452 |
-
),
|
1453 |
-
'rel' => array(
|
1454 |
-
'type' => 'bool',
|
1455 |
-
'default' => 'yes',
|
1456 |
-
'name' => __( 'Related videos', 'shortcodes-ultimate' ),
|
1457 |
-
'desc' => __( 'This parameter indicates whether the player should show related videos when playback of the initial video ends', 'shortcodes-ultimate' )
|
1458 |
-
),
|
1459 |
-
'fs' => array(
|
1460 |
-
'type' => 'bool',
|
1461 |
-
'default' => 'yes',
|
1462 |
-
'name' => __( 'Show full-screen button', 'shortcodes-ultimate' ),
|
1463 |
-
'desc' => __( 'Setting this parameter to NO prevents the fullscreen button from displaying', 'shortcodes-ultimate' )
|
1464 |
-
),
|
1465 |
-
'modestbranding' => array(
|
1466 |
-
'type' => 'bool',
|
1467 |
-
'default' => 'no',
|
1468 |
-
'name' => 'modestbranding',
|
1469 |
-
'desc' => __( 'This parameter lets you use a YouTube player that does not show a YouTube logo. Set the parameter value to YES to prevent the YouTube logo from displaying in the control bar. Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user\'s mouse pointer hovers over the player', 'shortcodes-ultimate' )
|
1470 |
-
),
|
1471 |
-
'theme' => array(
|
1472 |
-
'type' => 'select',
|
1473 |
-
'values' => array(
|
1474 |
-
'dark' => __( 'Dark theme', 'shortcodes-ultimate' ),
|
1475 |
-
'light' => __( 'Light theme', 'shortcodes-ultimate' )
|
1476 |
-
),
|
1477 |
-
'default' => 'dark',
|
1478 |
-
'name' => __( 'Theme', 'shortcodes-ultimate' ),
|
1479 |
-
'desc' => __( 'This parameter indicates whether the embedded player will display player controls (like a play button or volume control) within a dark or light control bar', 'shortcodes-ultimate' )
|
1480 |
-
),
|
1481 |
-
'https' => array(
|
1482 |
-
'type' => 'bool',
|
1483 |
-
'default' => 'no',
|
1484 |
-
'name' => __( 'Force HTTPS', 'shortcodes-ultimate' ),
|
1485 |
-
'desc' => __( 'Use HTTPS in player iframe', 'shortcodes-ultimate' )
|
1486 |
-
),
|
1487 |
-
'wmode' => array(
|
1488 |
-
'default' => '',
|
1489 |
-
'name' => __( 'WMode', 'shortcodes-ultimate' ),
|
1490 |
-
'desc' => sprintf( __( 'Here you can specify wmode value for the embed URL. %s Example values: %s, %s', 'shortcodes-ultimate' ), '<br>', '<b%value>transparent</b>', '<b%value>opaque</b>' )
|
1491 |
-
),
|
1492 |
-
'playsinline' => array(
|
1493 |
-
'type' => 'bool',
|
1494 |
-
'default' => 'no',
|
1495 |
-
'name' => __( 'Plays inline', 'shortcodes-ultimate' ),
|
1496 |
-
'desc' => __( 'This parameter controls whether videos play inline or fullscreen in an HTML5 player on iOS', 'shortcodes-ultimate' )
|
1497 |
-
),
|
1498 |
-
'class' => array(
|
1499 |
-
'type' => 'extra_css_class',
|
1500 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1501 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1502 |
-
'default' => '',
|
1503 |
-
),
|
1504 |
-
),
|
1505 |
-
'desc' => __( 'YouTube video player with advanced settings', 'shortcodes-ultimate' ),
|
1506 |
-
'example' => 'media',
|
1507 |
-
'icon' => 'youtube-play',
|
1508 |
-
'image' => $images_url . 'youtube_advanced.svg',
|
1509 |
-
),
|
1510 |
-
// vimeo
|
1511 |
-
'vimeo' => array(
|
1512 |
-
'name' => __( 'Vimeo', 'shortcodes-ultimate' ),
|
1513 |
-
'type' => 'single',
|
1514 |
-
'group' => 'media',
|
1515 |
-
'atts' => array(
|
1516 |
-
'url' => array(
|
1517 |
-
'values' => array( ),
|
1518 |
-
'default' => '',
|
1519 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ), 'desc' => __( 'Url of Vimeo page with video', 'shortcodes-ultimate' )
|
1520 |
-
),
|
1521 |
-
'width' => array(
|
1522 |
-
'type' => 'slider',
|
1523 |
-
'min' => 200,
|
1524 |
-
'max' => 1600,
|
1525 |
-
'step' => 20,
|
1526 |
-
'default' => 600,
|
1527 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1528 |
-
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
1529 |
-
),
|
1530 |
-
'height' => array(
|
1531 |
-
'type' => 'slider',
|
1532 |
-
'min' => 200,
|
1533 |
-
'max' => 1600,
|
1534 |
-
'step' => 20,
|
1535 |
-
'default' => 400,
|
1536 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1537 |
-
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
1538 |
-
),
|
1539 |
-
'responsive' => array(
|
1540 |
-
'type' => 'bool',
|
1541 |
-
'default' => 'yes',
|
1542 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
1543 |
-
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
1544 |
-
),
|
1545 |
-
'autoplay' => array(
|
1546 |
-
'type' => 'bool',
|
1547 |
-
'default' => 'no',
|
1548 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
1549 |
-
'desc' => __( 'Play video automatically when page is loaded', 'shortcodes-ultimate' )
|
1550 |
-
),
|
1551 |
-
'class' => array(
|
1552 |
-
'type' => 'extra_css_class',
|
1553 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1554 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1555 |
-
'default' => '',
|
1556 |
-
),
|
1557 |
-
),
|
1558 |
-
'desc' => __( 'Vimeo video', 'shortcodes-ultimate' ),
|
1559 |
-
'example' => 'media',
|
1560 |
-
'icon' => 'youtube-play',
|
1561 |
-
'image' => $images_url . 'vimeo.svg',
|
1562 |
-
),
|
1563 |
-
// screenr
|
1564 |
-
'screenr' => array(
|
1565 |
-
'deprecated' => true,
|
1566 |
-
'name' => __( 'Screenr', 'shortcodes-ultimate' ),
|
1567 |
-
'type' => 'single',
|
1568 |
-
'group' => 'media',
|
1569 |
-
'atts' => array(
|
1570 |
-
'url' => array(
|
1571 |
-
'default' => '',
|
1572 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
1573 |
-
'desc' => __( 'Url of Screenr page with video', 'shortcodes-ultimate' )
|
1574 |
-
),
|
1575 |
-
'width' => array(
|
1576 |
-
'type' => 'slider',
|
1577 |
-
'min' => 200,
|
1578 |
-
'max' => 1600,
|
1579 |
-
'step' => 20,
|
1580 |
-
'default' => 600,
|
1581 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1582 |
-
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
1583 |
-
),
|
1584 |
-
'height' => array(
|
1585 |
-
'type' => 'slider',
|
1586 |
-
'min' => 200,
|
1587 |
-
'max' => 1600,
|
1588 |
-
'step' => 20,
|
1589 |
-
'default' => 400,
|
1590 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1591 |
-
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
1592 |
-
),
|
1593 |
-
'responsive' => array(
|
1594 |
-
'type' => 'bool',
|
1595 |
-
'default' => 'yes',
|
1596 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
1597 |
-
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
1598 |
-
),
|
1599 |
-
'class' => array(
|
1600 |
-
'default' => '',
|
1601 |
-
'name' => __( 'Class', 'shortcodes-ultimate' ),
|
1602 |
-
'desc' => __( 'Extra CSS class', 'shortcodes-ultimate' )
|
1603 |
-
)
|
1604 |
-
),
|
1605 |
-
'desc' => __( 'Screenr video', 'shortcodes-ultimate' ),
|
1606 |
-
'icon' => 'youtube-play'
|
1607 |
-
),
|
1608 |
-
// dailymotion
|
1609 |
-
'dailymotion' => array(
|
1610 |
-
'name' => __( 'Dailymotion', 'shortcodes-ultimate' ),
|
1611 |
-
'type' => 'single',
|
1612 |
-
'group' => 'media',
|
1613 |
-
'atts' => array(
|
1614 |
-
'url' => array(
|
1615 |
-
'default' => '',
|
1616 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
1617 |
-
'desc' => __( 'Url of Dailymotion page with video', 'shortcodes-ultimate' )
|
1618 |
-
),
|
1619 |
-
'width' => array(
|
1620 |
-
'type' => 'slider',
|
1621 |
-
'min' => 200,
|
1622 |
-
'max' => 1600,
|
1623 |
-
'step' => 20,
|
1624 |
-
'default' => 600,
|
1625 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1626 |
-
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
1627 |
-
),
|
1628 |
-
'height' => array(
|
1629 |
-
'type' => 'slider',
|
1630 |
-
'min' => 200,
|
1631 |
-
'max' => 1600,
|
1632 |
-
'step' => 20,
|
1633 |
-
'default' => 400,
|
1634 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1635 |
-
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
1636 |
-
),
|
1637 |
-
'responsive' => array(
|
1638 |
-
'type' => 'bool',
|
1639 |
-
'default' => 'yes',
|
1640 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
1641 |
-
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
1642 |
-
),
|
1643 |
-
'autoplay' => array(
|
1644 |
-
'type' => 'bool',
|
1645 |
-
'default' => 'no',
|
1646 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
1647 |
-
'desc' => __( 'Start the playback of the video automatically after the player load. May not work on some mobile OS versions', 'shortcodes-ultimate' )
|
1648 |
-
),
|
1649 |
-
'background' => array(
|
1650 |
-
'type' => 'color',
|
1651 |
-
'default' => '#FFC300',
|
1652 |
-
'name' => __( 'Background color', 'shortcodes-ultimate' ),
|
1653 |
-
'desc' => __( 'HTML color of the background of controls elements', 'shortcodes-ultimate' )
|
1654 |
-
),
|
1655 |
-
'foreground' => array(
|
1656 |
-
'type' => 'color',
|
1657 |
-
'default' => '#F7FFFD',
|
1658 |
-
'name' => __( 'Foreground color', 'shortcodes-ultimate' ),
|
1659 |
-
'desc' => __( 'HTML color of the foreground of controls elements', 'shortcodes-ultimate' )
|
1660 |
-
),
|
1661 |
-
'highlight' => array(
|
1662 |
-
'type' => 'color',
|
1663 |
-
'default' => '#171D1B',
|
1664 |
-
'name' => __( 'Highlight color', 'shortcodes-ultimate' ),
|
1665 |
-
'desc' => __( 'HTML color of the controls elements\' highlights', 'shortcodes-ultimate' )
|
1666 |
-
),
|
1667 |
-
'logo' => array(
|
1668 |
-
'type' => 'bool',
|
1669 |
-
'default' => 'yes',
|
1670 |
-
'name' => __( 'Show logo', 'shortcodes-ultimate' ),
|
1671 |
-
'desc' => __( 'Allows to hide or show the Dailymotion logo', 'shortcodes-ultimate' )
|
1672 |
-
),
|
1673 |
-
'quality' => array(
|
1674 |
-
'type' => 'select',
|
1675 |
-
'values' => array(
|
1676 |
-
'240' => '240',
|
1677 |
-
'380' => '380',
|
1678 |
-
'480' => '480',
|
1679 |
-
'720' => '720',
|
1680 |
-
'1080' => '1080'
|
1681 |
-
),
|
1682 |
-
'default' => '380',
|
1683 |
-
'name' => __( 'Quality', 'shortcodes-ultimate' ),
|
1684 |
-
'desc' => __( 'Determines the quality that must be played by default if available', 'shortcodes-ultimate' )
|
1685 |
-
),
|
1686 |
-
'related' => array(
|
1687 |
-
'type' => 'bool',
|
1688 |
-
'default' => 'yes',
|
1689 |
-
'name' => __( 'Show related videos', 'shortcodes-ultimate' ),
|
1690 |
-
'desc' => __( 'Show related videos at the end of the video', 'shortcodes-ultimate' )
|
1691 |
-
),
|
1692 |
-
'info' => array(
|
1693 |
-
'type' => 'bool',
|
1694 |
-
'default' => 'yes',
|
1695 |
-
'name' => __( 'Show video info', 'shortcodes-ultimate' ),
|
1696 |
-
'desc' => __( 'Show videos info (title/author) on the start screen', 'shortcodes-ultimate' )
|
1697 |
-
),
|
1698 |
-
'class' => array(
|
1699 |
-
'type' => 'extra_css_class',
|
1700 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1701 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1702 |
-
'default' => '',
|
1703 |
-
),
|
1704 |
-
),
|
1705 |
-
'desc' => __( 'Dailymotion video', 'shortcodes-ultimate' ),
|
1706 |
-
'icon' => 'youtube-play',
|
1707 |
-
'image' => $images_url . 'dailymotion.svg',
|
1708 |
-
),
|
1709 |
-
// audio
|
1710 |
-
'audio' => array(
|
1711 |
-
'name' => __( 'Audio', 'shortcodes-ultimate' ),
|
1712 |
-
'type' => 'single',
|
1713 |
-
'group' => 'media',
|
1714 |
-
'atts' => array(
|
1715 |
-
'url' => array(
|
1716 |
-
'type' => 'upload',
|
1717 |
-
'default' => '',
|
1718 |
-
'name' => __( 'File', 'shortcodes-ultimate' ),
|
1719 |
-
'desc' => __( 'Audio file url. Supported formats: mp3, ogg', 'shortcodes-ultimate' )
|
1720 |
-
),
|
1721 |
-
'width' => array(
|
1722 |
-
'values' => array(),
|
1723 |
-
'default' => '100%',
|
1724 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1725 |
-
'desc' => __( 'Player width. You can specify width in percents and player will be responsive. Example values: <b%value>200px</b>, <b%value>100%</b>', 'shortcodes-ultimate' )
|
1726 |
-
),
|
1727 |
-
'autoplay' => array(
|
1728 |
-
'type' => 'bool',
|
1729 |
-
'default' => 'no',
|
1730 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
1731 |
-
'desc' => __( 'Play file automatically when page is loaded', 'shortcodes-ultimate' )
|
1732 |
-
),
|
1733 |
-
'loop' => array(
|
1734 |
-
'type' => 'bool',
|
1735 |
-
'default' => 'no',
|
1736 |
-
'name' => __( 'Loop', 'shortcodes-ultimate' ),
|
1737 |
-
'desc' => __( 'Repeat when playback is ended', 'shortcodes-ultimate' )
|
1738 |
-
),
|
1739 |
-
'class' => array(
|
1740 |
-
'type' => 'extra_css_class',
|
1741 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1742 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1743 |
-
'default' => '',
|
1744 |
-
),
|
1745 |
-
),
|
1746 |
-
'desc' => __( 'Custom audio player', 'shortcodes-ultimate' ),
|
1747 |
-
'example' => 'media',
|
1748 |
-
'icon' => 'play-circle',
|
1749 |
-
'image' => $images_url . 'audio.svg',
|
1750 |
-
),
|
1751 |
-
// video
|
1752 |
-
'video' => array(
|
1753 |
-
'name' => __( 'Video', 'shortcodes-ultimate' ),
|
1754 |
-
'type' => 'single',
|
1755 |
-
'group' => 'media',
|
1756 |
-
'atts' => array(
|
1757 |
-
'url' => array(
|
1758 |
-
'type' => 'upload',
|
1759 |
-
'default' => '',
|
1760 |
-
'name' => __( 'File', 'shortcodes-ultimate' ),
|
1761 |
-
'desc' => __( 'Url to mp4/flv video-file', 'shortcodes-ultimate' )
|
1762 |
-
),
|
1763 |
-
'poster' => array(
|
1764 |
-
'type' => 'upload',
|
1765 |
-
'default' => '',
|
1766 |
-
'name' => __( 'Poster', 'shortcodes-ultimate' ),
|
1767 |
-
'desc' => __( 'Url to poster image, that will be shown before playback', 'shortcodes-ultimate' )
|
1768 |
-
),
|
1769 |
-
'title' => array(
|
1770 |
-
'values' => array( ),
|
1771 |
-
'default' => '',
|
1772 |
-
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
1773 |
-
'desc' => __( 'Player title', 'shortcodes-ultimate' )
|
1774 |
-
),
|
1775 |
-
'width' => array(
|
1776 |
-
'type' => 'slider',
|
1777 |
-
'min' => 200,
|
1778 |
-
'max' => 1600,
|
1779 |
-
'step' => 20,
|
1780 |
-
'default' => 600,
|
1781 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
1782 |
-
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
1783 |
-
),
|
1784 |
-
'height' => array(
|
1785 |
-
'type' => 'slider',
|
1786 |
-
'min' => 200,
|
1787 |
-
'max' => 1600,
|
1788 |
-
'step' => 20,
|
1789 |
-
'default' => 300,
|
1790 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
1791 |
-
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
1792 |
-
),
|
1793 |
-
'controls' => array(
|
1794 |
-
'type' => 'bool',
|
1795 |
-
'default' => 'yes',
|
1796 |
-
'name' => __( 'Controls', 'shortcodes-ultimate' ),
|
1797 |
-
'desc' => __( 'Show player controls (play/pause etc.) or not', 'shortcodes-ultimate' )
|
1798 |
-
),
|
1799 |
-
'autoplay' => array(
|
1800 |
-
'type' => 'bool',
|
1801 |
-
'default' => 'no',
|
1802 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
1803 |
-
'desc' => __( 'Play file automatically when page is loaded', 'shortcodes-ultimate' )
|
1804 |
-
),
|
1805 |
-
'loop' => array(
|
1806 |
-
'type' => 'bool',
|
1807 |
-
'default' => 'no',
|
1808 |
-
'name' => __( 'Loop', 'shortcodes-ultimate' ),
|
1809 |
-
'desc' => __( 'Repeat when playback is ended', 'shortcodes-ultimate' )
|
1810 |
-
),
|
1811 |
-
'class' => array(
|
1812 |
-
'type' => 'extra_css_class',
|
1813 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1814 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1815 |
-
'default' => '',
|
1816 |
-
),
|
1817 |
-
),
|
1818 |
-
'desc' => __( 'Custom video player', 'shortcodes-ultimate' ),
|
1819 |
-
'example' => 'media',
|
1820 |
-
'icon' => 'play-circle',
|
1821 |
-
'image' => $images_url . 'video.svg',
|
1822 |
-
),
|
1823 |
-
// table
|
1824 |
-
'table' => array(
|
1825 |
-
'name' => __( 'Table', 'shortcodes-ultimate' ),
|
1826 |
-
'type' => 'wrap',
|
1827 |
-
'group' => 'content',
|
1828 |
-
'atts' => array(
|
1829 |
-
'url' => array(
|
1830 |
-
'type' => 'upload',
|
1831 |
-
'default' => '',
|
1832 |
-
'name' => __( 'CSV file', 'shortcodes-ultimate' ),
|
1833 |
-
'desc' => __( 'Upload CSV file if you want to create HTML-table from file', 'shortcodes-ultimate' )
|
1834 |
-
),
|
1835 |
-
'responsive' => array(
|
1836 |
-
'type' => 'bool',
|
1837 |
-
'default' => 'no',
|
1838 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
1839 |
-
'desc' => __( 'Add horizontal scrollbar if table width larger than page width', 'shortcodes-ultimate' )
|
1840 |
-
),
|
1841 |
-
'class' => array(
|
1842 |
-
'type' => 'extra_css_class',
|
1843 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1844 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1845 |
-
'default' => '',
|
1846 |
-
),
|
1847 |
-
),
|
1848 |
-
'content' => __( "<table>\n<tr>\n\t<td>Table</td>\n\t<td>Table</td>\n</tr>\n<tr>\n\t<td>Table</td>\n\t<td>Table</td>\n</tr>\n</table>", 'shortcodes-ultimate' ),
|
1849 |
-
'desc' => __( 'Styled table from HTML or CSV file', 'shortcodes-ultimate' ),
|
1850 |
-
'icon' => 'table',
|
1851 |
-
'image' => $images_url . 'table.svg',
|
1852 |
-
),
|
1853 |
-
// permalink
|
1854 |
-
'permalink' => array(
|
1855 |
-
'name' => __( 'Permalink', 'shortcodes-ultimate' ),
|
1856 |
-
'type' => 'mixed',
|
1857 |
-
'group' => 'content other',
|
1858 |
-
'atts' => array(
|
1859 |
-
'id' => array(
|
1860 |
-
'values' => array( ), 'default' => 1,
|
1861 |
-
'name' => __( 'ID', 'shortcodes-ultimate' ),
|
1862 |
-
'desc' => __( 'Post or page ID', 'shortcodes-ultimate' )
|
1863 |
-
),
|
1864 |
-
'target' => array(
|
1865 |
-
'type' => 'select',
|
1866 |
-
'values' => array(
|
1867 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
1868 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
1869 |
-
),
|
1870 |
-
'default' => 'self',
|
1871 |
-
'name' => __( 'Target', 'shortcodes-ultimate' ),
|
1872 |
-
'desc' => __( 'Link target', 'shortcodes-ultimate' )
|
1873 |
-
),
|
1874 |
-
'class' => array(
|
1875 |
-
'type' => 'extra_css_class',
|
1876 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1877 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1878 |
-
'default' => '',
|
1879 |
-
),
|
1880 |
-
),
|
1881 |
-
'content' => '',
|
1882 |
-
'desc' => __( 'Permalink to specified post/page', 'shortcodes-ultimate' ),
|
1883 |
-
'icon' => 'link',
|
1884 |
-
'image' => $images_url . 'permalink.svg',
|
1885 |
-
),
|
1886 |
-
// members
|
1887 |
-
'members' => array(
|
1888 |
-
'name' => __( 'Members', 'shortcodes-ultimate' ),
|
1889 |
-
'type' => 'wrap',
|
1890 |
-
'group' => 'other',
|
1891 |
-
'atts' => array(
|
1892 |
-
'message' => array(
|
1893 |
-
'default' => __( 'This content is for registered users only. Please %login%.', 'shortcodes-ultimate' ),
|
1894 |
-
'name' => __( 'Message', 'shortcodes-ultimate' ), 'desc' => __( 'Message for not logged users', 'shortcodes-ultimate' )
|
1895 |
-
),
|
1896 |
-
'color' => array(
|
1897 |
-
'type' => 'color',
|
1898 |
-
'default' => '#ffcc00',
|
1899 |
-
'name' => __( 'Box color', 'shortcodes-ultimate' ), 'desc' => __( 'This color will applied only to box for not logged users', 'shortcodes-ultimate' )
|
1900 |
-
),
|
1901 |
-
'login_text' => array(
|
1902 |
-
'default' => __( 'login', 'shortcodes-ultimate' ),
|
1903 |
-
'name' => __( 'Login link text', 'shortcodes-ultimate' ), 'desc' => __( 'Text for the login link', 'shortcodes-ultimate' )
|
1904 |
-
),
|
1905 |
-
'login_url' => array(
|
1906 |
-
'default' => wp_login_url(),
|
1907 |
-
'name' => __( 'Login link url', 'shortcodes-ultimate' ), 'desc' => __( 'Login link url', 'shortcodes-ultimate' )
|
1908 |
-
),
|
1909 |
-
'class' => array(
|
1910 |
-
'type' => 'extra_css_class',
|
1911 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1912 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1913 |
-
'default' => '',
|
1914 |
-
),
|
1915 |
-
),
|
1916 |
-
'content' => __( 'Content for logged members', 'shortcodes-ultimate' ),
|
1917 |
-
'desc' => __( 'Content for logged in members only', 'shortcodes-ultimate' ),
|
1918 |
-
'icon' => 'lock',
|
1919 |
-
'image' => $images_url . 'members.svg',
|
1920 |
-
),
|
1921 |
-
// guests
|
1922 |
-
'guests' => array(
|
1923 |
-
'name' => __( 'Guests', 'shortcodes-ultimate' ),
|
1924 |
-
'type' => 'wrap',
|
1925 |
-
'group' => 'other',
|
1926 |
-
'atts' => array(
|
1927 |
-
'class' => array(
|
1928 |
-
'type' => 'extra_css_class',
|
1929 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1930 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1931 |
-
'default' => '',
|
1932 |
-
),
|
1933 |
-
),
|
1934 |
-
'content' => __( 'This content will be available only for non-logged visitors', 'shortcodes-ultimate' ),
|
1935 |
-
'desc' => __( 'Content for guests only', 'shortcodes-ultimate' ),
|
1936 |
-
'icon' => 'user',
|
1937 |
-
'image' => $images_url . 'guests.svg',
|
1938 |
-
),
|
1939 |
-
// feed
|
1940 |
-
'feed' => array(
|
1941 |
-
'name' => __( 'RSS feed', 'shortcodes-ultimate' ),
|
1942 |
-
'type' => 'single',
|
1943 |
-
'group' => 'content other',
|
1944 |
-
'atts' => array(
|
1945 |
-
'url' => array(
|
1946 |
-
'values' => array( ),
|
1947 |
-
'default' => '',
|
1948 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
1949 |
-
'desc' => __( 'Url to RSS-feed', 'shortcodes-ultimate' )
|
1950 |
-
),
|
1951 |
-
'limit' => array(
|
1952 |
-
'type' => 'slider',
|
1953 |
-
'min' => 1,
|
1954 |
-
'max' => 20,
|
1955 |
-
'step' => 1,
|
1956 |
-
'default' => 3,
|
1957 |
-
'name' => __( 'Limit', 'shortcodes-ultimate' ), 'desc' => __( 'Number of items to show', 'shortcodes-ultimate' )
|
1958 |
-
),
|
1959 |
-
'class' => array(
|
1960 |
-
'type' => 'extra_css_class',
|
1961 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1962 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1963 |
-
'default' => '',
|
1964 |
-
),
|
1965 |
-
),
|
1966 |
-
'desc' => __( 'Feed grabber', 'shortcodes-ultimate' ),
|
1967 |
-
'icon' => 'rss',
|
1968 |
-
'image' => $images_url . 'feed.svg',
|
1969 |
-
),
|
1970 |
-
// menu
|
1971 |
-
'menu' => array(
|
1972 |
-
'name' => __( 'Menu', 'shortcodes-ultimate' ),
|
1973 |
-
'type' => 'single',
|
1974 |
-
'group' => 'other',
|
1975 |
-
'atts' => array(
|
1976 |
-
'name' => array(
|
1977 |
-
'values' => array( ),
|
1978 |
-
'default' => '',
|
1979 |
-
'name' => __( 'Menu name', 'shortcodes-ultimate' ), 'desc' => __( 'Custom menu name. Ex: Main menu', 'shortcodes-ultimate' )
|
1980 |
-
),
|
1981 |
-
'class' => array(
|
1982 |
-
'type' => 'extra_css_class',
|
1983 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
1984 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
1985 |
-
'default' => '',
|
1986 |
-
),
|
1987 |
-
),
|
1988 |
-
'desc' => __( 'Custom menu by name', 'shortcodes-ultimate' ),
|
1989 |
-
'icon' => 'bars',
|
1990 |
-
'image' => $images_url . 'menu.svg',
|
1991 |
-
),
|
1992 |
-
// subpages
|
1993 |
-
'subpages' => array(
|
1994 |
-
'name' => __( 'Sub pages', 'shortcodes-ultimate' ),
|
1995 |
-
'type' => 'single',
|
1996 |
-
'group' => 'other',
|
1997 |
-
'atts' => array(
|
1998 |
-
'depth' => array(
|
1999 |
-
'type' => 'select',
|
2000 |
-
'values' => array( 1, 2, 3, 4, 5 ), 'default' => 1,
|
2001 |
-
'name' => __( 'Depth', 'shortcodes-ultimate' ),
|
2002 |
-
'desc' => __( 'Max depth level of children pages', 'shortcodes-ultimate' )
|
2003 |
-
),
|
2004 |
-
'p' => array(
|
2005 |
-
'values' => array( ),
|
2006 |
-
'default' => '',
|
2007 |
-
'name' => __( 'Parent ID', 'shortcodes-ultimate' ),
|
2008 |
-
'desc' => __( 'ID of the parent page. Leave blank to use current page', 'shortcodes-ultimate' )
|
2009 |
-
),
|
2010 |
-
'class' => array(
|
2011 |
-
'type' => 'extra_css_class',
|
2012 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2013 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2014 |
-
'default' => '',
|
2015 |
-
),
|
2016 |
-
),
|
2017 |
-
'desc' => __( 'List of sub pages', 'shortcodes-ultimate' ),
|
2018 |
-
'icon' => 'bars',
|
2019 |
-
'image' => $images_url . 'subpages.svg',
|
2020 |
-
),
|
2021 |
-
// siblings
|
2022 |
-
'siblings' => array(
|
2023 |
-
'name' => __( 'Siblings', 'shortcodes-ultimate' ),
|
2024 |
-
'type' => 'single',
|
2025 |
-
'group' => 'other',
|
2026 |
-
'atts' => array(
|
2027 |
-
'depth' => array(
|
2028 |
-
'type' => 'select',
|
2029 |
-
'values' => array( 1, 2, 3 ), 'default' => 1,
|
2030 |
-
'name' => __( 'Depth', 'shortcodes-ultimate' ),
|
2031 |
-
'desc' => __( 'Max depth level', 'shortcodes-ultimate' )
|
2032 |
-
),
|
2033 |
-
'class' => array(
|
2034 |
-
'type' => 'extra_css_class',
|
2035 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2036 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2037 |
-
'default' => '',
|
2038 |
-
),
|
2039 |
-
),
|
2040 |
-
'desc' => __( 'List of cureent page siblings', 'shortcodes-ultimate' ),
|
2041 |
-
'icon' => 'bars',
|
2042 |
-
'image' => $images_url . 'siblings.svg',
|
2043 |
-
),
|
2044 |
-
// document
|
2045 |
-
'document' => array(
|
2046 |
-
'name' => __( 'Document', 'shortcodes-ultimate' ),
|
2047 |
-
'type' => 'single',
|
2048 |
-
'group' => 'media',
|
2049 |
-
'atts' => array(
|
2050 |
-
'url' => array(
|
2051 |
-
'type' => 'upload',
|
2052 |
-
'default' => '',
|
2053 |
-
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
2054 |
-
'desc' => __( 'Url to uploaded document. Supported formats: doc, xls, pdf etc.', 'shortcodes-ultimate' )
|
2055 |
-
),
|
2056 |
-
'width' => array(
|
2057 |
-
'type' => 'slider',
|
2058 |
-
'min' => 200,
|
2059 |
-
'max' => 1600,
|
2060 |
-
'step' => 20,
|
2061 |
-
'default' => 600,
|
2062 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
2063 |
-
'desc' => __( 'Viewer width', 'shortcodes-ultimate' )
|
2064 |
-
),
|
2065 |
-
'height' => array(
|
2066 |
-
'type' => 'slider',
|
2067 |
-
'min' => 200,
|
2068 |
-
'max' => 1600,
|
2069 |
-
'step' => 20,
|
2070 |
-
'default' => 600,
|
2071 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
2072 |
-
'desc' => __( 'Viewer height', 'shortcodes-ultimate' )
|
2073 |
-
),
|
2074 |
-
'responsive' => array(
|
2075 |
-
'type' => 'bool',
|
2076 |
-
'default' => 'yes',
|
2077 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
2078 |
-
'desc' => __( 'Ignore width and height parameters and make viewer responsive', 'shortcodes-ultimate' )
|
2079 |
-
),
|
2080 |
-
'class' => array(
|
2081 |
-
'type' => 'extra_css_class',
|
2082 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2083 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2084 |
-
'default' => '',
|
2085 |
-
),
|
2086 |
-
),
|
2087 |
-
'desc' => __( 'Document viewer by Google', 'shortcodes-ultimate' ),
|
2088 |
-
'icon' => 'file-text',
|
2089 |
-
'image' => $images_url . 'document.svg',
|
2090 |
-
),
|
2091 |
-
// gmap
|
2092 |
-
'gmap' => array(
|
2093 |
-
'name' => __( 'Google map', 'shortcodes-ultimate' ),
|
2094 |
-
'type' => 'single',
|
2095 |
-
'group' => 'media',
|
2096 |
-
'atts' => array(
|
2097 |
-
'width' => array(
|
2098 |
-
'type' => 'slider',
|
2099 |
-
'min' => 200,
|
2100 |
-
'max' => 1600,
|
2101 |
-
'step' => 20,
|
2102 |
-
'default' => 600,
|
2103 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
2104 |
-
'desc' => __( 'Map width', 'shortcodes-ultimate' )
|
2105 |
-
),
|
2106 |
-
'height' => array(
|
2107 |
-
'type' => 'slider',
|
2108 |
-
'min' => 200,
|
2109 |
-
'max' => 1600,
|
2110 |
-
'step' => 20,
|
2111 |
-
'default' => 400,
|
2112 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
2113 |
-
'desc' => __( 'Map height', 'shortcodes-ultimate' )
|
2114 |
-
),
|
2115 |
-
'responsive' => array(
|
2116 |
-
'type' => 'bool',
|
2117 |
-
'default' => 'yes',
|
2118 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
2119 |
-
'desc' => __( 'Ignore width and height parameters and make map responsive', 'shortcodes-ultimate' )
|
2120 |
-
),
|
2121 |
-
'address' => array(
|
2122 |
-
'values' => array( ),
|
2123 |
-
'default' => '',
|
2124 |
-
'name' => __( 'Marker', 'shortcodes-ultimate' ),
|
2125 |
-
'desc' => __( 'Address for the marker. You can type it in any language', 'shortcodes-ultimate' )
|
2126 |
-
),
|
2127 |
-
'class' => array(
|
2128 |
-
'type' => 'extra_css_class',
|
2129 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2130 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2131 |
-
'default' => '',
|
2132 |
-
),
|
2133 |
-
),
|
2134 |
-
'desc' => __( 'Maps by Google', 'shortcodes-ultimate' ),
|
2135 |
-
'icon' => 'globe',
|
2136 |
-
'image' => $images_url . 'gmap.svg',
|
2137 |
-
),
|
2138 |
-
// slider
|
2139 |
-
'slider' => array(
|
2140 |
-
'name' => __( 'Slider', 'shortcodes-ultimate' ),
|
2141 |
-
'type' => 'single',
|
2142 |
-
'group' => 'gallery',
|
2143 |
-
'atts' => array(
|
2144 |
-
'source' => array(
|
2145 |
-
'type' => 'image_source',
|
2146 |
-
'default' => 'none',
|
2147 |
-
'name' => __( 'Source', 'shortcodes-ultimate' ),
|
2148 |
-
'desc' => __( 'Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'shortcodes-ultimate' )
|
2149 |
-
),
|
2150 |
-
'limit' => array(
|
2151 |
-
'type' => 'slider',
|
2152 |
-
'min' => -1,
|
2153 |
-
'max' => 100,
|
2154 |
-
'step' => 1,
|
2155 |
-
'default' => 20,
|
2156 |
-
'name' => __( 'Limit', 'shortcodes-ultimate' ),
|
2157 |
-
'desc' => __( 'Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'shortcodes-ultimate' )
|
2158 |
-
),
|
2159 |
-
'link' => array(
|
2160 |
-
'type' => 'select',
|
2161 |
-
'values' => array(
|
2162 |
-
'none' => __( 'None', 'shortcodes-ultimate' ),
|
2163 |
-
'image' => __( 'Full-size image', 'shortcodes-ultimate' ),
|
2164 |
-
'lightbox' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
2165 |
-
'custom' => __( 'Slide link (added in media editor)', 'shortcodes-ultimate' ),
|
2166 |
-
'attachment' => __( 'Attachment page', 'shortcodes-ultimate' ),
|
2167 |
-
'post' => __( 'Post permalink', 'shortcodes-ultimate' )
|
2168 |
-
),
|
2169 |
-
'default' => 'none',
|
2170 |
-
'name' => __( 'Links', 'shortcodes-ultimate' ),
|
2171 |
-
'desc' => __( 'Select which links will be used for images in this gallery', 'shortcodes-ultimate' )
|
2172 |
-
),
|
2173 |
-
'target' => array(
|
2174 |
-
'type' => 'select',
|
2175 |
-
'values' => array(
|
2176 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
2177 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
2178 |
-
),
|
2179 |
-
'default' => 'self',
|
2180 |
-
'name' => __( 'Links target', 'shortcodes-ultimate' ),
|
2181 |
-
'desc' => __( 'Open links in', 'shortcodes-ultimate' )
|
2182 |
-
),
|
2183 |
-
'width' => array(
|
2184 |
-
'type' => 'slider',
|
2185 |
-
'min' => 200,
|
2186 |
-
'max' => 1600,
|
2187 |
-
'step' => 20,
|
2188 |
-
'default' => 600,
|
2189 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ), 'desc' => __( 'Slider width (in pixels)', 'shortcodes-ultimate' )
|
2190 |
-
),
|
2191 |
-
'height' => array(
|
2192 |
-
'type' => 'slider',
|
2193 |
-
'min' => 200,
|
2194 |
-
'max' => 1600,
|
2195 |
-
'step' => 20,
|
2196 |
-
'default' => 300,
|
2197 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ), 'desc' => __( 'Slider height (in pixels)', 'shortcodes-ultimate' )
|
2198 |
-
),
|
2199 |
-
'responsive' => array(
|
2200 |
-
'type' => 'bool',
|
2201 |
-
'default' => 'yes',
|
2202 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
2203 |
-
'desc' => __( 'Ignore width and height parameters and make slider responsive', 'shortcodes-ultimate' )
|
2204 |
-
),
|
2205 |
-
'title' => array(
|
2206 |
-
'type' => 'bool',
|
2207 |
-
'default' => 'yes',
|
2208 |
-
'name' => __( 'Show titles', 'shortcodes-ultimate' ), 'desc' => __( 'Display slide titles', 'shortcodes-ultimate' )
|
2209 |
-
),
|
2210 |
-
'centered' => array(
|
2211 |
-
'type' => 'bool',
|
2212 |
-
'default' => 'yes',
|
2213 |
-
'name' => __( 'Center', 'shortcodes-ultimate' ), 'desc' => __( 'Is slider centered on the page', 'shortcodes-ultimate' )
|
2214 |
-
),
|
2215 |
-
'arrows' => array(
|
2216 |
-
'type' => 'bool',
|
2217 |
-
'default' => 'yes',
|
2218 |
-
'name' => __( 'Arrows', 'shortcodes-ultimate' ), 'desc' => __( 'Show left and right arrows', 'shortcodes-ultimate' )
|
2219 |
-
),
|
2220 |
-
'pages' => array(
|
2221 |
-
'type' => 'bool',
|
2222 |
-
'default' => 'yes',
|
2223 |
-
'name' => __( 'Pagination', 'shortcodes-ultimate' ),
|
2224 |
-
'desc' => __( 'Show pagination', 'shortcodes-ultimate' )
|
2225 |
-
),
|
2226 |
-
'mousewheel' => array(
|
2227 |
-
'type' => 'bool',
|
2228 |
-
'default' => 'yes', 'name' => __( 'Mouse wheel control', 'shortcodes-ultimate' ),
|
2229 |
-
'desc' => __( 'Allow to change slides with mouse wheel', 'shortcodes-ultimate' )
|
2230 |
-
),
|
2231 |
-
'autoplay' => array(
|
2232 |
-
'type' => 'number',
|
2233 |
-
'min' => 0,
|
2234 |
-
'max' => 100000,
|
2235 |
-
'step' => 100,
|
2236 |
-
'default' => 5000,
|
2237 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
2238 |
-
'desc' => __( 'Choose interval between slide animations. Set to 0 to disable autoplay', 'shortcodes-ultimate' )
|
2239 |
-
),
|
2240 |
-
'speed' => array(
|
2241 |
-
'type' => 'number',
|
2242 |
-
'min' => 0,
|
2243 |
-
'max' => 20000,
|
2244 |
-
'step' => 100,
|
2245 |
-
'default' => 600,
|
2246 |
-
'name' => __( 'Speed', 'shortcodes-ultimate' ), 'desc' => __( 'Specify animation speed', 'shortcodes-ultimate' )
|
2247 |
-
),
|
2248 |
-
'class' => array(
|
2249 |
-
'type' => 'extra_css_class',
|
2250 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2251 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2252 |
-
'default' => '',
|
2253 |
-
),
|
2254 |
-
),
|
2255 |
-
'desc' => __( 'Customizable image slider', 'shortcodes-ultimate' ),
|
2256 |
-
'icon' => 'picture-o',
|
2257 |
-
'image' => $images_url . 'slider.svg',
|
2258 |
-
),
|
2259 |
-
// carousel
|
2260 |
-
'carousel' => array(
|
2261 |
-
'name' => __( 'Carousel', 'shortcodes-ultimate' ),
|
2262 |
-
'type' => 'single',
|
2263 |
-
'group' => 'gallery',
|
2264 |
-
'atts' => array(
|
2265 |
-
'source' => array(
|
2266 |
-
'type' => 'image_source',
|
2267 |
-
'default' => 'none',
|
2268 |
-
'name' => __( 'Source', 'shortcodes-ultimate' ),
|
2269 |
-
'desc' => __( 'Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'shortcodes-ultimate' )
|
2270 |
-
),
|
2271 |
-
'limit' => array(
|
2272 |
-
'type' => 'slider',
|
2273 |
-
'min' => -1,
|
2274 |
-
'max' => 100,
|
2275 |
-
'step' => 1,
|
2276 |
-
'default' => 20,
|
2277 |
-
'name' => __( 'Limit', 'shortcodes-ultimate' ),
|
2278 |
-
'desc' => __( 'Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'shortcodes-ultimate' )
|
2279 |
-
),
|
2280 |
-
'link' => array(
|
2281 |
-
'type' => 'select',
|
2282 |
-
'values' => array(
|
2283 |
-
'none' => __( 'None', 'shortcodes-ultimate' ),
|
2284 |
-
'image' => __( 'Full-size image', 'shortcodes-ultimate' ),
|
2285 |
-
'lightbox' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
2286 |
-
'custom' => __( 'Slide link (added in media editor)', 'shortcodes-ultimate' ),
|
2287 |
-
'attachment' => __( 'Attachment page', 'shortcodes-ultimate' ),
|
2288 |
-
'post' => __( 'Post permalink', 'shortcodes-ultimate' )
|
2289 |
-
),
|
2290 |
-
'default' => 'none',
|
2291 |
-
'name' => __( 'Links', 'shortcodes-ultimate' ),
|
2292 |
-
'desc' => __( 'Select which links will be used for images in this gallery', 'shortcodes-ultimate' )
|
2293 |
-
),
|
2294 |
-
'target' => array(
|
2295 |
-
'type' => 'select',
|
2296 |
-
'values' => array(
|
2297 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
2298 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
2299 |
-
),
|
2300 |
-
'default' => 'self',
|
2301 |
-
'name' => __( 'Links target', 'shortcodes-ultimate' ),
|
2302 |
-
'desc' => __( 'Open links in', 'shortcodes-ultimate' )
|
2303 |
-
),
|
2304 |
-
'width' => array(
|
2305 |
-
'type' => 'slider',
|
2306 |
-
'min' => 100,
|
2307 |
-
'max' => 1600,
|
2308 |
-
'step' => 20,
|
2309 |
-
'default' => 600,
|
2310 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
2311 |
-
'desc' => __( 'Carousel width (in pixels)', 'shortcodes-ultimate' )
|
2312 |
-
),
|
2313 |
-
'height' => array(
|
2314 |
-
'type' => 'slider',
|
2315 |
-
'min' => 20,
|
2316 |
-
'max' => 1600,
|
2317 |
-
'step' => 20,
|
2318 |
-
'default' => 100,
|
2319 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
2320 |
-
'desc' => __( 'Carousel height (in pixels)', 'shortcodes-ultimate' )
|
2321 |
-
),
|
2322 |
-
'responsive' => array(
|
2323 |
-
'type' => 'bool',
|
2324 |
-
'default' => 'yes',
|
2325 |
-
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
2326 |
-
'desc' => __( 'Ignore width and height parameters and make carousel responsive', 'shortcodes-ultimate' )
|
2327 |
-
),
|
2328 |
-
'items' => array(
|
2329 |
-
'type' => 'number',
|
2330 |
-
'min' => 1,
|
2331 |
-
'max' => 20,
|
2332 |
-
'step' => 1,
|
2333 |
-
'default' => 3,
|
2334 |
-
'name' => __( 'Items to show', 'shortcodes-ultimate' ),
|
2335 |
-
'desc' => __( 'How much carousel items is visible', 'shortcodes-ultimate' )
|
2336 |
-
),
|
2337 |
-
'scroll' => array(
|
2338 |
-
'type' => 'number',
|
2339 |
-
'min' => 1,
|
2340 |
-
'max' => 20,
|
2341 |
-
'step' => 1, 'default' => 1,
|
2342 |
-
'name' => __( 'Scroll number', 'shortcodes-ultimate' ),
|
2343 |
-
'desc' => __( 'How much items are scrolled in one transition', 'shortcodes-ultimate' )
|
2344 |
-
),
|
2345 |
-
'title' => array(
|
2346 |
-
'type' => 'bool',
|
2347 |
-
'default' => 'yes',
|
2348 |
-
'name' => __( 'Show titles', 'shortcodes-ultimate' ), 'desc' => __( 'Display titles for each item', 'shortcodes-ultimate' )
|
2349 |
-
),
|
2350 |
-
'centered' => array(
|
2351 |
-
'type' => 'bool',
|
2352 |
-
'default' => 'yes',
|
2353 |
-
'name' => __( 'Center', 'shortcodes-ultimate' ), 'desc' => __( 'Is carousel centered on the page', 'shortcodes-ultimate' )
|
2354 |
-
),
|
2355 |
-
'arrows' => array(
|
2356 |
-
'type' => 'bool',
|
2357 |
-
'default' => 'yes',
|
2358 |
-
'name' => __( 'Arrows', 'shortcodes-ultimate' ), 'desc' => __( 'Show left and right arrows', 'shortcodes-ultimate' )
|
2359 |
-
),
|
2360 |
-
'pages' => array(
|
2361 |
-
'type' => 'bool',
|
2362 |
-
'default' => 'no',
|
2363 |
-
'name' => __( 'Pagination', 'shortcodes-ultimate' ),
|
2364 |
-
'desc' => __( 'Show pagination', 'shortcodes-ultimate' )
|
2365 |
-
),
|
2366 |
-
'mousewheel' => array(
|
2367 |
-
'type' => 'bool',
|
2368 |
-
'default' => 'yes', 'name' => __( 'Mouse wheel control', 'shortcodes-ultimate' ),
|
2369 |
-
'desc' => __( 'Allow to rotate carousel with mouse wheel', 'shortcodes-ultimate' )
|
2370 |
-
),
|
2371 |
-
'autoplay' => array(
|
2372 |
-
'type' => 'number',
|
2373 |
-
'min' => 0,
|
2374 |
-
'max' => 100000,
|
2375 |
-
'step' => 100,
|
2376 |
-
'default' => 5000,
|
2377 |
-
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
2378 |
-
'desc' => __( 'Choose interval between auto animations. Set to 0 to disable autoplay', 'shortcodes-ultimate' )
|
2379 |
-
),
|
2380 |
-
'speed' => array(
|
2381 |
-
'type' => 'number',
|
2382 |
-
'min' => 0,
|
2383 |
-
'max' => 20000,
|
2384 |
-
'step' => 100,
|
2385 |
-
'default' => 600,
|
2386 |
-
'name' => __( 'Speed', 'shortcodes-ultimate' ), 'desc' => __( 'Specify animation speed', 'shortcodes-ultimate' )
|
2387 |
-
),
|
2388 |
-
'class' => array(
|
2389 |
-
'type' => 'extra_css_class',
|
2390 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2391 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2392 |
-
'default' => '',
|
2393 |
-
),
|
2394 |
-
),
|
2395 |
-
'desc' => __( 'Customizable image carousel', 'shortcodes-ultimate' ),
|
2396 |
-
'icon' => 'picture-o',
|
2397 |
-
'image' => $images_url . 'carousel.svg',
|
2398 |
-
),
|
2399 |
-
// custom_gallery
|
2400 |
-
'custom_gallery' => array(
|
2401 |
-
'name' => __( 'Gallery', 'shortcodes-ultimate' ),
|
2402 |
-
'type' => 'single',
|
2403 |
-
'group' => 'gallery',
|
2404 |
-
'atts' => array(
|
2405 |
-
'source' => array(
|
2406 |
-
'type' => 'image_source',
|
2407 |
-
'default' => 'none',
|
2408 |
-
'name' => __( 'Source', 'shortcodes-ultimate' ),
|
2409 |
-
'desc' => __( 'Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'shortcodes-ultimate' )
|
2410 |
-
),
|
2411 |
-
'limit' => array(
|
2412 |
-
'type' => 'slider',
|
2413 |
-
'min' => -1,
|
2414 |
-
'max' => 100,
|
2415 |
-
'step' => 1,
|
2416 |
-
'default' => 20,
|
2417 |
-
'name' => __( 'Limit', 'shortcodes-ultimate' ),
|
2418 |
-
'desc' => __( 'Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'shortcodes-ultimate' )
|
2419 |
-
),
|
2420 |
-
'link' => array(
|
2421 |
-
'type' => 'select',
|
2422 |
-
'values' => array(
|
2423 |
-
'none' => __( 'None', 'shortcodes-ultimate' ),
|
2424 |
-
'image' => __( 'Full-size image', 'shortcodes-ultimate' ),
|
2425 |
-
'lightbox' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
2426 |
-
'custom' => __( 'Slide link (added in media editor)', 'shortcodes-ultimate' ),
|
2427 |
-
'attachment' => __( 'Attachment page', 'shortcodes-ultimate' ),
|
2428 |
-
'post' => __( 'Post permalink', 'shortcodes-ultimate' )
|
2429 |
-
),
|
2430 |
-
'default' => 'none',
|
2431 |
-
'name' => __( 'Links', 'shortcodes-ultimate' ),
|
2432 |
-
'desc' => __( 'Select which links will be used for images in this gallery', 'shortcodes-ultimate' )
|
2433 |
-
),
|
2434 |
-
'target' => array(
|
2435 |
-
'type' => 'select',
|
2436 |
-
'values' => array(
|
2437 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
2438 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
2439 |
-
),
|
2440 |
-
'default' => 'self',
|
2441 |
-
'name' => __( 'Links target', 'shortcodes-ultimate' ),
|
2442 |
-
'desc' => __( 'Open links in', 'shortcodes-ultimate' )
|
2443 |
-
),
|
2444 |
-
'width' => array(
|
2445 |
-
'type' => 'slider',
|
2446 |
-
'min' => 10,
|
2447 |
-
'max' => 1600,
|
2448 |
-
'step' => 10,
|
2449 |
-
'default' => 90,
|
2450 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ), 'desc' => __( 'Single item width (in pixels)', 'shortcodes-ultimate' )
|
2451 |
-
),
|
2452 |
-
'height' => array(
|
2453 |
-
'type' => 'slider',
|
2454 |
-
'min' => 10,
|
2455 |
-
'max' => 1600,
|
2456 |
-
'step' => 10,
|
2457 |
-
'default' => 90,
|
2458 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ), 'desc' => __( 'Single item height (in pixels)', 'shortcodes-ultimate' )
|
2459 |
-
),
|
2460 |
-
'title' => array(
|
2461 |
-
'type' => 'select',
|
2462 |
-
'values' => array(
|
2463 |
-
'never' => __( 'Never', 'shortcodes-ultimate' ),
|
2464 |
-
'hover' => __( 'On mouse over', 'shortcodes-ultimate' ),
|
2465 |
-
'always' => __( 'Always', 'shortcodes-ultimate' )
|
2466 |
-
),
|
2467 |
-
'default' => 'hover',
|
2468 |
-
'name' => __( 'Show titles', 'shortcodes-ultimate' ),
|
2469 |
-
'desc' => __( 'Title display mode', 'shortcodes-ultimate' )
|
2470 |
-
),
|
2471 |
-
'class' => array(
|
2472 |
-
'type' => 'extra_css_class',
|
2473 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2474 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2475 |
-
'default' => '',
|
2476 |
-
),
|
2477 |
-
),
|
2478 |
-
'desc' => __( 'Customizable image gallery', 'shortcodes-ultimate' ),
|
2479 |
-
'icon' => 'picture-o',
|
2480 |
-
'image' => $images_url . 'custom_gallery.svg',
|
2481 |
-
),
|
2482 |
-
// posts
|
2483 |
-
'posts' => array(
|
2484 |
-
'name' => __( 'Posts', 'shortcodes-ultimate' ),
|
2485 |
-
'type' => 'single',
|
2486 |
-
'group' => 'other',
|
2487 |
-
'article' => 'http://docs.getshortcodes.com/article/43-posts',
|
2488 |
-
'atts' => array(
|
2489 |
-
'template' => array(
|
2490 |
-
'default' => 'templates/default-loop.php', 'name' => __( 'Template', 'shortcodes-ultimate' ),
|
2491 |
-
'desc' => __( 'Relative path to the template file. Default templates placed in the plugin directory (templates folder). You can copy them under your theme directory and modify as you want. You can use following default templates that already available in the plugin directory:<br/><b%value>templates/default-loop.php</b> - posts loop<br/><b%value>templates/teaser-loop.php</b> - posts loop with thumbnail and title<br/><b%value>templates/single-post.php</b> - single post template<br/><b%value>templates/list-loop.php</b> - unordered list with posts titles', 'shortcodes-ultimate' )
|
2492 |
-
),
|
2493 |
-
'id' => array(
|
2494 |
-
'default' => '',
|
2495 |
-
'name' => __( 'Post ID\'s', 'shortcodes-ultimate' ),
|
2496 |
-
'desc' => __( 'Enter comma separated ID\'s of the posts that you want to show', 'shortcodes-ultimate' )
|
2497 |
-
),
|
2498 |
-
'posts_per_page' => array(
|
2499 |
-
'type' => 'number',
|
2500 |
-
'min' => -1,
|
2501 |
-
'max' => 10000,
|
2502 |
-
'step' => 1,
|
2503 |
-
'default' => get_option( 'posts_per_page' ),
|
2504 |
-
'name' => __( 'Posts per page', 'shortcodes-ultimate' ),
|
2505 |
-
'desc' => __( 'Specify number of posts that you want to show. Enter -1 to get all posts', 'shortcodes-ultimate' )
|
2506 |
-
),
|
2507 |
-
'post_type' => array(
|
2508 |
-
'type' => 'post_type',
|
2509 |
-
'multiple' => true,
|
2510 |
-
'values' => array(),
|
2511 |
-
'default' => 'post',
|
2512 |
-
'name' => __( 'Post types', 'shortcodes-ultimate' ),
|
2513 |
-
'desc' => __( 'Select post types. Hold Ctrl key to select multiple post types', 'shortcodes-ultimate' )
|
2514 |
-
),
|
2515 |
-
'taxonomy' => array(
|
2516 |
-
'type' => 'taxonomy',
|
2517 |
-
'values' => array(),
|
2518 |
-
'default' => 'category',
|
2519 |
-
'name' => __( 'Taxonomy', 'shortcodes-ultimate' ),
|
2520 |
-
'desc' => __( 'Select taxonomy to show posts from', 'shortcodes-ultimate' )
|
2521 |
-
),
|
2522 |
-
'tax_term' => array(
|
2523 |
-
'type' => 'term',
|
2524 |
-
'multiple' => true,
|
2525 |
-
'values' => array(),
|
2526 |
-
'default' => '',
|
2527 |
-
'name' => __( 'Terms', 'shortcodes-ultimate' ),
|
2528 |
-
'desc' => __( 'Select terms to show posts from', 'shortcodes-ultimate' )
|
2529 |
-
),
|
2530 |
-
'tax_operator' => array(
|
2531 |
-
'type' => 'select',
|
2532 |
-
'values' => array(
|
2533 |
-
'IN' => __( 'IN - posts that have any of selected categories terms', 'shortcodes-ultimate' ),
|
2534 |
-
'NOT IN' => __( 'NOT IN - posts that is does not have any of selected terms', 'shortcodes-ultimate' ),
|
2535 |
-
'AND' => __( 'AND - posts that have all selected terms', 'shortcodes-ultimate' ),
|
2536 |
-
),
|
2537 |
-
'default' => 'IN',
|
2538 |
-
'name' => __( 'Taxonomy term operator', 'shortcodes-ultimate' ),
|
2539 |
-
'desc' => __( 'Operator to test', 'shortcodes-ultimate' )
|
2540 |
-
),
|
2541 |
-
// 'author' => array(
|
2542 |
-
// 'type' => 'select',
|
2543 |
-
// 'multiple' => true,
|
2544 |
-
// 'values' => Su_Tools::get_users(),
|
2545 |
-
// 'default' => 'default',
|
2546 |
-
// 'name' => __( 'Authors', 'shortcodes-ultimate' ),
|
2547 |
-
// 'desc' => __( 'Choose the authors whose posts you want to show. Enter here comma-separated list of users (IDs). Example: 1,7,18', 'shortcodes-ultimate' )
|
2548 |
-
// ),
|
2549 |
-
'author' => array(
|
2550 |
-
'default' => '',
|
2551 |
-
'name' => __( 'Authors', 'shortcodes-ultimate' ),
|
2552 |
-
'desc' => __( 'Enter here comma-separated list of author\'s IDs. Example: 1,7,18', 'shortcodes-ultimate' )
|
2553 |
-
),
|
2554 |
-
'meta_key' => array(
|
2555 |
-
'default' => '',
|
2556 |
-
'name' => __( 'Meta key', 'shortcodes-ultimate' ),
|
2557 |
-
'desc' => __( 'Enter meta key name to show posts that have this key', 'shortcodes-ultimate' )
|
2558 |
-
),
|
2559 |
-
'offset' => array(
|
2560 |
-
'type' => 'number',
|
2561 |
-
'min' => 0,
|
2562 |
-
'max' => 10000,
|
2563 |
-
'step' => 1, 'default' => 0,
|
2564 |
-
'name' => __( 'Offset', 'shortcodes-ultimate' ),
|
2565 |
-
'desc' => __( 'Specify offset to start posts loop not from first post', 'shortcodes-ultimate' )
|
2566 |
-
),
|
2567 |
-
'order' => array(
|
2568 |
-
'type' => 'select',
|
2569 |
-
'values' => array(
|
2570 |
-
'desc' => __( 'Descending', 'shortcodes-ultimate' ),
|
2571 |
-
'asc' => __( 'Ascending', 'shortcodes-ultimate' )
|
2572 |
-
),
|
2573 |
-
'default' => 'DESC',
|
2574 |
-
'name' => __( 'Order', 'shortcodes-ultimate' ),
|
2575 |
-
'desc' => __( 'Posts order', 'shortcodes-ultimate' )
|
2576 |
-
),
|
2577 |
-
'orderby' => array(
|
2578 |
-
'type' => 'select',
|
2579 |
-
'values' => array(
|
2580 |
-
'none' => __( 'None', 'shortcodes-ultimate' ),
|
2581 |
-
'id' => __( 'Post ID', 'shortcodes-ultimate' ),
|
2582 |
-
'author' => __( 'Post author', 'shortcodes-ultimate' ),
|
2583 |
-
'title' => __( 'Post title', 'shortcodes-ultimate' ),
|
2584 |
-
'name' => __( 'Post slug', 'shortcodes-ultimate' ),
|
2585 |
-
'date' => __( 'Date', 'shortcodes-ultimate' ), 'modified' => __( 'Last modified date', 'shortcodes-ultimate' ),
|
2586 |
-
'parent' => __( 'Post parent', 'shortcodes-ultimate' ),
|
2587 |
-
'rand' => __( 'Random', 'shortcodes-ultimate' ), 'comment_count' => __( 'Comments number', 'shortcodes-ultimate' ),
|
2588 |
-
'menu_order' => __( 'Menu order', 'shortcodes-ultimate' ), 'meta_value' => __( 'Meta key values', 'shortcodes-ultimate' ),
|
2589 |
-
),
|
2590 |
-
'default' => 'date',
|
2591 |
-
'name' => __( 'Order by', 'shortcodes-ultimate' ),
|
2592 |
-
'desc' => __( 'Order posts by', 'shortcodes-ultimate' )
|
2593 |
-
),
|
2594 |
-
'post_parent' => array(
|
2595 |
-
'default' => '',
|
2596 |
-
'name' => __( 'Post parent', 'shortcodes-ultimate' ),
|
2597 |
-
'desc' => __( 'Show childrens of entered post (enter post ID)', 'shortcodes-ultimate' )
|
2598 |
-
),
|
2599 |
-
'post_status' => array(
|
2600 |
-
'type' => 'select',
|
2601 |
-
'values' => array(
|
2602 |
-
'publish' => __( 'Published', 'shortcodes-ultimate' ),
|
2603 |
-
'pending' => __( 'Pending', 'shortcodes-ultimate' ),
|
2604 |
-
'draft' => __( 'Draft', 'shortcodes-ultimate' ),
|
2605 |
-
'auto-draft' => __( 'Auto-draft', 'shortcodes-ultimate' ),
|
2606 |
-
'future' => __( 'Future post', 'shortcodes-ultimate' ),
|
2607 |
-
'private' => __( 'Private post', 'shortcodes-ultimate' ),
|
2608 |
-
'inherit' => __( 'Inherit', 'shortcodes-ultimate' ),
|
2609 |
-
'trash' => __( 'Trashed', 'shortcodes-ultimate' ),
|
2610 |
-
'any' => __( 'Any', 'shortcodes-ultimate' ),
|
2611 |
-
),
|
2612 |
-
'default' => 'publish',
|
2613 |
-
'name' => __( 'Post status', 'shortcodes-ultimate' ),
|
2614 |
-
'desc' => __( 'Show only posts with selected status', 'shortcodes-ultimate' )
|
2615 |
-
),
|
2616 |
-
'ignore_sticky_posts' => array(
|
2617 |
-
'type' => 'bool',
|
2618 |
-
'default' => 'no',
|
2619 |
-
'name' => __( 'Ignore sticky', 'shortcodes-ultimate' ),
|
2620 |
-
'desc' => __( 'Select Yes to ignore posts that is sticked', 'shortcodes-ultimate' )
|
2621 |
-
)
|
2622 |
-
),
|
2623 |
-
'desc' => __( 'Custom posts query with customizable template', 'shortcodes-ultimate' ),
|
2624 |
-
'icon' => 'th-list',
|
2625 |
-
'image' => $images_url . 'posts.svg',
|
2626 |
-
),
|
2627 |
-
// dummy_text
|
2628 |
-
'dummy_text' => array(
|
2629 |
-
'name' => __( 'Dummy text', 'shortcodes-ultimate' ),
|
2630 |
-
'type' => 'single',
|
2631 |
-
'group' => 'content',
|
2632 |
-
'atts' => array(
|
2633 |
-
'what' => array(
|
2634 |
-
'type' => 'select',
|
2635 |
-
'values' => array(
|
2636 |
-
'paras' => __( 'Paragraphs', 'shortcodes-ultimate' ),
|
2637 |
-
'words' => __( 'Words', 'shortcodes-ultimate' ),
|
2638 |
-
'bytes' => __( 'Bytes', 'shortcodes-ultimate' ),
|
2639 |
-
),
|
2640 |
-
'default' => 'paras',
|
2641 |
-
'name' => __( 'What', 'shortcodes-ultimate' ),
|
2642 |
-
'desc' => __( 'What to generate', 'shortcodes-ultimate' )
|
2643 |
-
),
|
2644 |
-
'amount' => array(
|
2645 |
-
'type' => 'slider',
|
2646 |
-
'min' => 1,
|
2647 |
-
'max' => 100,
|
2648 |
-
'step' => 1,
|
2649 |
-
'default' => 1,
|
2650 |
-
'name' => __( 'Amount', 'shortcodes-ultimate' ),
|
2651 |
-
'desc' => __( 'How many items (paragraphs or words) to generate. Minimum words amount is 5', 'shortcodes-ultimate' )
|
2652 |
-
),
|
2653 |
-
'cache' => array(
|
2654 |
-
'type' => 'bool',
|
2655 |
-
'default' => 'yes',
|
2656 |
-
'name' => __( 'Cache', 'shortcodes-ultimate' ),
|
2657 |
-
'desc' => __( 'Generated text will be cached. Be careful with this option. If you disable it and insert many dummy_text shortcodes the page load time will be highly increased', 'shortcodes-ultimate' )
|
2658 |
-
),
|
2659 |
-
'class' => array(
|
2660 |
-
'type' => 'extra_css_class',
|
2661 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2662 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2663 |
-
'default' => '',
|
2664 |
-
),
|
2665 |
-
),
|
2666 |
-
'desc' => __( 'Text placeholder', 'shortcodes-ultimate' ),
|
2667 |
-
'icon' => 'text-height',
|
2668 |
-
'image' => $images_url . 'dummy_text.svg',
|
2669 |
-
),
|
2670 |
-
// dummy_image
|
2671 |
-
'dummy_image' => array(
|
2672 |
-
'name' => __( 'Dummy image', 'shortcodes-ultimate' ),
|
2673 |
-
'type' => 'single',
|
2674 |
-
'group' => 'content',
|
2675 |
-
'atts' => array(
|
2676 |
-
'width' => array(
|
2677 |
-
'type' => 'slider',
|
2678 |
-
'min' => 10,
|
2679 |
-
'max' => 1600,
|
2680 |
-
'step' => 10,
|
2681 |
-
'default' => 500,
|
2682 |
-
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
2683 |
-
'desc' => __( 'Image width', 'shortcodes-ultimate' )
|
2684 |
-
),
|
2685 |
-
'height' => array(
|
2686 |
-
'type' => 'slider',
|
2687 |
-
'min' => 10,
|
2688 |
-
'max' => 1600,
|
2689 |
-
'step' => 10,
|
2690 |
-
'default' => 300,
|
2691 |
-
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
2692 |
-
'desc' => __( 'Image height', 'shortcodes-ultimate' )
|
2693 |
-
),
|
2694 |
-
'theme' => array(
|
2695 |
-
'type' => 'select',
|
2696 |
-
'values' => array(
|
2697 |
-
'any' => __( 'Any', 'shortcodes-ultimate' ),
|
2698 |
-
'abstract' => __( 'Abstract', 'shortcodes-ultimate' ),
|
2699 |
-
'animals' => __( 'Animals', 'shortcodes-ultimate' ),
|
2700 |
-
'business' => __( 'Business', 'shortcodes-ultimate' ),
|
2701 |
-
'cats' => __( 'Cats', 'shortcodes-ultimate' ),
|
2702 |
-
'city' => __( 'City', 'shortcodes-ultimate' ),
|
2703 |
-
'food' => __( 'Food', 'shortcodes-ultimate' ),
|
2704 |
-
'nightlife' => __( 'Night life', 'shortcodes-ultimate' ),
|
2705 |
-
'fashion' => __( 'Fashion', 'shortcodes-ultimate' ),
|
2706 |
-
'people' => __( 'People', 'shortcodes-ultimate' ),
|
2707 |
-
'nature' => __( 'Nature', 'shortcodes-ultimate' ),
|
2708 |
-
'sports' => __( 'Sports', 'shortcodes-ultimate' ),
|
2709 |
-
'technics' => __( 'Technics', 'shortcodes-ultimate' ),
|
2710 |
-
'transport' => __( 'Transport', 'shortcodes-ultimate' )
|
2711 |
-
),
|
2712 |
-
'default' => 'any',
|
2713 |
-
'name' => __( 'Theme', 'shortcodes-ultimate' ),
|
2714 |
-
'desc' => __( 'Select the theme for this image', 'shortcodes-ultimate' )
|
2715 |
-
),
|
2716 |
-
'class' => array(
|
2717 |
-
'type' => 'extra_css_class',
|
2718 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2719 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2720 |
-
'default' => '',
|
2721 |
-
),
|
2722 |
-
),
|
2723 |
-
'desc' => __( 'Image placeholder with random image', 'shortcodes-ultimate' ),
|
2724 |
-
'icon' => 'picture-o',
|
2725 |
-
'image' => $images_url . 'dummy_image.svg',
|
2726 |
-
),
|
2727 |
-
// animate
|
2728 |
-
'animate' => array(
|
2729 |
-
'name' => __( 'Animation', 'shortcodes-ultimate' ),
|
2730 |
-
'type' => 'wrap',
|
2731 |
-
'group' => 'other',
|
2732 |
-
'atts' => array(
|
2733 |
-
'type' => array(
|
2734 |
-
'type' => 'select',
|
2735 |
-
'values' => array_combine( self::animations(), self::animations() ),
|
2736 |
-
'default' => 'bounceIn',
|
2737 |
-
'name' => __( 'Animation', 'shortcodes-ultimate' ),
|
2738 |
-
'desc' => __( 'Select animation type', 'shortcodes-ultimate' )
|
2739 |
-
),
|
2740 |
-
'duration' => array(
|
2741 |
-
'type' => 'slider',
|
2742 |
-
'min' => 0,
|
2743 |
-
'max' => 20,
|
2744 |
-
'step' => 0.5,
|
2745 |
-
'default' => 1,
|
2746 |
-
'name' => __( 'Duration', 'shortcodes-ultimate' ),
|
2747 |
-
'desc' => __( 'Animation duration (seconds)', 'shortcodes-ultimate' )
|
2748 |
-
),
|
2749 |
-
'delay' => array(
|
2750 |
-
'type' => 'slider',
|
2751 |
-
'min' => 0,
|
2752 |
-
'max' => 20,
|
2753 |
-
'step' => 0.5,
|
2754 |
-
'default' => 0,
|
2755 |
-
'name' => __( 'Delay', 'shortcodes-ultimate' ),
|
2756 |
-
'desc' => __( 'Animation delay (seconds)', 'shortcodes-ultimate' )
|
2757 |
-
),
|
2758 |
-
'inline' => array(
|
2759 |
-
'type' => 'bool',
|
2760 |
-
'default' => 'no',
|
2761 |
-
'name' => __( 'Inline', 'shortcodes-ultimate' ),
|
2762 |
-
'desc' => __( 'This parameter determines what HTML tag will be used for animation wrapper. Turn this option to YES and animated element will be wrapped in SPAN instead of DIV. Useful for inline animations, like buttons', 'shortcodes-ultimate' )
|
2763 |
-
),
|
2764 |
-
'class' => array(
|
2765 |
-
'type' => 'extra_css_class',
|
2766 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
2767 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
2768 |
-
'default' => '',
|
2769 |
-
),
|
2770 |
-
),
|
2771 |
-
'content' => __( 'Animated content', 'shortcodes-ultimate' ),
|
2772 |
-
'desc' => __( 'Wrapper for animation. Any nested element will be animated', 'shortcodes-ultimate' ),
|
2773 |
-
'example' => 'animations',
|
2774 |
-
'icon' => 'bolt',
|
2775 |
-
'image' => $images_url . 'animate.svg',
|
2776 |
-
),
|
2777 |
-
// meta
|
2778 |
-
'meta' => array(
|
2779 |
-
'name' => __( 'Meta data', 'shortcodes-ultimate' ),
|
2780 |
-
'type' => 'single',
|
2781 |
-
'group' => 'data',
|
2782 |
-
'atts' => array(
|
2783 |
-
'key' => array(
|
2784 |
-
'default' => '',
|
2785 |
-
'name' => __( 'Key', 'shortcodes-ultimate' ),
|
2786 |
-
'desc' => __( 'Meta key name', 'shortcodes-ultimate' )
|
2787 |
-
),
|
2788 |
-
'default' => array(
|
2789 |
-
'default' => '',
|
2790 |
-
'name' => __( 'Default', 'shortcodes-ultimate' ),
|
2791 |
-
'desc' => __( 'This text will be shown if data is not found', 'shortcodes-ultimate' )
|
2792 |
-
),
|
2793 |
-
'before' => array(
|
2794 |
-
'default' => '',
|
2795 |
-
'name' => __( 'Before', 'shortcodes-ultimate' ),
|
2796 |
-
'desc' => __( 'This content will be shown before the value', 'shortcodes-ultimate' )
|
2797 |
-
),
|
2798 |
-
'after' => array(
|
2799 |
-
'default' => '',
|
2800 |
-
'name' => __( 'After', 'shortcodes-ultimate' ),
|
2801 |
-
'desc' => __( 'This content will be shown after the value', 'shortcodes-ultimate' )
|
2802 |
-
),
|
2803 |
-
'post_id' => array(
|
2804 |
-
'default' => '',
|
2805 |
-
'name' => __( 'Post ID', 'shortcodes-ultimate' ),
|
2806 |
-
'desc' => __( 'You can specify custom post ID. Leave this field empty to use an ID of the current post. Current post ID may not work in Live Preview mode', 'shortcodes-ultimate' )
|
2807 |
-
),
|
2808 |
-
'filter' => array(
|
2809 |
-
'default' => '',
|
2810 |
-
'name' => __( 'Filter', 'shortcodes-ultimate' ),
|
2811 |
-
'desc' => __( 'You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Name of your function must include word <b>filter</b>. Example function: ', 'shortcodes-ultimate' ) . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>"
|
2812 |
-
)
|
2813 |
-
),
|
2814 |
-
'desc' => __( 'Post meta', 'shortcodes-ultimate' ),
|
2815 |
-
'icon' => 'info-circle',
|
2816 |
-
'image' => $images_url . 'meta.svg',
|
2817 |
-
),
|
2818 |
-
// user
|
2819 |
-
'user' => array(
|
2820 |
-
'name' => __( 'User data', 'shortcodes-ultimate' ),
|
2821 |
-
'type' => 'single',
|
2822 |
-
'group' => 'data',
|
2823 |
-
'atts' => array(
|
2824 |
-
'field' => array(
|
2825 |
-
'type' => 'select',
|
2826 |
-
'values' => array(
|
2827 |
-
'display_name' => __( 'Display name', 'shortcodes-ultimate' ),
|
2828 |
-
'ID' => __( 'ID', 'shortcodes-ultimate' ),
|
2829 |
-
'user_login' => __( 'Login', 'shortcodes-ultimate' ),
|
2830 |
-
'user_nicename' => __( 'Nice name', 'shortcodes-ultimate' ),
|
2831 |
-
'user_email' => __( 'Email', 'shortcodes-ultimate' ),
|
2832 |
-
'user_url' => __( 'URL', 'shortcodes-ultimate' ),
|
2833 |
-
'user_registered' => __( 'Registered', 'shortcodes-ultimate' ),
|
2834 |
-
'user_activation_key' => __( 'Activation key', 'shortcodes-ultimate' ),
|
2835 |
-
'user_status' => __( 'Status', 'shortcodes-ultimate' )
|
2836 |
-
),
|
2837 |
-
'default' => 'display_name',
|
2838 |
-
'name' => __( 'Field', 'shortcodes-ultimate' ),
|
2839 |
-
'desc' => __( 'User data field name', 'shortcodes-ultimate' )
|
2840 |
-
),
|
2841 |
-
'default' => array(
|
2842 |
-
'default' => '',
|
2843 |
-
'name' => __( 'Default', 'shortcodes-ultimate' ),
|
2844 |
-
'desc' => __( 'This text will be shown if data is not found', 'shortcodes-ultimate' )
|
2845 |
-
),
|
2846 |
-
'before' => array(
|
2847 |
-
'default' => '',
|
2848 |
-
'name' => __( 'Before', 'shortcodes-ultimate' ),
|
2849 |
-
'desc' => __( 'This content will be shown before the value', 'shortcodes-ultimate' )
|
2850 |
-
),
|
2851 |
-
'after' => array(
|
2852 |
-
'default' => '',
|
2853 |
-
'name' => __( 'After', 'shortcodes-ultimate' ),
|
2854 |
-
'desc' => __( 'This content will be shown after the value', 'shortcodes-ultimate' )
|
2855 |
-
),
|
2856 |
-
'user_id' => array(
|
2857 |
-
'default' => '',
|
2858 |
-
'name' => __( 'User ID', 'shortcodes-ultimate' ),
|
2859 |
-
'desc' => __( 'You can specify custom user ID. Leave this field empty to use an ID of the current user', 'shortcodes-ultimate' )
|
2860 |
-
),
|
2861 |
-
'filter' => array(
|
2862 |
-
'default' => '',
|
2863 |
-
'name' => __( 'Filter', 'shortcodes-ultimate' ),
|
2864 |
-
'desc' => __( 'You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Name of your function must include word <b>filter</b>. Example function: ', 'shortcodes-ultimate' ) . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>"
|
2865 |
-
)
|
2866 |
-
),
|
2867 |
-
'desc' => __( 'User data', 'shortcodes-ultimate' ),
|
2868 |
-
'icon' => 'info-circle',
|
2869 |
-
'image' => $images_url . 'user.svg',
|
2870 |
-
),
|
2871 |
-
// post
|
2872 |
-
'post' => array(
|
2873 |
-
'name' => __( 'Post data', 'shortcodes-ultimate' ),
|
2874 |
-
'type' => 'single',
|
2875 |
-
'group' => 'data',
|
2876 |
-
'atts' => array(
|
2877 |
-
'field' => array(
|
2878 |
-
'type' => 'select',
|
2879 |
-
'values' => array(
|
2880 |
-
'ID' => __( 'Post ID', 'shortcodes-ultimate' ),
|
2881 |
-
'post_author' => __( 'Post author', 'shortcodes-ultimate' ),
|
2882 |
-
'post_date' => __( 'Post date', 'shortcodes-ultimate' ),
|
2883 |
-
'post_date_gmt' => __( 'Post date', 'shortcodes-ultimate' ) . ' GMT',
|
2884 |
-
'post_content' => __( 'Post content', 'shortcodes-ultimate' ),
|
2885 |
-
'post_title' => __( 'Post title', 'shortcodes-ultimate' ),
|
2886 |
-
'post_excerpt' => __( 'Post excerpt', 'shortcodes-ultimate' ),
|
2887 |
-
'post_status' => __( 'Post status', 'shortcodes-ultimate' ),
|
2888 |
-
'comment_status' => __( 'Comment status', 'shortcodes-ultimate' ),
|
2889 |
-
'ping_status' => __( 'Ping status', 'shortcodes-ultimate' ),
|
2890 |
-
'post_name' => __( 'Post name', 'shortcodes-ultimate' ),
|
2891 |
-
'post_modified' => __( 'Post modified', 'shortcodes-ultimate' ),
|
2892 |
-
'post_modified_gmt' => __( 'Post modified', 'shortcodes-ultimate' ) . ' GMT',
|
2893 |
-
'post_content_filtered' => __( 'Filtered post content', 'shortcodes-ultimate' ),
|
2894 |
-
'post_parent' => __( 'Post parent', 'shortcodes-ultimate' ),
|
2895 |
-
'guid' => __( 'GUID', 'shortcodes-ultimate' ),
|
2896 |
-
'menu_order' => __( 'Menu order', 'shortcodes-ultimate' ),
|
2897 |
-
'post_type' => __( 'Post type', 'shortcodes-ultimate' ),
|
2898 |
-
'post_mime_type' => __( 'Post mime type', 'shortcodes-ultimate' ),
|
2899 |
-
'comment_count' => __( 'Comment count', 'shortcodes-ultimate' )
|
2900 |
-
),
|
2901 |
-
'default' => 'post_title',
|
2902 |
-
'name' => __( 'Field', 'shortcodes-ultimate' ),
|
2903 |
-
'desc' => __( 'Post data field name', 'shortcodes-ultimate' )
|
2904 |
-
),
|
2905 |
-
'default' => array(
|
2906 |
-
'default' => '',
|
2907 |
-
'name' => __( 'Default', 'shortcodes-ultimate' ),
|
2908 |
-
'desc' => __( 'This text will be shown if data is not found', 'shortcodes-ultimate' )
|
2909 |
-
),
|
2910 |
-
'before' => array(
|
2911 |
-
'default' => '',
|
2912 |
-
'name' => __( 'Before', 'shortcodes-ultimate' ),
|
2913 |
-
'desc' => __( 'This content will be shown before the value', 'shortcodes-ultimate' )
|
2914 |
-
),
|
2915 |
-
'after' => array(
|
2916 |
-
'default' => '',
|
2917 |
-
'name' => __( 'After', 'shortcodes-ultimate' ),
|
2918 |
-
'desc' => __( 'This content will be shown after the value', 'shortcodes-ultimate' )
|
2919 |
-
),
|
2920 |
-
'post_id' => array(
|
2921 |
-
'default' => '',
|
2922 |
-
'name' => __( 'Post ID', 'shortcodes-ultimate' ),
|
2923 |
-
'desc' => __( 'You can specify custom post ID. Leave this field empty to use an ID of the current post. Current post ID may not work in Live Preview mode', 'shortcodes-ultimate' )
|
2924 |
-
),
|
2925 |
-
'filter' => array(
|
2926 |
-
'default' => '',
|
2927 |
-
'name' => __( 'Filter', 'shortcodes-ultimate' ),
|
2928 |
-
'desc' => __( 'You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Name of your function must include word <b>filter</b>. Example function: ', 'shortcodes-ultimate' ) . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>"
|
2929 |
-
)
|
2930 |
-
),
|
2931 |
-
'desc' => __( 'Post data', 'shortcodes-ultimate' ),
|
2932 |
-
'icon' => 'info-circle',
|
2933 |
-
'image' => $images_url . 'post.svg',
|
2934 |
-
),
|
2935 |
-
// post_terms
|
2936 |
-
// 'post_terms' => array(
|
2937 |
-
// 'name' => __( 'Post terms', 'shortcodes-ultimate' ),
|
2938 |
-
// 'type' => 'single',
|
2939 |
-
// 'group' => 'data',
|
2940 |
-
// 'atts' => array(
|
2941 |
-
// 'post_id' => array(
|
2942 |
-
// 'default' => '',
|
2943 |
-
// 'name' => __( 'Post ID', 'shortcodes-ultimate' ),
|
2944 |
-
// 'desc' => __( 'You can specify custom post ID. Leave this field empty to use an ID of the current post. Current post ID may not work in Live Preview mode', 'shortcodes-ultimate' )
|
2945 |
-
// ),
|
2946 |
-
// 'links' => array(
|
2947 |
-
// 'type' => 'bool',
|
2948 |
-
// 'default' => 'yes',
|
2949 |
-
// 'name' => __( 'Show links', 'shortcodes-ultimate' ),
|
2950 |
-
// 'desc' => __( 'Show terms names as hyperlinks', 'shortcodes-ultimate' )
|
2951 |
-
// ),
|
2952 |
-
// 'format' => array(
|
2953 |
-
// 'type' => 'select',
|
2954 |
-
// 'values' => array(
|
2955 |
-
// 'text' => __( 'Terms separated by commas', 'shortcodes-ultimate' ),
|
2956 |
-
// 'br' => __( 'Terms separated by new lines', 'shortcodes-ultimate' ),
|
2957 |
-
// 'ul' => __( 'Unordered list', 'shortcodes-ultimate' ),
|
2958 |
-
// 'ol' => __( 'Ordered list', 'shortcodes-ultimate' ),
|
2959 |
-
// ),
|
2960 |
-
// 'default' => 'text',
|
2961 |
-
// 'name' => __( 'Format', 'shortcodes-ultimate' ),
|
2962 |
-
// 'desc' => __( 'Choose how to output the terms', 'shortcodes-ultimate' )
|
2963 |
-
// ),
|
2964 |
-
// ),
|
2965 |
-
// 'desc' => __( 'Terms list', 'shortcodes-ultimate' ),
|
2966 |
-
// 'icon' => 'info-circle'
|
2967 |
-
// ),
|
2968 |
-
// template
|
2969 |
-
'template' => array(
|
2970 |
-
'name' => __( 'Template', 'shortcodes-ultimate' ),
|
2971 |
-
'type' => 'single',
|
2972 |
-
'group' => 'other',
|
2973 |
-
'atts' => array(
|
2974 |
-
'name' => array(
|
2975 |
-
'default' => '',
|
2976 |
-
'name' => __( 'Template name', 'shortcodes-ultimate' ),
|
2977 |
-
'desc' => sprintf( __( 'Use template file name (with optional .php extension). If you need to use templates from theme sub-folder, use relative path. Example values: %s, %s, %s', 'shortcodes-ultimate' ), '<b%value>page</b>', '<b%value>page.php</b>', '<b%value>includes/page.php</b>' )
|
2978 |
-
)
|
2979 |
-
),
|
2980 |
-
'desc' => __( 'Theme template', 'shortcodes-ultimate' ),
|
2981 |
-
'icon' => 'puzzle-piece',
|
2982 |
-
'image' => $images_url . 'template.svg',
|
2983 |
-
),
|
2984 |
-
// qrcode
|
2985 |
-
'qrcode' => array(
|
2986 |
-
'name' => __( 'QR code', 'shortcodes-ultimate' ),
|
2987 |
-
'type' => 'single',
|
2988 |
-
'group' => 'content',
|
2989 |
-
'atts' => array(
|
2990 |
-
'data' => array(
|
2991 |
-
'default' => '',
|
2992 |
-
'name' => __( 'Data', 'shortcodes-ultimate' ),
|
2993 |
-
'desc' => __( 'The text to store within the QR code. You can use here any text or even URL', 'shortcodes-ultimate' )
|
2994 |
-
),
|
2995 |
-
'title' => array(
|
2996 |
-
'default' => '',
|
2997 |
-
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
2998 |
-
'desc' => __( 'Enter here short description. This text will be used in alt attribute of QR code', 'shortcodes-ultimate' )
|
2999 |
-
),
|
3000 |
-
'size' => array(
|
3001 |
-
'type' => 'slider',
|
3002 |
-
'min' => 10,
|
3003 |
-
'max' => 1000,
|
3004 |
-
'step' => 10,
|
3005 |
-
'default' => 200,
|
3006 |
-
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
3007 |
-
'desc' => __( 'Image width and height (in pixels)', 'shortcodes-ultimate' )
|
3008 |
-
),
|
3009 |
-
'margin' => array(
|
3010 |
-
'type' => 'slider',
|
3011 |
-
'min' => 0,
|
3012 |
-
'max' => 50,
|
3013 |
-
'step' => 5,
|
3014 |
-
'default' => 0,
|
3015 |
-
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
3016 |
-
'desc' => __( 'Thickness of a margin (in pixels)', 'shortcodes-ultimate' )
|
3017 |
-
),
|
3018 |
-
'align' => array(
|
3019 |
-
'type' => 'select',
|
3020 |
-
'values' => array(
|
3021 |
-
'none' => __( 'None', 'shortcodes-ultimate' ),
|
3022 |
-
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
3023 |
-
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
3024 |
-
'right' => __( 'Right', 'shortcodes-ultimate' ),
|
3025 |
-
),
|
3026 |
-
'default' => 'none',
|
3027 |
-
'name' => __( 'Align', 'shortcodes-ultimate' ),
|
3028 |
-
'desc' => __( 'Choose image alignment', 'shortcodes-ultimate' )
|
3029 |
-
),
|
3030 |
-
'link' => array(
|
3031 |
-
'default' => '',
|
3032 |
-
'name' => __( 'Link', 'shortcodes-ultimate' ),
|
3033 |
-
'desc' => __( 'You can make this QR code clickable. Enter here the URL', 'shortcodes-ultimate' )
|
3034 |
-
),
|
3035 |
-
'target' => array(
|
3036 |
-
'type' => 'select',
|
3037 |
-
'values' => array(
|
3038 |
-
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
3039 |
-
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' ),
|
3040 |
-
),
|
3041 |
-
'default' => 'blank',
|
3042 |
-
'name' => __( 'Link target', 'shortcodes-ultimate' ),
|
3043 |
-
'desc' => __( 'Select link target', 'shortcodes-ultimate' )
|
3044 |
-
),
|
3045 |
-
'color' => array(
|
3046 |
-
'type' => 'color',
|
3047 |
-
'default' => '#000000',
|
3048 |
-
'name' => __( 'Primary color', 'shortcodes-ultimate' ),
|
3049 |
-
'desc' => __( 'Pick a primary color', 'shortcodes-ultimate' )
|
3050 |
-
),
|
3051 |
-
'background' => array(
|
3052 |
-
'type' => 'color',
|
3053 |
-
'default' => '#ffffff',
|
3054 |
-
'name' => __( 'Background color', 'shortcodes-ultimate' ),
|
3055 |
-
'desc' => __( 'Pick a background color', 'shortcodes-ultimate' )
|
3056 |
-
),
|
3057 |
-
'class' => array(
|
3058 |
-
'type' => 'extra_css_class',
|
3059 |
-
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
3060 |
-
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
3061 |
-
'default' => '',
|
3062 |
-
),
|
3063 |
-
),
|
3064 |
-
'desc' => __( 'Advanced QR code generator', 'shortcodes-ultimate' ),
|
3065 |
-
'icon' => 'qrcode',
|
3066 |
-
'image' => $images_url . 'qrcode.svg',
|
3067 |
-
),
|
3068 |
-
// scheduler
|
3069 |
-
'scheduler' => array(
|
3070 |
-
'name' => __( 'Scheduler', 'shortcodes-ultimate' ),
|
3071 |
-
'type' => 'wrap',
|
3072 |
-
'group' => 'other',
|
3073 |
-
'atts' => array(
|
3074 |
-
'time' => array(
|
3075 |
-
'default' => '',
|
3076 |
-
'name' => __( 'Time', 'shortcodes-ultimate' ),
|
3077 |
-
'desc' => sprintf( __( 'In this field you can specify one or more time ranges. Every day at this time the content of shortcode will be visible. %s %s %s - show content from 9:00 to 18:00 %s - show content from 9:00 to 13:00 and from 14:00 to 18:00 %s - example with minutes (content will be visible each day, 45 minutes) %s - example with seconds', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>9-18</b>', '<br><b%value>9-13, 14-18</b>', '<br><b%value>9:30-10:15</b>', '<br><b%value>9:00:00-17:59:59</b>' )
|
3078 |
-
),
|
3079 |
-
'days_week' => array(
|
3080 |
-
'default' => '',
|
3081 |
-
'name' => __( 'Days of the week', 'shortcodes-ultimate' ),
|
3082 |
-
'desc' => sprintf( __( 'In this field you can specify one or more days of the week. Every week at these days the content of shortcode will be visible. %s 0 - Sunday %s 1 - Monday %s 2 - Tuesday %s 3 - Wednesday %s 4 - Thursday %s 5 - Friday %s 6 - Saturday %s %s %s - show content from Monday to Friday %s - show content only at Sunday %s - show content at Sunday and from Wednesday to Friday', 'shortcodes-ultimate' ), '<br><br>', '<br>', '<br>', '<br>', '<br>', '<br>', '<br>', '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>1-5</b>', '<br><b%value>0</b>', '<br><b%value>0, 3-5</b>' )
|
3083 |
-
),
|
3084 |
-
'days_month' => array(
|
3085 |
-
'default' => '',
|
3086 |
-
'name' => __( 'Days of the month', 'shortcodes-ultimate' ),
|
3087 |
-
'desc' => sprintf( __( 'In this field you can specify one or more days of the month. Every month at these days the content of shortcode will be visible. %s %s %s - show content only at first day of month %s - show content from 1th to 5th %s - show content from 10th to 15th and from 20th to 25th', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>1</b>', '<br><b%value>1-5</b>', '<br><b%value>10-15, 20-25</b>' )
|
3088 |
-
),
|
3089 |
-
'months' => array(
|
3090 |
-
'default' => '',
|
3091 |
-
'name' => __( 'Months', 'shortcodes-ultimate' ),
|
3092 |
-
'desc' => sprintf( __( 'In this field you can specify the month or months in which the content will be visible. %s %s %s - show content only in January %s - show content from February to June %s - show content in January, March and from May to July', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>1</b>', '<br><b%value>2-6</b>', '<br><b%value>1, 3, 5-7</b>' )
|
3093 |
-
),
|
3094 |
-
'years' => array(
|
3095 |
-
'default' => '',
|
3096 |
-
'name' => __( 'Years', 'shortcodes-ultimate' ),
|
3097 |
-
'desc' => sprintf( __( 'In this field you can specify the year or years in which the content will be visible. %s %s %s - show content only in 2014 %s - show content from 2014 to 2016 %s - show content in 2014, 2018 and from 2020 to 2022', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>2014</b>', '<br><b%value>2014-2016</b>', '<br><b%value>2014, 2018, 2020-2022</b>' )
|
3098 |
-
),
|
3099 |
-
'alt' => array(
|
3100 |
-
'default' => '',
|
3101 |
-
'name' => __( 'Alternative text', 'shortcodes-ultimate' ),
|
3102 |
-
'desc' => __( 'In this field you can type the text which will be shown if content is not visible at the current moment', 'shortcodes-ultimate' )
|
3103 |
-
)
|
3104 |
-
),
|
3105 |
-
'content' => __( 'Scheduled content', 'shortcodes-ultimate' ),
|
3106 |
-
'desc' => __( 'Allows to show the content only at the specified time period', 'shortcodes-ultimate' ),
|
3107 |
-
'note' => __( 'This shortcode allows you to show content only at the specified time.', 'shortcodes-ultimate' ) . '<br><br>' . __( 'Please pay special attention to the descriptions, which are located below each text field. It will save you a lot of time', 'shortcodes-ultimate' ) . '<br><br>' . __( 'By default, the content of this shortcode will be visible all the time. By using fields below, you can add some limitations. For example, if you type 1-5 in the Days of the week field, content will be only shown from Monday to Friday. Using the same principles, you can limit content visibility from years to seconds.', 'shortcodes-ultimate' ),
|
3108 |
-
'icon' => 'clock-o',
|
3109 |
-
'image' => $images_url . 'scheduler.svg',
|
3110 |
-
),
|
3111 |
-
) );
|
3112 |
-
// Return result
|
3113 |
-
return ( is_string( $shortcode ) ) ? $shortcodes[sanitize_text_field( $shortcode )] : $shortcodes;
|
3114 |
-
}
|
3115 |
-
}
|
3116 |
-
|
3117 |
-
class Shortcodes_Ultimate_Data extends Su_Data {
|
3118 |
-
function __construct() {
|
3119 |
-
parent::__construct();
|
3120 |
-
}
|
3121 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -29,7 +29,7 @@ class Su_Generator_Views {
|
|
29 |
public static function select( $id, $field ) {
|
30 |
|
31 |
// Multiple selects
|
32 |
-
$multiple =
|
33 |
$return = '<select name="' . $id . '" id="su-generator-attr-' . $id . '" class="su-generator-attr"' . $multiple . '>';
|
34 |
// Create options
|
35 |
foreach ( $field['values'] as $option_value => $option_title ) {
|
@@ -82,7 +82,7 @@ class Su_Generator_Views {
|
|
82 |
public static function term( $id, $field ) {
|
83 |
|
84 |
// Get categories
|
85 |
-
$field['values'] =
|
86 |
|
87 |
// Create select
|
88 |
return self::select( $id, $field );
|
@@ -127,8 +127,8 @@ class Su_Generator_Views {
|
|
127 |
|
128 |
public static function border( $id, $field ) {
|
129 |
$defaults = ( $field['default'] === 'none' ) ? array ( '0', 'solid', '#000000' ) : explode( ' ', str_replace( 'px', '', $field['default'] ) );
|
130 |
-
$borders =
|
131 |
-
'options' =>
|
132 |
'class' => 'su-generator-bp-style',
|
133 |
'selected' => $defaults[1]
|
134 |
) );
|
@@ -140,7 +140,7 @@ class Su_Generator_Views {
|
|
140 |
$field = wp_parse_args( $field, array(
|
141 |
'default' => 'none'
|
142 |
) );
|
143 |
-
$sources =
|
144 |
'options' => array(
|
145 |
'media' => __( 'Media library', 'shortcodes-ultimate' ),
|
146 |
'posts: recent' => __( 'Recent posts', 'shortcodes-ultimate' ),
|
@@ -151,19 +151,19 @@ class Su_Generator_Views {
|
|
151 |
'none' => __( 'Select images source', 'shortcodes-ultimate' ) . '…',
|
152 |
'class' => 'su-generator-isp-sources'
|
153 |
) );
|
154 |
-
$categories =
|
155 |
-
'options' =>
|
156 |
'multiple' => true,
|
157 |
'size' => 10,
|
158 |
'class' => 'su-generator-isp-categories'
|
159 |
) );
|
160 |
-
$taxonomies =
|
161 |
-
'options' =>
|
162 |
'none' => __( 'Select taxonomy', 'shortcodes-ultimate' ) . '…',
|
163 |
'selected' => '0',
|
164 |
'class' => 'su-generator-isp-taxonomies'
|
165 |
) );
|
166 |
-
$terms =
|
167 |
'class' => 'su-generator-isp-terms',
|
168 |
'multiple' => true,
|
169 |
'size' => 10,
|
29 |
public static function select( $id, $field ) {
|
30 |
|
31 |
// Multiple selects
|
32 |
+
$multiple = isset( $field['multiple'] ) && $field['multiple'] ? ' multiple' : '';
|
33 |
$return = '<select name="' . $id . '" id="su-generator-attr-' . $id . '" class="su-generator-attr"' . $multiple . '>';
|
34 |
// Create options
|
35 |
foreach ( $field['values'] as $option_value => $option_title ) {
|
82 |
public static function term( $id, $field ) {
|
83 |
|
84 |
// Get categories
|
85 |
+
$field['values'] = Su_Generator::get_terms( 'category' );
|
86 |
|
87 |
// Create select
|
88 |
return self::select( $id, $field );
|
127 |
|
128 |
public static function border( $id, $field ) {
|
129 |
$defaults = ( $field['default'] === 'none' ) ? array ( '0', 'solid', '#000000' ) : explode( ' ', str_replace( 'px', '', $field['default'] ) );
|
130 |
+
$borders = su_html_dropdown( array(
|
131 |
+
'options' => su_get_config( 'borders' ),
|
132 |
'class' => 'su-generator-bp-style',
|
133 |
'selected' => $defaults[1]
|
134 |
) );
|
140 |
$field = wp_parse_args( $field, array(
|
141 |
'default' => 'none'
|
142 |
) );
|
143 |
+
$sources = su_html_dropdown( array(
|
144 |
'options' => array(
|
145 |
'media' => __( 'Media library', 'shortcodes-ultimate' ),
|
146 |
'posts: recent' => __( 'Recent posts', 'shortcodes-ultimate' ),
|
151 |
'none' => __( 'Select images source', 'shortcodes-ultimate' ) . '…',
|
152 |
'class' => 'su-generator-isp-sources'
|
153 |
) );
|
154 |
+
$categories = su_html_dropdown( array(
|
155 |
+
'options' => Su_Generator::get_terms( 'category' ),
|
156 |
'multiple' => true,
|
157 |
'size' => 10,
|
158 |
'class' => 'su-generator-isp-categories'
|
159 |
) );
|
160 |
+
$taxonomies = su_html_dropdown( array(
|
161 |
+
'options' => Su_Generator::get_taxonomies(),
|
162 |
'none' => __( 'Select taxonomy', 'shortcodes-ultimate' ) . '…',
|
163 |
'selected' => '0',
|
164 |
'class' => 'su-generator-isp-taxonomies'
|
165 |
) );
|
166 |
+
$terms = su_html_dropdown( array(
|
167 |
'class' => 'su-generator-isp-terms',
|
168 |
'multiple' => true,
|
169 |
'size' => 10,
|
@@ -10,13 +10,6 @@ class Su_Generator {
|
|
10 |
function __construct() {
|
11 |
add_action( 'media_buttons', array( __CLASS__, 'button' ), 1000 );
|
12 |
|
13 |
-
add_action( 'su/update', array( __CLASS__, 'reset' ) );
|
14 |
-
add_action( 'su/activation', array( __CLASS__, 'reset' ) );
|
15 |
-
add_action( 'sunrise/page/before', array( __CLASS__, 'reset' ) );
|
16 |
-
add_action( 'create_term', array( __CLASS__, 'reset' ), 10, 3 );
|
17 |
-
add_action( 'edit_term', array( __CLASS__, 'reset' ), 10, 3 );
|
18 |
-
add_action( 'delete_term', array( __CLASS__, 'reset' ), 10, 3 );
|
19 |
-
|
20 |
add_action( 'wp_ajax_su_generator_settings', array( __CLASS__, 'settings' ) );
|
21 |
add_action( 'wp_ajax_su_generator_preview', array( __CLASS__, 'preview' ) );
|
22 |
add_action( 'su/generator/actions', array( __CLASS__, 'presets' ) );
|
@@ -64,69 +57,55 @@ class Su_Generator {
|
|
64 |
return $button;
|
65 |
}
|
66 |
|
67 |
-
/**
|
68 |
-
* Cache reset
|
69 |
-
*/
|
70 |
-
public static function reset() {
|
71 |
-
// Clear popup cache
|
72 |
-
delete_transient( 'su/generator/popup' );
|
73 |
-
// Clear shortcodes settings cache
|
74 |
-
foreach ( array_keys( (array) Su_Data::shortcodes() ) as $shortcode ) delete_transient( 'su/generator/settings/' . $shortcode );
|
75 |
-
}
|
76 |
-
|
77 |
/**
|
78 |
* Generator popup form
|
79 |
*/
|
80 |
public static function popup() {
|
81 |
-
|
82 |
-
$
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
// Add add-ons links
|
94 |
-
if ( !su_addon_active( 'maker' ) || !su_addon_active( 'skins' ) || !su_addon_active( 'extra' ) ) $tools[] = '<a href="' . admin_url( 'admin.php?page=shortcodes-ultimate-addons' ) . '" target="_blank" title="' . __( 'Add-ons', 'shortcodes-ultimate' ) . '" class="su-add-ons">' . __( 'Add-ons', 'shortcodes-ultimate' ) . '</a>';
|
95 |
?>
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
?>
|
115 |
-
</div>
|
116 |
</div>
|
117 |
-
<div id="su-generator-settings"></div>
|
118 |
-
<input type="hidden" name="su-generator-selected" id="su-generator-selected" value="<?php echo plugins_url( '', SU_PLUGIN_FILE ); ?>" />
|
119 |
-
<input type="hidden" name="su-generator-url" id="su-generator-url" value="<?php echo plugins_url( '', SU_PLUGIN_FILE ); ?>" />
|
120 |
-
<input type="hidden" name="su-compatibility-mode-prefix" id="su-compatibility-mode-prefix" value="<?php echo su_compatibility_mode_prefix(); ?>" />
|
121 |
-
<div id="su-generator-result" style="display:none"></div>
|
122 |
</div>
|
|
|
|
|
|
|
|
|
|
|
123 |
</div>
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
}
|
131 |
|
132 |
/**
|
@@ -136,68 +115,62 @@ class Su_Generator {
|
|
136 |
self::access();
|
137 |
// Param check
|
138 |
if ( empty( $_REQUEST['shortcode'] ) ) wp_die( __( 'Shortcode not specified', 'shortcodes-ultimate' ) );
|
139 |
-
//
|
140 |
-
$
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
$return
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
if ( is_callable( array( 'Su_Generator_Views', $attr_info['type'] ) ) ) $return .= call_user_func( array( 'Su_Generator_Views', $attr_info['type'] ), $attr_name, $attr_info );
|
174 |
-
elseif ( isset( $attr_info['callback'] ) && is_callable( $attr_info['callback'] ) ) $return .= call_user_func( $attr_info['callback'], $attr_name, $attr_info );
|
175 |
-
if ( isset( $attr_info['desc'] ) ) $attr_info['desc'] = str_replace( '%su_skins_link%', su_skins_link(), $attr_info['desc'] );
|
176 |
-
if ( isset( $attr_info['desc'] ) ) $return .= '<div class="su-generator-attr-desc">' . str_replace( array( '<b%value>', '<b_>' ), '<b class="su-generator-set-value" title="' . __( 'Click to set this value', 'shortcodes-ultimate' ) . '">', $attr_info['desc'] ) . '</div>';
|
177 |
-
$return .= '</div>';
|
178 |
-
}
|
179 |
}
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
if ( !isset( $shortcode['content'] ) ) {
|
186 |
-
$shortcode['content'] = '';
|
187 |
-
}
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
|
193 |
-
|
194 |
-
$
|
195 |
}
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
echo $return;
|
200 |
}
|
|
|
|
|
|
|
|
|
201 |
exit;
|
202 |
}
|
203 |
|
@@ -228,25 +201,29 @@ class Su_Generator {
|
|
228 |
|
229 |
public static function ajax_get_icons() {
|
230 |
self::access();
|
231 |
-
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
|
234 |
public static function ajax_get_terms() {
|
235 |
self::access();
|
236 |
$args = array();
|
237 |
-
if ( isset( $_REQUEST['tax'] ) ) $args['options'] = (array)
|
238 |
if ( isset( $_REQUEST['class'] ) ) $args['class'] = (string) sanitize_key( $_REQUEST['class'] );
|
239 |
if ( isset( $_REQUEST['multiple'] ) ) $args['multiple'] = (bool) sanitize_key( $_REQUEST['multiple'] );
|
240 |
if ( isset( $_REQUEST['size'] ) ) $args['size'] = (int) sanitize_key( $_REQUEST['size'] );
|
241 |
if ( isset( $_REQUEST['noselect'] ) ) $args['noselect'] = (bool) sanitize_key( $_REQUEST['noselect'] );
|
242 |
-
die(
|
243 |
}
|
244 |
|
245 |
public static function ajax_get_taxonomies() {
|
246 |
self::access();
|
247 |
$args = array();
|
248 |
-
$args['options'] =
|
249 |
-
die(
|
250 |
}
|
251 |
|
252 |
public static function presets( $actions ) {
|
@@ -392,7 +369,7 @@ class Su_Generator {
|
|
392 |
}
|
393 |
|
394 |
// Get shortcode data
|
395 |
-
$shortcode =
|
396 |
|
397 |
// Prepare shortcode prefix
|
398 |
$prefix = get_option( 'su_option_prefix' );
|
@@ -456,6 +433,129 @@ class Su_Generator {
|
|
456 |
return $output;
|
457 |
|
458 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
}
|
460 |
|
461 |
new Su_Generator;
|
10 |
function __construct() {
|
11 |
add_action( 'media_buttons', array( __CLASS__, 'button' ), 1000 );
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
add_action( 'wp_ajax_su_generator_settings', array( __CLASS__, 'settings' ) );
|
14 |
add_action( 'wp_ajax_su_generator_preview', array( __CLASS__, 'preview' ) );
|
15 |
add_action( 'su/generator/actions', array( __CLASS__, 'presets' ) );
|
57 |
return $button;
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
/**
|
61 |
* Generator popup form
|
62 |
*/
|
63 |
public static function popup() {
|
64 |
+
ob_start();
|
65 |
+
$tools = apply_filters( 'su/generator/tools', array(
|
66 |
+
'<a href="' . admin_url( 'admin.php?page=shortcodes-ultimate' ) . '#tab-1" target="_blank" title="' . __( 'Settings', 'shortcodes-ultimate' ) . '">' . __( 'Plugin settings', 'shortcodes-ultimate' ) . '</a>',
|
67 |
+
'<a href="http://gndev.info/shortcodes-ultimate/" target="_blank" title="' . __( 'Plugin homepage', 'shortcodes-ultimate' ) . '">' . __( 'Plugin homepage', 'shortcodes-ultimate' ) . '</a>',
|
68 |
+
'<a href="http://wordpress.org/support/plugin/shortcodes-ultimate/" target="_blank" title="' . __( 'Support forums', 'shortcodes-ultimate' ) . '">' . __( 'Support forums', 'shortcodes-ultimate' ) . '</a>'
|
69 |
+
) );
|
70 |
+
|
71 |
+
// Add add-ons links
|
72 |
+
if ( ! self::is_addons_active() ) {
|
73 |
+
$tools[] = '<a href="' . admin_url( 'admin.php?page=shortcodes-ultimate-addons' ) . '" target="_blank" title="' . __( 'Add-ons', 'shortcodes-ultimate' ) . '" class="su-add-ons">' . __( 'Add-ons', 'shortcodes-ultimate' ) . '</a>';
|
74 |
+
}
|
|
|
|
|
|
|
75 |
?>
|
76 |
+
<div id="su-generator-wrap" style="display:none">
|
77 |
+
<div id="su-generator">
|
78 |
+
<div id="su-generator-header">
|
79 |
+
<div id="su-generator-tools"><?php echo implode( ' <span></span> ', $tools ); ?></div>
|
80 |
+
<input type="text" name="su_generator_search" id="su-generator-search" value="" placeholder="<?php _e( 'Search for shortcodes', 'shortcodes-ultimate' ); ?>" />
|
81 |
+
<p id="su-generator-search-pro-tip"><?php printf( '<strong>%s:</strong> %s', __( 'Pro Tip', 'shortcodes-ultimate' ), __( 'Hit enter to select highlighted shortcode, while searching' ) ) ?></p>
|
82 |
+
<div id="su-generator-filter">
|
83 |
+
<strong><?php _e( 'Filter by type', 'shortcodes-ultimate' ); ?></strong>
|
84 |
+
<?php foreach ( su_get_config( 'groups' ) as $group => $label ) echo '<a href="#" data-filter="' . $group . '">' . $label . '</a>'; ?>
|
85 |
+
</div>
|
86 |
+
<div id="su-generator-choices" class="su-generator-clearfix">
|
87 |
+
<?php
|
88 |
+
// Choices loop
|
89 |
+
foreach ( self::get_shortcodes() as $name => $shortcode ) {
|
90 |
+
$icon = ( isset( $shortcode['icon'] ) ) ? $shortcode['icon'] : 'puzzle-piece';
|
91 |
+
$shortcode['name'] = ( isset( $shortcode['name'] ) ) ? $shortcode['name'] : $name;
|
92 |
+
echo '<span data-name="' . $shortcode['name'] . '" data-shortcode="' . $name . '" title="' . esc_attr( $shortcode['desc'] ) . '" data-desc="' . esc_attr( $shortcode['desc'] ) . '" data-group="' . $shortcode['group'] . '">' . su_html_icon( 'icon:' . $icon ) . $shortcode['name'] . '</span>' . "\n";
|
93 |
+
}
|
94 |
?>
|
|
|
95 |
</div>
|
|
|
|
|
|
|
|
|
|
|
96 |
</div>
|
97 |
+
<div id="su-generator-settings"></div>
|
98 |
+
<input type="hidden" name="su-generator-selected" id="su-generator-selected" value="<?php echo plugins_url( '', SU_PLUGIN_FILE ); ?>" />
|
99 |
+
<input type="hidden" name="su-generator-url" id="su-generator-url" value="<?php echo plugins_url( '', SU_PLUGIN_FILE ); ?>" />
|
100 |
+
<input type="hidden" name="su-compatibility-mode-prefix" id="su-compatibility-mode-prefix" value="<?php echo su_get_shortcode_prefix(); ?>" />
|
101 |
+
<div id="su-generator-result" style="display:none"></div>
|
102 |
</div>
|
103 |
+
</div>
|
104 |
+
<?php
|
105 |
+
$output = ob_get_contents();
|
106 |
+
set_transient( 'su/generator/popup', $output, 2 * DAY_IN_SECONDS );
|
107 |
+
ob_end_clean();
|
108 |
+
echo $output;
|
109 |
}
|
110 |
|
111 |
/**
|
115 |
self::access();
|
116 |
// Param check
|
117 |
if ( empty( $_REQUEST['shortcode'] ) ) wp_die( __( 'Shortcode not specified', 'shortcodes-ultimate' ) );
|
118 |
+
// Request queried shortcode
|
119 |
+
$shortcode = su_get_shortcode( sanitize_key( $_REQUEST['shortcode'] ) );
|
120 |
+
// Prepare skip-if-default option
|
121 |
+
$skip = ( get_option( 'su_option_skip' ) === 'on' ) ? ' su-generator-skip' : '';
|
122 |
+
// Prepare actions
|
123 |
+
$actions = apply_filters( 'su/generator/actions', array(
|
124 |
+
'insert' => '<a href="javascript:void(0);" class="button button-primary button-large su-generator-insert"><i class="fa fa-check"></i> ' . __( 'Insert shortcode', 'shortcodes-ultimate' ) . '</a>',
|
125 |
+
'preview' => '<a href="javascript:void(0);" class="button button-large su-generator-toggle-preview"><i class="fa fa-eye"></i> ' . __( 'Live preview', 'shortcodes-ultimate' ) . '</a>'
|
126 |
+
) );
|
127 |
+
// Shortcode header
|
128 |
+
$return = '<div id="su-generator-breadcrumbs">';
|
129 |
+
$return .= apply_filters( 'su/generator/breadcrumbs', '<a href="javascript:void(0);" class="su-generator-home" title="' . __( 'Click to return to the shortcodes list', 'shortcodes-ultimate' ) . '">' . __( 'All shortcodes', 'shortcodes-ultimate' ) . '</a> → <span>' . $shortcode['name'] . '</span> <small class="alignright">' . $shortcode['desc'] . '</small><div class="su-generator-clear"></div>' );
|
130 |
+
$return .= '</div>';
|
131 |
+
// Shortcode note
|
132 |
+
if ( isset( $shortcode['note'] ) ) {
|
133 |
+
$return .= '<div class="su-generator-note"><i class="fa fa-info-circle"></i><div class="su-generator-note-content">' . wpautop( $shortcode['note'] ) . '</div></div>';
|
134 |
+
}
|
135 |
+
// Shortcode has atts
|
136 |
+
if ( isset( $shortcode['atts'] ) && count( $shortcode['atts'] ) ) {
|
137 |
+
// Loop through shortcode parameters
|
138 |
+
foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
|
139 |
+
// Prepare default value
|
140 |
+
$default = (string) ( isset( $attr_info['default'] ) ) ? $attr_info['default'] : '';
|
141 |
+
$attr_info['name'] = ( isset( $attr_info['name'] ) ) ? $attr_info['name'] : $attr_name;
|
142 |
+
$return .= '<div class="su-generator-attr-container' . $skip . '" data-default="' . esc_attr( $default ) . '">';
|
143 |
+
$return .= '<h5>' . $attr_info['name'] . '</h5>';
|
144 |
+
// Create field types
|
145 |
+
if ( !isset( $attr_info['type'] ) && isset( $attr_info['values'] ) && is_array( $attr_info['values'] ) && count( $attr_info['values'] ) ) $attr_info['type'] = 'select';
|
146 |
+
elseif ( !isset( $attr_info['type'] ) ) $attr_info['type'] = 'text';
|
147 |
+
if ( is_callable( array( 'Su_Generator_Views', $attr_info['type'] ) ) ) $return .= call_user_func( array( 'Su_Generator_Views', $attr_info['type'] ), $attr_name, $attr_info );
|
148 |
+
elseif ( isset( $attr_info['callback'] ) && is_callable( $attr_info['callback'] ) ) $return .= call_user_func( $attr_info['callback'], $attr_name, $attr_info );
|
149 |
+
if ( isset( $attr_info['desc'] ) ) $attr_info['desc'] = str_replace( '%su_skins_link%', self::skins_link(), $attr_info['desc'] );
|
150 |
+
if ( isset( $attr_info['desc'] ) ) $return .= '<div class="su-generator-attr-desc">' . str_replace( array( '<b%value>', '<b_>' ), '<b class="su-generator-set-value" title="' . __( 'Click to set this value', 'shortcodes-ultimate' ) . '">', $attr_info['desc'] ) . '</div>';
|
151 |
+
$return .= '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
153 |
+
}
|
154 |
+
// Single shortcode (not closed)
|
155 |
+
if ( $shortcode['type'] == 'single' ) $return .= '<input type="hidden" name="su-generator-content" id="su-generator-content" value="false" />';
|
156 |
+
// Wrapping shortcode
|
157 |
+
else {
|
|
|
|
|
|
|
158 |
|
159 |
+
if ( !isset( $shortcode['content'] ) ) {
|
160 |
+
$shortcode['content'] = '';
|
161 |
+
}
|
162 |
|
163 |
+
if ( is_array( $shortcode['content'] ) ) {
|
164 |
+
$shortcode['content'] = self::get_shortcode_code( $shortcode['content'] );
|
165 |
}
|
166 |
+
|
167 |
+
// Prepare shortcode content
|
168 |
+
$return .= '<div class="su-generator-attr-container"><h5>' . __( 'Content', 'shortcodes-ultimate' ) . '</h5><textarea name="su-generator-content" id="su-generator-content" rows="5">' . esc_attr( str_replace( array( '%prefix_', '__' ), su_get_shortcode_prefix(), $shortcode['content'] ) ) . '</textarea></div>';
|
|
|
169 |
}
|
170 |
+
$return .= '<div id="su-generator-preview"></div>';
|
171 |
+
$return .= '<div class="su-generator-actions su-generator-clearfix">' . implode( ' ', array_values( $actions ) ) . '</div>';
|
172 |
+
set_transient( 'su/generator/settings/' . sanitize_text_field( $_REQUEST['shortcode'] ), $return, 2 * DAY_IN_SECONDS );
|
173 |
+
echo $return;
|
174 |
exit;
|
175 |
}
|
176 |
|
201 |
|
202 |
public static function ajax_get_icons() {
|
203 |
self::access();
|
204 |
+
$icons = array();
|
205 |
+
foreach ( su_get_config( 'icons' ) as $icon ) {
|
206 |
+
$icons[] = '<i class="fa fa-' . $icon . '" title="' . $icon . '"></i>';
|
207 |
+
}
|
208 |
+
die( implode( '', $icons ) );
|
209 |
}
|
210 |
|
211 |
public static function ajax_get_terms() {
|
212 |
self::access();
|
213 |
$args = array();
|
214 |
+
if ( isset( $_REQUEST['tax'] ) ) $args['options'] = (array) self::get_terms( sanitize_key( $_REQUEST['tax'] ) );
|
215 |
if ( isset( $_REQUEST['class'] ) ) $args['class'] = (string) sanitize_key( $_REQUEST['class'] );
|
216 |
if ( isset( $_REQUEST['multiple'] ) ) $args['multiple'] = (bool) sanitize_key( $_REQUEST['multiple'] );
|
217 |
if ( isset( $_REQUEST['size'] ) ) $args['size'] = (int) sanitize_key( $_REQUEST['size'] );
|
218 |
if ( isset( $_REQUEST['noselect'] ) ) $args['noselect'] = (bool) sanitize_key( $_REQUEST['noselect'] );
|
219 |
+
die( su_html_dropdown( $args ) );
|
220 |
}
|
221 |
|
222 |
public static function ajax_get_taxonomies() {
|
223 |
self::access();
|
224 |
$args = array();
|
225 |
+
$args['options'] = self::get_taxonomies();
|
226 |
+
die( su_html_dropdown( $args ) );
|
227 |
}
|
228 |
|
229 |
public static function presets( $actions ) {
|
369 |
}
|
370 |
|
371 |
// Get shortcode data
|
372 |
+
$shortcode = su_get_shortcode( $args['id'] );
|
373 |
|
374 |
// Prepare shortcode prefix
|
375 |
$prefix = get_option( 'su_option_prefix' );
|
433 |
return $output;
|
434 |
|
435 |
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Helper function to check if all available addons were activated.
|
439 |
+
*
|
440 |
+
* @since 5.0.5
|
441 |
+
* @return boolean True if all addons active, False otherwise.
|
442 |
+
*/
|
443 |
+
public static function is_addons_active() {
|
444 |
+
|
445 |
+
foreach ( su_get_config( 'addon-ids' ) as $addon ) {
|
446 |
+
|
447 |
+
if ( ! did_action( "su/{$addon}/ready" ) ) {
|
448 |
+
return false;
|
449 |
+
}
|
450 |
+
|
451 |
+
}
|
452 |
+
|
453 |
+
return true;
|
454 |
+
|
455 |
+
}
|
456 |
+
|
457 |
+
/**
|
458 |
+
* Display "Install additional skins" link if add-on isn't installed.
|
459 |
+
*
|
460 |
+
* @since 5.0.5
|
461 |
+
* @return string
|
462 |
+
*/
|
463 |
+
public static function skins_link() {
|
464 |
+
|
465 |
+
if ( did_action( 'su/skins/ready' ) ) {
|
466 |
+
|
467 |
+
return sprintf(
|
468 |
+
'<br><strong>%s</strong><br><strong>%s</strong>',
|
469 |
+
__( 'Additional skins successfully installed', 'shortcodes-ultimate' ),
|
470 |
+
__( 'Open dropdown to choose one of new styles', 'shortcodes-ultimate' )
|
471 |
+
);
|
472 |
+
|
473 |
+
}
|
474 |
+
else {
|
475 |
+
|
476 |
+
return sprintf(
|
477 |
+
'<br><a href="https://getshortcodes.com/add-ons/additional-skins/" target="_blank">%s →</a>',
|
478 |
+
__( 'Get more styles', 'shortcodes-ultimate' )
|
479 |
+
);
|
480 |
+
|
481 |
+
}
|
482 |
+
|
483 |
+
}
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Get available shortcodes, skipping deprecated ones.
|
487 |
+
*
|
488 |
+
* @since 5.0.5
|
489 |
+
* @return array Available shortcodes data.
|
490 |
+
*/
|
491 |
+
public static function get_shortcodes() {
|
492 |
+
|
493 |
+
return array_filter(
|
494 |
+
su_get_all_shortcodes(),
|
495 |
+
array( __CLASS__, 'filter_deprecated_shortcodes' )
|
496 |
+
);
|
497 |
+
|
498 |
+
}
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Filter shortcodes and skip deprecated ones.
|
502 |
+
*
|
503 |
+
* @since 5.0.5
|
504 |
+
* @param array $shortcode A single shortcode data.
|
505 |
+
* @return boolean False if shortcode deprecated, True otherwise.
|
506 |
+
*/
|
507 |
+
public static function filter_deprecated_shortcodes( $shortcode ) {
|
508 |
+
return ! isset( $shortcode['deprecated'] );
|
509 |
+
}
|
510 |
+
|
511 |
+
/**
|
512 |
+
* Get list of taxonomies as key-value pairs.
|
513 |
+
*
|
514 |
+
* @since 5.0.5
|
515 |
+
* @return array List of taxonomies.
|
516 |
+
*/
|
517 |
+
public static function get_taxonomies() {
|
518 |
+
|
519 |
+
$taxes = array();
|
520 |
+
|
521 |
+
foreach ( (array) get_taxonomies( '', 'objects' ) as $tax ) {
|
522 |
+
$taxes[$tax->name] = $tax->label;
|
523 |
+
}
|
524 |
+
|
525 |
+
return $taxes;
|
526 |
+
|
527 |
+
}
|
528 |
+
|
529 |
+
/**
|
530 |
+
* Get list of terms as key-value pairs.
|
531 |
+
*
|
532 |
+
* @since 5.0.5
|
533 |
+
* @return array List of terms.
|
534 |
+
*/
|
535 |
+
public static function get_terms( $tax = 'category', $key = 'id' ) {
|
536 |
+
|
537 |
+
$terms = array();
|
538 |
+
|
539 |
+
if ( $key === 'id' ) {
|
540 |
+
|
541 |
+
foreach ( (array) get_terms( $tax, array( 'hide_empty' => false ) ) as $term ) {
|
542 |
+
$terms[$term->term_id] = $term->name;
|
543 |
+
}
|
544 |
+
|
545 |
+
}
|
546 |
+
|
547 |
+
elseif ( $key === 'slug' ) {
|
548 |
+
|
549 |
+
foreach ( (array) get_terms( $tax, array( 'hide_empty' => false ) ) as $term ) {
|
550 |
+
$terms[$term->slug] = $term->name;
|
551 |
+
}
|
552 |
+
|
553 |
+
}
|
554 |
+
|
555 |
+
return $terms;
|
556 |
+
|
557 |
+
}
|
558 |
+
|
559 |
}
|
560 |
|
561 |
new Su_Generator;
|
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Shortcodes_Ultimate_Load {
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Constructor
|
6 |
-
*/
|
7 |
-
function __construct() {
|
8 |
-
// add_action( 'plugins_loaded', array( __CLASS__, 'init' ) );
|
9 |
-
add_action( 'init', array( __CLASS__, 'register' ) );
|
10 |
-
// add_action( 'init', array( __CLASS__, 'update' ), 20 );
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Plugin init
|
15 |
-
*/
|
16 |
-
public static function init() {
|
17 |
-
|
18 |
-
// Make plugin available for translation
|
19 |
-
// load_plugin_textdomain( 'shortcodes-ultimate', false, dirname( plugin_basename( SU_PLUGIN_FILE ) ) . '/languages/' );
|
20 |
-
|
21 |
-
// Shortcodes Ultimate is ready
|
22 |
-
// do_action( 'su/init' );
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Plugin update hook
|
28 |
-
*/
|
29 |
-
public static function update() {
|
30 |
-
// $option = get_option( 'su_option_version' );
|
31 |
-
// if ( $option !== SU_PLUGIN_VERSION ) {
|
32 |
-
// update_option( 'su_option_version', SU_PLUGIN_VERSION );
|
33 |
-
// do_action( 'su/update' );
|
34 |
-
// }
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Register shortcodes
|
39 |
-
*/
|
40 |
-
public static function register() {
|
41 |
-
// Prepare compatibility mode prefix
|
42 |
-
$prefix = su_cmpt();
|
43 |
-
// Loop through shortcodes
|
44 |
-
foreach ( ( array ) Su_Data::shortcodes() as $id => $data ) {
|
45 |
-
if ( isset( $data['function'] ) && is_callable( $data['function'] ) ) $func = $data['function'];
|
46 |
-
elseif ( is_callable( array( 'Su_Shortcodes', $id ) ) ) $func = array( 'Su_Shortcodes', $id );
|
47 |
-
elseif ( is_callable( array( 'Su_Shortcodes', 'su_' . $id ) ) ) $func = array( 'Su_Shortcodes', 'su_' . $id );
|
48 |
-
else continue;
|
49 |
-
// Register shortcode
|
50 |
-
add_shortcode( $prefix . $id, $func );
|
51 |
-
}
|
52 |
-
// Register [media] manually // 3.x
|
53 |
-
add_shortcode( $prefix . 'media', array( 'Su_Shortcodes', 'media' ) );
|
54 |
-
}
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
new Shortcodes_Ultimate_Load;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,1686 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Su_Shortcodes {
|
3 |
-
static $tabs = array();
|
4 |
-
static $tab_count = 0;
|
5 |
-
|
6 |
-
function __construct() {}
|
7 |
-
|
8 |
-
public static function heading( $atts = null, $content = null ) {
|
9 |
-
$atts = shortcode_atts( array(
|
10 |
-
'style' => 'default',
|
11 |
-
'size' => 13,
|
12 |
-
'align' => 'center',
|
13 |
-
'margin' => '20',
|
14 |
-
'class' => ''
|
15 |
-
), $atts, 'heading' );
|
16 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
17 |
-
do_action( 'su/shortcode/heading', $atts );
|
18 |
-
return '<div class="su-heading su-heading-style-' . $atts['style'] . ' su-heading-align-' . $atts['align'] . su_ecssc( $atts ) . '" style="font-size:' . intval( $atts['size'] ) . 'px;margin-bottom:' . $atts['margin'] . 'px"><div class="su-heading-inner">' . do_shortcode( $content ) . '</div></div>';
|
19 |
-
}
|
20 |
-
|
21 |
-
public static function tabs( $atts = null, $content = null ) {
|
22 |
-
$atts = shortcode_atts( array(
|
23 |
-
'active' => 1,
|
24 |
-
'vertical' => 'no',
|
25 |
-
'style' => 'default', // 3.x
|
26 |
-
'class' => ''
|
27 |
-
), $atts, 'tabs' );
|
28 |
-
if ( $atts['style'] === '3' ) $atts['vertical'] = 'yes';
|
29 |
-
do_shortcode( $content );
|
30 |
-
$return = '';
|
31 |
-
$tabs = $panes = array();
|
32 |
-
if ( is_array( self::$tabs ) ) {
|
33 |
-
if ( self::$tab_count < $atts['active'] ) $atts['active'] = self::$tab_count;
|
34 |
-
foreach ( self::$tabs as $tab ) {
|
35 |
-
$tabs[] = '<span class="' . su_ecssc( $tab ) . $tab['disabled'] . '"' . $tab['anchor'] . $tab['url'] . $tab['target'] . '>' . su_scattr( $tab['title'] ) . '</span>';
|
36 |
-
$panes[] = '<div class="su-tabs-pane su-clearfix' . su_ecssc( $tab ) . '">' . $tab['content'] . '</div>';
|
37 |
-
}
|
38 |
-
$atts['vertical'] = ( $atts['vertical'] === 'yes' ) ? ' su-tabs-vertical' : '';
|
39 |
-
$return = '<div class="su-tabs su-tabs-style-' . $atts['style'] . $atts['vertical'] . su_ecssc( $atts ) . '" data-active="' . (string) $atts['active'] . '"><div class="su-tabs-nav">' . implode( '', $tabs ) . '</div><div class="su-tabs-panes">' . implode( "\n", $panes ) . '</div></div>';
|
40 |
-
}
|
41 |
-
// Reset tabs
|
42 |
-
self::$tabs = array();
|
43 |
-
self::$tab_count = 0;
|
44 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
45 |
-
su_query_asset( 'js', 'jquery' );
|
46 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
47 |
-
do_action( 'su/shortcode/tabs', $atts );
|
48 |
-
return $return;
|
49 |
-
}
|
50 |
-
|
51 |
-
public static function tab( $atts = null, $content = null ) {
|
52 |
-
$atts = shortcode_atts( array(
|
53 |
-
'title' => __( 'Tab title', 'shortcodes-ultimate' ),
|
54 |
-
'disabled' => 'no',
|
55 |
-
'anchor' => '',
|
56 |
-
'url' => '',
|
57 |
-
'target' => 'blank',
|
58 |
-
'class' => ''
|
59 |
-
), $atts, 'tab' );
|
60 |
-
$x = self::$tab_count;
|
61 |
-
self::$tabs[$x] = array(
|
62 |
-
'title' => $atts['title'],
|
63 |
-
'content' => do_shortcode( $content ),
|
64 |
-
'disabled' => ( $atts['disabled'] === 'yes' ) ? ' su-tabs-disabled' : '',
|
65 |
-
'anchor' => ( $atts['anchor'] ) ? ' data-anchor="' . str_replace( array( ' ', '#' ), '', sanitize_text_field( $atts['anchor'] ) ) . '"' : '',
|
66 |
-
'url' => ' data-url="' . $atts['url'] . '"',
|
67 |
-
'target' => ' data-target="' . $atts['target'] . '"',
|
68 |
-
'class' => $atts['class']
|
69 |
-
);
|
70 |
-
self::$tab_count++;
|
71 |
-
do_action( 'su/shortcode/tab', $atts );
|
72 |
-
}
|
73 |
-
|
74 |
-
public static function spoiler( $atts = null, $content = null ) {
|
75 |
-
$atts = shortcode_atts( array(
|
76 |
-
'title' => __( 'Spoiler title', 'shortcodes-ultimate' ),
|
77 |
-
'open' => 'no',
|
78 |
-
'style' => 'default',
|
79 |
-
'icon' => 'plus',
|
80 |
-
'anchor' => '',
|
81 |
-
'class' => ''
|
82 |
-
), $atts, 'spoiler' );
|
83 |
-
$atts['style'] = str_replace( array( '1', '2' ), array( 'default', 'fancy' ), $atts['style'] );
|
84 |
-
$atts['anchor'] = ( $atts['anchor'] ) ? ' data-anchor="' . str_replace( array( ' ', '#' ), '', sanitize_text_field( $atts['anchor'] ) ) . '"' : '';
|
85 |
-
if ( $atts['open'] !== 'yes' ) $atts['class'] .= ' su-spoiler-closed';
|
86 |
-
su_query_asset( 'css', 'font-awesome' );
|
87 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
88 |
-
su_query_asset( 'js', 'jquery' );
|
89 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
90 |
-
do_action( 'su/shortcode/spoiler', $atts );
|
91 |
-
return '<div class="su-spoiler su-spoiler-style-' . $atts['style'] . ' su-spoiler-icon-' . $atts['icon'] . su_ecssc( $atts ) . '"' . $atts['anchor'] . '><div class="su-spoiler-title"><span class="su-spoiler-icon"></span>' . su_scattr( $atts['title'] ) . '</div><div class="su-spoiler-content su-clearfix">' . su_do_nested_shortcodes( $content, 'spoiler' ) . '</div></div>';
|
92 |
-
}
|
93 |
-
|
94 |
-
public static function accordion( $atts = null, $content = null ) {
|
95 |
-
$atts = shortcode_atts( array( 'class' => '' ), $atts, 'accordion' );
|
96 |
-
do_action( 'su/shortcode/accordion', $atts );
|
97 |
-
return '<div class="su-accordion' . su_ecssc( $atts ) . '">' . do_shortcode( $content ) . '</div>';
|
98 |
-
}
|
99 |
-
|
100 |
-
public static function divider( $atts = null, $content = null ) {
|
101 |
-
$atts = shortcode_atts( array(
|
102 |
-
'top' => 'yes',
|
103 |
-
'text' => __( 'Go to top', 'shortcodes-ultimate' ),
|
104 |
-
'style' => 'default',
|
105 |
-
'divider_color' => '#999999',
|
106 |
-
'link_color' => '#999999',
|
107 |
-
'size' => '3',
|
108 |
-
'margin' => '15',
|
109 |
-
'class' => ''
|
110 |
-
), $atts, 'divider' );
|
111 |
-
// Prepare TOP link
|
112 |
-
$top = ( $atts['top'] === 'yes' ) ? '<a href="#" style="color:' . $atts['link_color'] . '">' . su_scattr( $atts['text'] ) . '</a>' : '';
|
113 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
114 |
-
return '<div class="su-divider su-divider-style-' . $atts['style'] . su_ecssc( $atts ) . '" style="margin:' . $atts['margin'] . 'px 0;border-width:' . $atts['size'] . 'px;border-color:' . $atts['divider_color'] . '">' . $top . '</div>';
|
115 |
-
}
|
116 |
-
|
117 |
-
public static function spacer( $atts = null, $content = null ) {
|
118 |
-
$atts = shortcode_atts( array(
|
119 |
-
'size' => '20',
|
120 |
-
'class' => ''
|
121 |
-
), $atts, 'spacer' );
|
122 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
123 |
-
return '<div class="su-spacer' . su_ecssc( $atts ) . '" style="height:' . (string) $atts['size'] . 'px"></div>';
|
124 |
-
}
|
125 |
-
|
126 |
-
public static function highlight( $atts = null, $content = null ) {
|
127 |
-
$atts = shortcode_atts( array(
|
128 |
-
'background' => '#ddff99',
|
129 |
-
'bg' => null, // 3.x
|
130 |
-
'color' => '#000000',
|
131 |
-
'class' => ''
|
132 |
-
), $atts, 'highlight' );
|
133 |
-
if ( $atts['bg'] !== null ) $atts['background'] = $atts['bg'];
|
134 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
135 |
-
return '<span class="su-highlight' . su_ecssc( $atts ) . '" style="background:' . $atts['background'] . ';color:' . $atts['color'] . '"> ' . do_shortcode( $content ) . ' </span>';
|
136 |
-
}
|
137 |
-
|
138 |
-
public static function label( $atts = null, $content = null ) {
|
139 |
-
$atts = shortcode_atts( array(
|
140 |
-
'type' => 'default',
|
141 |
-
'style' => null, // 3.x
|
142 |
-
'class' => ''
|
143 |
-
), $atts, 'label' );
|
144 |
-
if ( $atts['style'] !== null ) $atts['type'] = $atts['style'];
|
145 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
146 |
-
return '<span class="su-label su-label-type-' . $atts['type'] . su_ecssc( $atts ) . '">' . do_shortcode( $content ) . '</span>';
|
147 |
-
}
|
148 |
-
|
149 |
-
public static function quote( $atts = null, $content = null ) {
|
150 |
-
$atts = shortcode_atts( array(
|
151 |
-
'style' => 'default',
|
152 |
-
'cite' => false,
|
153 |
-
'url' => false,
|
154 |
-
'class' => ''
|
155 |
-
), $atts, 'quote' );
|
156 |
-
$cite_link = ( $atts['url'] && $atts['cite'] ) ? '<a href="' . $atts['url'] . '" target="_blank">' . $atts['cite'] . '</a>'
|
157 |
-
: $atts['cite'];
|
158 |
-
$cite = ( $atts['cite'] ) ? '<span class="su-quote-cite">' . $cite_link . '</span>' : '';
|
159 |
-
$cite_class = ( $atts['cite'] ) ? ' su-quote-has-cite' : '';
|
160 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
161 |
-
do_action( 'su/shortcode/quote', $atts );
|
162 |
-
return '<div class="su-quote su-quote-style-' . $atts['style'] . $cite_class . su_ecssc( $atts ) . '"><div class="su-quote-inner su-clearfix">' . do_shortcode( $content ) . su_scattr( $cite ) . '</div></div>';
|
163 |
-
}
|
164 |
-
|
165 |
-
public static function pullquote( $atts = null, $content = null ) {
|
166 |
-
$atts = shortcode_atts( array(
|
167 |
-
'align' => 'left',
|
168 |
-
'class' => ''
|
169 |
-
), $atts, 'pullquote' );
|
170 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
171 |
-
return '<div class="su-pullquote su-pullquote-align-' . $atts['align'] . su_ecssc( $atts ) . '">' . do_shortcode( $content ) . '</div>';
|
172 |
-
}
|
173 |
-
|
174 |
-
public static function dropcap( $atts = null, $content = null ) {
|
175 |
-
$atts = shortcode_atts( array(
|
176 |
-
'style' => 'default',
|
177 |
-
'size' => 3,
|
178 |
-
'class' => ''
|
179 |
-
), $atts, 'dropcap' );
|
180 |
-
$atts['style'] = str_replace( array( '1', '2', '3' ), array( 'default', 'light', 'default' ), $atts['style'] ); // 3.x
|
181 |
-
// Calculate font-size
|
182 |
-
$em = $atts['size'] * 0.5 . 'em';
|
183 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
184 |
-
return '<span class="su-dropcap su-dropcap-style-' . $atts['style'] . su_ecssc( $atts ) . '" style="font-size:' . $em . '">' . do_shortcode( $content ) . '</span>';
|
185 |
-
}
|
186 |
-
|
187 |
-
public static function frame( $atts = null, $content = null ) {
|
188 |
-
$atts = shortcode_atts( array(
|
189 |
-
'style' => 'default',
|
190 |
-
'align' => 'left',
|
191 |
-
'class' => ''
|
192 |
-
), $atts, 'frame' );
|
193 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
194 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
195 |
-
return '<span class="su-frame su-frame-align-' . $atts['align'] . ' su-frame-style-' . $atts['style'] . su_ecssc( $atts ) . '"><span class="su-frame-inner">' . do_shortcode( $content ) . '</span></span>';
|
196 |
-
}
|
197 |
-
|
198 |
-
public static function row( $atts = null, $content = null ) {
|
199 |
-
$atts = shortcode_atts( array( 'class' => '' ), $atts );
|
200 |
-
return '<div class="su-row' . su_ecssc( $atts ) . '">' . su_do_nested_shortcodes( $content, 'row' ) . '</div>';
|
201 |
-
}
|
202 |
-
|
203 |
-
public static function column( $atts = null, $content = null ) {
|
204 |
-
$atts = shortcode_atts( array(
|
205 |
-
'size' => '1/2',
|
206 |
-
'center' => 'no',
|
207 |
-
'last' => null,
|
208 |
-
'class' => ''
|
209 |
-
), $atts, 'column' );
|
210 |
-
if ( $atts['last'] !== null && $atts['last'] == '1' ) $atts['class'] .= ' su-column-last';
|
211 |
-
if ( $atts['center'] === 'yes' ) $atts['class'] .= ' su-column-centered';
|
212 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
213 |
-
return '<div class="su-column su-column-size-' . str_replace( '/', '-', $atts['size'] ) . su_ecssc( $atts ) . '"><div class="su-column-inner su-clearfix">' . su_do_nested_shortcodes( $content, 'column' ) . '</div></div>';
|
214 |
-
}
|
215 |
-
|
216 |
-
public static function su_list( $atts = null, $content = null ) {
|
217 |
-
$atts = shortcode_atts( array(
|
218 |
-
'icon' => 'icon: star',
|
219 |
-
'icon_color' => '#333',
|
220 |
-
'style' => null,
|
221 |
-
'class' => ''
|
222 |
-
), $atts, 'list' );
|
223 |
-
// Backward compatibility // 4.2.3+
|
224 |
-
if ( $atts['style'] !== null ) {
|
225 |
-
switch ( $atts['style'] ) {
|
226 |
-
case 'star':
|
227 |
-
$atts['icon'] = 'icon: star';
|
228 |
-
$atts['icon_color'] = '#ffd647';
|
229 |
-
break;
|
230 |
-
case 'arrow':
|
231 |
-
$atts['icon'] = 'icon: arrow-right';
|
232 |
-
$atts['icon_color'] = '#00d1ce';
|
233 |
-
break;
|
234 |
-
case 'check':
|
235 |
-
$atts['icon'] = 'icon: check';
|
236 |
-
$atts['icon_color'] = '#17bf20';
|
237 |
-
break;
|
238 |
-
case 'cross':
|
239 |
-
$atts['icon'] = 'icon: remove';
|
240 |
-
$atts['icon_color'] = '#ff142b';
|
241 |
-
break;
|
242 |
-
case 'thumbs':
|
243 |
-
$atts['icon'] = 'icon: thumbs-o-up';
|
244 |
-
$atts['icon_color'] = '#8a8a8a';
|
245 |
-
break;
|
246 |
-
case 'link':
|
247 |
-
$atts['icon'] = 'icon: external-link';
|
248 |
-
$atts['icon_color'] = '#5c5c5c';
|
249 |
-
break;
|
250 |
-
case 'gear':
|
251 |
-
$atts['icon'] = 'icon: cog';
|
252 |
-
$atts['icon_color'] = '#ccc';
|
253 |
-
break;
|
254 |
-
case 'time':
|
255 |
-
$atts['icon'] = 'icon: time';
|
256 |
-
$atts['icon_color'] = '#a8a8a8';
|
257 |
-
break;
|
258 |
-
case 'note':
|
259 |
-
$atts['icon'] = 'icon: edit';
|
260 |
-
$atts['icon_color'] = '#f7d02c';
|
261 |
-
break;
|
262 |
-
case 'plus':
|
263 |
-
$atts['icon'] = 'icon: plus-sign';
|
264 |
-
$atts['icon_color'] = '#61dc3c';
|
265 |
-
break;
|
266 |
-
case 'guard':
|
267 |
-
$atts['icon'] = 'icon: shield';
|
268 |
-
$atts['icon_color'] = '#1bbe08';
|
269 |
-
break;
|
270 |
-
case 'event':
|
271 |
-
$atts['icon'] = 'icon: bullhorn';
|
272 |
-
$atts['icon_color'] = '#ff4c42';
|
273 |
-
break;
|
274 |
-
case 'idea':
|
275 |
-
$atts['icon'] = 'icon: sun';
|
276 |
-
$atts['icon_color'] = '#ffd880';
|
277 |
-
break;
|
278 |
-
case 'settings':
|
279 |
-
$atts['icon'] = 'icon: cogs';
|
280 |
-
$atts['icon_color'] = '#8a8a8a';
|
281 |
-
break;
|
282 |
-
case 'twitter':
|
283 |
-
$atts['icon'] = 'icon: twitter-sign';
|
284 |
-
$atts['icon_color'] = '#00ced6';
|
285 |
-
break;
|
286 |
-
}
|
287 |
-
}
|
288 |
-
if ( strpos( $atts['icon'], 'icon:' ) !== false ) {
|
289 |
-
$atts['icon'] = '<i class="fa fa-' . trim( str_replace( 'icon:', '', $atts['icon'] ) ) . '" style="color:' . $atts['icon_color'] . '"></i>';
|
290 |
-
su_query_asset( 'css', 'font-awesome' );
|
291 |
-
}
|
292 |
-
else $atts['icon'] = '<img src="' . $atts['icon'] . '" alt="" />';
|
293 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
294 |
-
return '<div class="su-list su-list-style-' . $atts['style'] . su_ecssc( $atts ) . '">' . str_replace( '<li>', '<li>' . $atts['icon'] . ' ', su_do_nested_shortcodes( $content, 'list' ) ) . '</div>';
|
295 |
-
}
|
296 |
-
|
297 |
-
public static function button( $atts = null, $content = null ) {
|
298 |
-
$atts = shortcode_atts( array(
|
299 |
-
'url' => get_option( 'home' ),
|
300 |
-
'link' => null, // 3.x
|
301 |
-
'target' => 'self',
|
302 |
-
'style' => 'default',
|
303 |
-
'background' => '#2D89EF',
|
304 |
-
'color' => '#FFFFFF',
|
305 |
-
'dark' => null, // 3.x
|
306 |
-
'size' => 3,
|
307 |
-
'wide' => 'no',
|
308 |
-
'center' => 'no',
|
309 |
-
'radius' => 'auto',
|
310 |
-
'icon' => false,
|
311 |
-
'icon_color' => '#FFFFFF',
|
312 |
-
'ts_color' => null, // Dep. 4.3.2
|
313 |
-
'ts_pos' => null, // Dep. 4.3.2
|
314 |
-
'text_shadow' => 'none',
|
315 |
-
'desc' => '',
|
316 |
-
'onclick' => '',
|
317 |
-
'rel' => '',
|
318 |
-
'title' => '',
|
319 |
-
'id' => '',
|
320 |
-
'class' => ''
|
321 |
-
), $atts, 'button' );
|
322 |
-
|
323 |
-
if ( $atts['link'] !== null ) $atts['url'] = $atts['link'];
|
324 |
-
if ( $atts['dark'] !== null ) {
|
325 |
-
$atts['background'] = $atts['color'];
|
326 |
-
$atts['color'] = ( $atts['dark'] ) ? '#000' : '#fff';
|
327 |
-
}
|
328 |
-
if ( is_numeric( $atts['style'] ) ) $atts['style'] = str_replace( array( '1', '2', '3', '4', '5' ), array( 'default', 'glass', 'bubbles', 'noise', 'stroked' ), $atts['style'] ); // 3.x
|
329 |
-
// Prepare vars
|
330 |
-
$a_css = array();
|
331 |
-
$span_css = array();
|
332 |
-
$img_css = array();
|
333 |
-
$small_css = array();
|
334 |
-
$radius = '0px';
|
335 |
-
$before = $after = '';
|
336 |
-
// Text shadow values
|
337 |
-
$shadows = array(
|
338 |
-
'none' => '0 0',
|
339 |
-
'top' => '0 -1px',
|
340 |
-
'right' => '1px 0',
|
341 |
-
'bottom' => '0 1px',
|
342 |
-
'left' => '-1px 0',
|
343 |
-
'top-right' => '1px -1px',
|
344 |
-
'top-left' => '-1px -1px',
|
345 |
-
'bottom-right' => '1px 1px',
|
346 |
-
'bottom-left' => '-1px 1px'
|
347 |
-
);
|
348 |
-
// Common styles for button
|
349 |
-
$styles = array(
|
350 |
-
'size' => round( ( $atts['size'] + 7 ) * 1.3 ),
|
351 |
-
'ts_color' => ( $atts['ts_color'] === 'light' ) ? su_hex_shift( $atts['background'], 'lighter', 50 ) : su_hex_shift( $atts['background'], 'darker', 40 ),
|
352 |
-
'ts_pos' => ( $atts['ts_pos'] !== null ) ? $shadows[$atts['ts_pos']] : $shadows['none']
|
353 |
-
);
|
354 |
-
// Calculate border-radius
|
355 |
-
if ( $atts['radius'] == 'auto' ) $radius = round( $atts['size'] + 2 ) . 'px';
|
356 |
-
elseif ( $atts['radius'] == 'round' ) $radius = round( ( ( $atts['size'] * 2 ) + 2 ) * 2 + $styles['size'] ) . 'px';
|
357 |
-
elseif ( is_numeric( $atts['radius'] ) ) $radius = intval( $atts['radius'] ) . 'px';
|
358 |
-
// CSS rules for <a> tag
|
359 |
-
$a_rules = array(
|
360 |
-
'color' => $atts['color'],
|
361 |
-
'background-color' => $atts['background'],
|
362 |
-
'border-color' => su_hex_shift( $atts['background'], 'darker', 20 ),
|
363 |
-
'border-radius' => $radius,
|
364 |
-
'-moz-border-radius' => $radius,
|
365 |
-
'-webkit-border-radius' => $radius
|
366 |
-
);
|
367 |
-
// CSS rules for <span> tag
|
368 |
-
$span_rules = array(
|
369 |
-
'color' => $atts['color'],
|
370 |
-
'padding' => ( $atts['icon'] ) ? round( ( $atts['size'] ) / 2 + 4 ) . 'px ' . round( $atts['size'] * 2 + 10 ) . 'px' : '0px ' . round( $atts['size'] * 2 + 10 ) . 'px',
|
371 |
-
'font-size' => $styles['size'] . 'px',
|
372 |
-
'line-height' => ( $atts['icon'] ) ? round( $styles['size'] * 1.5 ) . 'px' : round( $styles['size'] * 2 ) . 'px',
|
373 |
-
'border-color' => su_hex_shift( $atts['background'], 'lighter', 30 ),
|
374 |
-
'border-radius' => $radius,
|
375 |
-
'-moz-border-radius' => $radius,
|
376 |
-
'-webkit-border-radius' => $radius,
|
377 |
-
'text-shadow' => $styles['ts_pos'] . ' 1px ' . $styles['ts_color'],
|
378 |
-
'-moz-text-shadow' => $styles['ts_pos'] . ' 1px ' . $styles['ts_color'],
|
379 |
-
'-webkit-text-shadow' => $styles['ts_pos'] . ' 1px ' . $styles['ts_color']
|
380 |
-
);
|
381 |
-
// Apply new text-shadow value
|
382 |
-
if ( $atts['ts_color'] === null && $atts['ts_pos'] === null ) {
|
383 |
-
$span_rules['text-shadow'] = $atts['text_shadow'];
|
384 |
-
$span_rules['-moz-text-shadow'] = $atts['text_shadow'];
|
385 |
-
$span_rules['-webkit-text-shadow'] = $atts['text_shadow'];
|
386 |
-
}
|
387 |
-
// CSS rules for <img> tag
|
388 |
-
$img_rules = array(
|
389 |
-
'width' => round( $styles['size'] * 1.5 ) . 'px',
|
390 |
-
'height' => round( $styles['size'] * 1.5 ) . 'px'
|
391 |
-
);
|
392 |
-
// CSS rules for <small> tag
|
393 |
-
$small_rules = array(
|
394 |
-
'padding-bottom' => round( ( $atts['size'] ) / 2 + 4 ) . 'px',
|
395 |
-
'color' => $atts['color']
|
396 |
-
);
|
397 |
-
// Create style attr value for <a> tag
|
398 |
-
foreach ( $a_rules as $a_rule => $a_value ) $a_css[] = $a_rule . ':' . $a_value;
|
399 |
-
// Create style attr value for <span> tag
|
400 |
-
foreach ( $span_rules as $span_rule => $span_value ) $span_css[] = $span_rule . ':' . $span_value;
|
401 |
-
// Create style attr value for <img> tag
|
402 |
-
foreach ( $img_rules as $img_rule => $img_value ) $img_css[] = $img_rule . ':' . $img_value;
|
403 |
-
// Create style attr value for <img> tag
|
404 |
-
foreach ( $small_rules as $small_rule => $small_value ) $small_css[] = $small_rule . ':' . $small_value;
|
405 |
-
// Prepare button classes
|
406 |
-
$classes = array( 'su-button', 'su-button-style-' . $atts['style'] );
|
407 |
-
// Additional classes
|
408 |
-
if ( $atts['class'] ) $classes[] = $atts['class'];
|
409 |
-
// Wide class
|
410 |
-
if ( $atts['wide'] === 'yes' ) $classes[] = 'su-button-wide';
|
411 |
-
// Prepare icon
|
412 |
-
if ( $atts['icon'] ) {
|
413 |
-
if ( strpos( $atts['icon'], 'icon:' ) !== false ) {
|
414 |
-
$icon = '<i class="fa fa-' . trim( str_replace( 'icon:', '', $atts['icon'] ) ) . '" style="font-size:' . $styles['size'] . 'px;color:' . $atts['icon_color'] . '"></i>';
|
415 |
-
su_query_asset( 'css', 'font-awesome' );
|
416 |
-
}
|
417 |
-
else $icon = '<img src="' . $atts['icon'] . '" alt="' . esc_attr( $content ) . '" style="' . implode( $img_css, ';' ) . '" />';
|
418 |
-
}
|
419 |
-
else $icon = '';
|
420 |
-
// Prepare <small> with description
|
421 |
-
$desc = ( $atts['desc'] ) ? '<small style="' . implode( $small_css, ';' ) . '">' . su_scattr( $atts['desc'] ) . '</small>' : '';
|
422 |
-
// Wrap with div if button centered
|
423 |
-
if ( $atts['center'] === 'yes' ) {
|
424 |
-
$before .= '<div class="su-button-center">';
|
425 |
-
$after .= '</div>';
|
426 |
-
}
|
427 |
-
// Replace icon marker in content,
|
428 |
-
// add float-icon class to rearrange margins
|
429 |
-
if ( strpos( $content, '%icon%' ) !== false ) {
|
430 |
-
$content = str_replace( '%icon%', $icon, $content );
|
431 |
-
$classes[] = 'su-button-float-icon';
|
432 |
-
}
|
433 |
-
// Button text has no icon marker, append icon to begin of the text
|
434 |
-
else $content = $icon . ' ' . $content;
|
435 |
-
// Prepare onclick action
|
436 |
-
$atts['onclick'] = ( $atts['onclick'] ) ? ' onClick="' . $atts['onclick'] . '"' : '';
|
437 |
-
// Prepare rel attribute
|
438 |
-
$atts['rel'] = ( $atts['rel'] ) ? ' rel="' . $atts['rel'] . '"' : '';
|
439 |
-
// Prepare title attribute
|
440 |
-
$atts['title'] = ( $atts['title'] ) ? ' title="' . $atts['title'] . '"' : '';
|
441 |
-
// Add ID attribute
|
442 |
-
$atts['id'] = ! empty( $atts['id'] ) ? sprintf( ' id="%s"', esc_attr( $atts['id'] ) ) : '';
|
443 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
444 |
-
return $before . '<a href="' . su_scattr( $atts['url'] ) . '" class="' . implode( $classes, ' ' ) . '" style="' . implode( $a_css, ';' ) . '" target="_' . $atts['target'] . '"' . $atts['onclick'] . $atts['rel'] . $atts['title'] . $atts['id'] . '><span style="' . implode( $span_css, ';' ) . '">' . do_shortcode( stripcslashes( $content ) ) . $desc . '</span></a>' . $after;
|
445 |
-
}
|
446 |
-
|
447 |
-
public static function service( $atts = null, $content = null ) {
|
448 |
-
$atts = shortcode_atts( array(
|
449 |
-
'title' => __( 'Service title', 'shortcodes-ultimate' ),
|
450 |
-
'icon' => plugins_url( 'assets/images/service.png', SU_PLUGIN_FILE ),
|
451 |
-
'icon_color' => '#333',
|
452 |
-
'size' => 32,
|
453 |
-
'class' => ''
|
454 |
-
), $atts, 'service' );
|
455 |
-
// RTL
|
456 |
-
$rtl = ( is_rtl() ) ? 'right' : 'left';
|
457 |
-
// Built-in icon
|
458 |
-
if ( strpos( $atts['icon'], 'icon:' ) !== false ) {
|
459 |
-
$atts['icon'] = '<i class="fa fa-' . trim( str_replace( 'icon:', '', $atts['icon'] ) ) . '" style="font-size:' . $atts['size'] . 'px;color:' . $atts['icon_color'] . '"></i>';
|
460 |
-
su_query_asset( 'css', 'font-awesome' );
|
461 |
-
}
|
462 |
-
// Uploaded icon
|
463 |
-
else {
|
464 |
-
$atts['icon'] = '<img src="' . $atts['icon'] . '" width="' . $atts['size'] . '" height="' . $atts['size'] . '" alt="' . $atts['title'] . '" />';
|
465 |
-
}
|
466 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
467 |
-
return '<div class="su-service' . su_ecssc( $atts ) . '"><div class="su-service-title" style="padding-' . $rtl . ':' . round( $atts['size'] + 14 ) . 'px;min-height:' . $atts['size'] . 'px;line-height:' . $atts['size'] . 'px">' . $atts['icon'] . ' ' . su_scattr( $atts['title'] ) . '</div><div class="su-service-content su-clearfix" style="padding-' . $rtl . ':' . round( $atts['size'] + 14 ) . 'px">' . do_shortcode( $content ) . '</div></div>';
|
468 |
-
}
|
469 |
-
|
470 |
-
public static function box( $atts = null, $content = null ) {
|
471 |
-
|
472 |
-
$atts = shortcode_atts( array(
|
473 |
-
'title' => __( 'This is box title', 'shortcodes-ultimate' ),
|
474 |
-
'style' => 'default',
|
475 |
-
'box_color' => '#333333',
|
476 |
-
'title_color' => '#FFFFFF',
|
477 |
-
'color' => null, // 3.x
|
478 |
-
'radius' => '3',
|
479 |
-
'class' => ''
|
480 |
-
), $atts, 'box' );
|
481 |
-
|
482 |
-
if ( $atts['color'] !== null ) {
|
483 |
-
$atts['box_color'] = $atts['color'];
|
484 |
-
}
|
485 |
-
|
486 |
-
$atts['radius'] = is_numeric( $atts['radius'] ) ? intval( $atts['radius'] ) : 0;
|
487 |
-
$atts['inner_radius'] = $atts['radius'] > 2 ? $atts['radius'] - 2 : 0;
|
488 |
-
|
489 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
490 |
-
|
491 |
-
// Return result
|
492 |
-
return sprintf(
|
493 |
-
'<div class="su-box su-box-style-%1$s%2$s" style="border-color:%3$s;border-radius:%4$spx"><div class="su-box-title" style="background-color:%5$s;color:%6$s;border-top-left-radius:%7$spx;border-top-right-radius:%7$spx">%8$s</div><div class="su-box-content su-clearfix" style="border-bottom-left-radius:%7$spx;border-bottom-right-radius:%7$spx">%9$s</div></div>',
|
494 |
-
esc_attr( $atts['style'] ),
|
495 |
-
su_ecssc( $atts ),
|
496 |
-
su_hex_shift( $atts['box_color'], 'darker', 20 ),
|
497 |
-
$atts['radius'],
|
498 |
-
$atts['box_color'],
|
499 |
-
$atts['title_color'],
|
500 |
-
$atts['inner_radius'],
|
501 |
-
su_scattr( $atts['title'] ),
|
502 |
-
su_do_nested_shortcodes( $content, 'box' )
|
503 |
-
);
|
504 |
-
|
505 |
-
}
|
506 |
-
|
507 |
-
public static function note( $atts = null, $content = null ) {
|
508 |
-
$atts = shortcode_atts( array(
|
509 |
-
'note_color' => '#FFFF66',
|
510 |
-
'text_color' => '#333333',
|
511 |
-
'background' => null, // 3.x
|
512 |
-
'color' => null, // 3.x
|
513 |
-
'radius' => '3',
|
514 |
-
'class' => ''
|
515 |
-
), $atts, 'note' );
|
516 |
-
if ( $atts['color'] !== null ) $atts['note_color'] = $atts['color'];
|
517 |
-
if ( $atts['background'] !== null ) $atts['note_color'] = $atts['background'];
|
518 |
-
// Prepare border-radius
|
519 |
-
$radius = ( $atts['radius'] != '0' ) ? 'border-radius:' . $atts['radius'] . 'px;-moz-border-radius:' . $atts['radius'] . 'px;-webkit-border-radius:' . $atts['radius'] . 'px;' : '';
|
520 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
521 |
-
return '<div class="su-note' . su_ecssc( $atts ) . '" style="border-color:' . su_hex_shift( $atts['note_color'], 'darker', 10 ) . ';' . $radius . '"><div class="su-note-inner su-clearfix" style="background-color:' . $atts['note_color'] . ';border-color:' . su_hex_shift( $atts['note_color'], 'lighter', 80 ) . ';color:' . $atts['text_color'] . ';' . $radius . '">' . su_do_nested_shortcodes( $content, 'note' ) . '</div></div>';
|
522 |
-
}
|
523 |
-
|
524 |
-
public static function expand( $atts = null, $content = null ) {
|
525 |
-
$atts = shortcode_atts( array(
|
526 |
-
'more_text' => __( 'Show more', 'shortcodes-ultimate' ),
|
527 |
-
'less_text' => __( 'Show less', 'shortcodes-ultimate' ),
|
528 |
-
'height' => '100',
|
529 |
-
'hide_less' => 'no',
|
530 |
-
'text_color' => '#333333',
|
531 |
-
'link_color' => '#0088FF',
|
532 |
-
'link_style' => 'default',
|
533 |
-
'link_align' => 'left',
|
534 |
-
'more_icon' => '',
|
535 |
-
'less_icon' => '',
|
536 |
-
'class' => ''
|
537 |
-
), $atts, 'expand' );
|
538 |
-
// Prepare more icon
|
539 |
-
$more_icon = ( $atts['more_icon'] ) ? Su_Tools::icon( $atts['more_icon'] ) : '';
|
540 |
-
$less_icon = ( $atts['less_icon'] ) ? Su_Tools::icon( $atts['less_icon'] ) : '';
|
541 |
-
if ( $more_icon || $less_icon ) su_query_asset( 'css', 'font-awesome' );
|
542 |
-
// Prepare less link
|
543 |
-
$less = ( $atts['hide_less'] !== 'yes' ) ? '<div class="su-expand-link su-expand-link-less" style="text-align:' . $atts['link_align'] . '"><a href="javascript:;" style="color:' . $atts['link_color'] . ';border-color:' . $atts['link_color'] . '">' . $less_icon . '<span style="border-color:' . $atts['link_color'] . '">' . $atts['less_text'] . '</span></a></div>' : '';
|
544 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
545 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
546 |
-
return '<div class="su-expand su-expand-collapsed su-expand-link-style-' . $atts['link_style'] . su_ecssc( $atts ) . '" data-height="' . $atts['height'] . '"><div class="su-expand-content" style="color:' . $atts['text_color'] . ';max-height:' . intval( $atts['height'] ) . 'px;overflow:hidden">' . do_shortcode( $content ) . '</div><div class="su-expand-link su-expand-link-more" style="text-align:' . $atts['link_align'] . '"><a href="javascript:;" style="color:' . $atts['link_color'] . ';border-color:' . $atts['link_color'] . '">' . $more_icon . '<span style="border-color:' . $atts['link_color'] . '">' . $atts['more_text'] . '</span></a></div>' . $less . '</div>';
|
547 |
-
}
|
548 |
-
|
549 |
-
public static function lightbox( $atts = null, $content = null ) {
|
550 |
-
$atts = shortcode_atts( array(
|
551 |
-
'src' => false,
|
552 |
-
'type' => 'iframe',
|
553 |
-
'class' => ''
|
554 |
-
), $atts, 'lightbox' );
|
555 |
-
if ( !$atts['src'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct source', 'shortcodes-ultimate' ) );
|
556 |
-
su_query_asset( 'css', 'magnific-popup' );
|
557 |
-
su_query_asset( 'js', 'jquery' );
|
558 |
-
su_query_asset( 'js', 'magnific-popup' );
|
559 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
560 |
-
return '<span class="su-lightbox' . su_ecssc( $atts ) . '" data-mfp-src="' . su_scattr( $atts['src'] ) . '" data-mfp-type="' . $atts['type'] . '">' . do_shortcode( $content ) . '</span>';
|
561 |
-
}
|
562 |
-
|
563 |
-
public static function lightbox_content( $atts = null, $content = null ) {
|
564 |
-
$atts = shortcode_atts( array(
|
565 |
-
'id' => '',
|
566 |
-
'width' => '50%',
|
567 |
-
'margin' => '40',
|
568 |
-
'padding' => '40',
|
569 |
-
'text_align' => 'center',
|
570 |
-
'background' => '#FFFFFF',
|
571 |
-
'color' => '#333333',
|
572 |
-
'shadow' => '0px 0px 15px #333333',
|
573 |
-
'class' => ''
|
574 |
-
), $atts, 'lightbox_content' );
|
575 |
-
su_query_asset( 'css', 'su-box-shortcodes' );
|
576 |
-
if ( !$atts['id'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct ID for this block. You should use same ID as in the Content source field (when inserting lightbox shortcode)', 'shortcodes-ultimate' ) );
|
577 |
-
$return = '<div class="su-lightbox-content ' . su_ecssc( $atts ) . '" id="' . trim( $atts['id'], '#' ) . '" style="display:none;width:' . $atts['width'] . ';margin-top:' . $atts['margin'] . 'px;margin-bottom:' . $atts['margin'] . 'px;padding:' . $atts['padding'] . 'px;background-color:' . $atts['background'] . ';color:' . $atts['color'] . ';box-shadow:' . $atts['shadow'] . ';text-align:' . $atts['text_align'] . '">' . do_shortcode( $content ) . '</div>';
|
578 |
-
if ( did_action( 'su/generator/preview/before' ) ) return '<div class="su-lightbox-content-preview">' . $return . '</div>';
|
579 |
-
else return $return;
|
580 |
-
}
|
581 |
-
|
582 |
-
public static function tooltip( $atts = null, $content = null ) {
|
583 |
-
$atts = shortcode_atts( array(
|
584 |
-
'style' => 'yellow',
|
585 |
-
'position' => 'north',
|
586 |
-
'shadow' => 'no',
|
587 |
-
'rounded' => 'no',
|
588 |
-
'size' => 'default',
|
589 |
-
'title' => '',
|
590 |
-
'content' => __( 'Tooltip text', 'shortcodes-ultimate' ),
|
591 |
-
'behavior' => 'hover',
|
592 |
-
'close' => 'no',
|
593 |
-
'class' => ''
|
594 |
-
), $atts, 'tooltip' );
|
595 |
-
// Prepare style
|
596 |
-
$atts['style'] = ( in_array( $atts['style'], array( 'light', 'dark', 'green', 'red', 'blue', 'youtube', 'tipsy', 'bootstrap', 'jtools', 'tipped', 'cluetip' ) ) ) ? $atts['style'] : 'plain';
|
597 |
-
// Position
|
598 |
-
$atts['position'] = str_replace( array( 'top', 'right', 'bottom', 'left' ), array( 'north', 'east', 'south', 'west' ), $atts['position'] );
|
599 |
-
$position = array(
|
600 |
-
'my' => str_replace( array( 'north', 'east', 'south', 'west' ), array( 'bottom center', 'center left', 'top center', 'center right' ), $atts['position'] ),
|
601 |
-
'at' => str_replace( array( 'north', 'east', 'south', 'west' ), array( 'top center', 'center right', 'bottom center', 'center left' ), $atts['position'] )
|
602 |
-
);
|
603 |
-
// Prepare classes
|
604 |
-
$classes = array( 'su-qtip qtip-' . $atts['style'] );
|
605 |
-
$classes[] = 'su-qtip-size-' . $atts['size'];
|
606 |
-
if ( $atts['shadow'] === 'yes' ) $classes[] = 'qtip-shadow';
|
607 |
-
if ( $atts['rounded'] === 'yes' ) $classes[] = 'qtip-rounded';
|
608 |
-
// Query assets
|
609 |
-
su_query_asset( 'css', 'qtip' );
|
610 |
-
su_query_asset( 'css', 'su-other-shortcodes' );
|
611 |
-
su_query_asset( 'js', 'jquery' );
|
612 |
-
su_query_asset( 'js', 'qtip' );
|
613 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
614 |
-
return '<span class="su-tooltip' . su_ecssc( $atts ) . '" data-close="' . $atts['close'] . '" data-behavior="' . $atts['behavior'] . '" data-my="' . $position['my'] . '" data-at="' . $position['at'] . '" data-classes="' . implode( ' ', $classes ) . '" data-title="' . $atts['title'] . '" title="' . esc_attr( $atts['content'] ) . '">' . do_shortcode( $content ) . '</span>';
|
615 |
-
}
|
616 |
-
|
617 |
-
public static function su_private( $atts = null, $content = null ) {
|
618 |
-
$atts = shortcode_atts( array( 'class' => '' ), $atts, 'private' );
|
619 |
-
su_query_asset( 'css', 'su-other-shortcodes' );
|
620 |
-
return ( current_user_can( 'publish_posts' ) ) ? '<div class="su-private' . su_ecssc( $atts ) . '"><div class="su-private-shell">' . do_shortcode( $content ) . '</div></div>' : '';
|
621 |
-
}
|
622 |
-
|
623 |
-
public static function media( $atts = null, $content = null ) {
|
624 |
-
// Check YouTube video
|
625 |
-
if ( strpos( $atts['url'], 'youtu' ) !== false ) return Su_Shortcodes::youtube( $atts );
|
626 |
-
// Check Vimeo video
|
627 |
-
elseif ( strpos( $atts['url'], 'vimeo' ) !== false ) return Su_Shortcodes::vimeo( $atts );
|
628 |
-
// Image
|
629 |
-
else return '<img src="' . $atts['url'] . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" style="max-width:100%" />';
|
630 |
-
}
|
631 |
-
|
632 |
-
public static function youtube( $atts = null, $content = null ) {
|
633 |
-
// Prepare data
|
634 |
-
$return = array();
|
635 |
-
$atts = shortcode_atts( array(
|
636 |
-
'url' => false,
|
637 |
-
'width' => 600,
|
638 |
-
'height' => 400,
|
639 |
-
'autoplay' => 'no',
|
640 |
-
'responsive' => 'yes',
|
641 |
-
'class' => ''
|
642 |
-
), $atts, 'youtube' );
|
643 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
644 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
645 |
-
$id = ( preg_match( '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $atts['url'], $match ) ) ? $match[1] : false;
|
646 |
-
// Check that url is specified
|
647 |
-
if ( !$id ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
648 |
-
// Prepare autoplay
|
649 |
-
$autoplay = ( $atts['autoplay'] === 'yes' ) ? '?autoplay=1' : '';
|
650 |
-
// Create player
|
651 |
-
$return[] = '<div class="su-youtube su-responsive-media-' . $atts['responsive'] . su_ecssc( $atts ) . '">';
|
652 |
-
$return[] = '<iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="https://www.youtube.com/embed/' . $id . $autoplay . '" frameborder="0" allowfullscreen="true"></iframe>';
|
653 |
-
$return[] = '</div>';
|
654 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
655 |
-
// Return result
|
656 |
-
return implode( '', $return );
|
657 |
-
}
|
658 |
-
|
659 |
-
public static function youtube_advanced( $atts = null, $content = null ) {
|
660 |
-
// Prepare data
|
661 |
-
$return = array();
|
662 |
-
$params = array();
|
663 |
-
$atts = shortcode_atts( array(
|
664 |
-
'url' => false,
|
665 |
-
'width' => 600,
|
666 |
-
'height' => 400,
|
667 |
-
'responsive' => 'yes',
|
668 |
-
'autohide' => 'alt',
|
669 |
-
'autoplay' => 'no',
|
670 |
-
'controls' => 'yes',
|
671 |
-
'fs' => 'yes',
|
672 |
-
'loop' => 'no',
|
673 |
-
'modestbranding' => 'no',
|
674 |
-
'playlist' => '',
|
675 |
-
'rel' => 'yes',
|
676 |
-
'showinfo' => 'yes',
|
677 |
-
'theme' => 'dark',
|
678 |
-
'https' => 'no',
|
679 |
-
'wmode' => '',
|
680 |
-
'playsinline' => 'no',
|
681 |
-
'class' => ''
|
682 |
-
), $atts, 'youtube_advanced' );
|
683 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
684 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
685 |
-
$id = ( preg_match( '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $atts['url'], $match ) ) ? $match[1] : false;
|
686 |
-
// Check that url is specified
|
687 |
-
if ( !$id ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
688 |
-
// Prepare params
|
689 |
-
foreach ( array( 'autohide', 'autoplay', 'controls', 'fs', 'loop', 'modestbranding', 'playlist', 'rel', 'showinfo', 'theme', 'wmode', 'playsinline' ) as $param ) $params[$param] = str_replace( array( 'no', 'yes', 'alt' ), array( '0', '1', '2' ), $atts[$param] );
|
690 |
-
// Correct loop
|
691 |
-
if ( $params['loop'] === '1' && $params['playlist'] === '' ) $params['playlist'] = $id;
|
692 |
-
// Prepare protocol
|
693 |
-
$protocol = ( $atts['https'] === 'yes' ) ? 'https' : 'http';
|
694 |
-
// Prepare player parameters
|
695 |
-
$params = http_build_query( $params );
|
696 |
-
// Create player
|
697 |
-
$return[] = '<div class="su-youtube su-responsive-media-' . $atts['responsive'] . su_ecssc( $atts ) . '">';
|
698 |
-
$return[] = '<iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="' . $protocol . '://www.youtube.com/embed/' . $id . '?' . $params . '" frameborder="0" allowfullscreen="true"></iframe>';
|
699 |
-
$return[] = '</div>';
|
700 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
701 |
-
// Return result
|
702 |
-
return implode( '', $return );
|
703 |
-
}
|
704 |
-
|
705 |
-
public static function vimeo( $atts = null, $content = null ) {
|
706 |
-
// Prepare data
|
707 |
-
$return = array();
|
708 |
-
$atts = shortcode_atts( array(
|
709 |
-
'url' => false,
|
710 |
-
'width' => 600,
|
711 |
-
'height' => 400,
|
712 |
-
'autoplay' => 'no',
|
713 |
-
'responsive' => 'yes',
|
714 |
-
'class' => ''
|
715 |
-
), $atts, 'vimeo' );
|
716 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
717 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
718 |
-
$id = ( preg_match( '~(?:<iframe [^>]*src=")?(?:https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/videos?)?\/([0-9]+)[^\s]*)"?(?:[^>]*></iframe>)?(?:<p>.*</p>)?~ix', $atts['url'], $match ) ) ? $match[1] : false;
|
719 |
-
// Check that url is specified
|
720 |
-
if ( !$id ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
721 |
-
// Prepare autoplay
|
722 |
-
$autoplay = ( $atts['autoplay'] === 'yes' ) ? '&autoplay=1' : '';
|
723 |
-
// Create player
|
724 |
-
$return[] = '<div class="su-vimeo su-responsive-media-' . $atts['responsive'] . su_ecssc( $atts ) . '">';
|
725 |
-
$return[] = '<iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="//player.vimeo.com/video/' . $id . '?title=0&byline=0&portrait=0&color=ffffff' . $autoplay . '" frameborder="0" allowfullscreen="true"></iframe>';
|
726 |
-
$return[] = '</div>';
|
727 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
728 |
-
// Return result
|
729 |
-
return implode( '', $return );
|
730 |
-
}
|
731 |
-
|
732 |
-
public static function screenr( $atts = null, $content = null ) {
|
733 |
-
// Prepare data
|
734 |
-
$return = array();
|
735 |
-
$atts = shortcode_atts( array(
|
736 |
-
'url' => false,
|
737 |
-
'width' => 600,
|
738 |
-
'height' => 400,
|
739 |
-
'responsive' => 'yes',
|
740 |
-
'class' => ''
|
741 |
-
), $atts, 'screenr' );
|
742 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
743 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
744 |
-
$id = ( preg_match( '~(?:<iframe [^>]*src=")?(?:https?:\/\/(?:[\w]+\.)*screenr\.com(?:[\/\w]*\/videos?)?\/([a-zA-Z0-9]+)[^\s]*)"?(?:[^>]*></iframe>)?(?:<p>.*</p>)?~ix', $atts['url'], $match ) ) ? $match[1] : false;
|
745 |
-
// Check that url is specified
|
746 |
-
if ( !$id ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
747 |
-
// Create player
|
748 |
-
$return[] = '<div class="su-screenr su-responsive-media-' . $atts['responsive'] . su_ecssc( $atts ) . '">';
|
749 |
-
$return[] = '<iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="http://screenr.com/embed/' . $id . '" frameborder="0" allowfullscreen="true"></iframe>';
|
750 |
-
$return[] = '</div>';
|
751 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
752 |
-
// Return result
|
753 |
-
return implode( '', $return );
|
754 |
-
}
|
755 |
-
|
756 |
-
public static function dailymotion( $atts = null, $content = null ) {
|
757 |
-
// Prepare data
|
758 |
-
$return = array();
|
759 |
-
$atts = shortcode_atts( array(
|
760 |
-
'url' => false,
|
761 |
-
'width' => 600,
|
762 |
-
'height' => 400,
|
763 |
-
'responsive' => 'yes',
|
764 |
-
'autoplay' => 'no',
|
765 |
-
'background' => '#FFC300',
|
766 |
-
'foreground' => '#F7FFFD',
|
767 |
-
'highlight' => '#171D1B',
|
768 |
-
'logo' => 'yes',
|
769 |
-
'quality' => '380',
|
770 |
-
'related' => 'yes',
|
771 |
-
'info' => 'yes',
|
772 |
-
'class' => ''
|
773 |
-
), $atts, 'dailymotion' );
|
774 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
775 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
776 |
-
$id = strtok( basename( $atts['url'] ), '_' );
|
777 |
-
// Check that url is specified
|
778 |
-
if ( !$id ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
779 |
-
// Prepare params
|
780 |
-
$params = array();
|
781 |
-
foreach ( array( 'autoplay', 'background', 'foreground', 'highlight', 'logo', 'quality', 'related', 'info' ) as $param )
|
782 |
-
$params[] = $param . '=' . str_replace( array( 'yes', 'no', '#' ), array( '1', '0', '' ), $atts[$param] );
|
783 |
-
// Create player
|
784 |
-
$return[] = '<div class="su-dailymotion su-responsive-media-' . $atts['responsive'] . su_ecssc( $atts ) . '">';
|
785 |
-
$return[] = '<iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="http://www.dailymotion.com/embed/video/' . $id . '?' . implode( '&', $params ) . '" frameborder="0" allowfullscreen="true"></iframe>';
|
786 |
-
$return[] = '</div>';
|
787 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
788 |
-
// Return result
|
789 |
-
return implode( '', $return );
|
790 |
-
}
|
791 |
-
|
792 |
-
public static function audio( $atts = null, $content = null ) {
|
793 |
-
$atts = shortcode_atts( array(
|
794 |
-
'url' => false,
|
795 |
-
'width' => 'auto',
|
796 |
-
'title' => '',
|
797 |
-
'autoplay' => 'no',
|
798 |
-
'loop' => 'no',
|
799 |
-
'class' => ''
|
800 |
-
), $atts, 'audio' );
|
801 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
802 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
803 |
-
// Generate unique ID
|
804 |
-
$id = uniqid( 'su_audio_player_' );
|
805 |
-
// Prepare width
|
806 |
-
$width = ( $atts['width'] !== 'auto' ) ? 'max-width:' . $atts['width'] : '';
|
807 |
-
// Check that url is specified
|
808 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
809 |
-
su_query_asset( 'css', 'su-players-shortcodes' );
|
810 |
-
su_query_asset( 'js', 'jquery' );
|
811 |
-
su_query_asset( 'js', 'jplayer' );
|
812 |
-
su_query_asset( 'js', 'su-players-shortcodes' );
|
813 |
-
su_query_asset( 'js', 'su-players-shortcodes' );
|
814 |
-
// Create player
|
815 |
-
return '<div class="su-audio' . su_ecssc( $atts ) . '" data-id="' . $id . '" data-audio="' . $atts['url'] . '" data-swf="' . plugins_url( 'assets/other/Jplayer.swf', SU_PLUGIN_FILE ) . '" data-autoplay="' . $atts['autoplay'] . '" data-loop="' . $atts['loop'] . '" style="' . $width . '"><div id="' . $id . '" class="jp-jplayer"></div><div id="' . $id . '_container" class="jp-audio"><div class="jp-type-single"><div class="jp-gui jp-interface"><div class="jp-controls"><span class="jp-play"></span><span class="jp-pause"></span><span class="jp-stop"></span><span class="jp-mute"></span><span class="jp-unmute"></span><span class="jp-volume-max"></span></div><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div><div class="jp-current-time"></div><div class="jp-duration"></div></div><div class="jp-title">' . $atts['title'] . '</div></div></div></div>';
|
816 |
-
}
|
817 |
-
|
818 |
-
public static function video( $atts = null, $content = null ) {
|
819 |
-
$atts = shortcode_atts( array(
|
820 |
-
'url' => false,
|
821 |
-
'poster' => false,
|
822 |
-
'title' => '',
|
823 |
-
'width' => 600,
|
824 |
-
'height' => 300,
|
825 |
-
'controls' => 'yes',
|
826 |
-
'autoplay' => 'no',
|
827 |
-
'loop' => 'no',
|
828 |
-
'class' => ''
|
829 |
-
), $atts, 'video' );
|
830 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
831 |
-
$atts['url'] = su_scattr( $atts['url'] );
|
832 |
-
// Generate unique ID
|
833 |
-
$id = uniqid( 'su_video_player_' );
|
834 |
-
// Check that url is specified
|
835 |
-
if ( !$atts['url'] ) return Su_Tools::error( __FUNCTION__, __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
836 |
-
// Prepare title
|
837 |
-
$title = ( $atts['title'] ) ? '<div class="jp-title">' . $atts['title'] . '</div>' : '';
|
838 |
-
su_query_asset( 'css', 'su-players-shortcodes' );
|
839 |
-
su_query_asset( 'js', 'jquery' );
|
840 |
-
su_query_asset( 'js', 'jplayer' );
|
841 |
-
su_query_asset( 'js', 'su-players-shortcodes' );
|
842 |
-
// Create player
|
843 |
-
return '<div style="width:' . $atts['width'] . 'px"><div id="' . $id . '" class="su-video jp-video su-video-controls-' . $atts['controls'] . su_ecssc( $atts ) . '" data-id="' . $id . '" data-video="' . $atts['url'] . '" data-swf="' . plugins_url( 'assets/other/Jplayer.swf', SU_PLUGIN_FILE ) . '" data-autoplay="' . $atts['autoplay'] . '" data-loop="' . $atts['loop'] . '" data-poster="' . $atts['poster'] . '"><div id="' . $id . '_player" class="jp-jplayer" style="width:' . $atts['width'] . 'px;height:' . $atts['height'] . 'px"></div>' . $title . '<div class="jp-start jp-play"></div><div class="jp-gui"><div class="jp-interface"><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-current-time"></div><div class="jp-duration"></div><div class="jp-controls-holder"><span class="jp-play"></span><span class="jp-pause"></span><span class="jp-mute"></span><span class="jp-unmute"></span><span class="jp-full-screen"></span><span class="jp-restore-screen"></span><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div></div></div></div></div></div>';
|
844 |
-
}
|
845 |
-
|
846 |
-
public static function table( $atts = null, $content = null ) {
|
847 |
-
$atts = shortcode_atts( array(
|
848 |
-
'url' => false,
|
849 |
-
'responsive' => false,
|
850 |
-
'class' => ''
|
851 |
-
), $atts, 'table' );
|
852 |
-
if ( $atts['responsive'] ) {
|
853 |
-
$atts['class'] .= ' su-table-responsive';
|
854 |
-
}
|
855 |
-
$return = '<div class="su-table' . su_ecssc( $atts ) . '">';
|
856 |
-
$return .= ( $atts['url'] ) ? su_parse_csv( $atts['url'] ) : do_shortcode( $content );
|
857 |
-
$return .= '</div>';
|
858 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
859 |
-
su_query_asset( 'js', 'jquery' );
|
860 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
861 |
-
return $return;
|
862 |
-
}
|
863 |
-
|
864 |
-
public static function permalink( $atts = null, $content = null ) {
|
865 |
-
$atts = shortcode_atts( array(
|
866 |
-
'id' => 1,
|
867 |
-
'p' => null, // 3.x
|
868 |
-
'target' => 'self',
|
869 |
-
'class' => ''
|
870 |
-
), $atts, 'permalink' );
|
871 |
-
if ( $atts['p'] !== null ) $atts['id'] = $atts['p'];
|
872 |
-
$atts['id'] = su_scattr( $atts['id'] );
|
873 |
-
// Prepare link text
|
874 |
-
$text = ( $content ) ? $content : get_the_title( $atts['id'] );
|
875 |
-
return '<a href="' . get_permalink( $atts['id'] ) . '" class="' . su_ecssc( $atts ) . '" title="' . $text . '" target="_' . $atts['target'] . '">' . $text . '</a>';
|
876 |
-
}
|
877 |
-
|
878 |
-
public static function members( $atts = null, $content = null ) {
|
879 |
-
$atts = shortcode_atts( array(
|
880 |
-
'message' => __( 'This content is for registered users only. Please %login%.', 'shortcodes-ultimate' ),
|
881 |
-
'color' => '#ffcc00',
|
882 |
-
'style' => null, // 3.x
|
883 |
-
'login_text' => __( 'login', 'shortcodes-ultimate' ),
|
884 |
-
'login_url' => wp_login_url(),
|
885 |
-
'login' => null, // 3.x
|
886 |
-
'class' => ''
|
887 |
-
), $atts, 'members' );
|
888 |
-
if ( $atts['style'] !== null ) $atts['color'] = str_replace( array( '0', '1', '2' ), array( '#fff', '#FFFF29', '#1F9AFF' ), $atts['style'] );
|
889 |
-
// Check feed
|
890 |
-
if ( is_feed() ) return;
|
891 |
-
// Check authorization
|
892 |
-
if ( !is_user_logged_in() ) {
|
893 |
-
if ( $atts['login'] !== null && $atts['login'] == '0' ) return; // 3.x
|
894 |
-
// Prepare login link
|
895 |
-
$login = '<a href="' . esc_attr( $atts['login_url'] ) . '">' . $atts['login_text'] . '</a>';
|
896 |
-
su_query_asset( 'css', 'su-other-shortcodes' );
|
897 |
-
return '<div class="su-members' . su_ecssc( $atts ) . '" style="background-color:' . su_hex_shift( $atts['color'], 'lighter', 50 ) . ';border-color:' .su_hex_shift( $atts['color'], 'darker', 20 ) . ';color:' .su_hex_shift( $atts['color'], 'darker', 60 ) . '">' . str_replace( '%login%', $login, su_scattr( $atts['message'] ) ) . '</div>';
|
898 |
-
}
|
899 |
-
// Return original content
|
900 |
-
else return do_shortcode( $content );
|
901 |
-
}
|
902 |
-
|
903 |
-
public static function guests( $atts = null, $content = null ) {
|
904 |
-
$atts = shortcode_atts( array( 'class' => '' ), $atts, 'guests' );
|
905 |
-
$return = '';
|
906 |
-
if ( !is_user_logged_in() && !is_null( $content ) ) {
|
907 |
-
su_query_asset( 'css', 'su-other-shortcodes' );
|
908 |
-
$return = '<div class="su-guests' . su_ecssc( $atts ) . '">' . do_shortcode( $content ) . '</div>';
|
909 |
-
}
|
910 |
-
return $return;
|
911 |
-
}
|
912 |
-
|
913 |
-
public static function feed( $atts = null, $content = null ) {
|
914 |
-
$atts = shortcode_atts( array(
|
915 |
-
'url' => get_bloginfo_rss( 'rss2_url' ),
|
916 |
-
'limit' => 3,
|
917 |
-
'class' => ''
|
918 |
-
), $atts, 'feed' );
|
919 |
-
if ( !function_exists( 'wp_rss' ) ) include_once ABSPATH . WPINC . '/rss.php';
|
920 |
-
ob_start();
|
921 |
-
echo '<div class="su-feed' . su_ecssc( $atts ) . '">';
|
922 |
-
wp_rss( $atts['url'], $atts['limit'] );
|
923 |
-
echo '</div>';
|
924 |
-
$return = ob_get_contents();
|
925 |
-
ob_end_clean();
|
926 |
-
return $return;
|
927 |
-
}
|
928 |
-
|
929 |
-
public static function subpages( $atts = null, $content = null ) {
|
930 |
-
$atts = shortcode_atts( array(
|
931 |
-
'depth' => 1,
|
932 |
-
'p' => false,
|
933 |
-
'class' => ''
|
934 |
-
), $atts, 'subpages' );
|
935 |
-
global $post;
|
936 |
-
$child_of = ( $atts['p'] ) ? $atts['p'] : get_the_ID();
|
937 |
-
$return = wp_list_pages( array(
|
938 |
-
'title_li' => '',
|
939 |
-
'echo' => 0,
|
940 |
-
'child_of' => $child_of,
|
941 |
-
'depth' => $atts['depth']
|
942 |
-
) );
|
943 |
-
return ( $return ) ? '<ul class="su-subpages' . su_ecssc( $atts ) . '">' . $return . '</ul>' : false;
|
944 |
-
}
|
945 |
-
|
946 |
-
public static function siblings( $atts = null, $content = null ) {
|
947 |
-
$atts = shortcode_atts( array( 'depth' => 1, 'class' => '' ), $atts, 'siblings' );
|
948 |
-
global $post;
|
949 |
-
$return = wp_list_pages( array( 'title_li' => '',
|
950 |
-
'echo' => 0,
|
951 |
-
'child_of' => $post->post_parent,
|
952 |
-
'depth' => $atts['depth'],
|
953 |
-
'exclude' => $post->ID ) );
|
954 |
-
return ( $return ) ? '<ul class="su-siblings' . su_ecssc( $atts ) . '">' . $return . '</ul>' : false;
|
955 |
-
}
|
956 |
-
|
957 |
-
public static function menu( $atts = null, $content = null ) {
|
958 |
-
$atts = shortcode_atts( array(
|
959 |
-
'name' => false,
|
960 |
-
'class' => ''
|
961 |
-
), $atts, 'menu' );
|
962 |
-
$return = wp_nav_menu( array(
|
963 |
-
'echo' => false,
|
964 |
-
'menu' => $atts['name'],
|
965 |
-
'container' => false,
|
966 |
-
'fallback_cb' => array( __CLASS__, 'menu_fb' ),
|
967 |
-
'items_wrap' => '<ul id="%1$s" class="%2$s' . su_ecssc( $atts ) . '">%3$s</ul>'
|
968 |
-
) );
|
969 |
-
return ( $atts['name'] ) ? $return : false;
|
970 |
-
}
|
971 |
-
|
972 |
-
public static function menu_fb() {
|
973 |
-
return __( 'This menu doesn\'t exists, or has no elements', 'shortcodes-ultimate' );
|
974 |
-
}
|
975 |
-
|
976 |
-
public static function document( $atts = null, $content = null ) {
|
977 |
-
$atts = shortcode_atts( array(
|
978 |
-
'url' => '',
|
979 |
-
'file' => null, // 3.x
|
980 |
-
'width' => 600,
|
981 |
-
'height' => 400,
|
982 |
-
'responsive' => 'yes',
|
983 |
-
'class' => ''
|
984 |
-
), $atts, 'document' );
|
985 |
-
if ( $atts['file'] !== null ) $atts['url'] = $atts['file'];
|
986 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
987 |
-
return '<div class="su-document su-responsive-media-' . $atts['responsive'] . '"><iframe src="//docs.google.com/viewer?embedded=true&url=' . $atts['url'] . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" class="su-document' . su_ecssc( $atts ) . '"></iframe></div>';
|
988 |
-
}
|
989 |
-
|
990 |
-
public static function gmap( $atts = null, $content = null ) {
|
991 |
-
$atts = shortcode_atts( array(
|
992 |
-
'width' => 600,
|
993 |
-
'height' => 400,
|
994 |
-
'responsive' => 'yes',
|
995 |
-
'address' => 'New York',
|
996 |
-
'class' => ''
|
997 |
-
), $atts, 'gmap' );
|
998 |
-
su_query_asset( 'css', 'su-media-shortcodes' );
|
999 |
-
return '<div class="su-gmap su-responsive-media-' . $atts['responsive'] . su_ecssc( $atts ) . '"><iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="//maps.google.com/maps?q=' . urlencode( su_scattr( $atts['address'] ) ) . '&output=embed"></iframe></div>';
|
1000 |
-
}
|
1001 |
-
|
1002 |
-
public static function slider( $atts = null, $content = null ) {
|
1003 |
-
$return = '';
|
1004 |
-
$atts = shortcode_atts( array(
|
1005 |
-
'source' => 'none',
|
1006 |
-
'limit' => 20,
|
1007 |
-
'gallery' => null, // Dep. 4.3.2
|
1008 |
-
'link' => 'none',
|
1009 |
-
'target' => 'self',
|
1010 |
-
'width' => 600,
|
1011 |
-
'height' => 300,
|
1012 |
-
'responsive' => 'yes',
|
1013 |
-
'title' => 'yes',
|
1014 |
-
'centered' => 'yes',
|
1015 |
-
'arrows' => 'yes',
|
1016 |
-
'pages' => 'yes',
|
1017 |
-
'mousewheel' => 'yes',
|
1018 |
-
'autoplay' => 3000,
|
1019 |
-
'speed' => 600,
|
1020 |
-
'class' => ''
|
1021 |
-
), $atts, 'slider' );
|
1022 |
-
// Get slides
|
1023 |
-
$slides = (array) Su_Tools::get_slides( $atts );
|
1024 |
-
// Loop slides
|
1025 |
-
if ( count( $slides ) ) {
|
1026 |
-
// Prepare unique ID
|
1027 |
-
$id = uniqid( 'su_slider_' );
|
1028 |
-
// Links target
|
1029 |
-
$target = ( $atts['target'] === 'yes' || $atts['target'] === 'blank' ) ? ' target="_blank"' : '';
|
1030 |
-
// Centered class
|
1031 |
-
$centered = ( $atts['centered'] === 'yes' ) ? ' su-slider-centered' : '';
|
1032 |
-
// Wheel control
|
1033 |
-
$mousewheel = ( $atts['mousewheel'] === 'yes' ) ? 'true' : 'false';
|
1034 |
-
// Prepare width and height
|
1035 |
-
$size = ( $atts['responsive'] === 'yes' ) ? 'width:100%' : 'width:' . intval( $atts['width'] ) . 'px;height:' . intval( $atts['height'] ) . 'px';
|
1036 |
-
// Add lightbox class
|
1037 |
-
if ( $atts['link'] === 'lightbox' ) $atts['class'] .= ' su-lightbox-gallery';
|
1038 |
-
// Open slider
|
1039 |
-
$return .= '<div id="' . $id . '" class="su-slider' . $centered . ' su-slider-pages-' . $atts['pages'] . ' su-slider-responsive-' . $atts['responsive'] . su_ecssc( $atts ) . '" style="' . $size . '" data-autoplay="' . $atts['autoplay'] . '" data-speed="' . $atts['speed'] . '" data-mousewheel="' . $mousewheel . '"><div class="su-slider-slides">';
|
1040 |
-
// Create slides
|
1041 |
-
foreach ( $slides as $slide ) {
|
1042 |
-
// Crop the image
|
1043 |
-
$image = su_image_resize( $slide['image'], $atts['width'], $atts['height'] );
|
1044 |
-
// Prepare slide title
|
1045 |
-
$title = ( $atts['title'] === 'yes' && $slide['title'] ) ? '<span class="su-slider-slide-title">' . stripslashes( $slide['title'] ) . '</span>' : '';
|
1046 |
-
// Open slide
|
1047 |
-
$return .= '<div class="su-slider-slide">';
|
1048 |
-
// Slide content with link
|
1049 |
-
if ( $slide['link'] ) $return .= '<a href="' . $slide['link'] . '" ' . $target . ' title="' . esc_attr( $slide['title'] ) . '"><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
1050 |
-
// Slide content without link
|
1051 |
-
else $return .= '<a><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
1052 |
-
// Close slide
|
1053 |
-
$return .= '</div>';
|
1054 |
-
}
|
1055 |
-
// Close slides
|
1056 |
-
$return .= '</div>';
|
1057 |
-
// Open nav section
|
1058 |
-
$return .= '<div class="su-slider-nav">';
|
1059 |
-
// Append direction nav
|
1060 |
-
if ( $atts['arrows'] === 'yes' ) $return .= '<div class="su-slider-direction"><span class="su-slider-prev"></span><span class="su-slider-next"></span></div>';
|
1061 |
-
// Append pagination nav
|
1062 |
-
$return .= '<div class="su-slider-pagination"></div>';
|
1063 |
-
// Close nav section
|
1064 |
-
$return .= '</div>';
|
1065 |
-
// Close slider
|
1066 |
-
$return .= '</div>';
|
1067 |
-
// Add lightbox assets
|
1068 |
-
if ( $atts['link'] === 'lightbox' ) {
|
1069 |
-
su_query_asset( 'css', 'magnific-popup' );
|
1070 |
-
su_query_asset( 'js', 'magnific-popup' );
|
1071 |
-
}
|
1072 |
-
su_query_asset( 'css', 'su-galleries-shortcodes' );
|
1073 |
-
su_query_asset( 'js', 'jquery' );
|
1074 |
-
su_query_asset( 'js', 'swiper' );
|
1075 |
-
su_query_asset( 'js', 'su-galleries-shortcodes' );
|
1076 |
-
}
|
1077 |
-
// Slides not found
|
1078 |
-
else $return = Su_Tools::error( __FUNCTION__, __( 'images not found', 'shortcodes-ultimate' ) );
|
1079 |
-
return $return;
|
1080 |
-
}
|
1081 |
-
|
1082 |
-
public static function carousel( $atts = null, $content = null ) {
|
1083 |
-
$return = '';
|
1084 |
-
$atts = shortcode_atts( array(
|
1085 |
-
'source' => 'none',
|
1086 |
-
'limit' => 20,
|
1087 |
-
'gallery' => null, // Dep. 4.3.2
|
1088 |
-
'link' => 'none',
|
1089 |
-
'target' => 'self',
|
1090 |
-
'width' => 600,
|
1091 |
-
'height' => 100,
|
1092 |
-
'responsive' => 'yes',
|
1093 |
-
'items' => 3,
|
1094 |
-
'scroll' => 1,
|
1095 |
-
'title' => 'yes',
|
1096 |
-
'centered' => 'yes',
|
1097 |
-
'arrows' => 'yes',
|
1098 |
-
'pages' => 'no',
|
1099 |
-
'mousewheel' => 'yes',
|
1100 |
-
'autoplay' => 3000,
|
1101 |
-
'speed' => 600,
|
1102 |
-
'class' => ''
|
1103 |
-
), $atts, 'carousel' );
|
1104 |
-
// Get slides
|
1105 |
-
$slides = (array) Su_Tools::get_slides( $atts );
|
1106 |
-
// Loop slides
|
1107 |
-
if ( count( $slides ) ) {
|
1108 |
-
// Prepare unique ID
|
1109 |
-
$id = uniqid( 'su_carousel_' );
|
1110 |
-
// Links target
|
1111 |
-
$target = ( $atts['target'] === 'yes' || $atts['target'] === 'blank' ) ? ' target="_blank"' : '';
|
1112 |
-
// Centered class
|
1113 |
-
$centered = ( $atts['centered'] === 'yes' ) ? ' su-carousel-centered' : '';
|
1114 |
-
// Wheel control
|
1115 |
-
$mousewheel = ( $atts['mousewheel'] === 'yes' ) ? 'true' : 'false';
|
1116 |
-
// Prepare width and height
|
1117 |
-
$size = ( $atts['responsive'] === 'yes' ) ? 'width:100%' : 'width:' . intval( $atts['width'] ) . 'px;height:' . intval( $atts['height'] ) . 'px';
|
1118 |
-
// Add lightbox class
|
1119 |
-
if ( $atts['link'] === 'lightbox' ) $atts['class'] .= ' su-lightbox-gallery';
|
1120 |
-
// Open slider
|
1121 |
-
$return .= '<div id="' . $id . '" class="su-carousel' . $centered . ' su-carousel-pages-' . $atts['pages'] . ' su-carousel-responsive-' . $atts['responsive'] . su_ecssc( $atts ) . '" style="' . $size . '" data-autoplay="' . $atts['autoplay'] . '" data-speed="' . $atts['speed'] . '" data-mousewheel="' . $mousewheel . '" data-items="' . $atts['items'] . '" data-scroll="' . $atts['scroll'] . '"><div class="su-carousel-slides">';
|
1122 |
-
// Create slides
|
1123 |
-
foreach ( (array) $slides as $slide ) {
|
1124 |
-
// Crop the image
|
1125 |
-
$image = su_image_resize( $slide['image'], ( round( $atts['width'] / $atts['items'] ) - 18 ), $atts['height'] );
|
1126 |
-
// Prepare slide title
|
1127 |
-
$title = ( $atts['title'] === 'yes' && $slide['title'] ) ? '<span class="su-carousel-slide-title">' . stripslashes( $slide['title'] ) . '</span>' : '';
|
1128 |
-
// Open slide
|
1129 |
-
$return .= '<div class="su-carousel-slide">';
|
1130 |
-
// Slide content with link
|
1131 |
-
if ( $slide['link'] ) $return .= '<a href="' . $slide['link'] . '"' . $target . ' title="' . esc_attr( $slide['title'] ) . '"><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
1132 |
-
// Slide content without link
|
1133 |
-
else $return .= '<a><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
1134 |
-
// Close slide
|
1135 |
-
$return .= '</div>';
|
1136 |
-
}
|
1137 |
-
// Close slides
|
1138 |
-
$return .= '</div>';
|
1139 |
-
// Open nav section
|
1140 |
-
$return .= '<div class="su-carousel-nav">';
|
1141 |
-
// Append direction nav
|
1142 |
-
if ( $atts['arrows'] === 'yes'
|
1143 |
-
) $return .= '<div class="su-carousel-direction"><span class="su-carousel-prev"></span><span class="su-carousel-next"></span></div>';
|
1144 |
-
// Append pagination nav
|
1145 |
-
$return .= '<div class="su-carousel-pagination"></div>';
|
1146 |
-
// Close nav section
|
1147 |
-
$return .= '</div>';
|
1148 |
-
// Close slider
|
1149 |
-
$return .= '</div>';
|
1150 |
-
// Add lightbox assets
|
1151 |
-
if ( $atts['link'] === 'lightbox' ) {
|
1152 |
-
su_query_asset( 'css', 'magnific-popup' );
|
1153 |
-
su_query_asset( 'js', 'magnific-popup' );
|
1154 |
-
}
|
1155 |
-
su_query_asset( 'css', 'su-galleries-shortcodes' );
|
1156 |
-
su_query_asset( 'js', 'jquery' );
|
1157 |
-
su_query_asset( 'js', 'swiper' );
|
1158 |
-
su_query_asset( 'js', 'su-galleries-shortcodes' );
|
1159 |
-
}
|
1160 |
-
// Slides not found
|
1161 |
-
else $return = Su_Tools::error( __FUNCTION__, __( 'images not found', 'shortcodes-ultimate' ) );
|
1162 |
-
return $return;
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
public static function custom_gallery( $atts = null, $content = null ) {
|
1166 |
-
$return = '';
|
1167 |
-
$atts = shortcode_atts( array(
|
1168 |
-
'source' => 'none',
|
1169 |
-
'limit' => 20,
|
1170 |
-
'gallery' => null, // Dep. 4.4.0
|
1171 |
-
'link' => 'none',
|
1172 |
-
'width' => 90,
|
1173 |
-
'height' => 90,
|
1174 |
-
'title' => 'hover',
|
1175 |
-
'target' => 'self',
|
1176 |
-
'class' => ''
|
1177 |
-
), $atts, 'custom_gallery' );
|
1178 |
-
$slides = (array) Su_Tools::get_slides( $atts );
|
1179 |
-
// Loop slides
|
1180 |
-
if ( count( $slides ) ) {
|
1181 |
-
// Prepare links target
|
1182 |
-
$atts['target'] = ( $atts['target'] === 'yes' || $atts['target'] === 'blank' ) ? ' target="_blank"' : '';
|
1183 |
-
// Add lightbox class
|
1184 |
-
if ( $atts['link'] === 'lightbox' ) $atts['class'] .= ' su-lightbox-gallery';
|
1185 |
-
// Open gallery
|
1186 |
-
$return = '<div class="su-custom-gallery su-custom-gallery-title-' . $atts['title'] . su_ecssc( $atts ) . '">';
|
1187 |
-
// Create slides
|
1188 |
-
foreach ( $slides as $slide ) {
|
1189 |
-
// Crop image
|
1190 |
-
$image = su_image_resize( $slide['image'], $atts['width'], $atts['height'] );
|
1191 |
-
// Prepare slide title
|
1192 |
-
$title = ( $slide['title'] ) ? '<span class="su-custom-gallery-title">' . stripslashes( $slide['title'] ) . '</span>' : '';
|
1193 |
-
// Open slide
|
1194 |
-
$return .= '<div class="su-custom-gallery-slide">';
|
1195 |
-
// Slide content with link
|
1196 |
-
if ( $slide['link'] ) $return .= '<a href="' . $slide['link'] . '"' . $atts['target'] . ' title="' . esc_attr( $slide['title'] ) . '"><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" />' . $title . '</a>';
|
1197 |
-
// Slide content without link
|
1198 |
-
else $return .= '<a><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" />' . $title . '</a>';
|
1199 |
-
// Close slide
|
1200 |
-
$return .= '</div>';
|
1201 |
-
}
|
1202 |
-
// Clear floats
|
1203 |
-
$return .= '<div class="su-clear"></div>';
|
1204 |
-
// Close gallery
|
1205 |
-
$return .= '</div>';
|
1206 |
-
// Add lightbox assets
|
1207 |
-
if ( $atts['link'] === 'lightbox' ) {
|
1208 |
-
su_query_asset( 'css', 'magnific-popup' );
|
1209 |
-
su_query_asset( 'js', 'jquery' );
|
1210 |
-
su_query_asset( 'js', 'magnific-popup' );
|
1211 |
-
su_query_asset( 'js', 'su-galleries-shortcodes' );
|
1212 |
-
}
|
1213 |
-
su_query_asset( 'css', 'su-galleries-shortcodes' );
|
1214 |
-
}
|
1215 |
-
// Slides not found
|
1216 |
-
else $return = Su_Tools::error( __FUNCTION__, __( 'images not found', 'shortcodes-ultimate' ) );
|
1217 |
-
return $return;
|
1218 |
-
}
|
1219 |
-
|
1220 |
-
public static function posts( $atts = null, $content = null ) {
|
1221 |
-
|
1222 |
-
$original_atts = $atts;
|
1223 |
-
|
1224 |
-
// Parse attributes
|
1225 |
-
$atts = shortcode_atts( array(
|
1226 |
-
'template' => 'templates/default-loop.php',
|
1227 |
-
'id' => false,
|
1228 |
-
'posts_per_page' => get_option( 'posts_per_page' ),
|
1229 |
-
'post_type' => 'post',
|
1230 |
-
'taxonomy' => 'category',
|
1231 |
-
'tax_term' => false,
|
1232 |
-
'tax_operator' => 'IN',
|
1233 |
-
'author' => '',
|
1234 |
-
'tag' => '',
|
1235 |
-
'meta_key' => '',
|
1236 |
-
'offset' => 0,
|
1237 |
-
'order' => 'DESC',
|
1238 |
-
'orderby' => 'date',
|
1239 |
-
'post_parent' => false,
|
1240 |
-
'post_status' => 'publish',
|
1241 |
-
'ignore_sticky_posts' => 'no'
|
1242 |
-
), $atts, 'posts' );
|
1243 |
-
|
1244 |
-
$author = sanitize_text_field( $atts['author'] );
|
1245 |
-
$id = $atts['id']; // Sanitized later as an array of integers
|
1246 |
-
$ignore_sticky_posts = ( bool ) ( $atts['ignore_sticky_posts'] === 'yes' ) ? true : false;
|
1247 |
-
$meta_key = sanitize_text_field( $atts['meta_key'] );
|
1248 |
-
$offset = intval( $atts['offset'] );
|
1249 |
-
$order = sanitize_key( $atts['order'] );
|
1250 |
-
$orderby = sanitize_key( $atts['orderby'] );
|
1251 |
-
$post_parent = $atts['post_parent'];
|
1252 |
-
$post_status = $atts['post_status'];
|
1253 |
-
$post_type = sanitize_text_field( $atts['post_type'] );
|
1254 |
-
$posts_per_page = intval( $atts['posts_per_page'] );
|
1255 |
-
$tag = sanitize_text_field( $atts['tag'] );
|
1256 |
-
$tax_operator = $atts['tax_operator'];
|
1257 |
-
$tax_term = sanitize_text_field( $atts['tax_term'] );
|
1258 |
-
$taxonomy = sanitize_key( $atts['taxonomy'] );
|
1259 |
-
// Set up initial query for post
|
1260 |
-
$args = array(
|
1261 |
-
'category_name' => '',
|
1262 |
-
'order' => $order,
|
1263 |
-
'orderby' => $orderby,
|
1264 |
-
'post_type' => explode( ',', $post_type ),
|
1265 |
-
'posts_per_page' => $posts_per_page,
|
1266 |
-
'tag' => $tag
|
1267 |
-
);
|
1268 |
-
// Ignore Sticky Posts
|
1269 |
-
if ( $ignore_sticky_posts ) $args['ignore_sticky_posts'] = true;
|
1270 |
-
// Meta key (for ordering)
|
1271 |
-
if ( !empty( $meta_key ) ) $args['meta_key'] = $meta_key;
|
1272 |
-
// If Post IDs
|
1273 |
-
if ( $id ) {
|
1274 |
-
$posts_in = array_map( 'intval', explode( ',', $id ) );
|
1275 |
-
$args['post__in'] = $posts_in;
|
1276 |
-
}
|
1277 |
-
// Post Author
|
1278 |
-
if ( !empty( $author ) ) $args['author'] = $author;
|
1279 |
-
// Offset
|
1280 |
-
if ( !empty( $offset ) ) $args['offset'] = $offset;
|
1281 |
-
// Post Status
|
1282 |
-
$post_status = explode( ', ', $post_status );
|
1283 |
-
$validated = array();
|
1284 |
-
$available = array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash', 'any' );
|
1285 |
-
foreach ( $post_status as $unvalidated ) {
|
1286 |
-
if ( in_array( $unvalidated, $available ) ) $validated[] = $unvalidated;
|
1287 |
-
}
|
1288 |
-
if ( !empty( $validated ) ) $args['post_status'] = $validated;
|
1289 |
-
// If taxonomy attributes, create a taxonomy query
|
1290 |
-
if ( !empty( $taxonomy ) && !empty( $tax_term ) ) {
|
1291 |
-
// Term string to array
|
1292 |
-
$tax_term = explode( ',', $tax_term );
|
1293 |
-
// Validate operator
|
1294 |
-
$tax_operator = str_replace( array( 0, 1, 2 ), array( 'IN', 'NOT IN', 'AND' ), $tax_operator );
|
1295 |
-
if ( !in_array( $tax_operator, array( 'IN', 'NOT IN', 'AND' ) ) ) $tax_operator = 'IN';
|
1296 |
-
$tax_args = array( 'tax_query' => array( array(
|
1297 |
-
'taxonomy' => $taxonomy,
|
1298 |
-
'field' => ( is_numeric( $tax_term[0] ) ) ? 'id' : 'slug',
|
1299 |
-
'terms' => $tax_term,
|
1300 |
-
'operator' => $tax_operator ) ) );
|
1301 |
-
// Check for multiple taxonomy queries
|
1302 |
-
$count = 2;
|
1303 |
-
$more_tax_queries = false;
|
1304 |
-
while (
|
1305 |
-
isset( $original_atts['taxonomy_' . $count] ) &&
|
1306 |
-
! empty( $original_atts['taxonomy_' . $count] ) &&
|
1307 |
-
isset( $original_atts['tax_' . $count . '_term'] ) &&
|
1308 |
-
! empty( $original_atts['tax_' . $count . '_term'] )
|
1309 |
-
) {
|
1310 |
-
// Sanitize values
|
1311 |
-
$more_tax_queries = true;
|
1312 |
-
$taxonomy = sanitize_key( $original_atts['taxonomy_' . $count] );
|
1313 |
-
$terms = explode( ', ', sanitize_text_field( $original_atts['tax_' . $count . '_term'] ) );
|
1314 |
-
$tax_operator = isset( $original_atts['tax_' . $count . '_operator'] ) ? $original_atts[
|
1315 |
-
'tax_' . $count . '_operator'] : 'IN';
|
1316 |
-
$tax_operator = in_array( $tax_operator, array( 'IN', 'NOT IN', 'AND' ) ) ? $tax_operator : 'IN';
|
1317 |
-
$tax_args['tax_query'][] = array( 'taxonomy' => $taxonomy,
|
1318 |
-
'field' => 'slug',
|
1319 |
-
'terms' => $terms,
|
1320 |
-
'operator' => $tax_operator );
|
1321 |
-
$count++;
|
1322 |
-
}
|
1323 |
-
if ( $more_tax_queries ) {
|
1324 |
-
|
1325 |
-
$tax_relation = 'AND';
|
1326 |
-
|
1327 |
-
if (
|
1328 |
-
isset( $original_atts['tax_relation'] ) &&
|
1329 |
-
in_array( $original_atts['tax_relation'], array( 'AND', 'OR' ) )
|
1330 |
-
) {
|
1331 |
-
$tax_relation = $original_atts['tax_relation'];
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
$args['tax_query']['relation'] = $tax_relation;
|
1335 |
-
|
1336 |
-
}
|
1337 |
-
|
1338 |
-
$args = array_merge( $args, $tax_args );
|
1339 |
-
|
1340 |
-
}
|
1341 |
-
|
1342 |
-
// If post parent attribute, set up parent
|
1343 |
-
if ( $post_parent ) {
|
1344 |
-
if ( 'current' == $post_parent ) {
|
1345 |
-
global $post;
|
1346 |
-
$post_parent = $post->ID;
|
1347 |
-
}
|
1348 |
-
$args['post_parent'] = intval( $post_parent );
|
1349 |
-
}
|
1350 |
-
// Save original posts
|
1351 |
-
global $posts;
|
1352 |
-
$original_posts = $posts;
|
1353 |
-
// Query posts
|
1354 |
-
$posts = new WP_Query( $args );
|
1355 |
-
// Buffer output
|
1356 |
-
ob_start();
|
1357 |
-
// Search for template in stylesheet directory
|
1358 |
-
if ( file_exists( STYLESHEETPATH . '/' . $atts['template'] ) ) load_template( STYLESHEETPATH . '/' . $atts['template'], false );
|
1359 |
-
// Search for template in theme directory
|
1360 |
-
elseif ( file_exists( TEMPLATEPATH . '/' . $atts['template'] ) ) load_template( TEMPLATEPATH . '/' . $atts['template'], false );
|
1361 |
-
// Search for template in plugin directory
|
1362 |
-
elseif ( file_exists( path_join( dirname( SU_PLUGIN_FILE ), $atts['template'] ) ) ) load_template( path_join( dirname( SU_PLUGIN_FILE ), $atts['template'] ), false );
|
1363 |
-
// Template not found
|
1364 |
-
else echo Su_Tools::error( __FUNCTION__, __( 'template not found', 'shortcodes-ultimate' ) );
|
1365 |
-
$output = ob_get_contents();
|
1366 |
-
ob_end_clean();
|
1367 |
-
// Return original posts
|
1368 |
-
$posts = $original_posts;
|
1369 |
-
// Reset the query
|
1370 |
-
wp_reset_postdata();
|
1371 |
-
su_query_asset( 'css', 'su-other-shortcodes' );
|
1372 |
-
return $output;
|
1373 |
-
}
|
1374 |
-
|
1375 |
-
public static function dummy_text( $atts = null, $content = null ) {
|
1376 |
-
$atts = shortcode_atts( array(
|
1377 |
-
'amount' => 1,
|
1378 |
-
'what' => 'paras',
|
1379 |
-
'cache' => 'yes',
|
1380 |
-
'class' => ''
|
1381 |
-
), $atts, 'dummy_text' );
|
1382 |
-
$transient = 'su/cache/dummy_text/' . sanitize_text_field( $atts['what'] ) . '/' . intval( $atts['amount'] );
|
1383 |
-
$return = get_transient( $transient );
|
1384 |
-
if ( $return && $atts['cache'] === 'yes' ) return $return;
|
1385 |
-
else {
|
1386 |
-
$xml = simplexml_load_file( 'http://www.lipsum.com/feed/xml?amount=' . $atts['amount'] . '&what=' . $atts['what'] . '&start=0' );
|
1387 |
-
$return = '<div class="su-dummy-text' . su_ecssc( $atts ) . '">' . wpautop( str_replace( "\n", "\n\n", $xml->lipsum ) ) . '</div>';
|
1388 |
-
set_transient( $transient, $return, 60*60*24*30 );
|
1389 |
-
return $return;
|
1390 |
-
}
|
1391 |
-
}
|
1392 |
-
|
1393 |
-
public static function dummy_image( $atts = null, $content = null ) {
|
1394 |
-
$atts = shortcode_atts( array(
|
1395 |
-
'width' => 500,
|
1396 |
-
'height' => 300,
|
1397 |
-
'theme' => 'any',
|
1398 |
-
'class' => ''
|
1399 |
-
), $atts, 'dummy_image' );
|
1400 |
-
$url = 'http://lorempixel.com/' . $atts['width'] . '/' . $atts['height'] . '/';
|
1401 |
-
if ( $atts['theme'] !== 'any' ) $url .= $atts['theme'] . '/' . rand( 0, 10 ) . '/';
|
1402 |
-
return '<img src="' . $url . '" alt="' . __( 'Dummy image', 'shortcodes-ultimate' ) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" class="su-dummy-image' . su_ecssc( $atts ) . '" />';
|
1403 |
-
}
|
1404 |
-
|
1405 |
-
public static function animate( $atts = null, $content = null ) {
|
1406 |
-
$atts = shortcode_atts( array(
|
1407 |
-
'type' => 'bounceIn',
|
1408 |
-
'duration' => 1,
|
1409 |
-
'delay' => 0,
|
1410 |
-
'inline' => 'no',
|
1411 |
-
'class' => ''
|
1412 |
-
), $atts, 'animate' );
|
1413 |
-
$tag = ( $atts['inline'] === 'yes' ) ? 'span' : 'div';
|
1414 |
-
$time = '-webkit-animation-duration:' . $atts['duration'] . 's;-webkit-animation-delay:' . $atts['delay'] . 's;animation-duration:' . $atts['duration'] . 's;animation-delay:' . $atts['delay'] . 's;';
|
1415 |
-
$return = '<' . $tag . ' class="su-animate' . su_ecssc( $atts ) . '" style="visibility:hidden;' . $time . '" data-animation="' . $atts['type'] . '" data-duration="' . $atts['duration'] . '" data-delay="' . $atts['delay'] . '">' . do_shortcode( $content ) . '</' . $tag . '>';
|
1416 |
-
su_query_asset( 'css', 'animate' );
|
1417 |
-
su_query_asset( 'js', 'jquery' );
|
1418 |
-
su_query_asset( 'js', 'jquery-inview' );
|
1419 |
-
su_query_asset( 'js', 'su-other-shortcodes' );
|
1420 |
-
return $return;
|
1421 |
-
}
|
1422 |
-
|
1423 |
-
public static function meta( $atts = null, $content = null ) {
|
1424 |
-
$atts = shortcode_atts( array(
|
1425 |
-
'key' => '',
|
1426 |
-
'default' => '',
|
1427 |
-
'before' => '',
|
1428 |
-
'after' => '',
|
1429 |
-
'post_id' => '',
|
1430 |
-
'filter' => ''
|
1431 |
-
), $atts, 'meta' );
|
1432 |
-
// Define current post ID
|
1433 |
-
if ( !$atts['post_id'] ) $atts['post_id'] = get_the_ID();
|
1434 |
-
// Check post ID
|
1435 |
-
if ( !is_numeric( $atts['post_id'] ) || $atts['post_id'] < 1 ) return sprintf( '<p class="su-error">Meta: %s</p>', __( 'post ID is incorrect', 'shortcodes-ultimate' ) );
|
1436 |
-
// Check key name
|
1437 |
-
if ( !$atts['key'] ) return sprintf( '<p class="su-error">Meta: %s</p>', __( 'please specify meta key name', 'shortcodes-ultimate' ) );
|
1438 |
-
// Get the meta
|
1439 |
-
$meta = get_post_meta( $atts['post_id'], $atts['key'], true );
|
1440 |
-
// Set default value if meta is empty
|
1441 |
-
if ( !$meta ) $meta = $atts['default'];
|
1442 |
-
// Apply cutom filter
|
1443 |
-
if (
|
1444 |
-
$atts['filter'] &&
|
1445 |
-
Su_Tools::is_valid_filter( $atts['filter'] ) &&
|
1446 |
-
function_exists( $atts['filter'] )
|
1447 |
-
) {
|
1448 |
-
$meta = call_user_func( $atts['filter'], $meta );
|
1449 |
-
}
|
1450 |
-
// Return result
|
1451 |
-
return ( $meta ) ? $atts['before'] . $meta . $atts['after'] : '';
|
1452 |
-
}
|
1453 |
-
|
1454 |
-
public static function user( $atts = null, $content = null ) {
|
1455 |
-
$atts = shortcode_atts( array(
|
1456 |
-
'field' => 'display_name',
|
1457 |
-
'default' => '',
|
1458 |
-
'before' => '',
|
1459 |
-
'after' => '',
|
1460 |
-
'user_id' => '',
|
1461 |
-
'filter' => ''
|
1462 |
-
), $atts, 'user' );
|
1463 |
-
// Check for password requests
|
1464 |
-
if ( $atts['field'] === 'user_pass' ) return sprintf( '<p class="su-error">User: %s</p>', __( 'password field is not allowed', 'shortcodes-ultimate' ) );
|
1465 |
-
// Define current user ID
|
1466 |
-
if ( !$atts['user_id'] ) $atts['user_id'] = get_current_user_id();
|
1467 |
-
// Check user ID
|
1468 |
-
if ( !is_numeric( $atts['user_id'] ) || $atts['user_id'] < 0 ) return sprintf( '<p class="su-error">User: %s</p>', __( 'user ID is incorrect', 'shortcodes-ultimate' ) );
|
1469 |
-
// Get user data
|
1470 |
-
$user = get_user_by( 'id', $atts['user_id'] );
|
1471 |
-
// Get user data if user was found
|
1472 |
-
$user = ( $user && isset( $user->data->{$atts['field']} ) ) ? $user->data->{$atts['field']} : $atts['default'];
|
1473 |
-
// Apply cutom filter
|
1474 |
-
if (
|
1475 |
-
$atts['filter'] &&
|
1476 |
-
Su_Tools::is_valid_filter( $atts['filter'] ) &&
|
1477 |
-
function_exists( $atts['filter'] )
|
1478 |
-
) {
|
1479 |
-
$user = call_user_func( $atts['filter'], $user );
|
1480 |
-
}
|
1481 |
-
// Return result
|
1482 |
-
return ( $user ) ? $atts['before'] . $user . $atts['after'] : '';
|
1483 |
-
}
|
1484 |
-
|
1485 |
-
public static function post( $atts = null, $content = null ) {
|
1486 |
-
$atts = shortcode_atts( array(
|
1487 |
-
'field' => 'post_title',
|
1488 |
-
'default' => '',
|
1489 |
-
'before' => '',
|
1490 |
-
'after' => '',
|
1491 |
-
'post_id' => '',
|
1492 |
-
'filter' => ''
|
1493 |
-
), $atts, 'post' );
|
1494 |
-
// Define current post ID
|
1495 |
-
if ( !$atts['post_id'] ) $atts['post_id'] = get_the_ID();
|
1496 |
-
// Check post ID
|
1497 |
-
if ( !is_numeric( $atts['post_id'] ) || $atts['post_id'] < 1 ) return sprintf( '<p class="su-error">Post: %s</p>', __( 'post ID is incorrect', 'shortcodes-ultimate' ) );
|
1498 |
-
// Get the post
|
1499 |
-
$post = get_post( $atts['post_id'] );
|
1500 |
-
// Set default value if meta is empty
|
1501 |
-
$post = ( empty( $post ) || empty( $post->{$atts['field']} ) ) ? $atts['default'] : $post->{$atts['field']};
|
1502 |
-
// Apply cutom filter
|
1503 |
-
if (
|
1504 |
-
$atts['filter'] &&
|
1505 |
-
Su_Tools::is_valid_filter( $atts['filter'] ) &&
|
1506 |
-
function_exists( $atts['filter'] )
|
1507 |
-
) {
|
1508 |
-
$post = call_user_func( $atts['filter'], $post );
|
1509 |
-
}
|
1510 |
-
// Return result
|
1511 |
-
return ( $post ) ? $atts['before'] . $post . $atts['after'] : '';
|
1512 |
-
}
|
1513 |
-
|
1514 |
-
// public static function post_terms( $atts = null, $content = null ) {
|
1515 |
-
// $atts = shortcode_atts( array(
|
1516 |
-
// 'post_id' => '',
|
1517 |
-
// 'taxonomy' => 'category',
|
1518 |
-
// 'limit' => '5',
|
1519 |
-
// 'links' => '',
|
1520 |
-
// 'format' => ''
|
1521 |
-
// ), $atts, 'post_terms' );
|
1522 |
-
// // Define current post ID
|
1523 |
-
// if ( !$atts['post_id'] ) $atts['post_id'] = get_the_ID();
|
1524 |
-
// // Check post ID
|
1525 |
-
// if ( !is_numeric( $atts['post_id'] ) || $atts['post_id'] < 1 ) return sprintf( '<p class="su-error">Post terms: %s</p>', __( 'post ID is incorrect', 'shortcodes-ultimate' ) );
|
1526 |
-
// }
|
1527 |
-
|
1528 |
-
public static function template( $atts = null, $content = null ) {
|
1529 |
-
$atts = shortcode_atts( array(
|
1530 |
-
'name' => ''
|
1531 |
-
), $atts, 'template' );
|
1532 |
-
// Check template name
|
1533 |
-
if ( !$atts['name'] ) return sprintf( '<p class="su-error">Template: %s</p>', __( 'please specify template name', 'shortcodes-ultimate' ) );
|
1534 |
-
// Get template output
|
1535 |
-
ob_start();
|
1536 |
-
get_template_part( str_replace( '.php', '', $atts['name'] ) );
|
1537 |
-
$output = ob_get_contents();
|
1538 |
-
ob_end_clean();
|
1539 |
-
// Return result
|
1540 |
-
return $output;
|
1541 |
-
}
|
1542 |
-
|
1543 |
-
public static function qrcode( $atts = null, $content = null ) {
|
1544 |
-
$atts = shortcode_atts( array(
|
1545 |
-
'data' => '',
|
1546 |
-
'title' => '',
|
1547 |
-
'size' => 200,
|
1548 |
-
'margin' => 0,
|
1549 |
-
'align' => 'none',
|
1550 |
-
'link' => '',
|
1551 |
-
'target' => 'blank',
|
1552 |
-
'color' => '#000000',
|
1553 |
-
'background' => '#ffffff',
|
1554 |
-
'class' => ''
|
1555 |
-
), $atts, 'qrcode' );
|
1556 |
-
// Check the data
|
1557 |
-
if ( !$atts['data'] ) return 'QR code: ' . __( 'please specify the data', 'shortcodes-ultimate' );
|
1558 |
-
// Prepare link
|
1559 |
-
$href = ( $atts['link'] ) ? ' href="' . $atts['link'] . '"' : '';
|
1560 |
-
// Prepare clickable class
|
1561 |
-
if ( $atts['link'] ) $atts['class'] .= ' su-qrcode-clickable';
|
1562 |
-
// Prepare title
|
1563 |
-
$atts['title'] = esc_attr( $atts['title'] );
|
1564 |
-
// Query assets
|
1565 |
-
su_query_asset( 'css', 'su-content-shortcodes' );
|
1566 |
-
// Return result
|
1567 |
-
return '<span class="su-qrcode su-qrcode-align-' . $atts['align'] . su_ecssc( $atts ) . '"><a' . $href . ' target="_' . $atts['target'] . '" title="' . $atts['title'] . '"><img src="https://api.qrserver.com/v1/create-qr-code/?data=' . urlencode( $atts['data'] ) . '&size=' . $atts['size'] . 'x' . $atts['size'] . '&format=png&margin=' . $atts['margin'] . '&color=' . su_hex2rgb( $atts['color'] ) . '&bgcolor=' . su_hex2rgb( $atts['background'] ) . '" alt="' . $atts['title'] . '" /></a></span>';
|
1568 |
-
}
|
1569 |
-
|
1570 |
-
public static function scheduler( $atts = null, $content = null ) {
|
1571 |
-
|
1572 |
-
$atts = shortcode_atts( array(
|
1573 |
-
'time' => 'all',
|
1574 |
-
'days_week' => 'all',
|
1575 |
-
'days_month' => 'all',
|
1576 |
-
'months' => 'all',
|
1577 |
-
'years' => 'all',
|
1578 |
-
'alt' => ''
|
1579 |
-
), $atts, 'scheduler' );
|
1580 |
-
|
1581 |
-
$timestamp = current_time( 'timestamp', 0 );
|
1582 |
-
$now = array(
|
1583 |
-
'time' => $timestamp,
|
1584 |
-
'day_week' => date( 'w', $timestamp ),
|
1585 |
-
'day_month' => date( 'j', $timestamp ),
|
1586 |
-
'month' => date( 'n', $timestamp ),
|
1587 |
-
'year' => date( 'Y', $timestamp ),
|
1588 |
-
);
|
1589 |
-
|
1590 |
-
if ( $atts['years'] !== 'all' ) {
|
1591 |
-
|
1592 |
-
$atts['years'] = preg_replace( "/[^0-9-,]/", '', $atts['years'] );
|
1593 |
-
|
1594 |
-
$selected_years = Su_Tools::range( $atts['years'] );
|
1595 |
-
|
1596 |
-
if ( ! in_array( $now['year'], $selected_years ) ) {
|
1597 |
-
return su_scattr( $atts['alt'] );
|
1598 |
-
}
|
1599 |
-
|
1600 |
-
}
|
1601 |
-
|
1602 |
-
if ( $atts['months'] !== 'all' ) {
|
1603 |
-
|
1604 |
-
$atts['months'] = preg_replace( "/[^0-9-,]/", '', $atts['months'] );
|
1605 |
-
|
1606 |
-
$selected_months = Su_Tools::range( $atts['months'] );
|
1607 |
-
|
1608 |
-
if ( ! in_array( $now['month'], $selected_months ) ) {
|
1609 |
-
return su_scattr( $atts['alt'] );
|
1610 |
-
}
|
1611 |
-
|
1612 |
-
}
|
1613 |
-
|
1614 |
-
if ( $atts['days_month'] !== 'all' ) {
|
1615 |
-
|
1616 |
-
$atts['days_month'] = preg_replace( "/[^0-9-,]/", '', $atts['days_month'] );
|
1617 |
-
|
1618 |
-
$selected_days_month = Su_Tools::range( $atts['days_month'] );
|
1619 |
-
|
1620 |
-
if ( ! in_array( $now['day_month'], $selected_days_month ) ) {
|
1621 |
-
return su_scattr( $atts['alt'] );
|
1622 |
-
}
|
1623 |
-
|
1624 |
-
}
|
1625 |
-
|
1626 |
-
if ( $atts['days_week'] !== 'all' ) {
|
1627 |
-
|
1628 |
-
$atts['days_week'] = preg_replace( "/[^0-9-,]/", '', $atts['days_week'] );
|
1629 |
-
|
1630 |
-
$selected_days_week = Su_Tools::range( $atts['days_week'] );
|
1631 |
-
|
1632 |
-
if ( ! in_array( $now['day_week'], $selected_days_week ) ) {
|
1633 |
-
return su_scattr( $atts['alt'] );
|
1634 |
-
}
|
1635 |
-
|
1636 |
-
}
|
1637 |
-
|
1638 |
-
if ( $atts['time'] !== 'all' ) {
|
1639 |
-
|
1640 |
-
$valid_time = false;
|
1641 |
-
$atts['time'] = preg_replace( "/[^0-9-,:]/", '', $atts['time'] );
|
1642 |
-
|
1643 |
-
foreach ( explode( ',', $atts['time'] ) as $range ) {
|
1644 |
-
|
1645 |
-
$range = explode( '-', $range );
|
1646 |
-
|
1647 |
-
if ( ! isset( $range[1] ) ) {
|
1648 |
-
$range[1] = $range[0] . ':59:59';
|
1649 |
-
}
|
1650 |
-
|
1651 |
-
if ( strpos( $range[0], ':' ) === false ) {
|
1652 |
-
$range[0] .= ':00:00';
|
1653 |
-
}
|
1654 |
-
if ( strpos( $range[1], ':' ) === false ) {
|
1655 |
-
$range[1] .= ':00:00';
|
1656 |
-
}
|
1657 |
-
|
1658 |
-
if (
|
1659 |
-
$now['time'] >= strtotime( $range[0], $now['time'] ) &&
|
1660 |
-
$now['time'] <= strtotime( $range[1], $now['time'] )
|
1661 |
-
) {
|
1662 |
-
$valid_time = true;
|
1663 |
-
break;
|
1664 |
-
}
|
1665 |
-
|
1666 |
-
}
|
1667 |
-
|
1668 |
-
if ( ! $valid_time ) {
|
1669 |
-
return su_scattr( $atts['alt'] );
|
1670 |
-
}
|
1671 |
-
|
1672 |
-
}
|
1673 |
-
|
1674 |
-
return do_shortcode( $content );
|
1675 |
-
|
1676 |
-
}
|
1677 |
-
|
1678 |
-
}
|
1679 |
-
|
1680 |
-
new Su_Shortcodes;
|
1681 |
-
|
1682 |
-
class Shortcodes_Ultimate_Shortcodes extends Su_Shortcodes {
|
1683 |
-
function __construct() {
|
1684 |
-
parent::__construct();
|
1685 |
-
}
|
1686 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -158,122 +158,6 @@ function su_hex2rgb( $colour, $delimiter = '-' ) {
|
|
158 |
return implode( $delimiter, array( $r, $g, $b ) ); //array( 'red' => $r, 'green' => $g, 'blue' => $b );
|
159 |
}
|
160 |
|
161 |
-
/**
|
162 |
-
* Custom do_shortcode function for nested shortcodes
|
163 |
-
*
|
164 |
-
* @param string $content Shortcode content
|
165 |
-
* @param string $pre First shortcode letter
|
166 |
-
*
|
167 |
-
* @return string Formatted content
|
168 |
-
*/
|
169 |
-
function su_do_nested_shortcodes_alt( $content, $pre ) {
|
170 |
-
|
171 |
-
if ( strpos( $content, '[_' ) !== false ) {
|
172 |
-
$content = preg_replace( '@(\[_*)_(' . $pre . '|/)@', "$1$2", $content );
|
173 |
-
}
|
174 |
-
|
175 |
-
return do_shortcode( $content );
|
176 |
-
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Remove underscores from nested shortcodes.
|
181 |
-
*
|
182 |
-
* @since 5.0.4
|
183 |
-
* @param string $content String with nested shortcodes.
|
184 |
-
* @param string $shortcode Shortcode tag name (without prefix).
|
185 |
-
* @return string Parsed string.
|
186 |
-
*/
|
187 |
-
function su_do_nested_shortcodes( $content, $shortcode ) {
|
188 |
-
|
189 |
-
if ( get_option( 'su_option_do_nested_shortcodes_alt' ) ) {
|
190 |
-
return su_do_nested_shortcodes_alt( $content, substr( $shortcode, 0, 1 ) );
|
191 |
-
}
|
192 |
-
|
193 |
-
$prefix = su_cmpt();
|
194 |
-
|
195 |
-
if ( strpos( $content, '[_' . $prefix . $shortcode ) !== false ) {
|
196 |
-
|
197 |
-
$content = str_replace(
|
198 |
-
array( '[_' . $prefix . $shortcode, '[_/' . $prefix . $shortcode, ),
|
199 |
-
array( '[' . $prefix . $shortcode, '[/' . $prefix . $shortcode, ),
|
200 |
-
$content
|
201 |
-
);
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
else {
|
206 |
-
$content = wptexturize( $content );
|
207 |
-
}
|
208 |
-
|
209 |
-
$content = do_shortcode( $content );
|
210 |
-
|
211 |
-
return $content;
|
212 |
-
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Shortcode names prefix in compatibility mode
|
217 |
-
*
|
218 |
-
* @return string Special prefix
|
219 |
-
*/
|
220 |
-
function su_compatibility_mode_prefix() {
|
221 |
-
return get_option( 'su_option_prefix' );
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Shortcut for su_compatibility_mode_prefix()
|
226 |
-
*/
|
227 |
-
function su_cmpt() {
|
228 |
-
return su_compatibility_mode_prefix();
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Extra CSS class helper
|
233 |
-
*
|
234 |
-
* @param array $atts Shortcode attributes
|
235 |
-
*
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
function su_ecssc( $atts ) {
|
239 |
-
return ( $atts['class'] ) ? ' ' . trim( $atts['class'] ) : '';
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Helper to check add-on is activated
|
244 |
-
*
|
245 |
-
* @return bool
|
246 |
-
*/
|
247 |
-
function su_addon_active( $addons ) {
|
248 |
-
|
249 |
-
if ( ! function_exists( 'is_plugin_active' ) ) {
|
250 |
-
return true;
|
251 |
-
}
|
252 |
-
|
253 |
-
// Prepare add-ons paths
|
254 |
-
$paths = array(
|
255 |
-
'maker' => 'shortcodes-ultimate-maker/shortcodes-ultimate-maker.php',
|
256 |
-
'skins' => 'shortcodes-ultimate-skins/shortcodes-ultimate-skins.php',
|
257 |
-
'extra' => 'shortcodes-ultimate-extra/shortcodes-ultimate-extra.php',
|
258 |
-
);
|
259 |
-
|
260 |
-
// Convert string into array
|
261 |
-
if ( is_string( $addons ) ) $addons = array( $addons );
|
262 |
-
|
263 |
-
// Loop addons
|
264 |
-
foreach ( $addons as $addon ) {
|
265 |
-
if ( ! is_plugin_active( $paths[$addon] ) ) return false;
|
266 |
-
}
|
267 |
-
|
268 |
-
return true;
|
269 |
-
|
270 |
-
}
|
271 |
-
|
272 |
-
function su_skins_link() {
|
273 |
-
if ( su_addon_active( 'skins' ) ) return sprintf( '<br><strong>%s</strong><br><strong>%s</strong>', __( 'Additional skins successfully installed', 'shortcodes-ultimate' ), __( 'Open dropdown to choose one of new styles', 'shortcodes-ultimate' ) );
|
274 |
-
else return sprintf( '<br><a href="http://gndev.info/sus" target="_blank">%s →</a>', __( 'Get more styles', 'shortcodes-ultimate' ) );
|
275 |
-
}
|
276 |
-
|
277 |
/**
|
278 |
* Resizes an image and returns an array containing the resized URL, width, height and file type. Uses native Wordpress functionality.
|
279 |
*
|
@@ -589,368 +473,3 @@ function su_delete_resized_images( $post_id ) {
|
|
589 |
}
|
590 |
|
591 |
add_action( 'delete_attachment', 'su_delete_resized_images' );
|
592 |
-
|
593 |
-
class Su_Tools {
|
594 |
-
function __construct() {
|
595 |
-
// add_action( 'wp_ajax_su_example_preview', array( __CLASS__, 'example' ) );
|
596 |
-
// add_action( 'su/update', array( __CLASS__, 'reset_examples' ) );
|
597 |
-
// add_action( 'su/activation', array( __CLASS__, 'reset_examples' ) );
|
598 |
-
// add_action( 'sunrise/page/before', array( __CLASS__, 'reset_examples' ) );
|
599 |
-
|
600 |
-
add_filter( 'attachment_fields_to_edit', array( __CLASS__, 'slide_link_input' ), null, 2 );
|
601 |
-
add_filter( 'attachment_fields_to_save', array( __CLASS__, 'slide_link_save' ), null, 2 );
|
602 |
-
}
|
603 |
-
|
604 |
-
public static function is_valid_filter( $filter ) {
|
605 |
-
return is_string( $filter ) && strpos( $filter, 'filter' ) !== false;
|
606 |
-
}
|
607 |
-
|
608 |
-
public static function select( $args ) {
|
609 |
-
$args = wp_parse_args( $args, array(
|
610 |
-
'id' => '',
|
611 |
-
'name' => '',
|
612 |
-
'class' => '',
|
613 |
-
'multiple' => '',
|
614 |
-
'size' => '',
|
615 |
-
'disabled' => '',
|
616 |
-
'selected' => '',
|
617 |
-
'none' => '',
|
618 |
-
'options' => array(),
|
619 |
-
'style' => '',
|
620 |
-
'format' => 'keyval', // keyval/idtext
|
621 |
-
'noselect' => '' // return options without <select> tag
|
622 |
-
) );
|
623 |
-
$options = array();
|
624 |
-
if ( !is_array( $args['options'] ) ) $args['options'] = array();
|
625 |
-
if ( $args['id'] ) $args['id'] = ' id="' . $args['id'] . '"';
|
626 |
-
if ( $args['name'] ) $args['name'] = ' name="' . $args['name'] . '"';
|
627 |
-
if ( $args['class'] ) $args['class'] = ' class="' . $args['class'] . '"';
|
628 |
-
if ( $args['style'] ) $args['style'] = ' style="' . esc_attr( $args['style'] ) . '"';
|
629 |
-
if ( $args['multiple'] ) $args['multiple'] = ' multiple="multiple"';
|
630 |
-
if ( $args['disabled'] ) $args['disabled'] = ' disabled="disabled"';
|
631 |
-
if ( $args['size'] ) $args['size'] = ' size="' . $args['size'] . '"';
|
632 |
-
if ( $args['none'] && $args['format'] === 'keyval' ) $args['options'][0] = $args['none'];
|
633 |
-
if ( $args['none'] && $args['format'] === 'idtext' ) array_unshift( $args['options'], array( 'id' => '0', 'text' => $args['none'] ) );
|
634 |
-
// keyval loop
|
635 |
-
// $args['options'] = array(
|
636 |
-
// id => text,
|
637 |
-
// id => text
|
638 |
-
// );
|
639 |
-
if ( $args['format'] === 'keyval' ) foreach ( $args['options'] as $id => $text ) {
|
640 |
-
$options[] = '<option value="' . (string) $id . '">' . (string) $text . '</option>';
|
641 |
-
}
|
642 |
-
// idtext loop
|
643 |
-
// $args['options'] = array(
|
644 |
-
// array( id => id, text => text ),
|
645 |
-
// array( id => id, text => text )
|
646 |
-
// );
|
647 |
-
elseif ( $args['format'] === 'idtext' ) foreach ( $args['options'] as $option ) {
|
648 |
-
if ( isset( $option['id'] ) && isset( $option['text'] ) )
|
649 |
-
$options[] = '<option value="' . (string) $option['id'] . '">' . (string) $option['text'] . '</option>';
|
650 |
-
}
|
651 |
-
$options = implode( '', $options );
|
652 |
-
$options = str_replace( 'value="' . $args['selected'] . '"', 'value="' . $args['selected'] . '" selected="selected"', $options );
|
653 |
-
return ( $args['noselect'] ) ? $options : '<select' . $args['id'] . $args['name'] . $args['class'] . $args['multiple'] . $args['size'] . $args['disabled'] . $args['style'] . '>' . $options . '</select>';
|
654 |
-
}
|
655 |
-
|
656 |
-
public static function get_categories() {
|
657 |
-
$cats = array();
|
658 |
-
foreach ( (array) get_terms( 'category', array( 'hide_empty' => false ) ) as $cat ) $cats[$cat->slug] = $cat->name;
|
659 |
-
return $cats;
|
660 |
-
}
|
661 |
-
|
662 |
-
public static function get_types() {
|
663 |
-
$types = array();
|
664 |
-
foreach ( (array) get_post_types( '', 'objects' ) as $cpt => $cpt_data ) $types[$cpt] = $cpt_data->label;
|
665 |
-
return $types;
|
666 |
-
}
|
667 |
-
|
668 |
-
public static function get_taxonomies() {
|
669 |
-
$taxes = array();
|
670 |
-
foreach ( (array) get_taxonomies( '', 'objects' ) as $tax ) $taxes[$tax->name] = $tax->label;
|
671 |
-
return $taxes;
|
672 |
-
}
|
673 |
-
|
674 |
-
public static function get_terms( $tax = 'category', $key = 'id' ) {
|
675 |
-
$terms = array();
|
676 |
-
if ( $key === 'id' ) foreach ( (array) get_terms( $tax, array( 'hide_empty' => false ) ) as $term ) $terms[$term->term_id] = $term->name;
|
677 |
-
elseif ( $key === 'slug' ) foreach ( (array) get_terms( $tax, array( 'hide_empty' => false ) ) as $term ) $terms[$term->slug] = $term->name;
|
678 |
-
return $terms;
|
679 |
-
}
|
680 |
-
|
681 |
-
public static function get_slides( $args ) {
|
682 |
-
$args = wp_parse_args( $args, array(
|
683 |
-
'source' => 'none',
|
684 |
-
'limit' => 20,
|
685 |
-
'gallery' => null,
|
686 |
-
'type' => '',
|
687 |
-
'link' => 'none'
|
688 |
-
) );
|
689 |
-
// Get deprecated galleries if needed
|
690 |
-
if ( $args['gallery'] !== null || ( $args['source'] === 'none' && get_option( 'su_option_galleries-432' ) ) ) return self::get_slides_432( $args );
|
691 |
-
// Prepare empty array for slides
|
692 |
-
$slides = array();
|
693 |
-
// Loop through source types
|
694 |
-
foreach ( array( 'media', 'posts', 'category', 'taxonomy' ) as $type ) {
|
695 |
-
if ( strpos( trim( $args['source'] ), $type . ':' ) === 0 ) {
|
696 |
-
$args['source'] = array(
|
697 |
-
'type' => $type,
|
698 |
-
'val' => (string) trim( str_replace( array( $type . ':', ' ' ), '', $args['source'] ), ',' )
|
699 |
-
);
|
700 |
-
break;
|
701 |
-
}
|
702 |
-
}
|
703 |
-
// Source is not parsed correctly, return empty array
|
704 |
-
if ( !is_array( $args['source'] ) ) return $slides;
|
705 |
-
// Default posts query
|
706 |
-
$query = array( 'posts_per_page' => $args['limit'] );
|
707 |
-
// Source: media
|
708 |
-
if ( $args['source']['type'] === 'media' ) {
|
709 |
-
$query['post_type'] = 'attachment';
|
710 |
-
$query['post_status'] = 'any';
|
711 |
-
$query['post__in'] = (array) explode( ',', $args['source']['val'] );
|
712 |
-
$query['orderby'] = 'post__in';
|
713 |
-
}
|
714 |
-
// Source: posts
|
715 |
-
if ( $args['source']['type'] === 'posts' ) {
|
716 |
-
if ( $args['source']['val'] !== 'recent' ) {
|
717 |
-
$query['post__in'] = (array) explode( ',', $args['source']['val'] );
|
718 |
-
$query['orderby'] = 'post__in';
|
719 |
-
$query['post_type'] = 'any';
|
720 |
-
}
|
721 |
-
}
|
722 |
-
// Source: category
|
723 |
-
elseif ( $args['source']['type'] === 'category' ) {
|
724 |
-
$query['category__in'] = (array) explode( ',', $args['source']['val'] );
|
725 |
-
}
|
726 |
-
// Source: taxonomy
|
727 |
-
elseif ( $args['source']['type'] === 'taxonomy' ) {
|
728 |
-
// Parse taxonomy name and terms ids
|
729 |
-
$args['source']['val'] = explode( '/', $args['source']['val'] );
|
730 |
-
// Taxonomy parsed incorrectly, return empty array
|
731 |
-
if ( !is_array( $args['source']['val'] ) || count( $args['source']['val'] ) !== 2 ) return $slides;
|
732 |
-
$query['tax_query'] = array(
|
733 |
-
array(
|
734 |
-
'taxonomy' => $args['source']['val'][0],
|
735 |
-
'field' => 'id',
|
736 |
-
'terms' => (array) explode( ',', $args['source']['val'][1] )
|
737 |
-
)
|
738 |
-
);
|
739 |
-
$query['post_type'] = 'any';
|
740 |
-
}
|
741 |
-
// Query posts
|
742 |
-
$query = apply_filters( 'su/slides_query', $query, $args );
|
743 |
-
$query = new WP_Query( $query );
|
744 |
-
// Loop through posts
|
745 |
-
if ( is_array( $query->posts ) ) foreach ( $query->posts as $post ) {
|
746 |
-
// Get attachment ID
|
747 |
-
$thumb = ( $args['source']['type'] === 'media' || $post->post_type === 'attachment' ) ? $post->ID : get_post_thumbnail_id( $post->ID );
|
748 |
-
// Thumbnail isn't set, go to next post
|
749 |
-
if ( !is_numeric( $thumb ) ) continue;
|
750 |
-
$slide = array(
|
751 |
-
'image' => wp_get_attachment_url( $thumb ),
|
752 |
-
'link' => '',
|
753 |
-
'title' => get_the_title( $post->ID )
|
754 |
-
);
|
755 |
-
if ( $args['link'] === 'image' || $args['link'] === 'lightbox' ) $slide['link'] = $slide['image'];
|
756 |
-
elseif ( $args['link'] === 'custom' ) $slide['link'] = get_post_meta( $post->ID, 'su_slide_link', true );
|
757 |
-
elseif ( $args['link'] === 'post' ) $slide['link'] = get_permalink( $post->ID );
|
758 |
-
elseif ( $args['link'] === 'attachment' ) $slide['link'] = get_attachment_link( $thumb );
|
759 |
-
$slides[] = $slide;
|
760 |
-
}
|
761 |
-
// Return slides
|
762 |
-
return $slides;
|
763 |
-
}
|
764 |
-
|
765 |
-
public static function get_slides_432( $args ) {
|
766 |
-
$args = wp_parse_args( $args, array(
|
767 |
-
'gallery' => 1
|
768 |
-
) );
|
769 |
-
$slides = array();
|
770 |
-
$args['gallery'] = ( $args['gallery'] === null ) ? 0 : $args['gallery'] - 1;
|
771 |
-
$galleries = get_option( 'su_option_galleries-432' );
|
772 |
-
// No galleries found
|
773 |
-
if ( !is_array( $galleries ) ) return $slides;
|
774 |
-
// If galleries found loop through them
|
775 |
-
if ( isset( $galleries[$args['gallery']] ) ) $slides = $galleries[$args['gallery']]['items'];
|
776 |
-
// Return slides
|
777 |
-
return $slides;
|
778 |
-
}
|
779 |
-
|
780 |
-
// public static function example() {
|
781 |
-
// // Check authentication
|
782 |
-
// self::access();
|
783 |
-
// // Check nonce
|
784 |
-
// if ( !isset( $_REQUEST['nonce'] ) || !wp_verify_nonce( $_REQUEST['nonce'], 'su_examples_nonce' ) ) return;
|
785 |
-
// // Check incoming data
|
786 |
-
// if ( !isset( $_REQUEST['code'] ) || !isset( $_REQUEST['id'] ) ) return;
|
787 |
-
// // Check for cache
|
788 |
-
// $output = get_transient( 'su/examples/render/' . sanitize_key( $_REQUEST['id'] ) );
|
789 |
-
// if ( $output && SU_ENABLE_CACHE ) echo $output;
|
790 |
-
// // Cache not found
|
791 |
-
// else {
|
792 |
-
// ob_start();
|
793 |
-
// // Prepare data
|
794 |
-
// $code = file_get_contents( sanitize_text_field( $_REQUEST['code'] ) );
|
795 |
-
// // Check for code
|
796 |
-
// if ( !$code ) die( '<p class="su-examples-error">' . __( 'Example code does not found, please check it later', 'shortcodes-ultimate' ) . '</p>' );
|
797 |
-
// // Clean-up the code
|
798 |
-
// $code = str_replace( array( "\t", '%su_' ), array( ' ', su_cmpt() ), $code );
|
799 |
-
// // Split code
|
800 |
-
// $chunks = explode( '-----', $code );
|
801 |
-
// // Show snippets
|
802 |
-
// do_action( 'su/examples/preview/before' );
|
803 |
-
// foreach ( $chunks as $chunk ) {
|
804 |
-
// // Clean-up new lines
|
805 |
-
// $chunk = trim( $chunk, "\n\r" );
|
806 |
-
// // Calc textarea rows
|
807 |
-
// $rows = substr_count( $chunk, "\n" );
|
808 |
-
// $rows = ( $rows < 4 ) ? '4' : (string) ( $rows + 1 );
|
809 |
-
// $rows = ( $rows > 20 ) ? '20' : (string) ( $rows + 1 );
|
810 |
-
// echo wpautop( do_shortcode( $chunk ) );
|
811 |
-
// echo '<div style="clear:both"></div>';
|
812 |
-
// echo '<div class="su-examples-code"><span class="su-examples-get-code button"><i class="fa fa-code"></i> ' . __( 'Get the code', 'shortcodes-ultimate' ) . '</span><textarea rows="' . $rows . '">' . esc_textarea( $chunk ) . '</textarea></div>';
|
813 |
-
// }
|
814 |
-
// do_action( 'su/examples/preview/after' );
|
815 |
-
// $output = ob_get_contents();
|
816 |
-
// ob_end_clean();
|
817 |
-
// set_transient( 'su/examples/render/' . sanitize_key( $_REQUEST['id'] ), $output );
|
818 |
-
// echo $output;
|
819 |
-
// }
|
820 |
-
// die();
|
821 |
-
// }
|
822 |
-
|
823 |
-
public static function reset_examples() {
|
824 |
-
// foreach ( (array) Su_Data::examples() as $example ) foreach ( (array) $example['items'] as $item ) delete_transient( 'su/examples/render/' . $item['id'] );
|
825 |
-
}
|
826 |
-
|
827 |
-
public static function do_attr( $value ) {
|
828 |
-
return do_shortcode( str_replace( array( '{', '}' ), array( '[', ']' ), $value ) );
|
829 |
-
}
|
830 |
-
|
831 |
-
public static function icon( $src = 'file' ) {
|
832 |
-
return ( strpos( $src, '/' ) !== false ) ? '<img src="' . $src . '" alt="" />' : '<i class="fa fa-' . str_replace( 'icon: ', '', $src ) . '"></i>';
|
833 |
-
}
|
834 |
-
|
835 |
-
public static function get_icon( $args ) {
|
836 |
-
$args = wp_parse_args( $args, array(
|
837 |
-
'icon' => '',
|
838 |
-
'size' => '',
|
839 |
-
'color' => '',
|
840 |
-
'style' => ''
|
841 |
-
) );
|
842 |
-
// Check for icon param
|
843 |
-
if ( !$args['icon'] ) return;
|
844 |
-
// Add trailing ; to the style param
|
845 |
-
if ( $args['style'] ) $args['style'] = rtrim( $args['style'], ';' ) . ';';
|
846 |
-
// Font Awesome icon
|
847 |
-
if ( strpos( $args['icon'], 'icon:' ) !== false ) {
|
848 |
-
// Add size
|
849 |
-
if ( $args['size'] ) $args['style'] .= 'font-size:' . $args['size'] . 'px;';
|
850 |
-
// Add color
|
851 |
-
if ( $args['color'] ) $args['style'] .= 'color:' . $args['color'] . ';';
|
852 |
-
// Query font-awesome stylesheet
|
853 |
-
su_query_asset( 'css', 'font-awesome' );
|
854 |
-
// Return icon
|
855 |
-
return '<i class="fa fa-' . trim( str_replace( 'icon:', '', $args['icon'] ) ) . '" style="' . $args['style'] . '"></i>';
|
856 |
-
}
|
857 |
-
// Image icon
|
858 |
-
elseif ( strpos( $args['icon'], '/' ) !== false ) {
|
859 |
-
// Add size
|
860 |
-
if ( $args['size'] ) $args['style'] .= 'width:' . $args['size'] . 'px;height:' . $args['size'] . 'px;';
|
861 |
-
// Return icon
|
862 |
-
return '<img src="' . $args['icon'] . '" alt="" style="' . $args['style'] . '" />';
|
863 |
-
}
|
864 |
-
// Icon is not detected
|
865 |
-
return false;
|
866 |
-
}
|
867 |
-
|
868 |
-
public static function icons() {
|
869 |
-
$icons = array();
|
870 |
-
if ( is_callable( array( 'Su_Data', 'icons' ) ) ) foreach ( (array) Su_Data::icons() as $icon ) {
|
871 |
-
$icons[] = '<i class="fa fa-' . $icon . '" title="' . $icon . '"></i>';
|
872 |
-
}
|
873 |
-
return implode( '', $icons );
|
874 |
-
}
|
875 |
-
|
876 |
-
public static function access() {
|
877 |
-
if ( !self::access_check() ) wp_die( __( 'Access denied', 'shortcodes-ultimate' ) );
|
878 |
-
}
|
879 |
-
|
880 |
-
public static function access_check() {
|
881 |
-
return current_user_can( 'edit_posts' );
|
882 |
-
}
|
883 |
-
|
884 |
-
public static function slide_link_input( $form_fields, $post ) {
|
885 |
-
$form_fields['su_slide_link'] = array(
|
886 |
-
'label' => __( 'Slide link', 'shortcodes-ultimate' ),
|
887 |
-
'input' => 'text',
|
888 |
-
'value' => get_post_meta( $post->ID, 'su_slide_link', true ),
|
889 |
-
'helps' => sprintf( '<strong>%s</strong><br>%s', __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ), __( 'Use this field to add custom links to slides used with Slider, Carousel and Custom Gallery shortcodes', 'shortcodes-ultimate' ) )
|
890 |
-
);
|
891 |
-
return $form_fields;
|
892 |
-
}
|
893 |
-
|
894 |
-
public static function slide_link_save( $post, $attachment ) {
|
895 |
-
if ( isset( $attachment['su_slide_link'] ) )
|
896 |
-
update_post_meta( $post['ID'], 'su_slide_link', $attachment['su_slide_link'] );
|
897 |
-
return $post;
|
898 |
-
}
|
899 |
-
|
900 |
-
public static function error( $prefix = false, $message = false ) {
|
901 |
-
if ( !$prefix && !$message ) return '';
|
902 |
-
$return = array( '<div class="su-error" style="padding:10px;border:1px solid #f03;color:#903;background:#fde">' );
|
903 |
-
if ( $prefix ) $return[] = '<strong>' . $prefix . '</strong><br/>';
|
904 |
-
$return[] = $message;
|
905 |
-
$return[] = '</div>';
|
906 |
-
return implode( '', $return );
|
907 |
-
}
|
908 |
-
|
909 |
-
/**
|
910 |
-
* Range converter
|
911 |
-
* Converts string range (like 1, 5-7, 10) into array (like [1]=>1, [5]=>5, [6]=>6, [7]=>7, [10]=>10)
|
912 |
-
*/
|
913 |
-
public static function range( $string = '' ) {
|
914 |
-
$numbers = array();
|
915 |
-
// Loop values
|
916 |
-
foreach ( explode( ',', $string ) as $range ) {
|
917 |
-
// Detect range (min-max)
|
918 |
-
if ( strpos( $range, '-' ) !== false ) {
|
919 |
-
// Split min/max
|
920 |
-
$range = explode( '-', $range );
|
921 |
-
// Check min/max values
|
922 |
-
if ( !is_numeric( $range[0] ) ) $range[0] = 0;
|
923 |
-
if ( !is_numeric( $range[1] ) ) $range[1] = 0;
|
924 |
-
// Sort min/max values
|
925 |
-
sort( $range );
|
926 |
-
// List values from min to max
|
927 |
-
$range = range( $range[0], $range[1] );
|
928 |
-
// Add values to the array
|
929 |
-
foreach ( $range as $value ) $numbers[$value] = $value;
|
930 |
-
}
|
931 |
-
// Single value
|
932 |
-
else {
|
933 |
-
// Add day to the array
|
934 |
-
$numbers[$range] = $range;
|
935 |
-
}
|
936 |
-
}
|
937 |
-
// Return array with numbers
|
938 |
-
return $numbers;
|
939 |
-
}
|
940 |
-
}
|
941 |
-
|
942 |
-
new Su_Tools;
|
943 |
-
|
944 |
-
/**
|
945 |
-
* Shortcut for Su_Tools::decode_shortcode()
|
946 |
-
*/
|
947 |
-
function su_scattr( $value ) {
|
948 |
-
return Su_Tools::do_attr( $value );
|
949 |
-
}
|
950 |
-
|
951 |
-
/**
|
952 |
-
* Shortcut for Su_Tools::get_icon()
|
953 |
-
*/
|
954 |
-
function su_get_icon( $args ) {
|
955 |
-
return Su_Tools::get_icon( $args );
|
956 |
-
}
|
158 |
return implode( $delimiter, array( $r, $g, $b ) ); //array( 'red' => $r, 'green' => $g, 'blue' => $b );
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
/**
|
162 |
* Resizes an image and returns an array containing the resized URL, width, height and file type. Uses native Wordpress functionality.
|
163 |
*
|
473 |
}
|
474 |
|
475 |
add_action( 'delete_attachment', 'su_delete_resized_images' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The class responsible for adding, storing and accessing shortcodes data.
|
5 |
+
*
|
6 |
+
* @since 5.0.5
|
7 |
+
* @package Shortcodes_Ultimate
|
8 |
+
* @subpackage Shortcodes_Ultimate/includes
|
9 |
+
*/
|
10 |
+
class Shortcodes_Ultimate_Shortcodes {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The collection of available shortcodes.
|
14 |
+
*
|
15 |
+
* @since 5.0.5
|
16 |
+
* @var array
|
17 |
+
*/
|
18 |
+
private static $shortcodes = array();
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get all shortcodes.
|
22 |
+
*
|
23 |
+
* @since 5.0.5
|
24 |
+
* @return array The collection of available shortcodes.
|
25 |
+
*/
|
26 |
+
public static function get_all() {
|
27 |
+
return apply_filters( 'su/data/shortcodes', self::$shortcodes );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get specific shortcode by ID.
|
32 |
+
*
|
33 |
+
* @since 5.0.5
|
34 |
+
* @param string $id The ID (without prefix) of shortcode.
|
35 |
+
* @return array|boolean Shortcode data if found, False otherwise.
|
36 |
+
*/
|
37 |
+
public static function get( $id ) {
|
38 |
+
|
39 |
+
$shortcodes = self::get_all();
|
40 |
+
|
41 |
+
return isset( $shortcodes[ $id ] )
|
42 |
+
? $shortcodes[ $id ]
|
43 |
+
: false;
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Add a shortcode.
|
49 |
+
*
|
50 |
+
* @since 5.0.5
|
51 |
+
* @param array $data New shortcode data.
|
52 |
+
* @param boolean $replace Replace existing shortcode or not.
|
53 |
+
*/
|
54 |
+
public static function add( $data = array(), $replace = true ) {
|
55 |
+
|
56 |
+
if ( ! isset( $data['id'], $data['callback'] ) ) {
|
57 |
+
|
58 |
+
trigger_error( 'Shortcode was not added. Missing required params (ID, callback).' );
|
59 |
+
|
60 |
+
return;
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( ! $replace && self::get( $data['id'] ) ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
self::$shortcodes[ $data['id'] ] = $data;
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Remove a shortcode.
|
74 |
+
*
|
75 |
+
* @since 5.0.5
|
76 |
+
* @param string $id Shortcode ID to remove.
|
77 |
+
*/
|
78 |
+
public static function remove( $id ) {
|
79 |
+
|
80 |
+
if ( isset( self::$shortcodes[ $id ] ) ) {
|
81 |
+
unset( self::$shortcodes[ $id ] );
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Register all available shortcodes.
|
88 |
+
*
|
89 |
+
* @since 5.0.5
|
90 |
+
*/
|
91 |
+
public static function register() {
|
92 |
+
|
93 |
+
$shortcodes = self::get_all();
|
94 |
+
$prefix = su_get_shortcode_prefix();
|
95 |
+
|
96 |
+
foreach ( $shortcodes as $id => $shortcode ) {
|
97 |
+
|
98 |
+
if ( isset( $shortcode['callback'] ) && is_callable( $shortcode['callback'] ) ) {
|
99 |
+
$callback = $shortcode['callback'];
|
100 |
+
}
|
101 |
+
|
102 |
+
elseif ( isset( $shortcode['function'] ) && is_callable( $shortcode['function'] ) ) {
|
103 |
+
$callback = $shortcode['function'];
|
104 |
+
}
|
105 |
+
|
106 |
+
else {
|
107 |
+
continue;
|
108 |
+
}
|
109 |
+
|
110 |
+
add_shortcode( $prefix . $id, $callback );
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
@@ -112,9 +112,9 @@ class Shortcodes_Ultimate {
|
|
112 |
private function load_dependencies() {
|
113 |
|
114 |
/**
|
115 |
-
*
|
116 |
*/
|
117 |
-
require_once $this->plugin_path . 'includes/
|
118 |
|
119 |
/**
|
120 |
* The class responsible for plugin upgrades.
|
@@ -136,6 +136,35 @@ class Shortcodes_Ultimate {
|
|
136 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice.php';
|
137 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice-rate.php';
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
/**
|
@@ -206,17 +235,29 @@ class Shortcodes_Ultimate {
|
|
206 |
add_action( 'admin_notices', array( $this->rate_notice, 'display_notice' ) );
|
207 |
add_action( 'admin_post_su_dismiss_notice', array( $this->rate_notice, 'dismiss_notice' ) );
|
208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
|
211 |
/**
|
212 |
-
* Register all of the hooks related to both admin area and public part
|
213 |
-
*
|
214 |
*
|
215 |
* @since 5.0.4
|
216 |
* @access private
|
217 |
*/
|
218 |
private function define_common_hooks() {
|
219 |
|
|
|
|
|
|
|
|
|
|
|
220 |
/**
|
221 |
* Disable wptexturize filter for nestable shortcodes.
|
222 |
*/
|
112 |
private function load_dependencies() {
|
113 |
|
114 |
/**
|
115 |
+
* The class responsible for adding, storing and accessing shortcodes data.
|
116 |
*/
|
117 |
+
require_once $this->plugin_path . 'includes/class-shortcodes-ultimate-shortcodes.php';
|
118 |
|
119 |
/**
|
120 |
* The class responsible for plugin upgrades.
|
136 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice.php';
|
137 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice-rate.php';
|
138 |
|
139 |
+
/**
|
140 |
+
* Filters.
|
141 |
+
*/
|
142 |
+
require_once $this->plugin_path . 'includes/filters.php';
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Functions.
|
146 |
+
*/
|
147 |
+
require_once $this->plugin_path . 'includes/functions-helpers.php';
|
148 |
+
require_once $this->plugin_path . 'includes/functions-html.php';
|
149 |
+
require_once $this->plugin_path . 'includes/functions-shortcodes.php';
|
150 |
+
require_once $this->plugin_path . 'includes/functions-galleries.php';
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Deprecated stuff.
|
154 |
+
*/
|
155 |
+
require_once $this->plugin_path . 'includes/deprecated/class-su-data.php';
|
156 |
+
require_once $this->plugin_path . 'includes/deprecated/class-su-tools.php';
|
157 |
+
require_once $this->plugin_path . 'includes/deprecated/functions.php';
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Shortcodes.
|
161 |
+
*/
|
162 |
+
require_once $this->plugin_path . 'includes/shortcodes/_all.php';
|
163 |
+
|
164 |
+
// foreach ( glob( $this->plugin_path . 'includes/shortcodes/*.php' ) as $shortcode_file ) {
|
165 |
+
// require_once $shortcode_file;
|
166 |
+
// }
|
167 |
+
|
168 |
}
|
169 |
|
170 |
/**
|
235 |
add_action( 'admin_notices', array( $this->rate_notice, 'display_notice' ) );
|
236 |
add_action( 'admin_post_su_dismiss_notice', array( $this->rate_notice, 'dismiss_notice' ) );
|
237 |
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Add/Save 'Slide link' field on attachment page.
|
241 |
+
*/
|
242 |
+
add_filter( 'attachment_fields_to_edit', 'su_slide_link_input', 10, 2 );
|
243 |
+
add_filter( 'attachment_fields_to_save', 'su_slide_link_save', 10, 2 );
|
244 |
+
|
245 |
}
|
246 |
|
247 |
/**
|
248 |
+
* Register all of the hooks related to both admin area and public part of
|
249 |
+
* the plugin.
|
250 |
*
|
251 |
* @since 5.0.4
|
252 |
* @access private
|
253 |
*/
|
254 |
private function define_common_hooks() {
|
255 |
|
256 |
+
/**
|
257 |
+
* Register available shortcodes.
|
258 |
+
*/
|
259 |
+
add_action( 'init', array( 'Shortcodes_Ultimate_Shortcodes', 'register' ) );
|
260 |
+
|
261 |
/**
|
262 |
* Disable wptexturize filter for nestable shortcodes.
|
263 |
*/
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return array( 'skins', 'maker', 'extra' );
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return apply_filters( 'su/data/animations', array(
|
4 |
+
'flash',
|
5 |
+
'bounce',
|
6 |
+
'shake',
|
7 |
+
'tada',
|
8 |
+
'swing',
|
9 |
+
'wobble',
|
10 |
+
'pulse',
|
11 |
+
'flip',
|
12 |
+
'flipInX',
|
13 |
+
'flipOutX',
|
14 |
+
'flipInY',
|
15 |
+
'flipOutY',
|
16 |
+
'fadeIn',
|
17 |
+
'fadeInUp',
|
18 |
+
'fadeInDown',
|
19 |
+
'fadeInLeft',
|
20 |
+
'fadeInRight',
|
21 |
+
'fadeInUpBig',
|
22 |
+
'fadeInDownBig',
|
23 |
+
'fadeInLeftBig',
|
24 |
+
'fadeInRightBig',
|
25 |
+
'fadeOut',
|
26 |
+
'fadeOutUp',
|
27 |
+
'fadeOutDown',
|
28 |
+
'fadeOutLeft',
|
29 |
+
'fadeOutRight',
|
30 |
+
'fadeOutUpBig',
|
31 |
+
'fadeOutDownBig',
|
32 |
+
'fadeOutLeftBig',
|
33 |
+
'fadeOutRightBig',
|
34 |
+
'slideInDown',
|
35 |
+
'slideInLeft',
|
36 |
+
'slideInRight',
|
37 |
+
'slideOutUp',
|
38 |
+
'slideOutLeft',
|
39 |
+
'slideOutRight',
|
40 |
+
'bounceIn',
|
41 |
+
'bounceInDown',
|
42 |
+
'bounceInUp',
|
43 |
+
'bounceInLeft',
|
44 |
+
'bounceInRight',
|
45 |
+
'bounceOut',
|
46 |
+
'bounceOutDown',
|
47 |
+
'bounceOutUp',
|
48 |
+
'bounceOutLeft',
|
49 |
+
'bounceOutRight',
|
50 |
+
'rotateIn',
|
51 |
+
'rotateInDownLeft',
|
52 |
+
'rotateInDownRight',
|
53 |
+
'rotateInUpLeft',
|
54 |
+
'rotateInUpRight',
|
55 |
+
'rotateOut',
|
56 |
+
'rotateOutDownLeft',
|
57 |
+
'rotateOutDownRight',
|
58 |
+
'rotateOutUpLeft',
|
59 |
+
'rotateOutUpRight',
|
60 |
+
'lightSpeedIn',
|
61 |
+
'lightSpeedOut',
|
62 |
+
'hinge',
|
63 |
+
'rollIn',
|
64 |
+
'rollOut'
|
65 |
+
) );
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return apply_filters( 'su/data/borders', array(
|
4 |
+
'none' => __( 'None', 'shortcodes-ultimate' ),
|
5 |
+
'solid' => __( 'Solid', 'shortcodes-ultimate' ),
|
6 |
+
'dotted' => __( 'Dotted', 'shortcodes-ultimate' ),
|
7 |
+
'dashed' => __( 'Dashed', 'shortcodes-ultimate' ),
|
8 |
+
'double' => __( 'Double', 'shortcodes-ultimate' ),
|
9 |
+
'groove' => __( 'Groove', 'shortcodes-ultimate' ),
|
10 |
+
'ridge' => __( 'Ridge', 'shortcodes-ultimate' )
|
11 |
+
) );
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return apply_filters( 'su/data/groups', array(
|
4 |
+
'all' => __( 'All', 'shortcodes-ultimate' ),
|
5 |
+
'content' => __( 'Content', 'shortcodes-ultimate' ),
|
6 |
+
'box' => __( 'Box', 'shortcodes-ultimate' ),
|
7 |
+
'media' => __( 'Media', 'shortcodes-ultimate' ),
|
8 |
+
'gallery' => __( 'Gallery', 'shortcodes-ultimate' ),
|
9 |
+
'data' => __( 'Data', 'shortcodes-ultimate' ),
|
10 |
+
'other' => __( 'Other', 'shortcodes-ultimate' )
|
11 |
+
) );
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return apply_filters( 'su/data/icons', array( 'address-book', 'address-book-o', 'address-card', 'address-card-o', 'bandcamp', 'bath', 'bathtub', 'drivers-license', 'drivers-license-o', 'eercast', 'envelope-open', 'envelope-open-o', 'etsy', 'free-code-camp', 'grav', 'handshake-o', 'id-badge', 'id-card', 'id-card-o', 'imdb', 'linode', 'meetup', 'microchip', 'podcast', 'quora', 'ravelry', 's15', 'shower', 'snowflake-o', 'superpowers', 'telegram', 'thermometer', 'thermometer-0', 'thermometer-1', 'thermometer-2', 'thermometer-3', 'thermometer-4', 'thermometer-empty', 'thermometer-full', 'thermometer-half', 'thermometer-quarter', 'thermometer-three-quarters', 'times-rectangle', 'times-rectangle-o', 'user-circle', 'user-circle-o', 'user-o', 'vcard', 'vcard-o', 'window-close', 'window-close-o', 'window-maximize', 'window-minimize', 'window-restore', 'wpexplorer', 'adjust', 'american-sign-language-interpreting', 'anchor', 'archive', 'area-chart', 'arrows', 'arrows-h', 'arrows-v', 'asl-interpreting', 'assistive-listening-systems', 'asterisk', 'at', 'audio-description', 'automobile', 'balance-scale', 'ban', 'bank', 'bar-chart', 'bar-chart-o', 'barcode', 'bars', 'battery', 'battery-0', 'battery-1', 'battery-2', 'battery-3', 'battery-4', 'battery-empty', 'battery-full', 'battery-half', 'battery-quarter', 'battery-three-quarters', 'bed', 'beer', 'bell', 'bell-o', 'bell-slash', 'bell-slash-o', 'bicycle', 'binoculars', 'birthday-cake', 'blind', 'bluetooth', 'bluetooth-b', 'bolt', 'bomb', 'book', 'bookmark', 'bookmark-o', 'braille', 'briefcase', 'bug', 'building', 'building-o', 'bullhorn', 'bullseye', 'bus', 'cab', 'calculator', 'calendar', 'calendar-check-o', 'calendar-minus-o', 'calendar-o', 'calendar-plus-o', 'calendar-times-o', 'camera', 'camera-retro', 'car', 'caret-square-o-down', 'caret-square-o-left', 'caret-square-o-right', 'caret-square-o-up', 'cart-arrow-down', 'cart-plus', 'cc', 'certificate', 'check', 'check-circle', 'check-circle-o', 'check-square', 'check-square-o', 'child', 'circle', 'circle-o', 'circle-o-notch', 'circle-thin', 'clock-o', 'clone', 'close', 'cloud', 'cloud-download', 'cloud-upload', 'code', 'code-fork', 'coffee', 'cog', 'cogs', 'comment', 'comment-o', 'commenting', 'commenting-o', 'comments', 'comments-o', 'compass', 'copyright', 'creative-commons', 'credit-card', 'credit-card-alt', 'crop', 'crosshairs', 'cube', 'cubes', 'cutlery', 'dashboard', 'database', 'deaf', 'deafness', 'desktop', 'diamond', 'dot-circle-o', 'download', 'edit', 'ellipsis-h', 'ellipsis-v', 'envelope', 'envelope-o', 'envelope-square', 'eraser', 'exchange', 'exclamation', 'exclamation-circle', 'exclamation-triangle', 'external-link', 'external-link-square', 'eye', 'eye-slash', 'eyedropper', 'fax', 'feed', 'female', 'fighter-jet', 'file-archive-o', 'file-audio-o', 'file-code-o', 'file-excel-o', 'file-image-o', 'file-movie-o', 'file-pdf-o', 'file-photo-o', 'file-picture-o', 'file-powerpoint-o', 'file-sound-o', 'file-video-o', 'file-word-o', 'file-zip-o', 'film', 'filter', 'fire', 'fire-extinguisher', 'flag', 'flag-checkered', 'flag-o', 'flash', 'flask', 'folder', 'folder-o', 'folder-open', 'folder-open-o', 'frown-o', 'futbol-o', 'gamepad', 'gavel', 'gear', 'gears', 'gift', 'glass', 'globe', 'graduation-cap', 'group', 'hand-grab-o', 'hand-lizard-o', 'hand-paper-o', 'hand-peace-o', 'hand-pointer-o', 'hand-rock-o', 'hand-scissors-o', 'hand-spock-o', 'hand-stop-o', 'hard-of-hearing', 'hashtag', 'hdd-o', 'headphones', 'heart', 'heart-o', 'heartbeat', 'history', 'home', 'hotel', 'hourglass', 'hourglass-1', 'hourglass-2', 'hourglass-3', 'hourglass-end', 'hourglass-half', 'hourglass-o', 'hourglass-start', 'i-cursor', 'image', 'inbox', 'industry', 'info', 'info-circle', 'institution', 'key', 'keyboard-o', 'language', 'laptop', 'leaf', 'legal', 'lemon-o', 'level-down', 'level-up', 'life-bouy', 'life-buoy', 'life-ring', 'life-saver', 'lightbulb-o', 'line-chart', 'location-arrow', 'lock', 'low-vision', 'magic', 'magnet', 'mail-forward', 'mail-reply', 'mail-reply-all', 'male', 'map', 'map-marker', 'map-o', 'map-pin', 'map-signs', 'meh-o', 'microphone', 'microphone-slash', 'minus', 'minus-circle', 'minus-square', 'minus-square-o', 'mobile', 'mobile-phone', 'money', 'moon-o', 'mortar-board', 'motorcycle', 'mouse-pointer', 'music', 'navicon', 'newspaper-o', 'object-group', 'object-ungroup', 'paint-brush', 'paper-plane', 'paper-plane-o', 'paw', 'pencil', 'pencil-square', 'pencil-square-o', 'percent', 'phone', 'phone-square', 'photo', 'picture-o', 'pie-chart', 'plane', 'plug', 'plus', 'plus-circle', 'plus-square', 'plus-square-o', 'power-off', 'print', 'puzzle-piece', 'qrcode', 'question', 'question-circle', 'question-circle-o', 'quote-left', 'quote-right', 'random', 'recycle', 'refresh', 'registered', 'remove', 'reorder', 'reply', 'reply-all', 'retweet', 'road', 'rocket', 'rss', 'rss-square', 'search', 'search-minus', 'search-plus', 'send', 'send-o', 'server', 'share', 'share-alt', 'share-alt-square', 'share-square', 'share-square-o', 'shield', 'ship', 'shopping-bag', 'shopping-basket', 'shopping-cart', 'sign-in', 'sign-language', 'sign-out', 'signal', 'signing', 'sitemap', 'sliders', 'smile-o', 'soccer-ball-o', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-amount-asc', 'sort-amount-desc', 'sort-asc', 'sort-desc', 'sort-down', 'sort-numeric-asc', 'sort-numeric-desc', 'sort-up', 'space-shuttle', 'spinner', 'spoon', 'square', 'square-o', 'star', 'star-half', 'star-half-empty', 'star-half-full', 'star-half-o', 'star-o', 'sticky-note', 'sticky-note-o', 'street-view', 'suitcase', 'sun-o', 'support', 'tablet', 'tachometer', 'tag', 'tags', 'tasks', 'taxi', 'television', 'terminal', 'thumb-tack', 'thumbs-down', 'thumbs-o-down', 'thumbs-o-up', 'thumbs-up', 'ticket', 'times', 'times-circle', 'times-circle-o', 'tint', 'toggle-down', 'toggle-left', 'toggle-off', 'toggle-on', 'toggle-right', 'toggle-up', 'trademark', 'trash', 'trash-o', 'tree', 'trophy', 'truck', 'tty', 'tv', 'umbrella', 'universal-access', 'university', 'unlock', 'unlock-alt', 'unsorted', 'upload', 'user', 'user-plus', 'user-secret', 'user-times', 'users', 'video-camera', 'volume-control-phone', 'volume-down', 'volume-off', 'volume-up', 'warning', 'wheelchair', 'wheelchair-alt', 'wifi', 'wrench', 'hand-o-down', 'hand-o-left', 'hand-o-right', 'hand-o-up', 'ambulance', 'subway', 'train', 'genderless', 'intersex', 'mars', 'mars-double', 'mars-stroke', 'mars-stroke-h', 'mars-stroke-v', 'mercury', 'neuter', 'transgender', 'transgender-alt', 'venus', 'venus-double', 'venus-mars', 'file', 'file-o', 'file-text', 'file-text-o', 'cc-amex', 'cc-diners-club', 'cc-discover', 'cc-jcb', 'cc-mastercard', 'cc-paypal', 'cc-stripe', 'cc-visa', 'google-wallet', 'paypal', 'bitcoin', 'btc', 'cny', 'dollar', 'eur', 'euro', 'gbp', 'gg', 'gg-circle', 'ils', 'inr', 'jpy', 'krw', 'rmb', 'rouble', 'rub', 'ruble', 'rupee', 'shekel', 'sheqel', 'try', 'turkish-lira', 'usd', 'viacoin', 'won', 'yen', 'align-center', 'align-justify', 'align-left', 'align-right', 'bold', 'chain', 'chain-broken', 'clipboard', 'columns', 'copy', 'cut', 'dedent', 'files-o', 'floppy-o', 'font', 'header', 'indent', 'italic', 'link', 'list', 'list-alt', 'list-ol', 'list-ul', 'outdent', 'paperclip', 'paragraph', 'paste', 'repeat', 'rotate-left', 'rotate-right', 'save', 'scissors', 'strikethrough', 'subscript', 'superscript', 'table', 'text-height', 'text-width', 'th', 'th-large', 'th-list', 'underline', 'undo', 'unlink', 'angle-double-down', 'angle-double-left', 'angle-double-right', 'angle-double-up', 'angle-down', 'angle-left', 'angle-right', 'angle-up', 'arrow-circle-down', 'arrow-circle-left', 'arrow-circle-o-down', 'arrow-circle-o-left', 'arrow-circle-o-right', 'arrow-circle-o-up', 'arrow-circle-right', 'arrow-circle-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'arrows-alt', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'chevron-circle-down', 'chevron-circle-left', 'chevron-circle-right', 'chevron-circle-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'long-arrow-down', 'long-arrow-left', 'long-arrow-right', 'long-arrow-up', 'backward', 'compress', 'eject', 'expand', 'fast-backward', 'fast-forward', 'forward', 'pause', 'pause-circle', 'pause-circle-o', 'play', 'play-circle', 'play-circle-o', 'step-backward', 'step-forward', 'stop', 'stop-circle', 'stop-circle-o', 'youtube-play', '500px', 'adn', 'amazon', 'android', 'angellist', 'apple', 'behance', 'behance-square', 'bitbucket', 'bitbucket-square', 'black-tie', 'buysellads', 'chrome', 'codepen', 'codiepie', 'connectdevelop', 'contao', 'css3', 'dashcube', 'delicious', 'deviantart', 'digg', 'dribbble', 'dropbox', 'drupal', 'edge', 'empire', 'envira', 'expeditedssl', 'fa', 'facebook', 'facebook-f', 'facebook-official', 'facebook-square', 'firefox', 'first-order', 'flickr', 'font-awesome', 'fonticons', 'fort-awesome', 'forumbee', 'foursquare', 'ge', 'get-pocket', 'git', 'git-square', 'github', 'github-alt', 'github-square', 'gitlab', 'gittip', 'glide', 'glide-g', 'google', 'google-plus', 'google-plus-circle', 'google-plus-official', 'google-plus-square', 'gratipay', 'hacker-news', 'houzz', 'html5', 'instagram', 'internet-explorer', 'ioxhost', 'joomla', 'jsfiddle', 'lastfm', 'lastfm-square', 'leanpub', 'linkedin', 'linkedin-square', 'linux', 'maxcdn', 'meanpath', 'medium', 'mixcloud', 'modx', 'odnoklassniki', 'odnoklassniki-square', 'opencart', 'openid', 'opera', 'optin-monster', 'pagelines', 'pied-piper', 'pied-piper-alt', 'pied-piper-pp', 'pinterest', 'pinterest-p', 'pinterest-square', 'product-hunt', 'qq', 'ra', 'rebel', 'reddit', 'reddit-alien', 'reddit-square', 'renren', 'resistance', 'safari', 'scribd', 'sellsy', 'shirtsinbulk', 'simplybuilt', 'skyatlas', 'skype', 'slack', 'slideshare', 'snapchat', 'snapchat-ghost', 'snapchat-square', 'soundcloud', 'spotify', 'stack-exchange', 'stack-overflow', 'steam', 'steam-square', 'stumbleupon', 'stumbleupon-circle', 'tencent-weibo', 'themeisle', 'trello', 'tripadvisor', 'tumblr', 'tumblr-square', 'twitch', 'twitter', 'twitter-square', 'usb', 'viadeo', 'viadeo-square', 'vimeo', 'vimeo-square', 'vine', 'vk', 'wechat', 'weibo', 'weixin', 'whatsapp', 'wikipedia-w', 'windows', 'wordpress', 'wpbeginner', 'wpforms', 'xing', 'xing-square', 'y-combinator', 'y-combinator-square', 'yahoo', 'yc', 'yc-square', 'yelp', 'yoast', 'youtube', 'youtube-square', 'h-square', 'hospital-o', 'medkit', 'stethoscope', 'user-md', ) );
|
@@ -0,0 +1,2411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*** Shortcodes Ultimate - box elements ***/
|
2 |
+
/* Common styles
|
3 |
+
---------------------------------------------------------------*/
|
4 |
+
.su-clearfix:before,
|
5 |
+
.su-clearfix:after {
|
6 |
+
display: table;
|
7 |
+
content: " ";
|
8 |
+
}
|
9 |
+
|
10 |
+
.su-clearfix:after {
|
11 |
+
clear: both;
|
12 |
+
}
|
13 |
+
|
14 |
+
/* Tabs + Tab
|
15 |
+
---------------------------------------------------------------*/
|
16 |
+
.su-tabs {
|
17 |
+
margin: 0 0 1.5em 0;
|
18 |
+
padding: 3px;
|
19 |
+
border-radius: 3px;
|
20 |
+
background: #eee;
|
21 |
+
}
|
22 |
+
|
23 |
+
.su-tabs-nav span {
|
24 |
+
display: inline-block;
|
25 |
+
margin-right: 3px;
|
26 |
+
padding: 10px 15px;
|
27 |
+
font-size: 13px;
|
28 |
+
min-height: 40px;
|
29 |
+
line-height: 20px;
|
30 |
+
border-top-left-radius: 3px;
|
31 |
+
border-top-right-radius: 3px;
|
32 |
+
color: #333;
|
33 |
+
cursor: pointer;
|
34 |
+
-webkit-transition: all .2s;
|
35 |
+
transition: all .2s;
|
36 |
+
}
|
37 |
+
|
38 |
+
.su-tabs-nav span:hover {
|
39 |
+
background: #f5f5f5;
|
40 |
+
}
|
41 |
+
|
42 |
+
.su-tabs-nav span.su-tabs-current {
|
43 |
+
background: #fff;
|
44 |
+
cursor: default;
|
45 |
+
}
|
46 |
+
|
47 |
+
.su-tabs-nav span.su-tabs-disabled {
|
48 |
+
opacity: 0.5;
|
49 |
+
filter: alpha(opacity=50);
|
50 |
+
cursor: default;
|
51 |
+
}
|
52 |
+
|
53 |
+
.su-tabs-pane {
|
54 |
+
padding: 15px;
|
55 |
+
font-size: 13px;
|
56 |
+
border-bottom-right-radius: 3px;
|
57 |
+
border-bottom-left-radius: 3px;
|
58 |
+
background: #fff;
|
59 |
+
color: #333;
|
60 |
+
}
|
61 |
+
|
62 |
+
.su-tabs-vertical:before,
|
63 |
+
.su-tabs-vertical:after {
|
64 |
+
content: " ";
|
65 |
+
display: table;
|
66 |
+
}
|
67 |
+
|
68 |
+
.su-tabs-vertical:after {
|
69 |
+
clear: both;
|
70 |
+
}
|
71 |
+
|
72 |
+
.su-tabs-vertical .su-tabs-nav {
|
73 |
+
float: left;
|
74 |
+
width: 30%;
|
75 |
+
}
|
76 |
+
|
77 |
+
.su-tabs-vertical .su-tabs-nav span {
|
78 |
+
display: block;
|
79 |
+
margin-right: 0;
|
80 |
+
border-radius: 0;
|
81 |
+
border-top-left-radius: 3px;
|
82 |
+
border-bottom-left-radius: 3px;
|
83 |
+
}
|
84 |
+
|
85 |
+
.su-tabs-vertical .su-tabs-panes {
|
86 |
+
float: left;
|
87 |
+
width: 70%;
|
88 |
+
}
|
89 |
+
|
90 |
+
.su-tabs-vertical .su-tabs-pane {
|
91 |
+
border-radius: 0;
|
92 |
+
-webkit-border-top-right-radius: 3px;
|
93 |
+
-webkit-border-bottom-right-radius: 3px;
|
94 |
+
-moz-border-radius-topright: 3px;
|
95 |
+
-moz-border-radius-bottomright: 3px;
|
96 |
+
border-top-right-radius: 3px;
|
97 |
+
border-bottom-right-radius: 3px;
|
98 |
+
}
|
99 |
+
|
100 |
+
.su-tabs-nav,
|
101 |
+
.su-tabs-nav span,
|
102 |
+
.su-tabs-panes,
|
103 |
+
.su-tabs-pane {
|
104 |
+
-webkit-box-sizing: border-box !important;
|
105 |
+
box-sizing: border-box !important;
|
106 |
+
}
|
107 |
+
|
108 |
+
/* Styles for screens that are less than 768px */
|
109 |
+
@media only screen and (max-width: 768px) {
|
110 |
+
.su-tabs-nav span {
|
111 |
+
display: block;
|
112 |
+
}
|
113 |
+
.su-tabs-vertical .su-tabs-nav {
|
114 |
+
float: none;
|
115 |
+
width: auto;
|
116 |
+
}
|
117 |
+
.su-tabs-vertical .su-tabs-panes {
|
118 |
+
float: none;
|
119 |
+
width: auto;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
/* Spoiler + Accordion
|
124 |
+
---------------------------------------------------------------*/
|
125 |
+
.su-spoiler {
|
126 |
+
margin-bottom: 1.5em;
|
127 |
+
}
|
128 |
+
|
129 |
+
.su-spoiler .su-spoiler:last-child {
|
130 |
+
margin-bottom: 0;
|
131 |
+
}
|
132 |
+
|
133 |
+
.su-accordion {
|
134 |
+
margin-bottom: 1.5em;
|
135 |
+
}
|
136 |
+
|
137 |
+
.su-accordion .su-spoiler {
|
138 |
+
margin-bottom: 0.5em;
|
139 |
+
}
|
140 |
+
|
141 |
+
.su-spoiler-title {
|
142 |
+
position: relative;
|
143 |
+
cursor: pointer;
|
144 |
+
min-height: 20px;
|
145 |
+
line-height: 20px;
|
146 |
+
padding: 7px 7px 7px 34px;
|
147 |
+
font-weight: bold;
|
148 |
+
font-size: 13px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.su-spoiler-icon {
|
152 |
+
position: absolute;
|
153 |
+
left: 7px;
|
154 |
+
top: 7px;
|
155 |
+
display: block;
|
156 |
+
width: 20px;
|
157 |
+
height: 20px;
|
158 |
+
line-height: 21px;
|
159 |
+
text-align: center;
|
160 |
+
font-size: 14px;
|
161 |
+
font-family: FontAwesome;
|
162 |
+
font-weight: normal;
|
163 |
+
font-style: normal;
|
164 |
+
-webkit-font-smoothing: antialiased;
|
165 |
+
*margin-right: .3em;
|
166 |
+
}
|
167 |
+
|
168 |
+
.su-spoiler-content {
|
169 |
+
padding: 14px;
|
170 |
+
-webkit-transition: padding-top .2s;
|
171 |
+
transition: padding-top .2s;
|
172 |
+
-ie-transition: padding-top .2s;
|
173 |
+
}
|
174 |
+
|
175 |
+
.su-spoiler.su-spoiler-closed > .su-spoiler-content {
|
176 |
+
height: 0;
|
177 |
+
margin: 0;
|
178 |
+
padding: 0;
|
179 |
+
overflow: hidden;
|
180 |
+
border: none;
|
181 |
+
opacity: 0;
|
182 |
+
}
|
183 |
+
|
184 |
+
.su-spoiler-icon-plus .su-spoiler-icon:before {
|
185 |
+
content: "\f068";
|
186 |
+
}
|
187 |
+
|
188 |
+
.su-spoiler-icon-plus.su-spoiler-closed .su-spoiler-icon:before {
|
189 |
+
content: "\f067";
|
190 |
+
}
|
191 |
+
|
192 |
+
.su-spoiler-icon-plus-circle .su-spoiler-icon:before {
|
193 |
+
content: "\f056";
|
194 |
+
}
|
195 |
+
|
196 |
+
.su-spoiler-icon-plus-circle.su-spoiler-closed .su-spoiler-icon:before {
|
197 |
+
content: "\f055";
|
198 |
+
}
|
199 |
+
|
200 |
+
.su-spoiler-icon-plus-square-1 .su-spoiler-icon:before {
|
201 |
+
content: "\f146";
|
202 |
+
}
|
203 |
+
|
204 |
+
.su-spoiler-icon-plus-square-1.su-spoiler-closed .su-spoiler-icon:before {
|
205 |
+
content: "\f0fe";
|
206 |
+
}
|
207 |
+
|
208 |
+
.su-spoiler-icon-plus-square-2 .su-spoiler-icon:before {
|
209 |
+
content: "\f117";
|
210 |
+
}
|
211 |
+
|
212 |
+
.su-spoiler-icon-plus-square-2.su-spoiler-closed .su-spoiler-icon:before {
|
213 |
+
content: "\f116";
|
214 |
+
}
|
215 |
+
|
216 |
+
.su-spoiler-icon-arrow .su-spoiler-icon:before {
|
217 |
+
content: "\f063";
|
218 |
+
}
|
219 |
+
|
220 |
+
.su-spoiler-icon-arrow.su-spoiler-closed .su-spoiler-icon:before {
|
221 |
+
content: "\f061";
|
222 |
+
}
|
223 |
+
|
224 |
+
.su-spoiler-icon-arrow-circle-1 .su-spoiler-icon:before {
|
225 |
+
content: "\f0ab";
|
226 |
+
}
|
227 |
+
|
228 |
+
.su-spoiler-icon-arrow-circle-1.su-spoiler-closed .su-spoiler-icon:before {
|
229 |
+
content: "\f0a9";
|
230 |
+
}
|
231 |
+
|
232 |
+
.su-spoiler-icon-arrow-circle-2 .su-spoiler-icon:before {
|
233 |
+
content: "\f01a";
|
234 |
+
}
|
235 |
+
|
236 |
+
.su-spoiler-icon-arrow-circle-2.su-spoiler-closed .su-spoiler-icon:before {
|
237 |
+
content: "\f18e";
|
238 |
+
}
|
239 |
+
|
240 |
+
.su-spoiler-icon-chevron .su-spoiler-icon:before {
|
241 |
+
content: "\f078";
|
242 |
+
}
|
243 |
+
|
244 |
+
.su-spoiler-icon-chevron.su-spoiler-closed .su-spoiler-icon:before {
|
245 |
+
content: "\f054";
|
246 |
+
}
|
247 |
+
|
248 |
+
.su-spoiler-icon-chevron-circle .su-spoiler-icon:before {
|
249 |
+
content: "\f13a";
|
250 |
+
}
|
251 |
+
|
252 |
+
.su-spoiler-icon-chevron-circle.su-spoiler-closed .su-spoiler-icon:before {
|
253 |
+
content: "\f138";
|
254 |
+
}
|
255 |
+
|
256 |
+
.su-spoiler-icon-caret .su-spoiler-icon:before {
|
257 |
+
content: "\f0d7";
|
258 |
+
}
|
259 |
+
|
260 |
+
.su-spoiler-icon-caret.su-spoiler-closed .su-spoiler-icon:before {
|
261 |
+
content: "\f0da";
|
262 |
+
}
|
263 |
+
|
264 |
+
.su-spoiler-icon-caret-square .su-spoiler-icon:before {
|
265 |
+
content: "\f150";
|
266 |
+
}
|
267 |
+
|
268 |
+
.su-spoiler-icon-caret-square.su-spoiler-closed .su-spoiler-icon:before {
|
269 |
+
content: "\f152";
|
270 |
+
}
|
271 |
+
|
272 |
+
.su-spoiler-icon-folder-1 .su-spoiler-icon:before {
|
273 |
+
content: "\f07c";
|
274 |
+
}
|
275 |
+
|
276 |
+
.su-spoiler-icon-folder-1.su-spoiler-closed .su-spoiler-icon:before {
|
277 |
+
content: "\f07b";
|
278 |
+
}
|
279 |
+
|
280 |
+
.su-spoiler-icon-folder-2 .su-spoiler-icon:before {
|
281 |
+
content: "\f115";
|
282 |
+
}
|
283 |
+
|
284 |
+
.su-spoiler-icon-folder-2.su-spoiler-closed .su-spoiler-icon:before {
|
285 |
+
content: "\f114";
|
286 |
+
}
|
287 |
+
|
288 |
+
.su-spoiler-style-default > .su-spoiler-title {
|
289 |
+
padding-left: 27px;
|
290 |
+
padding-right: 0;
|
291 |
+
}
|
292 |
+
|
293 |
+
.su-spoiler-style-default > .su-spoiler-title > .su-spoiler-icon {
|
294 |
+
left: 0;
|
295 |
+
}
|
296 |
+
|
297 |
+
.su-spoiler-style-default > .su-spoiler-content {
|
298 |
+
padding: 1em 0 1em 27px;
|
299 |
+
}
|
300 |
+
|
301 |
+
.su-spoiler-style-fancy {
|
302 |
+
border: 1px solid #ccc;
|
303 |
+
border-radius: 10px;
|
304 |
+
background: #fff;
|
305 |
+
color: #333;
|
306 |
+
}
|
307 |
+
|
308 |
+
.su-spoiler-style-fancy > .su-spoiler-title {
|
309 |
+
border-bottom: 1px solid #ccc;
|
310 |
+
border-radius: 10px;
|
311 |
+
background: #f0f0f0;
|
312 |
+
font-size: 0.9em;
|
313 |
+
}
|
314 |
+
|
315 |
+
.su-spoiler-style-fancy.su-spoiler-closed > .su-spoiler-title {
|
316 |
+
border: none;
|
317 |
+
}
|
318 |
+
|
319 |
+
.su-spoiler-style-fancy > .su-spoiler-content {
|
320 |
+
border-radius: 10px;
|
321 |
+
}
|
322 |
+
|
323 |
+
.su-spoiler-style-simple {
|
324 |
+
border-top: 1px solid #ccc;
|
325 |
+
border-bottom: 1px solid #ccc;
|
326 |
+
}
|
327 |
+
|
328 |
+
.su-spoiler-style-simple > .su-spoiler-title {
|
329 |
+
padding: 5px 10px;
|
330 |
+
background: #f0f0f0;
|
331 |
+
color: #333;
|
332 |
+
font-size: 0.9em;
|
333 |
+
}
|
334 |
+
|
335 |
+
.su-spoiler-style-simple > .su-spoiler-title > .su-spoiler-icon {
|
336 |
+
display: none;
|
337 |
+
}
|
338 |
+
|
339 |
+
.su-spoiler-style-simple > .su-spoiler-content {
|
340 |
+
padding: 1em 10px;
|
341 |
+
background: #fff;
|
342 |
+
color: #333;
|
343 |
+
}
|
344 |
+
|
345 |
+
/* Quote
|
346 |
+
---------------------------------------------------------------*/
|
347 |
+
.su-quote-style-default {
|
348 |
+
position: relative;
|
349 |
+
margin-bottom: 1.5em;
|
350 |
+
padding: 0.5em 3em;
|
351 |
+
font-style: italic;
|
352 |
+
}
|
353 |
+
|
354 |
+
/*.su-quote-style-default.su-quote-has-cite { margin-bottom: 3em; }*/
|
355 |
+
.su-quote-style-default:before,
|
356 |
+
.su-quote-style-default:after {
|
357 |
+
position: absolute;
|
358 |
+
display: block;
|
359 |
+
width: 20px;
|
360 |
+
height: 20px;
|
361 |
+
background-image: url("../images/quote.png");
|
362 |
+
content: '';
|
363 |
+
}
|
364 |
+
|
365 |
+
.su-quote-style-default:before {
|
366 |
+
top: 0;
|
367 |
+
left: 0;
|
368 |
+
background-position: 0 0;
|
369 |
+
}
|
370 |
+
|
371 |
+
.su-quote-style-default:after {
|
372 |
+
right: 0;
|
373 |
+
bottom: 0;
|
374 |
+
background-position: -20px 0;
|
375 |
+
}
|
376 |
+
|
377 |
+
.su-quote-style-default .su-quote-cite {
|
378 |
+
display: block;
|
379 |
+
text-align: right;
|
380 |
+
font-style: normal;
|
381 |
+
}
|
382 |
+
|
383 |
+
.su-quote-style-default .su-quote-cite:before {
|
384 |
+
content: "\2014\0000a0";
|
385 |
+
}
|
386 |
+
|
387 |
+
.su-quote-style-default .su-quote-cite a {
|
388 |
+
text-decoration: underline;
|
389 |
+
}
|
390 |
+
|
391 |
+
/* Pullquote
|
392 |
+
---------------------------------------------------------------*/
|
393 |
+
.su-pullquote {
|
394 |
+
display: block;
|
395 |
+
width: 30%;
|
396 |
+
padding: 0.5em 1em;
|
397 |
+
}
|
398 |
+
|
399 |
+
.su-pullquote-align-left {
|
400 |
+
margin: 0.5em 1.5em 1em 0;
|
401 |
+
padding-left: 0;
|
402 |
+
float: left;
|
403 |
+
border-right: 5px solid #eee;
|
404 |
+
}
|
405 |
+
|
406 |
+
.su-pullquote-align-right {
|
407 |
+
margin: 0.5em 0 1em 1.5em;
|
408 |
+
padding-right: 0;
|
409 |
+
float: right;
|
410 |
+
border-left: 5px solid #eee;
|
411 |
+
}
|
412 |
+
|
413 |
+
@media screen and (max-width: 48em) {
|
414 |
+
.su-pullquote {
|
415 |
+
width: auto;
|
416 |
+
}
|
417 |
+
.su-pullquote-align-left,
|
418 |
+
.su-pullquote-align-right {
|
419 |
+
float: none;
|
420 |
+
margin: 1.5em 0;
|
421 |
+
padding: 0.5em 1em;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
/* Row + Column
|
426 |
+
---------------------------------------------------------------*/
|
427 |
+
.su-row {
|
428 |
+
clear: both;
|
429 |
+
zoom: 1;
|
430 |
+
margin-bottom: 1.5em;
|
431 |
+
}
|
432 |
+
|
433 |
+
.su-row:before,
|
434 |
+
.su-row:after {
|
435 |
+
display: table;
|
436 |
+
content: "";
|
437 |
+
}
|
438 |
+
|
439 |
+
.su-row:after {
|
440 |
+
clear: both;
|
441 |
+
}
|
442 |
+
|
443 |
+
.su-column {
|
444 |
+
display: block;
|
445 |
+
margin: 0 4% 0 0;
|
446 |
+
float: left;
|
447 |
+
-webkit-box-sizing: border-box;
|
448 |
+
box-sizing: border-box;
|
449 |
+
}
|
450 |
+
|
451 |
+
.su-column-last {
|
452 |
+
margin-right: 0;
|
453 |
+
}
|
454 |
+
|
455 |
+
.su-row .su-column {
|
456 |
+
margin: 0 0 0 4%;
|
457 |
+
}
|
458 |
+
|
459 |
+
.su-row .su-column.su-column-size-1-1 {
|
460 |
+
margin-left: 0;
|
461 |
+
margin-right: 0;
|
462 |
+
}
|
463 |
+
|
464 |
+
.su-row .su-column:first-child {
|
465 |
+
margin-left: 0;
|
466 |
+
}
|
467 |
+
|
468 |
+
.su-column-centered {
|
469 |
+
margin-right: auto !important;
|
470 |
+
margin-left: auto !important;
|
471 |
+
float: none !important;
|
472 |
+
}
|
473 |
+
|
474 |
+
.su-column img,
|
475 |
+
.su-column iframe,
|
476 |
+
.su-column object,
|
477 |
+
.su-column embed {
|
478 |
+
max-width: 100%;
|
479 |
+
}
|
480 |
+
|
481 |
+
@media only screen {
|
482 |
+
[class*="su-column"] + [class*="su-column"]:last-child {
|
483 |
+
float: right;
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
.su-column-size-1-1 {
|
488 |
+
width: 100%;
|
489 |
+
}
|
490 |
+
|
491 |
+
.su-column-size-1-2 {
|
492 |
+
width: 48%;
|
493 |
+
}
|
494 |
+
|
495 |
+
.su-column-size-1-3 {
|
496 |
+
width: 30.66%;
|
497 |
+
}
|
498 |
+
|
499 |
+
.su-column-size-2-3 {
|
500 |
+
width: 65.33%;
|
501 |
+
}
|
502 |
+
|
503 |
+
.su-column-size-1-4 {
|
504 |
+
width: 22%;
|
505 |
+
}
|
506 |
+
|
507 |
+
.su-column-size-3-4 {
|
508 |
+
width: 74%;
|
509 |
+
}
|
510 |
+
|
511 |
+
.su-column-size-1-5 {
|
512 |
+
width: 16.8%;
|
513 |
+
}
|
514 |
+
|
515 |
+
.su-column-size-2-5 {
|
516 |
+
width: 37.6%;
|
517 |
+
}
|
518 |
+
|
519 |
+
.su-column-size-3-5 {
|
520 |
+
width: 58.4%;
|
521 |
+
}
|
522 |
+
|
523 |
+
.su-column-size-4-5 {
|
524 |
+
width: 79.2%;
|
525 |
+
}
|
526 |
+
|
527 |
+
.su-column-size-1-6 {
|
528 |
+
width: 13.33%;
|
529 |
+
}
|
530 |
+
|
531 |
+
.su-column-size-5-6 {
|
532 |
+
width: 82.66%;
|
533 |
+
}
|
534 |
+
|
535 |
+
/* Styles for screens that are less than 768px */
|
536 |
+
@media only screen and (max-width: 768px) {
|
537 |
+
.su-column {
|
538 |
+
width: 100% !important;
|
539 |
+
margin: 0 0 1.5em 0 !important;
|
540 |
+
float: none !important;
|
541 |
+
}
|
542 |
+
.su-row .su-column:last-child {
|
543 |
+
margin-bottom: 0 !important;
|
544 |
+
}
|
545 |
+
}
|
546 |
+
|
547 |
+
/* Service
|
548 |
+
---------------------------------------------------------------*/
|
549 |
+
.su-service {
|
550 |
+
position: relative;
|
551 |
+
margin: 0 0 1.5em 0;
|
552 |
+
}
|
553 |
+
|
554 |
+
.su-service-title {
|
555 |
+
display: block;
|
556 |
+
margin-bottom: 0.5em;
|
557 |
+
color: #333;
|
558 |
+
font-weight: bold;
|
559 |
+
font-size: 1.1em;
|
560 |
+
}
|
561 |
+
|
562 |
+
.su-service-title img {
|
563 |
+
position: absolute;
|
564 |
+
top: 0;
|
565 |
+
left: 0;
|
566 |
+
display: block !important;
|
567 |
+
margin: 0 !important;
|
568 |
+
padding: 0 !important;
|
569 |
+
border: none !important;
|
570 |
+
-webkit-box-shadow: none !important;
|
571 |
+
box-shadow: none !important;
|
572 |
+
}
|
573 |
+
|
574 |
+
.su-service-title i {
|
575 |
+
position: absolute;
|
576 |
+
top: 0;
|
577 |
+
left: 0;
|
578 |
+
display: block !important;
|
579 |
+
width: 1em;
|
580 |
+
height: 1em;
|
581 |
+
text-align: center;
|
582 |
+
line-height: 1em;
|
583 |
+
}
|
584 |
+
|
585 |
+
.su-service-content {
|
586 |
+
line-height: 1.4;
|
587 |
+
}
|
588 |
+
|
589 |
+
/* Box
|
590 |
+
---------------------------------------------------------------*/
|
591 |
+
.su-box {
|
592 |
+
margin: 0 0 1.5em 0;
|
593 |
+
border-width: 2px;
|
594 |
+
border-style: solid;
|
595 |
+
}
|
596 |
+
|
597 |
+
.su-box-title {
|
598 |
+
display: block;
|
599 |
+
padding: 0.5em 1em;
|
600 |
+
font-weight: bold;
|
601 |
+
font-size: 1.1em;
|
602 |
+
}
|
603 |
+
|
604 |
+
.su-box-content {
|
605 |
+
background-color: #fff;
|
606 |
+
color: #444;
|
607 |
+
padding: 1em;
|
608 |
+
}
|
609 |
+
|
610 |
+
.su-box-style-soft .su-box-title {
|
611 |
+
background-image: url("../images/styles/style-soft.png");
|
612 |
+
background-position: 0 0;
|
613 |
+
background-repeat: repeat-x;
|
614 |
+
}
|
615 |
+
|
616 |
+
.su-box-style-glass .su-box-title {
|
617 |
+
background-image: url("../images/styles/style-glass.png");
|
618 |
+
background-position: 0 50%;
|
619 |
+
background-repeat: repeat-x;
|
620 |
+
}
|
621 |
+
|
622 |
+
.su-box-style-bubbles .su-box-title {
|
623 |
+
background-image: url("../images/styles/style-bubbles.png");
|
624 |
+
background-position: 0 50%;
|
625 |
+
background-repeat: repeat-x;
|
626 |
+
}
|
627 |
+
|
628 |
+
.su-box-style-noise .su-box-title {
|
629 |
+
background-image: url("../images/styles/style-noise.png");
|
630 |
+
background-position: 0 0;
|
631 |
+
background-repeat: repeat-x;
|
632 |
+
}
|
633 |
+
|
634 |
+
/* Note
|
635 |
+
---------------------------------------------------------------*/
|
636 |
+
.su-note {
|
637 |
+
margin: 0 0 1.5em 0;
|
638 |
+
border-width: 1px;
|
639 |
+
border-style: solid;
|
640 |
+
}
|
641 |
+
|
642 |
+
.su-note-inner {
|
643 |
+
padding: 1em;
|
644 |
+
border-width: 1px;
|
645 |
+
border-style: solid;
|
646 |
+
}
|
647 |
+
|
648 |
+
/* Expand
|
649 |
+
---------------------------------------------------------------*/
|
650 |
+
.su-expand {
|
651 |
+
margin: 0 0 1.5em 0;
|
652 |
+
}
|
653 |
+
|
654 |
+
.su-expand-content {
|
655 |
+
overflow: hidden;
|
656 |
+
}
|
657 |
+
|
658 |
+
.su-expand-link {
|
659 |
+
margin-top: 0.5em;
|
660 |
+
cursor: pointer;
|
661 |
+
}
|
662 |
+
|
663 |
+
.su-expand-link:hover {
|
664 |
+
opacity: 0.7;
|
665 |
+
filter: alpha(opacity=70);
|
666 |
+
}
|
667 |
+
|
668 |
+
.su-expand-link a,
|
669 |
+
.su-expand-link a:hover,
|
670 |
+
.su-expand-link a:active,
|
671 |
+
.su-expand-link a:visited,
|
672 |
+
.su-expand-link a:focus {
|
673 |
+
display: inline;
|
674 |
+
text-decoration: none;
|
675 |
+
-webkit-box-shadow: none;
|
676 |
+
box-shadow: none;
|
677 |
+
background: transparent;
|
678 |
+
border: none;
|
679 |
+
}
|
680 |
+
|
681 |
+
.su-expand-link-style-underlined .su-expand-link span {
|
682 |
+
text-decoration: underline;
|
683 |
+
}
|
684 |
+
|
685 |
+
.su-expand-link-style-dotted .su-expand-link span {
|
686 |
+
border-bottom: 1px dotted #333;
|
687 |
+
}
|
688 |
+
|
689 |
+
.su-expand-link-style-dashed .su-expand-link span {
|
690 |
+
border-bottom: 1px dashed #333;
|
691 |
+
}
|
692 |
+
|
693 |
+
.su-expand-link-style-button .su-expand-link a {
|
694 |
+
display: inline-block;
|
695 |
+
margin-top: 0.2em;
|
696 |
+
padding: 0.2em 0.4em;
|
697 |
+
border: 2px solid #333;
|
698 |
+
}
|
699 |
+
|
700 |
+
.su-expand-link-more {
|
701 |
+
display: none;
|
702 |
+
}
|
703 |
+
|
704 |
+
.su-expand-link-less {
|
705 |
+
display: block;
|
706 |
+
}
|
707 |
+
|
708 |
+
.su-expand-collapsed .su-expand-link-more {
|
709 |
+
display: block;
|
710 |
+
}
|
711 |
+
|
712 |
+
.su-expand-collapsed .su-expand-link-less {
|
713 |
+
display: none;
|
714 |
+
}
|
715 |
+
|
716 |
+
.su-expand-link i {
|
717 |
+
display: inline-block;
|
718 |
+
margin: 0 0.3em 0 0;
|
719 |
+
vertical-align: middle;
|
720 |
+
color: inherit;
|
721 |
+
}
|
722 |
+
|
723 |
+
.su-expand-link img {
|
724 |
+
display: inline-block;
|
725 |
+
width: 1em;
|
726 |
+
height: 1em;
|
727 |
+
margin: 0 0.3em 0 0;
|
728 |
+
vertical-align: middle;
|
729 |
+
}
|
730 |
+
|
731 |
+
/* Lightbox content
|
732 |
+
---------------------------------------------------------------*/
|
733 |
+
.su-lightbox-content {
|
734 |
+
position: relative;
|
735 |
+
margin: 0 auto;
|
736 |
+
}
|
737 |
+
|
738 |
+
.mfp-content .su-lightbox-content,
|
739 |
+
#su-generator .su-lightbox-content {
|
740 |
+
display: block !important;
|
741 |
+
}
|
742 |
+
|
743 |
+
.su-lightbox-content-preview {
|
744 |
+
width: 100%;
|
745 |
+
min-height: 300px;
|
746 |
+
background: #444;
|
747 |
+
overflow: hidden;
|
748 |
+
}
|
749 |
+
|
750 |
+
.su-lightbox-content h1,
|
751 |
+
.su-lightbox-content h2,
|
752 |
+
.su-lightbox-content h3,
|
753 |
+
.su-lightbox-content h4,
|
754 |
+
.su-lightbox-content h5,
|
755 |
+
.su-lightbox-content h6 {
|
756 |
+
color: inherit;
|
757 |
+
}
|
758 |
+
|
759 |
+
/* Common margin resets for box elements
|
760 |
+
---------------------------------------------------------------*/
|
761 |
+
.su-column-inner > *:first-child,
|
762 |
+
.su-accordion > *:first-child,
|
763 |
+
.su-spoiler-content > *:first-child,
|
764 |
+
.su-service-content > *:first-child,
|
765 |
+
.su-box-content > *:first-child,
|
766 |
+
.su-note-inner > *:first-child,
|
767 |
+
.su-expand-content > *:first-child,
|
768 |
+
.su-lightbox-content > *:first-child {
|
769 |
+
margin-top: 0;
|
770 |
+
}
|
771 |
+
|
772 |
+
.su-column-inner > *:last-child,
|
773 |
+
.su-tabs-pane > *:last-child,
|
774 |
+
.su-accordion > *:last-child,
|
775 |
+
.su-spoiler-content > *:last-child,
|
776 |
+
.su-service-content > *:last-child,
|
777 |
+
.su-box-content > *:last-child,
|
778 |
+
.su-note-inner > *:last-child,
|
779 |
+
.su-expand-content > *:last-child,
|
780 |
+
.su-lightbox-content > *:last-child {
|
781 |
+
margin-bottom: 0;
|
782 |
+
}
|
783 |
+
|
784 |
+
/*** Shortcodes Ultimate - content elements ***/
|
785 |
+
/* Heading
|
786 |
+
---------------------------------------------------------------*/
|
787 |
+
.su-heading-style-default {
|
788 |
+
padding: 2px 0;
|
789 |
+
border-top: 1px solid #999;
|
790 |
+
border-bottom: 1px solid #999;
|
791 |
+
}
|
792 |
+
|
793 |
+
.su-heading-style-default .su-heading-inner {
|
794 |
+
padding: 1em .5em;
|
795 |
+
border-top: 4px solid #eee;
|
796 |
+
border-bottom: 4px solid #eee;
|
797 |
+
}
|
798 |
+
|
799 |
+
.su-heading.su-heading-align-left {
|
800 |
+
text-align: left;
|
801 |
+
}
|
802 |
+
|
803 |
+
.su-heading.su-heading-align-left .su-heading-inner {
|
804 |
+
padding-left: .2em;
|
805 |
+
}
|
806 |
+
|
807 |
+
.su-heading.su-heading-align-right {
|
808 |
+
text-align: right;
|
809 |
+
}
|
810 |
+
|
811 |
+
.su-heading.su-heading-align-right .su-heading-inner {
|
812 |
+
padding-right: .2em;
|
813 |
+
}
|
814 |
+
|
815 |
+
.su-heading.su-heading-align-center {
|
816 |
+
text-align: center;
|
817 |
+
}
|
818 |
+
|
819 |
+
/* Divider
|
820 |
+
---------------------------------------------------------------*/
|
821 |
+
.su-divider {
|
822 |
+
clear: both;
|
823 |
+
border: none;
|
824 |
+
text-align: right;
|
825 |
+
line-height: 1;
|
826 |
+
}
|
827 |
+
|
828 |
+
.su-divider a {
|
829 |
+
display: inline-block;
|
830 |
+
font-size: .8em;
|
831 |
+
text-decoration: none;
|
832 |
+
outline: none;
|
833 |
+
padding-bottom: 5px;
|
834 |
+
}
|
835 |
+
|
836 |
+
.su-divider-style-default {
|
837 |
+
border-bottom-style: solid;
|
838 |
+
}
|
839 |
+
|
840 |
+
.su-divider-style-dotted {
|
841 |
+
border-bottom-style: dotted;
|
842 |
+
}
|
843 |
+
|
844 |
+
.su-divider-style-dashed {
|
845 |
+
border-bottom-style: dashed;
|
846 |
+
}
|
847 |
+
|
848 |
+
.su-divider-style-double {
|
849 |
+
border-bottom-style: double;
|
850 |
+
}
|
851 |
+
|
852 |
+
/* Spacer
|
853 |
+
---------------------------------------------------------------*/
|
854 |
+
.su-spacer {
|
855 |
+
display: block;
|
856 |
+
height: 0;
|
857 |
+
clear: both;
|
858 |
+
overflow: hidden;
|
859 |
+
}
|
860 |
+
|
861 |
+
.su-spacer-5 {
|
862 |
+
height: 5px;
|
863 |
+
}
|
864 |
+
|
865 |
+
.su-spacer-10 {
|
866 |
+
height: 10px;
|
867 |
+
}
|
868 |
+
|
869 |
+
.su-spacer-20 {
|
870 |
+
height: 20px;
|
871 |
+
}
|
872 |
+
|
873 |
+
.su-spacer-30 {
|
874 |
+
height: 30px;
|
875 |
+
}
|
876 |
+
|
877 |
+
.su-spacer-40 {
|
878 |
+
height: 40px;
|
879 |
+
}
|
880 |
+
|
881 |
+
/* Highlight
|
882 |
+
---------------------------------------------------------------*/
|
883 |
+
.su-highlight {
|
884 |
+
display: inline;
|
885 |
+
padding: 1px 0;
|
886 |
+
}
|
887 |
+
|
888 |
+
/* Label
|
889 |
+
---------------------------------------------------------------*/
|
890 |
+
.su-label {
|
891 |
+
display: inline;
|
892 |
+
margin-right: .3em;
|
893 |
+
padding: .1em .3em;
|
894 |
+
font-size: .8em;
|
895 |
+
height: .8em;
|
896 |
+
line-height: .8em;
|
897 |
+
color: #fff;
|
898 |
+
border-radius: 3px;
|
899 |
+
}
|
900 |
+
|
901 |
+
.su-label-type-default {
|
902 |
+
background: #999;
|
903 |
+
}
|
904 |
+
|
905 |
+
.su-label-type-success {
|
906 |
+
background: #090;
|
907 |
+
}
|
908 |
+
|
909 |
+
.su-label-type-warning {
|
910 |
+
background: #f90;
|
911 |
+
}
|
912 |
+
|
913 |
+
.su-label-type-important {
|
914 |
+
background: #f03;
|
915 |
+
}
|
916 |
+
|
917 |
+
.su-label-type-black {
|
918 |
+
background: #111;
|
919 |
+
}
|
920 |
+
|
921 |
+
.su-label-type-info {
|
922 |
+
background: #09c;
|
923 |
+
}
|
924 |
+
|
925 |
+
/* Dropcap
|
926 |
+
---------------------------------------------------------------*/
|
927 |
+
.su-dropcap {
|
928 |
+
float: left;
|
929 |
+
display: inline-block;
|
930 |
+
width: 2em;
|
931 |
+
height: 2em;
|
932 |
+
margin: .2em .5em .2em 0;
|
933 |
+
line-height: 2em;
|
934 |
+
text-align: center;
|
935 |
+
overflow: hidden;
|
936 |
+
text-transform: uppercase;
|
937 |
+
}
|
938 |
+
|
939 |
+
.su-dropcap-style-default {
|
940 |
+
color: #fff;
|
941 |
+
background: #45484d;
|
942 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#45484d), to(black));
|
943 |
+
background: linear-gradient(to bottom, #45484d 0%, black 100%);
|
944 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#45484d', endColorstr='#000000', GradientType=0);
|
945 |
+
text-shadow: -1px -1px 0 #000;
|
946 |
+
border-radius: 50%;
|
947 |
+
}
|
948 |
+
|
949 |
+
.su-dropcap-style-flat {
|
950 |
+
background: #444;
|
951 |
+
color: #fff;
|
952 |
+
}
|
953 |
+
|
954 |
+
.su-dropcap-style-light {
|
955 |
+
color: #333;
|
956 |
+
border-radius: 50%;
|
957 |
+
-moz-border-radius: 50%;
|
958 |
+
-webkit-border-radius: 50%;
|
959 |
+
background: white;
|
960 |
+
background: -webkit-gradient(linear, left top, left bottom, from(white), to(#eaeaea));
|
961 |
+
background: linear-gradient(to bottom, white 0%, #eaeaea 100%);
|
962 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eaeaea', GradientType=0);
|
963 |
+
}
|
964 |
+
|
965 |
+
.su-dropcap-style-simple {
|
966 |
+
width: 1em;
|
967 |
+
height: 1em;
|
968 |
+
line-height: 1em;
|
969 |
+
text-align: left;
|
970 |
+
}
|
971 |
+
|
972 |
+
/* Frame
|
973 |
+
---------------------------------------------------------------*/
|
974 |
+
.su-frame,
|
975 |
+
.su-frame-inner {
|
976 |
+
display: block;
|
977 |
+
}
|
978 |
+
|
979 |
+
.su-frame-align-left {
|
980 |
+
float: left;
|
981 |
+
margin: 0 1em 1em 0;
|
982 |
+
}
|
983 |
+
|
984 |
+
.su-frame-align-center {
|
985 |
+
float: none;
|
986 |
+
margin: 1em auto;
|
987 |
+
}
|
988 |
+
|
989 |
+
.su-frame-align-right {
|
990 |
+
float: right;
|
991 |
+
margin: 0 0 1em 1em;
|
992 |
+
}
|
993 |
+
|
994 |
+
.su-frame img {
|
995 |
+
display: block !important;
|
996 |
+
float: none !important;
|
997 |
+
padding: 0 !important;
|
998 |
+
margin: 0 !important;
|
999 |
+
border: none !important;
|
1000 |
+
-webkit-box-shadow: none !important;
|
1001 |
+
box-shadow: none !important;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
.su-frame-style-default {
|
1005 |
+
padding: 2px;
|
1006 |
+
border: 1px solid #999;
|
1007 |
+
background: #fff;
|
1008 |
+
-webkit-box-shadow: 1px 1px 4px #ccc;
|
1009 |
+
box-shadow: 1px 1px 4px #ccc;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
.su-frame-style-default .su-frame-inner {
|
1013 |
+
padding: 2px;
|
1014 |
+
border: 4px solid #eee;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
/* List
|
1018 |
+
---------------------------------------------------------------*/
|
1019 |
+
.su-list ul {
|
1020 |
+
list-style: none !important;
|
1021 |
+
margin: 0 0 1.5em !important;
|
1022 |
+
padding: 0 !important;
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
.su-list ul li {
|
1026 |
+
position: relative;
|
1027 |
+
list-style-type: none !important;
|
1028 |
+
display: block !important;
|
1029 |
+
line-height: 1.3em;
|
1030 |
+
margin: 0 !important;
|
1031 |
+
padding: 4px 0 4px 2em !important;
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
.su-list ul li > img {
|
1035 |
+
position: absolute;
|
1036 |
+
left: 0;
|
1037 |
+
top: 4px;
|
1038 |
+
width: 1.3em;
|
1039 |
+
height: 1.3em;
|
1040 |
+
padding: 0;
|
1041 |
+
margin: 0;
|
1042 |
+
border: none;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
.su-list ul li i {
|
1046 |
+
position: absolute;
|
1047 |
+
left: 0;
|
1048 |
+
top: 4px;
|
1049 |
+
width: 1.3em;
|
1050 |
+
height: 1.3em;
|
1051 |
+
line-height: 1.3em;
|
1052 |
+
text-align: center;
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/* Button
|
1056 |
+
---------------------------------------------------------------*/
|
1057 |
+
.su-button {
|
1058 |
+
display: inline-block !important;
|
1059 |
+
text-align: center;
|
1060 |
+
text-decoration: none !important;
|
1061 |
+
-webkit-box-sizing: content-box !important;
|
1062 |
+
box-sizing: content-box !important;
|
1063 |
+
-webkit-transition: all .2s;
|
1064 |
+
transition: all .2s;
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
.su-button-wide {
|
1068 |
+
display: block !important;
|
1069 |
+
margin: 1em 0;
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
.su-button-center {
|
1073 |
+
text-align: center;
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
.su-button span {
|
1077 |
+
display: block !important;
|
1078 |
+
text-decoration: none !important;
|
1079 |
+
box-sizing: content-box !important;
|
1080 |
+
-moz-box-sizing: content-box !important;
|
1081 |
+
-webkit-box-sizing: content-box !important;
|
1082 |
+
-webkit-transition: all .2s;
|
1083 |
+
transition: all .2s;
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
.su-button img {
|
1087 |
+
border: none !important;
|
1088 |
+
vertical-align: middle !important;
|
1089 |
+
margin: -.2em .4em 0 -.3em !important;
|
1090 |
+
box-shadow: none !important;
|
1091 |
+
-moz-box-shadow: none !important;
|
1092 |
+
-webkit-box-shadow: none !important;
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
.su-button i {
|
1096 |
+
display: inline-block;
|
1097 |
+
width: 1em;
|
1098 |
+
height: 1em;
|
1099 |
+
margin: 0 .5em 0 0 !important;
|
1100 |
+
text-align: center;
|
1101 |
+
line-height: 1em;
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
.su-button.su-button-float-icon img {
|
1105 |
+
margin: 0 .5em !important;
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
.su-button small {
|
1109 |
+
display: block;
|
1110 |
+
margin: -.2em 0 0;
|
1111 |
+
color: inherit;
|
1112 |
+
text-align: center;
|
1113 |
+
font-style: normal;
|
1114 |
+
font-size: .8em;
|
1115 |
+
line-height: 1;
|
1116 |
+
opacity: .7;
|
1117 |
+
filter: alpha(opacity=70);
|
1118 |
+
}
|
1119 |
+
|
1120 |
+
@media screen and (max-width: 768px) {
|
1121 |
+
.su-button span {
|
1122 |
+
padding-top: .25em !important;
|
1123 |
+
padding-bottom: .25em !important;
|
1124 |
+
line-height: 1.2 !important;
|
1125 |
+
}
|
1126 |
+
.su-button small {
|
1127 |
+
margin-top: .2em !important;
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
.su-button-style-default {
|
1132 |
+
border-width: 1px;
|
1133 |
+
border-style: solid;
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
.su-button-style-default:hover {
|
1137 |
+
filter: alpha(opacity=70);
|
1138 |
+
opacity: .7;
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
.su-button-style-default span {
|
1142 |
+
border-top-width: 1px;
|
1143 |
+
border-bottom-width: 1px;
|
1144 |
+
border-top-style: solid;
|
1145 |
+
border-bottom-style: solid;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
.su-button-style-flat,
|
1149 |
+
.su-button-style-flat span {
|
1150 |
+
border: none;
|
1151 |
+
}
|
1152 |
+
|
1153 |
+
.su-button-style-flat span {
|
1154 |
+
position: relative;
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
.su-button-style-flat:hover span {
|
1158 |
+
top: 1px;
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
.su-button-style-ghost {
|
1162 |
+
background: transparent !important;
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
.su-button-style-ghost span {
|
1166 |
+
border-width: 3px;
|
1167 |
+
border-style: solid;
|
1168 |
+
}
|
1169 |
+
|
1170 |
+
.su-button-style-ghost:hover span {
|
1171 |
+
border-color: inherit !important;
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
.su-button-style-soft span {
|
1175 |
+
background: 0 -20px url("../images/styles/style-soft.png") repeat-x;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
.su-button-style-soft:hover span {
|
1179 |
+
background: 0 0 url("../images/styles/style-soft.png") repeat-x;
|
1180 |
+
}
|
1181 |
+
|
1182 |
+
.su-button-style-glass span {
|
1183 |
+
background: 0 50% url("../images/styles/style-glass.png") repeat-x;
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
.su-button-style-glass:hover span {
|
1187 |
+
background: 100% 50% url("../images/styles/style-glass.png") repeat-x;
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
.su-button-style-bubbles span {
|
1191 |
+
background: 0 50% url("../images/styles/style-bubbles.png") no-repeat;
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
.su-button-style-bubbles:hover span {
|
1195 |
+
background: -710px 50% url("../images/styles/style-bubbles.png") no-repeat;
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
.su-button-style-noise span {
|
1199 |
+
background: 0 0 url("../images/styles/style-noise.png") repeat-x;
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
.su-button-style-noise:hover span {
|
1203 |
+
background: 0 0 url("../images/styles/style-noise.png") repeat-x;
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
.su-button-style-stroked span {
|
1207 |
+
margin: 1px;
|
1208 |
+
border: 1px dashed #fff !important;
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
.su-button-style-stroked:hover span {
|
1212 |
+
filter: alpha(opacity=70);
|
1213 |
+
opacity: .7;
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
.su-button-style-3d {
|
1217 |
+
border-bottom-style: solid;
|
1218 |
+
border-bottom-width: 6px;
|
1219 |
+
}
|
1220 |
+
|
1221 |
+
.su-button-style-3d span {
|
1222 |
+
border-bottom-style: solid;
|
1223 |
+
border-bottom-width: 1px;
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
.su-button-style-3d:hover {
|
1227 |
+
position: relative;
|
1228 |
+
top: 3px;
|
1229 |
+
border-bottom-width: 3px;
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
/* Table
|
1233 |
+
---------------------------------------------------------------*/
|
1234 |
+
.su-table {
|
1235 |
+
width: 100%;
|
1236 |
+
margin-bottom: 1.5em;
|
1237 |
+
}
|
1238 |
+
|
1239 |
+
.su-table table {
|
1240 |
+
width: 100% !important;
|
1241 |
+
margin: 0 !important;
|
1242 |
+
border-collapse: collapse !important;
|
1243 |
+
font-size: 1em !important;
|
1244 |
+
border: 1px solid #ccc !important;
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
.su-table.su-table-responsive {
|
1248 |
+
overflow-x: auto;
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
.su-table.su-table-responsive table {
|
1252 |
+
width: auto !important;
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.su-table th {
|
1256 |
+
text-align: center !important;
|
1257 |
+
padding: 1em !important;
|
1258 |
+
font-size: 1em !important;
|
1259 |
+
font-weight: normal !important;
|
1260 |
+
color: #333 !important;
|
1261 |
+
border: 1px solid #ccc !important;
|
1262 |
+
background: #f0f0f0 !important;
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
.su-table td {
|
1266 |
+
padding: .5em 1em !important;
|
1267 |
+
border: 1px solid #ccc !important;
|
1268 |
+
background: #fff !important;
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
.su-table .su-even td {
|
1272 |
+
background: #f7f7f7 !important;
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
/* QR code
|
1276 |
+
---------------------------------------------------------------*/
|
1277 |
+
.su-qrcode {
|
1278 |
+
display: inline-block;
|
1279 |
+
}
|
1280 |
+
|
1281 |
+
.su-qrcode-align-left {
|
1282 |
+
float: left;
|
1283 |
+
margin: 0 .5em .5em 0;
|
1284 |
+
}
|
1285 |
+
|
1286 |
+
.su-qrcode-align-center {
|
1287 |
+
display: block;
|
1288 |
+
clear: both;
|
1289 |
+
margin: 1em auto;
|
1290 |
+
text-align: center;
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
.su-qrcode-align-right {
|
1294 |
+
float: right;
|
1295 |
+
margin: 0 0 .5em .5em;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
.su-qrcode a,
|
1299 |
+
.su-qrcode a:hover,
|
1300 |
+
.su-qrcode a:active,
|
1301 |
+
.su-qrcode a:focus {
|
1302 |
+
background: transparent;
|
1303 |
+
outline: none;
|
1304 |
+
display: inline;
|
1305 |
+
text-decoration: none;
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
.su-qrcode-clickable a:hover {
|
1309 |
+
opacity: .7;
|
1310 |
+
filter: alpha(opacity=70);
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
.su-qrcode img {
|
1314 |
+
max-width: 100%;
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
/*** Shortcodes Ultimate - galleries elements ***/
|
1318 |
+
.su-slider {
|
1319 |
+
position: relative;
|
1320 |
+
margin-bottom: 1.5em;
|
1321 |
+
overflow: hidden;
|
1322 |
+
-webkit-backface-visibility: hidden;
|
1323 |
+
backface-visibility: hidden;
|
1324 |
+
z-index: 1;
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
.su-slider-centered {
|
1328 |
+
margin: 0 auto 1.5em;
|
1329 |
+
}
|
1330 |
+
|
1331 |
+
.su-slider-slides {
|
1332 |
+
position: relative;
|
1333 |
+
width: 100%;
|
1334 |
+
-webkit-transition-property: -webkit-transform, left, top;
|
1335 |
+
-webkit-transition-duration: 0s;
|
1336 |
+
-webkit-transform: translate3d(0, 0, 0);
|
1337 |
+
-webkit-transition-timing-function: ease;
|
1338 |
+
-moz-transition-property: -moz-transform, left, top;
|
1339 |
+
-moz-transition-duration: 0s;
|
1340 |
+
-moz-transform: translate3d(0, 0, 0);
|
1341 |
+
-moz-transition-timing-function: ease;
|
1342 |
+
-o-transition-property: -o-transform, left, top;
|
1343 |
+
-o-transition-duration: 0s;
|
1344 |
+
-o-transform: translate3d(0, 0, 0);
|
1345 |
+
-o-transition-timing-function: ease;
|
1346 |
+
-o-transform: translate(0, 0);
|
1347 |
+
-ms-transition-property: -ms-transform, left, top;
|
1348 |
+
-ms-transition-duration: 0s;
|
1349 |
+
-ms-transform: translate3d(0, 0, 0);
|
1350 |
+
-ms-transition-timing-function: ease;
|
1351 |
+
-webkit-transition-property: left, top, -webkit-transform;
|
1352 |
+
transition-property: left, top, -webkit-transform;
|
1353 |
+
transition-property: transform, left, top;
|
1354 |
+
transition-property: transform, left, top, -webkit-transform;
|
1355 |
+
transition-duration: 0s;
|
1356 |
+
transform: translate3d(0, 0, 0);
|
1357 |
+
transition-timing-function: ease;
|
1358 |
+
}
|
1359 |
+
|
1360 |
+
.swiper-free-mode > .su-slider-slides {
|
1361 |
+
-webkit-transition-timing-function: ease-out;
|
1362 |
+
transition-timing-function: ease-out;
|
1363 |
+
margin: 0 auto;
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
.su-slider-slide {
|
1367 |
+
position: relative;
|
1368 |
+
float: left;
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
.su-slider-slide > a,
|
1372 |
+
.su-slider-slide > img,
|
1373 |
+
.su-slider-slide > a > img {
|
1374 |
+
position: relative;
|
1375 |
+
display: block;
|
1376 |
+
width: 100%;
|
1377 |
+
height: 100%;
|
1378 |
+
text-decoration: none;
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
.su-slider-responsive-yes .su-slider-slide > a,
|
1382 |
+
.su-slider-responsive-yes .su-slider-slide > img,
|
1383 |
+
.su-slider-responsive-yes .su-slider-slide > a > img {
|
1384 |
+
height: auto;
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
.su-slider-pages-no .su-slider-pagination {
|
1388 |
+
display: none;
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
.swiper-wp8-horizontal {
|
1392 |
+
-ms-touch-action: pan-y;
|
1393 |
+
}
|
1394 |
+
|
1395 |
+
.swiper-wp8-vertical {
|
1396 |
+
-ms-touch-action: pan-x;
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
.su-slider-slide-title {
|
1400 |
+
position: absolute;
|
1401 |
+
left: 20px;
|
1402 |
+
bottom: 20px;
|
1403 |
+
display: block;
|
1404 |
+
max-width: 90%;
|
1405 |
+
padding: 5px 10px;
|
1406 |
+
color: #fff;
|
1407 |
+
line-height: 1.3;
|
1408 |
+
background: black;
|
1409 |
+
background: rgba(0, 0, 0, 0.5);
|
1410 |
+
border-radius: 5px;
|
1411 |
+
-moz-border-radius: 5px;
|
1412 |
+
-webkit-border-radius: 5px;
|
1413 |
+
box-sizing: border-box;
|
1414 |
+
-moz-box-sizing: border-box;
|
1415 |
+
-webkit-box-sizing: border-box;
|
1416 |
+
filter: alpha(opacity=0);
|
1417 |
+
opacity: 0;
|
1418 |
+
transition: opacity 1s;
|
1419 |
+
-o-transition: opacity 1s;
|
1420 |
+
-moz-transition: opacity 1s;
|
1421 |
+
-webkit-transition: opacity 1s;
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
.su-slider-slide-visible .su-slider-slide-title {
|
1425 |
+
filter: alpha(opacity=100);
|
1426 |
+
opacity: 1;
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
.su-slider-prev,
|
1430 |
+
.su-slider-next {
|
1431 |
+
position: absolute;
|
1432 |
+
top: 50%;
|
1433 |
+
display: block;
|
1434 |
+
width: 40px;
|
1435 |
+
height: 40px;
|
1436 |
+
margin-top: -20px !important;
|
1437 |
+
background: black 0 0 url("../images/swiper/default.png") no-repeat;
|
1438 |
+
background-color: rgba(0, 0, 0, 0.5);
|
1439 |
+
cursor: pointer;
|
1440 |
+
border-radius: 50%;
|
1441 |
+
-moz-border-radius: 50%;
|
1442 |
+
-webkit-border-radius: 50%;
|
1443 |
+
filter: alpha(opacity=0);
|
1444 |
+
opacity: 0;
|
1445 |
+
-webkit-transition: all .2s;
|
1446 |
+
transition: all .2s;
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
.su-slider-prev {
|
1450 |
+
right: 10px;
|
1451 |
+
margin-right: 30px;
|
1452 |
+
background-position: -40px 0;
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
.su-slider-next {
|
1456 |
+
left: 10px;
|
1457 |
+
margin-left: 30px;
|
1458 |
+
background-position: 0 0;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
.su-slider:hover .su-slider-prev,
|
1462 |
+
.su-slider:hover .su-slider-next {
|
1463 |
+
margin-left: 0;
|
1464 |
+
margin-right: 0;
|
1465 |
+
filter: alpha(opacity=70);
|
1466 |
+
opacity: .7;
|
1467 |
+
}
|
1468 |
+
|
1469 |
+
.su-slider .su-slider-prev:hover,
|
1470 |
+
.su-slider .su-slider-next:hover {
|
1471 |
+
filter: alpha(opacity=100);
|
1472 |
+
opacity: 1;
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
.su-slider-pagination {
|
1476 |
+
position: absolute;
|
1477 |
+
left: 15%;
|
1478 |
+
right: 15%;
|
1479 |
+
top: 50%;
|
1480 |
+
width: 70%;
|
1481 |
+
height: 0;
|
1482 |
+
margin-top: -7px;
|
1483 |
+
text-align: center;
|
1484 |
+
cursor: default;
|
1485 |
+
filter: alpha(opacity=0);
|
1486 |
+
opacity: 0;
|
1487 |
+
-webkit-transition: all .2s;
|
1488 |
+
transition: all .2s;
|
1489 |
+
}
|
1490 |
+
|
1491 |
+
.su-slider:hover .su-slider-pagination {
|
1492 |
+
bottom: 20px;
|
1493 |
+
filter: alpha(opacity=100);
|
1494 |
+
opacity: 1;
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
.su-slider-pagination span {
|
1498 |
+
display: inline-block;
|
1499 |
+
width: 14px;
|
1500 |
+
height: 14px;
|
1501 |
+
margin: 0;
|
1502 |
+
background: black 0 -999px url("../images/swiper/default.png") no-repeat;
|
1503 |
+
background-color: rgba(0, 0, 0, 0.5);
|
1504 |
+
cursor: pointer;
|
1505 |
+
border-radius: 50%;
|
1506 |
+
-moz-border-radius: 50%;
|
1507 |
+
-webkit-border-radius: 50%;
|
1508 |
+
-webkit-transition: all .2s;
|
1509 |
+
transition: all .2s;
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
.su-slider:hover .su-slider-pagination span {
|
1513 |
+
margin: 0 3px;
|
1514 |
+
}
|
1515 |
+
|
1516 |
+
.su-slider .su-slider-pagination span.swiper-visible-switch {
|
1517 |
+
background-color: white;
|
1518 |
+
background-color: rgba(255, 255, 255, 0.5);
|
1519 |
+
}
|
1520 |
+
|
1521 |
+
.su-slider-pagination span:hover,
|
1522 |
+
.su-slider-pagination span.swiper-active-switch {
|
1523 |
+
background-position: 0 -40px;
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
/* Carousel
|
1527 |
+
---------------------------------------------------------------*/
|
1528 |
+
.su-carousel {
|
1529 |
+
position: relative;
|
1530 |
+
margin-bottom: 1.5em;
|
1531 |
+
overflow: hidden;
|
1532 |
+
-webkit-backface-visibility: hidden;
|
1533 |
+
backface-visibility: hidden;
|
1534 |
+
z-index: 1;
|
1535 |
+
}
|
1536 |
+
|
1537 |
+
.su-carousel-centered {
|
1538 |
+
margin: 0 auto 1.5em;
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
.su-carousel-slides {
|
1542 |
+
position: relative;
|
1543 |
+
width: 100%;
|
1544 |
+
-webkit-transition-property: -webkit-transform, left, top;
|
1545 |
+
-webkit-transition-duration: 0s;
|
1546 |
+
-webkit-transform: translate3d(0, 0, 0);
|
1547 |
+
-webkit-transition-timing-function: ease;
|
1548 |
+
-moz-transition-property: -moz-transform, left, top;
|
1549 |
+
-moz-transition-duration: 0s;
|
1550 |
+
-moz-transform: translate3d(0, 0, 0);
|
1551 |
+
-moz-transition-timing-function: ease;
|
1552 |
+
-o-transition-property: -o-transform, left, top;
|
1553 |
+
-o-transition-duration: 0s;
|
1554 |
+
-o-transform: translate3d(0, 0, 0);
|
1555 |
+
-o-transition-timing-function: ease;
|
1556 |
+
-o-transform: translate(0, 0);
|
1557 |
+
-ms-transition-property: -ms-transform, left, top;
|
1558 |
+
-ms-transition-duration: 0s;
|
1559 |
+
-ms-transform: translate3d(0, 0, 0);
|
1560 |
+
-ms-transition-timing-function: ease;
|
1561 |
+
-webkit-transition-property: left, top, -webkit-transform;
|
1562 |
+
transition-property: left, top, -webkit-transform;
|
1563 |
+
transition-property: transform, left, top;
|
1564 |
+
transition-property: transform, left, top, -webkit-transform;
|
1565 |
+
transition-duration: 0s;
|
1566 |
+
transform: translate3d(0, 0, 0);
|
1567 |
+
transition-timing-function: ease;
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
.swiper-free-mode > .su-carousel-slides {
|
1571 |
+
-webkit-transition-timing-function: ease-out;
|
1572 |
+
transition-timing-function: ease-out;
|
1573 |
+
margin: 0 auto;
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
.su-carousel-slide {
|
1577 |
+
position: relative;
|
1578 |
+
float: left;
|
1579 |
+
}
|
1580 |
+
|
1581 |
+
.su-carousel-slide > a,
|
1582 |
+
.su-carousel-slide > img,
|
1583 |
+
.su-carousel-slide > a > img {
|
1584 |
+
position: relative;
|
1585 |
+
display: block;
|
1586 |
+
width: 100%;
|
1587 |
+
height: 100%;
|
1588 |
+
text-decoration: none;
|
1589 |
+
box-sizing: border-box;
|
1590 |
+
-moz-box-sizing: border-box;
|
1591 |
+
-webkit-box-sizing: border-box;
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
.su-carousel-responsive-yes .su-carousel-slide > a,
|
1595 |
+
.su-carousel-responsive-yes .su-carousel-slide > img,
|
1596 |
+
.su-carousel-responsive-yes .su-carousel-slide > a > img {
|
1597 |
+
height: auto;
|
1598 |
+
}
|
1599 |
+
|
1600 |
+
.su-carousel-pages-no .su-carousel-pagination {
|
1601 |
+
display: none;
|
1602 |
+
}
|
1603 |
+
|
1604 |
+
.swiper-wp8-horizontal {
|
1605 |
+
-ms-touch-action: pan-y;
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
.swiper-wp8-vertical {
|
1609 |
+
-ms-touch-action: pan-x;
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
.su-carousel .su-carousel-slide a {
|
1613 |
+
padding: 0 5px;
|
1614 |
+
}
|
1615 |
+
|
1616 |
+
.su-carousel .su-carousel-slide img {
|
1617 |
+
padding: 3px;
|
1618 |
+
border: 1px solid #ccc;
|
1619 |
+
background: #fff;
|
1620 |
+
border-radius: 5px;
|
1621 |
+
-moz-border-radius: 5px;
|
1622 |
+
-webkit-border-radius: 5px;
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
.su-carousel .su-carousel-slide-title {
|
1626 |
+
position: absolute;
|
1627 |
+
left: 9px;
|
1628 |
+
right: 9px;
|
1629 |
+
bottom: 4px;
|
1630 |
+
display: block;
|
1631 |
+
padding: 2px 3px;
|
1632 |
+
color: #fff;
|
1633 |
+
line-height: 1.2;
|
1634 |
+
font-size: 11px;
|
1635 |
+
background: black;
|
1636 |
+
background: rgba(0, 0, 0, 0.5);
|
1637 |
+
box-sizing: border-box;
|
1638 |
+
-moz-box-sizing: border-box;
|
1639 |
+
-webkit-box-sizing: border-box;
|
1640 |
+
transition: opacity 1s;
|
1641 |
+
-o-transition: opacity 1s;
|
1642 |
+
-moz-transition: opacity 1s;
|
1643 |
+
-webkit-transition: opacity 1s;
|
1644 |
+
}
|
1645 |
+
|
1646 |
+
.su-carousel .su-carousel-prev,
|
1647 |
+
.su-carousel .su-carousel-next {
|
1648 |
+
position: absolute;
|
1649 |
+
top: 50%;
|
1650 |
+
display: block;
|
1651 |
+
width: 40px;
|
1652 |
+
height: 40px;
|
1653 |
+
margin-top: -20px;
|
1654 |
+
background: black 0 0 url("../images/swiper/default.png") no-repeat;
|
1655 |
+
background-color: rgba(0, 0, 0, 0.5);
|
1656 |
+
cursor: pointer;
|
1657 |
+
border-radius: 50%;
|
1658 |
+
-moz-border-radius: 50%;
|
1659 |
+
-webkit-border-radius: 50%;
|
1660 |
+
filter: alpha(opacity=0);
|
1661 |
+
opacity: 0;
|
1662 |
+
-webkit-transition: all .2s;
|
1663 |
+
transition: all .2s;
|
1664 |
+
}
|
1665 |
+
|
1666 |
+
.su-carousel .su-carousel-prev {
|
1667 |
+
right: 20px;
|
1668 |
+
margin-right: 40px;
|
1669 |
+
background-position: -40px 0;
|
1670 |
+
}
|
1671 |
+
|
1672 |
+
.su-carousel .su-carousel-next {
|
1673 |
+
left: 20px;
|
1674 |
+
margin-left: 40px;
|
1675 |
+
background-position: 0 0;
|
1676 |
+
}
|
1677 |
+
|
1678 |
+
.su-carousel:hover .su-carousel-prev,
|
1679 |
+
.su-carousel:hover .su-carousel-next {
|
1680 |
+
margin-left: 0;
|
1681 |
+
margin-right: 0;
|
1682 |
+
filter: alpha(opacity=70);
|
1683 |
+
opacity: .7;
|
1684 |
+
}
|
1685 |
+
|
1686 |
+
.su-carousel .su-carousel-prev:hover,
|
1687 |
+
.su-carousel .su-carousel-next:hover {
|
1688 |
+
filter: alpha(opacity=100);
|
1689 |
+
opacity: 1;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
.su-carousel .su-carousel-pagination {
|
1693 |
+
position: absolute;
|
1694 |
+
left: 15%;
|
1695 |
+
right: 15%;
|
1696 |
+
top: 50%;
|
1697 |
+
width: 70%;
|
1698 |
+
height: 0;
|
1699 |
+
margin-top: -7px;
|
1700 |
+
text-align: center;
|
1701 |
+
cursor: default;
|
1702 |
+
filter: alpha(opacity=0);
|
1703 |
+
opacity: 0;
|
1704 |
+
-webkit-transition: all .2s;
|
1705 |
+
transition: all .2s;
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
.su-carousel:hover .su-carousel-pagination {
|
1709 |
+
bottom: 20px;
|
1710 |
+
filter: alpha(opacity=100);
|
1711 |
+
opacity: 1;
|
1712 |
+
}
|
1713 |
+
|
1714 |
+
.su-carousel .su-carousel-pagination span {
|
1715 |
+
display: inline-block;
|
1716 |
+
width: 14px;
|
1717 |
+
height: 14px;
|
1718 |
+
margin: 0;
|
1719 |
+
background: black 0 -999px url("../images/swiper/default.png") no-repeat;
|
1720 |
+
background-color: rgba(0, 0, 0, 0.5);
|
1721 |
+
cursor: pointer;
|
1722 |
+
border-radius: 50%;
|
1723 |
+
-moz-border-radius: 50%;
|
1724 |
+
-webkit-border-radius: 50%;
|
1725 |
+
-webkit-transition: all .2s;
|
1726 |
+
transition: all .2s;
|
1727 |
+
}
|
1728 |
+
|
1729 |
+
.su-carousel:hover .su-carousel-pagination span {
|
1730 |
+
margin: 0 3px;
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
.su-carousel .su-carousel-pagination span.swiper-visible-switch {
|
1734 |
+
background-color: white;
|
1735 |
+
background-color: rgba(255, 255, 255, 0.5);
|
1736 |
+
}
|
1737 |
+
|
1738 |
+
.su-carousel .su-carousel-pagination span:hover,
|
1739 |
+
.su-carousel .su-carousel-pagination span.swiper-active-switch {
|
1740 |
+
background-position: 0 -40px;
|
1741 |
+
}
|
1742 |
+
|
1743 |
+
/* Custom gallery
|
1744 |
+
---------------------------------------------------------------*/
|
1745 |
+
.su-custom-gallery {
|
1746 |
+
margin-bottom: 1.5em;
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
.su-custom-gallery:after,
|
1750 |
+
.su-custom-gallery:before {
|
1751 |
+
content: "";
|
1752 |
+
display: table;
|
1753 |
+
}
|
1754 |
+
|
1755 |
+
.su-custom-gallery:after {
|
1756 |
+
clear: both;
|
1757 |
+
}
|
1758 |
+
|
1759 |
+
.su-custom-gallery-slide {
|
1760 |
+
position: relative;
|
1761 |
+
float: left;
|
1762 |
+
margin: 0.5em;
|
1763 |
+
overflow: hidden;
|
1764 |
+
}
|
1765 |
+
|
1766 |
+
.su-custom-gallery-slide a {
|
1767 |
+
display: block;
|
1768 |
+
width: 100%;
|
1769 |
+
height: 100%;
|
1770 |
+
}
|
1771 |
+
|
1772 |
+
.su-custom-gallery-slide img {
|
1773 |
+
display: block;
|
1774 |
+
margin: 0;
|
1775 |
+
padding: 3px;
|
1776 |
+
border: 1px solid #ccc;
|
1777 |
+
background: #fff;
|
1778 |
+
box-sizing: border-box;
|
1779 |
+
-moz-box-sizing: border-box;
|
1780 |
+
-webkit-box-sizing: border-box;
|
1781 |
+
border-radius: 5px;
|
1782 |
+
-moz-border-radius: 5px;
|
1783 |
+
-webkit-border-radius: 5px;
|
1784 |
+
box-shadow: none;
|
1785 |
+
-moz-box-shadow: none;
|
1786 |
+
-webkit-box-shadow: none;
|
1787 |
+
transition: all .2s;
|
1788 |
+
-o-transition: all .2s;
|
1789 |
+
-ie-transition: all .2s;
|
1790 |
+
-moz-transition: all .2s;
|
1791 |
+
-webkit-transition: all .2s;
|
1792 |
+
}
|
1793 |
+
|
1794 |
+
.su-custom-gallery-slide:hover img {
|
1795 |
+
background: #eee;
|
1796 |
+
border: 1px solid #aaa;
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
.su-custom-gallery-slide span {
|
1800 |
+
position: absolute;
|
1801 |
+
left: 4px;
|
1802 |
+
bottom: 4px;
|
1803 |
+
right: 4px;
|
1804 |
+
display: block;
|
1805 |
+
padding: 2px 4px;
|
1806 |
+
font-size: 12px;
|
1807 |
+
color: #fff;
|
1808 |
+
background: black;
|
1809 |
+
background: rgba(0, 0, 0, 0.5);
|
1810 |
+
line-height: 1.3;
|
1811 |
+
opacity: 0;
|
1812 |
+
filter: alpha(opacity=0);
|
1813 |
+
transition: all .2s;
|
1814 |
+
-o-transition: all .2s;
|
1815 |
+
-ie-transition: all .2s;
|
1816 |
+
-moz-transition: all .2s;
|
1817 |
+
-webkit-transition: all .2s;
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
.su-custom-gallery-slide:hover span {
|
1821 |
+
opacity: 1;
|
1822 |
+
filter: alpha(opacity=100);
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
.su-custom-gallery-title-never span {
|
1826 |
+
display: none;
|
1827 |
+
}
|
1828 |
+
|
1829 |
+
.su-custom-gallery-title-always span {
|
1830 |
+
opacity: 1;
|
1831 |
+
filter: alpha(opacity=100);
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
/*** Shortcodes Ultimate - media elements ***/
|
1835 |
+
/* Container for responsive media elements */
|
1836 |
+
.su-responsive-media-yes {
|
1837 |
+
position: relative;
|
1838 |
+
padding-bottom: 56.25%;
|
1839 |
+
height: 0;
|
1840 |
+
overflow: hidden;
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
.su-responsive-media-yes iframe,
|
1844 |
+
.su-responsive-media-yes object,
|
1845 |
+
.su-responsive-media-yes embed {
|
1846 |
+
position: absolute;
|
1847 |
+
top: 0;
|
1848 |
+
left: 0;
|
1849 |
+
width: 100%;
|
1850 |
+
height: 100%;
|
1851 |
+
}
|
1852 |
+
|
1853 |
+
/* Disable fitvid.js */
|
1854 |
+
.su-responsive-media-yes .fluid-width-video-wrapper {
|
1855 |
+
position: static;
|
1856 |
+
}
|
1857 |
+
|
1858 |
+
/* YouTube
|
1859 |
+
---------------------------------------------------------------*/
|
1860 |
+
.su-youtube {
|
1861 |
+
margin: 0 0 1.5em 0;
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
.su-youtube iframe {
|
1865 |
+
border: none !important;
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
/* Vimeo
|
1869 |
+
---------------------------------------------------------------*/
|
1870 |
+
.su-vimeo {
|
1871 |
+
margin: 0 0 1.5em 0;
|
1872 |
+
}
|
1873 |
+
|
1874 |
+
.su-vimeo iframe {
|
1875 |
+
border: none !important;
|
1876 |
+
}
|
1877 |
+
|
1878 |
+
/* Screenr
|
1879 |
+
---------------------------------------------------------------*/
|
1880 |
+
.su-screenr {
|
1881 |
+
margin: 0 0 1.5em 0;
|
1882 |
+
}
|
1883 |
+
|
1884 |
+
.su-screenr iframe {
|
1885 |
+
border: none !important;
|
1886 |
+
}
|
1887 |
+
|
1888 |
+
/* Dailymotion
|
1889 |
+
---------------------------------------------------------------*/
|
1890 |
+
.su-dailymotion {
|
1891 |
+
margin: 0 0 1.5em 0;
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
.su-dailymotion iframe {
|
1895 |
+
border: none !important;
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
/* Document
|
1899 |
+
---------------------------------------------------------------*/
|
1900 |
+
.su-document {
|
1901 |
+
margin: 0 0 1.5em 0;
|
1902 |
+
}
|
1903 |
+
|
1904 |
+
.su-document iframe {
|
1905 |
+
border: none !important;
|
1906 |
+
}
|
1907 |
+
|
1908 |
+
/* Gmap
|
1909 |
+
---------------------------------------------------------------*/
|
1910 |
+
.su-gmap {
|
1911 |
+
margin: 0 0 1.5em 0;
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
.su-gmap iframe {
|
1915 |
+
border: none !important;
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
/*** Shortcodes Ultimate - other elements ***/
|
1919 |
+
/* Tooltip
|
1920 |
+
---------------------------------------------------------------*/
|
1921 |
+
.qtip.su-qtip {
|
1922 |
+
max-width: 480px !important;
|
1923 |
+
}
|
1924 |
+
|
1925 |
+
.su-tooltip {
|
1926 |
+
display: inline-block;
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
.su-qtip-size-1 {
|
1930 |
+
font-size: 0.8em !important;
|
1931 |
+
}
|
1932 |
+
|
1933 |
+
.su-qtip-size-2 {
|
1934 |
+
font-size: 0.9em !important;
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
.su-qtip-size-3 {
|
1938 |
+
font-size: 1em !important;
|
1939 |
+
}
|
1940 |
+
|
1941 |
+
.su-qtip-size-4 {
|
1942 |
+
font-size: 1.1em !important;
|
1943 |
+
}
|
1944 |
+
|
1945 |
+
.su-qtip-size-5 {
|
1946 |
+
font-size: 1.2em !important;
|
1947 |
+
}
|
1948 |
+
|
1949 |
+
.su-qtip-size-6 {
|
1950 |
+
font-size: 1.3em !important;
|
1951 |
+
}
|
1952 |
+
|
1953 |
+
.su-tooltip-content {
|
1954 |
+
display: none;
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
.su-tooltip-content > :last-child {
|
1958 |
+
margin-bottom: 0;
|
1959 |
+
}
|
1960 |
+
|
1961 |
+
.qtip-content .su-tooltip-content img,
|
1962 |
+
.qtip-content .su-tooltip-content object,
|
1963 |
+
.qtip-content .su-tooltip-content iframe,
|
1964 |
+
.qtip-content .su-tooltip-content embed {
|
1965 |
+
max-width: 430px;
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
.qtip-content .su-tooltip-content .su-responsive-media-yes {
|
1969 |
+
width: 430px;
|
1970 |
+
}
|
1971 |
+
|
1972 |
+
/* Private
|
1973 |
+
---------------------------------------------------------------*/
|
1974 |
+
.su-private {
|
1975 |
+
margin: 0 0 1.5em 0;
|
1976 |
+
}
|
1977 |
+
|
1978 |
+
/* Members
|
1979 |
+
---------------------------------------------------------------*/
|
1980 |
+
.su-members {
|
1981 |
+
margin-bottom: 1.5em;
|
1982 |
+
padding: 1em;
|
1983 |
+
border-width: 1px 0;
|
1984 |
+
border-style: solid;
|
1985 |
+
text-align: center;
|
1986 |
+
}
|
1987 |
+
|
1988 |
+
.su-members a {
|
1989 |
+
text-decoration: underline;
|
1990 |
+
color: inherit;
|
1991 |
+
}
|
1992 |
+
|
1993 |
+
/* Guests
|
1994 |
+
---------------------------------------------------------------*/
|
1995 |
+
.su-guests {
|
1996 |
+
margin-bottom: 1.5em;
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
/* Posts
|
2000 |
+
---------------------------------------------------------------*/
|
2001 |
+
.su-posts-default-loop .su-post {
|
2002 |
+
margin-bottom: 2.5em;
|
2003 |
+
line-height: 1.5;
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
.su-posts-default-loop .su-post:after {
|
2007 |
+
content: '';
|
2008 |
+
display: table;
|
2009 |
+
clear: both;
|
2010 |
+
}
|
2011 |
+
|
2012 |
+
.su-posts-default-loop .su-post-thumbnail {
|
2013 |
+
float: left;
|
2014 |
+
display: block;
|
2015 |
+
width: 100px;
|
2016 |
+
height: 100px;
|
2017 |
+
margin-right: 1em;
|
2018 |
+
}
|
2019 |
+
|
2020 |
+
.su-posts-default-loop .su-post-thumbnail img {
|
2021 |
+
max-width: 100px;
|
2022 |
+
max-height: 100px;
|
2023 |
+
}
|
2024 |
+
|
2025 |
+
.su-posts-default-loop h2.su-post-title {
|
2026 |
+
clear: none;
|
2027 |
+
margin: 0 0 0.3em 0;
|
2028 |
+
font-size: 1.2em;
|
2029 |
+
font-weight: bold;
|
2030 |
+
}
|
2031 |
+
|
2032 |
+
.su-posts-default-loop .su-post-meta {
|
2033 |
+
margin-bottom: 0.7em;
|
2034 |
+
font-size: 0.8em;
|
2035 |
+
opacity: 0.6;
|
2036 |
+
filter: alpha(opacity=60);
|
2037 |
+
}
|
2038 |
+
|
2039 |
+
.su-posts-default-loop .su-post-excerpt {
|
2040 |
+
margin-bottom: 0.5em;
|
2041 |
+
}
|
2042 |
+
|
2043 |
+
.su-posts-default-loop .su-post-excerpt p:last-child {
|
2044 |
+
margin-bottom: 0;
|
2045 |
+
}
|
2046 |
+
|
2047 |
+
.su-posts-default-loop .su-post-comments-link {
|
2048 |
+
font-size: 0.9em;
|
2049 |
+
}
|
2050 |
+
|
2051 |
+
.su-posts-teaser-loop .su-post {
|
2052 |
+
margin-bottom: 1.5em;
|
2053 |
+
line-height: 1.2;
|
2054 |
+
}
|
2055 |
+
|
2056 |
+
.su-posts-teaser-loop .su-post:after {
|
2057 |
+
content: '';
|
2058 |
+
display: table;
|
2059 |
+
clear: both;
|
2060 |
+
}
|
2061 |
+
|
2062 |
+
.su-posts-teaser-loop .su-post-thumbnail {
|
2063 |
+
float: left;
|
2064 |
+
display: block;
|
2065 |
+
width: 56px;
|
2066 |
+
height: 56px;
|
2067 |
+
margin: 0 1em 0 0;
|
2068 |
+
}
|
2069 |
+
|
2070 |
+
.su-posts-teaser-loop .su-post-thumbnail img {
|
2071 |
+
display: block;
|
2072 |
+
margin: 0;
|
2073 |
+
padding: 2px;
|
2074 |
+
border: 1px solid #ccc;
|
2075 |
+
border-radius: 5px;
|
2076 |
+
-moz-border-radius: 5px;
|
2077 |
+
-webkit-border-radius: 5px;
|
2078 |
+
max-width: 100%;
|
2079 |
+
max-height: 100%;
|
2080 |
+
}
|
2081 |
+
|
2082 |
+
.su-posts-teaser-loop h2.su-post-title {
|
2083 |
+
display: block;
|
2084 |
+
margin: 0;
|
2085 |
+
padding: 0;
|
2086 |
+
border: none;
|
2087 |
+
font-size: 0.9em;
|
2088 |
+
font-weight: normal;
|
2089 |
+
clear: none;
|
2090 |
+
}
|
2091 |
+
|
2092 |
+
.su-posts-single-post .su-post {
|
2093 |
+
margin-bottom: 2.5em;
|
2094 |
+
line-height: 1.5;
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
.su-posts-single-post .su-post:after {
|
2098 |
+
content: '';
|
2099 |
+
display: table;
|
2100 |
+
clear: both;
|
2101 |
+
}
|
2102 |
+
|
2103 |
+
.su-posts-single-post h1.su-post-title {
|
2104 |
+
clear: none;
|
2105 |
+
margin: 0 0 0.3em 0;
|
2106 |
+
font-size: 1.2em;
|
2107 |
+
font-weight: bold;
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
.su-posts-single-post .su-post-meta {
|
2111 |
+
margin-bottom: 0.7em;
|
2112 |
+
font-size: 0.8em;
|
2113 |
+
opacity: 0.6;
|
2114 |
+
filter: alpha(opacity=60);
|
2115 |
+
}
|
2116 |
+
|
2117 |
+
.su-posts-single-post .su-post-content {
|
2118 |
+
margin-bottom: 0.5em;
|
2119 |
+
}
|
2120 |
+
|
2121 |
+
.su-posts-single-post .su-post-content p:last-child {
|
2122 |
+
margin-bottom: 0;
|
2123 |
+
}
|
2124 |
+
|
2125 |
+
/*** Shortcodes Ultimate - players elements ***/
|
2126 |
+
/* Audio
|
2127 |
+
---------------------------------------------------------------*/
|
2128 |
+
.su-audio {
|
2129 |
+
position: relative;
|
2130 |
+
width: 100%;
|
2131 |
+
height: 30px;
|
2132 |
+
margin-bottom: 1.5em;
|
2133 |
+
background: #7c8781;
|
2134 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#7c8781), to(#0a0809));
|
2135 |
+
background: linear-gradient(to bottom, #7c8781 0%, #0a0809 100%);
|
2136 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c8781', endColorstr='#0a0809', GradientType=0);
|
2137 |
+
border-radius: 3px;
|
2138 |
+
}
|
2139 |
+
|
2140 |
+
.su-audio .jp-play,
|
2141 |
+
.su-audio .jp-pause {
|
2142 |
+
position: absolute;
|
2143 |
+
left: 0;
|
2144 |
+
top: 0;
|
2145 |
+
display: block;
|
2146 |
+
width: 30px;
|
2147 |
+
height: 30px;
|
2148 |
+
border-top-left-radius: 3px;
|
2149 |
+
border-bottom-left-radius: 3px;
|
2150 |
+
cursor: pointer;
|
2151 |
+
border-right: 1px solid #454947;
|
2152 |
+
background-image: url("../images/player/default.png");
|
2153 |
+
background-repeat: no-repeat;
|
2154 |
+
}
|
2155 |
+
|
2156 |
+
.su-audio .jp-play {
|
2157 |
+
background-position: 0 0;
|
2158 |
+
}
|
2159 |
+
|
2160 |
+
.su-audio .jp-pause {
|
2161 |
+
background-position: -30px 0;
|
2162 |
+
}
|
2163 |
+
|
2164 |
+
.su-audio .jp-current-time,
|
2165 |
+
.su-audio .jp-duration {
|
2166 |
+
position: absolute;
|
2167 |
+
top: 0;
|
2168 |
+
display: block;
|
2169 |
+
height: 30px;
|
2170 |
+
line-height: 30px;
|
2171 |
+
font-size: 10px;
|
2172 |
+
color: #eee;
|
2173 |
+
text-shadow: 0 -1px 0 #000;
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
.su-audio .jp-current-time {
|
2177 |
+
left: 45px;
|
2178 |
+
}
|
2179 |
+
|
2180 |
+
.su-audio .jp-duration {
|
2181 |
+
right: 10px;
|
2182 |
+
}
|
2183 |
+
|
2184 |
+
.su-audio .jp-seek-bar,
|
2185 |
+
.su-audio .jp-play-bar {
|
2186 |
+
position: absolute;
|
2187 |
+
top: 0;
|
2188 |
+
left: 0;
|
2189 |
+
height: 10px;
|
2190 |
+
border-radius: 3px;
|
2191 |
+
cursor: pointer;
|
2192 |
+
}
|
2193 |
+
|
2194 |
+
.su-audio .jp-progress {
|
2195 |
+
position: absolute;
|
2196 |
+
top: 10px;
|
2197 |
+
left: 85px;
|
2198 |
+
right: 50px;
|
2199 |
+
height: 10px;
|
2200 |
+
background: #333;
|
2201 |
+
-webkit-box-shadow: 0 0 5px #000 inset;
|
2202 |
+
box-shadow: 0 0 5px #000 inset;
|
2203 |
+
border-radius: 3px;
|
2204 |
+
}
|
2205 |
+
|
2206 |
+
.su-audio .jp-seek-bar {
|
2207 |
+
background: #0b0b0b;
|
2208 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#0b0b0b), to(#666));
|
2209 |
+
background: linear-gradient(to bottom, #0b0b0b 0%, #666 100%);
|
2210 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b0b0b', endColorstr='#666666', GradientType=0);
|
2211 |
+
}
|
2212 |
+
|
2213 |
+
.su-audio .jp-play-bar {
|
2214 |
+
background: #6db3f2;
|
2215 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#6db3f2), color-stop(50%, #54a3ee), color-stop(51%, #3690f0), to(#1e69de));
|
2216 |
+
background: linear-gradient(to bottom, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
2217 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6db3f2', endColorstr='#1e69de', GradientType=0);
|
2218 |
+
}
|
2219 |
+
|
2220 |
+
/* Video
|
2221 |
+
---------------------------------------------------------------*/
|
2222 |
+
.su-video {
|
2223 |
+
position: relative;
|
2224 |
+
margin-bottom: 1.5em;
|
2225 |
+
overflow: hidden;
|
2226 |
+
}
|
2227 |
+
|
2228 |
+
.su-video .jp-title {
|
2229 |
+
position: absolute;
|
2230 |
+
top: -100px;
|
2231 |
+
left: 0;
|
2232 |
+
width: 100%;
|
2233 |
+
height: 30px;
|
2234 |
+
padding: 0 1em;
|
2235 |
+
line-height: 30px;
|
2236 |
+
font-size: .9em;
|
2237 |
+
background: black;
|
2238 |
+
background: rgba(0, 0, 0, 0.5);
|
2239 |
+
color: #fff;
|
2240 |
+
-webkit-transition: top .2s;
|
2241 |
+
transition: top .2s;
|
2242 |
+
}
|
2243 |
+
|
2244 |
+
.su-video:hover .jp-title {
|
2245 |
+
top: 0;
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
.su-video .jp-start {
|
2249 |
+
position: absolute;
|
2250 |
+
left: 0;
|
2251 |
+
top: 0;
|
2252 |
+
width: 100%;
|
2253 |
+
height: 100%;
|
2254 |
+
cursor: pointer;
|
2255 |
+
opacity: .5;
|
2256 |
+
-webkit-transition: opacity .2s;
|
2257 |
+
transition: opacity .2s;
|
2258 |
+
background: 50% 50% url("../images/player/default-start.png") no-repeat;
|
2259 |
+
}
|
2260 |
+
|
2261 |
+
.su-video:hover .jp-start {
|
2262 |
+
opacity: .8;
|
2263 |
+
}
|
2264 |
+
|
2265 |
+
.su-video.jp-video-full {
|
2266 |
+
position: fixed;
|
2267 |
+
left: 0;
|
2268 |
+
top: 0;
|
2269 |
+
width: 100%;
|
2270 |
+
height: 100%;
|
2271 |
+
}
|
2272 |
+
|
2273 |
+
.su-video.jp-video-full .jp-jplayer {
|
2274 |
+
position: fixed !important;
|
2275 |
+
left: 0;
|
2276 |
+
top: 0;
|
2277 |
+
overflow: hidden;
|
2278 |
+
}
|
2279 |
+
|
2280 |
+
.su-video .jp-gui {
|
2281 |
+
position: relative;
|
2282 |
+
height: 30px;
|
2283 |
+
background: #7c8781;
|
2284 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#7c8781), to(#0a0809));
|
2285 |
+
background: linear-gradient(to bottom, #7c8781 0%, #0a0809 100%);
|
2286 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c8781', endColorstr='#0a0809', GradientType=0);
|
2287 |
+
border-bottom-right-radius: 3px;
|
2288 |
+
border-bottom-left-radius: 3px;
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
.su-video.jp-video-full .jp-gui {
|
2292 |
+
position: fixed;
|
2293 |
+
left: 0;
|
2294 |
+
bottom: 0;
|
2295 |
+
width: 100%;
|
2296 |
+
}
|
2297 |
+
|
2298 |
+
.su-video-controls-no .jp-gui {
|
2299 |
+
position: absolute !important;
|
2300 |
+
bottom: -100px;
|
2301 |
+
left: 0;
|
2302 |
+
right: 0;
|
2303 |
+
-webkit-transition: bottom .2s;
|
2304 |
+
transition: bottom .2s;
|
2305 |
+
}
|
2306 |
+
|
2307 |
+
.su-video-controls-no:hover .jp-gui {
|
2308 |
+
bottom: 0;
|
2309 |
+
}
|
2310 |
+
|
2311 |
+
.su-video img {
|
2312 |
+
border-radius: 0 !important;
|
2313 |
+
border: none !important;
|
2314 |
+
margin: 0 !important;
|
2315 |
+
padding: 0 !important;
|
2316 |
+
}
|
2317 |
+
|
2318 |
+
.su-video .jp-gui .jp-play,
|
2319 |
+
.su-video .jp-gui .jp-pause {
|
2320 |
+
position: absolute;
|
2321 |
+
left: 0;
|
2322 |
+
top: 0;
|
2323 |
+
display: block;
|
2324 |
+
width: 30px;
|
2325 |
+
height: 30px;
|
2326 |
+
border-right: 1px solid #454947;
|
2327 |
+
cursor: pointer;
|
2328 |
+
}
|
2329 |
+
|
2330 |
+
.su-video .jp-gui .jp-play {
|
2331 |
+
background: 0 0 url("../images/player/default.png") no-repeat;
|
2332 |
+
}
|
2333 |
+
|
2334 |
+
.su-video .jp-gui .jp-pause {
|
2335 |
+
background: -30px 0 url("../images/player/default.png") no-repeat;
|
2336 |
+
}
|
2337 |
+
|
2338 |
+
.su-video .jp-full-screen,
|
2339 |
+
.su-video .jp-restore-screen {
|
2340 |
+
position: absolute;
|
2341 |
+
top: 0;
|
2342 |
+
right: 0;
|
2343 |
+
display: block;
|
2344 |
+
width: 30px;
|
2345 |
+
height: 30px;
|
2346 |
+
border-left: 1px solid #454947;
|
2347 |
+
cursor: pointer;
|
2348 |
+
}
|
2349 |
+
|
2350 |
+
.su-video .jp-full-screen {
|
2351 |
+
background: 0 -30px url("../images/player/default.png") no-repeat;
|
2352 |
+
}
|
2353 |
+
|
2354 |
+
.su-video .jp-restore-screen {
|
2355 |
+
background: -30px -30px url("../images/player/default.png") no-repeat;
|
2356 |
+
}
|
2357 |
+
|
2358 |
+
.su-video .jp-progress {
|
2359 |
+
position: absolute;
|
2360 |
+
top: 10px;
|
2361 |
+
left: 90px;
|
2362 |
+
right: 90px;
|
2363 |
+
height: 10px;
|
2364 |
+
background: #333;
|
2365 |
+
border-radius: 3px;
|
2366 |
+
-webkit-box-shadow: 0 0 5px #000 inset;
|
2367 |
+
box-shadow: 0 0 5px #000 inset;
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
.su-video .jp-seek-bar,
|
2371 |
+
.su-video .jp-play-bar {
|
2372 |
+
position: absolute;
|
2373 |
+
top: 0;
|
2374 |
+
left: 0;
|
2375 |
+
height: 100%;
|
2376 |
+
cursor: pointer;
|
2377 |
+
border-radius: 3px;
|
2378 |
+
}
|
2379 |
+
|
2380 |
+
.su-video .jp-seek-bar {
|
2381 |
+
background: #0b0b0b;
|
2382 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#0b0b0b), to(#666));
|
2383 |
+
background: linear-gradient(to bottom, #0b0b0b 0%, #666 100%);
|
2384 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b0b0b', endColorstr='#666666', GradientType=0);
|
2385 |
+
}
|
2386 |
+
|
2387 |
+
.su-video .jp-play-bar {
|
2388 |
+
background: #6db3f2;
|
2389 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#6db3f2), color-stop(50%, #54a3ee), color-stop(51%, #3690f0), to(#1e69de));
|
2390 |
+
background: linear-gradient(to bottom, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
2391 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6db3f2', endColorstr='#1e69de', GradientType=0);
|
2392 |
+
}
|
2393 |
+
|
2394 |
+
.su-video .jp-current-time,
|
2395 |
+
.su-video .jp-duration {
|
2396 |
+
position: absolute;
|
2397 |
+
top: 0;
|
2398 |
+
display: block;
|
2399 |
+
height: 30px;
|
2400 |
+
line-height: 30px;
|
2401 |
+
color: #f5f5f5;
|
2402 |
+
font-size: 10px;
|
2403 |
+
}
|
2404 |
+
|
2405 |
+
.su-video .jp-current-time {
|
2406 |
+
left: 50px;
|
2407 |
+
}
|
2408 |
+
|
2409 |
+
.su-video .jp-duration {
|
2410 |
+
right: 50px;
|
2411 |
+
}
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! class_exists( 'Su_Data' ) ) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @deprecated 5.0.5
|
9 |
+
*/
|
10 |
+
class Su_Data {
|
11 |
+
|
12 |
+
/**
|
13 |
+
*
|
14 |
+
*
|
15 |
+
* @deprecated 5.0.5
|
16 |
+
*/
|
17 |
+
public static function icons() {
|
18 |
+
return su_get_config( 'icons' );
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! class_exists( 'Su_Tools' ) ) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @deprecated 5.0.5
|
9 |
+
*/
|
10 |
+
class Su_Tools {
|
11 |
+
|
12 |
+
/**
|
13 |
+
*
|
14 |
+
*
|
15 |
+
* @deprecated 5.0.5
|
16 |
+
*/
|
17 |
+
public static function get_icon( $args ) {
|
18 |
+
|
19 |
+
if ( is_string( $args ) ) {
|
20 |
+
$args = array( 'icon' => $args );
|
21 |
+
}
|
22 |
+
|
23 |
+
$args = wp_parse_args( $args, array(
|
24 |
+
'icon' => '',
|
25 |
+
'size' => '',
|
26 |
+
'color' => '',
|
27 |
+
'style' => ''
|
28 |
+
) );
|
29 |
+
|
30 |
+
if ( ! $args['icon'] ) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
if ( $args['style'] ) {
|
35 |
+
$args['style'] = rtrim( $args['style'], ';' ) . ';';
|
36 |
+
}
|
37 |
+
|
38 |
+
// Font Awesome icon
|
39 |
+
if ( strpos( $args['icon'], 'icon:' ) !== false ) {
|
40 |
+
|
41 |
+
if ( $args['size'] ) {
|
42 |
+
$args['style'] .= 'font-size:' . $args['size'] . 'px;';
|
43 |
+
}
|
44 |
+
|
45 |
+
if ( $args['color'] ) {
|
46 |
+
$args['style'] .= 'color:' . $args['color'] . ';';
|
47 |
+
}
|
48 |
+
|
49 |
+
su_query_asset( 'css', 'font-awesome' );
|
50 |
+
|
51 |
+
return '<i class="fa fa-' . trim( str_replace( 'icon:', '', $args['icon'] ) ) . '" style="' . $args['style'] . '"></i>';
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
// Image icon
|
56 |
+
elseif ( strpos( $args['icon'], '/' ) !== false ) {
|
57 |
+
|
58 |
+
if ( $args['size'] ) {
|
59 |
+
$args['style'] .= 'width:' . $args['size'] . 'px;height:' . $args['size'] . 'px;';
|
60 |
+
}
|
61 |
+
|
62 |
+
return '<img src="' . $args['icon'] . '" alt="" style="' . $args['style'] . '" />';
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
return false;
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Deprecated functions.
|
5 |
+
*/
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Extra CSS class helper.
|
9 |
+
*
|
10 |
+
* @deprecated 5.0.5 Replaced with more clear name su_get_css_class().
|
11 |
+
* @param array $atts Shortcode attributes.
|
12 |
+
* @return string String with CSS class name(s).
|
13 |
+
*/
|
14 |
+
function su_ecssc( $atts ) {
|
15 |
+
return su_get_css_class( $atts );
|
16 |
+
}
|
@@ -5,7 +5,7 @@
|
|
5 |
*
|
6 |
* @since 5.0.4
|
7 |
* @package Shortcodes_Ultimate
|
8 |
-
* @subpackage Shortcodes_Ultimate/
|
9 |
*/
|
10 |
|
11 |
/**
|
@@ -17,7 +17,7 @@
|
|
17 |
*/
|
18 |
function su_filter_disable_wptexturize( $shortcodes ) {
|
19 |
|
20 |
-
$prefix =
|
21 |
|
22 |
$exclude = array(
|
23 |
$prefix . 'spoiler',
|
@@ -50,3 +50,36 @@ function su_filter_custom_formatting( $content ) {
|
|
50 |
return strtr( $content, $replacements );
|
51 |
|
52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
*
|
6 |
* @since 5.0.4
|
7 |
* @package Shortcodes_Ultimate
|
8 |
+
* @subpackage Shortcodes_Ultimate/includes
|
9 |
*/
|
10 |
|
11 |
/**
|
17 |
*/
|
18 |
function su_filter_disable_wptexturize( $shortcodes ) {
|
19 |
|
20 |
+
$prefix = su_get_shortcode_prefix();
|
21 |
|
22 |
$exclude = array(
|
23 |
$prefix . 'spoiler',
|
50 |
return strtr( $content, $replacements );
|
51 |
|
52 |
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Adds 'Slide Link' field at attachment page.
|
56 |
+
*
|
57 |
+
* @since 5.0.5
|
58 |
+
*/
|
59 |
+
function su_slide_link_input( $form_fields, $post ) {
|
60 |
+
|
61 |
+
$form_fields['su_slide_link'] = array(
|
62 |
+
'label' => __( 'Slide link', 'shortcodes-ultimate' ),
|
63 |
+
'input' => 'text',
|
64 |
+
'value' => get_post_meta( $post->ID, 'su_slide_link', true ),
|
65 |
+
'helps' => sprintf( '<strong>%s</strong><br>%s', __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ), __( 'Use this field to add custom links to slides used with Slider, Carousel and Custom Gallery shortcodes', 'shortcodes-ultimate' ) ),
|
66 |
+
);
|
67 |
+
|
68 |
+
return $form_fields;
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Saves 'Slide Link' field.
|
74 |
+
*
|
75 |
+
* @since 5.0.5
|
76 |
+
*/
|
77 |
+
function su_slide_link_save( $post, $attachment ) {
|
78 |
+
|
79 |
+
if ( isset( $attachment['su_slide_link'] ) ) {
|
80 |
+
update_post_meta( $post['ID'], 'su_slide_link', $attachment['su_slide_link'] );
|
81 |
+
}
|
82 |
+
|
83 |
+
return $post;
|
84 |
+
|
85 |
+
}
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Get slides data.
|
5 |
+
*
|
6 |
+
* @since 5.0.5
|
7 |
+
* @param array $args Query args.
|
8 |
+
* @return array Slides collection.
|
9 |
+
*/
|
10 |
+
function su_get_slides( $args ) {
|
11 |
+
|
12 |
+
$args = wp_parse_args( $args, array(
|
13 |
+
'source' => 'none',
|
14 |
+
'limit' => 20,
|
15 |
+
'gallery' => null,
|
16 |
+
'type' => '',
|
17 |
+
'link' => 'none'
|
18 |
+
) );
|
19 |
+
|
20 |
+
if (
|
21 |
+
$args['gallery'] !== null ||
|
22 |
+
( $args['source'] === 'none' && get_option( 'su_option_galleries-432' ) )
|
23 |
+
) {
|
24 |
+
return su_get_slides_432( $args );
|
25 |
+
}
|
26 |
+
|
27 |
+
$slides = array();
|
28 |
+
|
29 |
+
foreach ( array( 'media', 'posts', 'category', 'taxonomy' ) as $type ) {
|
30 |
+
|
31 |
+
if ( strpos( trim( $args['source'] ), $type . ':' ) === 0 ) {
|
32 |
+
$args['source'] = array(
|
33 |
+
'type' => $type,
|
34 |
+
'val' => (string) trim( str_replace( array( $type . ':', ' ' ), '', $args['source'] ), ',' )
|
35 |
+
);
|
36 |
+
break;
|
37 |
+
}
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( ! is_array( $args['source'] ) ) {
|
42 |
+
return $slides;
|
43 |
+
}
|
44 |
+
|
45 |
+
$query = array( 'posts_per_page' => $args['limit'] );
|
46 |
+
|
47 |
+
if ( 'media' === $args['source']['type'] ) {
|
48 |
+
|
49 |
+
$query['post_type'] = 'attachment';
|
50 |
+
$query['post_status'] = 'any';
|
51 |
+
$query['post__in'] = (array) explode( ',', $args['source']['val'] );
|
52 |
+
$query['orderby'] = 'post__in';
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
// Source: posts
|
57 |
+
if ( 'posts' === $args['source']['type'] ) {
|
58 |
+
|
59 |
+
if ( 'recent' !== $args['source']['val'] ) {
|
60 |
+
|
61 |
+
$query['post__in'] = (array) explode( ',', $args['source']['val'] );
|
62 |
+
$query['orderby'] = 'post__in';
|
63 |
+
$query['post_type'] = 'any';
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
elseif ( 'category' === $args['source']['type'] ) {
|
70 |
+
$query['category__in'] = (array) explode( ',', $args['source']['val'] );
|
71 |
+
}
|
72 |
+
|
73 |
+
elseif ( 'taxonomy' === $args['source']['type'] ) {
|
74 |
+
|
75 |
+
$args['source']['val'] = explode( '/', $args['source']['val'] );
|
76 |
+
|
77 |
+
if (
|
78 |
+
! is_array( $args['source']['val'] ) ||
|
79 |
+
count( $args['source']['val'] ) !== 2
|
80 |
+
) {
|
81 |
+
return $slides;
|
82 |
+
}
|
83 |
+
|
84 |
+
$query['tax_query'] = array(
|
85 |
+
array(
|
86 |
+
'taxonomy' => $args['source']['val'][0],
|
87 |
+
'field' => 'id',
|
88 |
+
'terms' => (array) explode( ',', $args['source']['val'][1] )
|
89 |
+
)
|
90 |
+
);
|
91 |
+
$query['post_type'] = 'any';
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
$query = apply_filters( 'su/slides_query', $query, $args );
|
96 |
+
$query = new WP_Query( $query );
|
97 |
+
|
98 |
+
if ( is_array( $query->posts ) ) {
|
99 |
+
|
100 |
+
foreach ( $query->posts as $post ) {
|
101 |
+
|
102 |
+
$thumb = $args['source']['type'] === 'media' || $post->post_type === 'attachment'
|
103 |
+
? $post->ID
|
104 |
+
: get_post_thumbnail_id( $post->ID );
|
105 |
+
|
106 |
+
if ( ! is_numeric( $thumb ) ) {
|
107 |
+
continue;
|
108 |
+
}
|
109 |
+
|
110 |
+
$slide = array(
|
111 |
+
'image' => wp_get_attachment_url( $thumb ),
|
112 |
+
'link' => '',
|
113 |
+
'title' => get_the_title( $post->ID )
|
114 |
+
);
|
115 |
+
|
116 |
+
if ( 'image' === $args['link'] || 'lightbox' === $args['link'] ) {
|
117 |
+
$slide['link'] = $slide['image'];
|
118 |
+
}
|
119 |
+
elseif ( 'custom' === $args['link'] ) {
|
120 |
+
$slide['link'] = get_post_meta( $post->ID, 'su_slide_link', true );
|
121 |
+
}
|
122 |
+
elseif ( 'post' === $args['link'] ) {
|
123 |
+
$slide['link'] = get_permalink( $post->ID );
|
124 |
+
}
|
125 |
+
elseif ( 'attachment' === $args['link'] ) {
|
126 |
+
$slide['link'] = get_attachment_link( $thumb );
|
127 |
+
}
|
128 |
+
|
129 |
+
$slides[] = $slide;
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
return $slides;
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Get slides data.
|
141 |
+
*
|
142 |
+
* Deprecated since 4.3.2.
|
143 |
+
*
|
144 |
+
* @since 5.0.5
|
145 |
+
* @param array $args Query args.
|
146 |
+
* @return array Slides collection.
|
147 |
+
*/
|
148 |
+
function su_get_slides_432( $args ) {
|
149 |
+
|
150 |
+
$args = wp_parse_args( $args, array(
|
151 |
+
'gallery' => 1
|
152 |
+
) );
|
153 |
+
|
154 |
+
$slides = array();
|
155 |
+
|
156 |
+
$args['gallery'] = $args['gallery'] === null
|
157 |
+
? 0
|
158 |
+
: $args['gallery'] - 1;
|
159 |
+
|
160 |
+
$galleries = get_option( 'su_option_galleries-432' );
|
161 |
+
|
162 |
+
if ( ! is_array( $galleries ) ) {
|
163 |
+
return $slides;
|
164 |
+
}
|
165 |
+
|
166 |
+
if ( isset( $galleries[ $args['gallery'] ] ) ) {
|
167 |
+
$slides = $galleries[ $args['gallery'] ]['items'];
|
168 |
+
}
|
169 |
+
|
170 |
+
return $slides;
|
171 |
+
|
172 |
+
}
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Helper Functions.
|
5 |
+
*
|
6 |
+
* @since 5.0.5
|
7 |
+
* @package Shortcodes_Ultimate
|
8 |
+
* @subpackage Shortcodes_Ultimate/includes
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Retrieve the URL of the plugin directory (with trailing slash).
|
13 |
+
*
|
14 |
+
* @since 5.0.5
|
15 |
+
* @return string The URL of the plugin directory (with trailing slash).
|
16 |
+
*/
|
17 |
+
function su_get_plugin_url() {
|
18 |
+
return plugin_dir_url( SU_PLUGIN_FILE );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Retrieve the filesystem path of the plugin directory (with trailing slash).
|
23 |
+
*
|
24 |
+
* @since 5.0.5
|
25 |
+
* @return string The filesystem path of the plugin directory (with trailing slash).
|
26 |
+
*/
|
27 |
+
function su_get_plugin_path() {
|
28 |
+
return plugin_dir_path( SU_PLUGIN_FILE );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get plugin config.
|
33 |
+
*
|
34 |
+
* @since 5.0.5
|
35 |
+
* @param string $key
|
36 |
+
* @return mixed Config data if found, Flase otherwise.
|
37 |
+
*/
|
38 |
+
function su_get_config( $key = null ) {
|
39 |
+
|
40 |
+
static $config = array();
|
41 |
+
|
42 |
+
if (
|
43 |
+
empty( $key ) ||
|
44 |
+
preg_match( "/^(?!-)[a-z0-9-_]+(?<!-)(\/(?!-)[a-z0-9-_]+(?<!-))*$/", $key ) !== 1
|
45 |
+
) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
if ( isset( $config[ $key ] ) ) {
|
50 |
+
return $config[ $key ];
|
51 |
+
}
|
52 |
+
|
53 |
+
$config_file = su_get_plugin_path() . 'includes/config/' . $key . '.php';
|
54 |
+
|
55 |
+
if ( ! file_exists( $config_file ) ) {
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
|
59 |
+
return $config[ $key ] = require_once $config_file;
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Create an error message.
|
65 |
+
*
|
66 |
+
* @since 5.0.5
|
67 |
+
* @param string $title Error title.
|
68 |
+
* @param string $message Error message.
|
69 |
+
* @return string Error message markup.
|
70 |
+
*/
|
71 |
+
function su_error_message( $title = '', $message = '' ) {
|
72 |
+
|
73 |
+
if ( $title ) {
|
74 |
+
$title = "<strong>${title}:</strong> ";
|
75 |
+
}
|
76 |
+
|
77 |
+
return sprintf(
|
78 |
+
'<p class="su-error" style="padding:5px 10px;color:#ff685e;border-left:3px solid #ff685e;background:#fff">%1$s%2$s</p>',
|
79 |
+
$title,
|
80 |
+
$message
|
81 |
+
);
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Validate filter callback name.
|
87 |
+
*
|
88 |
+
* @since 5.0.5
|
89 |
+
* @param string $filter Filter callback name.
|
90 |
+
* @return boolean True if filter name contains word 'filter', False otherwise.
|
91 |
+
*/
|
92 |
+
function su_is_filter_safe( $filter ) {
|
93 |
+
return is_string( $filter ) && strpos( $filter, 'filter' ) !== false;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Range converter.
|
98 |
+
*
|
99 |
+
* Converts string range like '1, 3-5, 10' into an array like [1, 3, 4, 5, 10].
|
100 |
+
*
|
101 |
+
* @since 5.0.5
|
102 |
+
* @param string $string Range string.
|
103 |
+
* @return array Parsed range.
|
104 |
+
*/
|
105 |
+
function su_parse_range( $string = '' ) {
|
106 |
+
|
107 |
+
$parsed = array();
|
108 |
+
|
109 |
+
foreach ( explode( ',', $string ) as $range ) {
|
110 |
+
|
111 |
+
if ( strpos( $range, '-' ) === false ) {
|
112 |
+
$parsed[] = intval( $range );
|
113 |
+
continue;
|
114 |
+
}
|
115 |
+
|
116 |
+
$range = explode( '-', $range );
|
117 |
+
|
118 |
+
if ( ! is_numeric( $range[0] ) ) {
|
119 |
+
$range[0] = 0;
|
120 |
+
}
|
121 |
+
|
122 |
+
if ( ! is_numeric( $range[1] ) ) {
|
123 |
+
$range[1] = 0;
|
124 |
+
}
|
125 |
+
|
126 |
+
foreach ( range( $range[0], $range[1] ) as $value ) {
|
127 |
+
$parsed[] = $value;
|
128 |
+
}
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
sort( $parsed );
|
133 |
+
$parsed = array_unique( $parsed );
|
134 |
+
|
135 |
+
return $parsed;
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Extract CSS class name(s) from shortcode $atts and prepend with a space.
|
141 |
+
*
|
142 |
+
* @since 5.0.5
|
143 |
+
* @param array $atts Shortcode atts.
|
144 |
+
* @return string Extra CSS class(es) prepended by a space.
|
145 |
+
*/
|
146 |
+
function su_get_css_class( $atts ) {
|
147 |
+
return $atts['class'] ? ' ' . trim( $atts['class'] ) : '';
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Get shortcode prefix.
|
152 |
+
*
|
153 |
+
* @since 5.0.5
|
154 |
+
* @return string Shortcode prefix.
|
155 |
+
*/
|
156 |
+
function su_get_shortcode_prefix() {
|
157 |
+
return get_option( 'su_option_prefix' );
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Do shortcodes in attributes.
|
162 |
+
*
|
163 |
+
* Replace braces with square brackets: {shortcode} => [shortcode], applies do_shortcode() filter.
|
164 |
+
*
|
165 |
+
* @since 5.0.5
|
166 |
+
* @param string $value Attribute value with shortcodes.
|
167 |
+
* @return string Parsed string.
|
168 |
+
*/
|
169 |
+
function su_do_attribute( $value ) {
|
170 |
+
|
171 |
+
$value = str_replace( array( '{', '}' ), array( '[', ']' ), $value );
|
172 |
+
$value = do_shortcode( $value );
|
173 |
+
|
174 |
+
return $value;
|
175 |
+
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Custom do_shortcode function for nested shortcodes
|
180 |
+
*
|
181 |
+
* @since 5.0.4
|
182 |
+
* @param string $content Shortcode content.
|
183 |
+
* @param string $pre First shortcode letter.
|
184 |
+
* @return string Formatted content.
|
185 |
+
*/
|
186 |
+
function su_do_nested_shortcodes_alt( $content, $pre ) {
|
187 |
+
|
188 |
+
if ( strpos( $content, '[_' ) !== false ) {
|
189 |
+
$content = preg_replace( '@(\[_*)_(' . $pre . '|/)@', "$1$2", $content );
|
190 |
+
}
|
191 |
+
|
192 |
+
return do_shortcode( $content );
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Remove underscores from nested shortcodes.
|
198 |
+
*
|
199 |
+
* @since 5.0.4
|
200 |
+
* @param string $content String with nested shortcodes.
|
201 |
+
* @param string $shortcode Shortcode tag name (without prefix).
|
202 |
+
* @return string Parsed string.
|
203 |
+
*/
|
204 |
+
function su_do_nested_shortcodes( $content, $shortcode ) {
|
205 |
+
|
206 |
+
if ( get_option( 'su_option_do_nested_shortcodes_alt' ) ) {
|
207 |
+
return su_do_nested_shortcodes_alt( $content, substr( $shortcode, 0, 1 ) );
|
208 |
+
}
|
209 |
+
|
210 |
+
$prefix = su_get_shortcode_prefix();
|
211 |
+
|
212 |
+
if ( strpos( $content, '[_' . $prefix . $shortcode ) !== false ) {
|
213 |
+
|
214 |
+
$content = str_replace(
|
215 |
+
array( '[_' . $prefix . $shortcode, '[_/' . $prefix . $shortcode, ),
|
216 |
+
array( '[' . $prefix . $shortcode, '[/' . $prefix . $shortcode, ),
|
217 |
+
$content
|
218 |
+
);
|
219 |
+
|
220 |
+
}
|
221 |
+
|
222 |
+
else {
|
223 |
+
$content = wptexturize( $content );
|
224 |
+
}
|
225 |
+
|
226 |
+
return do_shortcode( $content );
|
227 |
+
|
228 |
+
}
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Simple helper to create icon markup.
|
5 |
+
*
|
6 |
+
* @since 5.0.5
|
7 |
+
* @param string $src FA icon name or image URL.
|
8 |
+
* @return string HTML markup, <i> or <img> tag.
|
9 |
+
*/
|
10 |
+
function su_html_icon( $args ) {
|
11 |
+
|
12 |
+
if ( is_string( $args ) ) {
|
13 |
+
$args = array( 'icon' => $args );
|
14 |
+
}
|
15 |
+
|
16 |
+
$args = wp_parse_args( $args, array(
|
17 |
+
'icon' => '',
|
18 |
+
'size' => '',
|
19 |
+
'color' => '',
|
20 |
+
'style' => '',
|
21 |
+
'alt' => '',
|
22 |
+
'enqueue-fa' => false,
|
23 |
+
) );
|
24 |
+
|
25 |
+
if ( ! $args['icon'] ) {
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
|
29 |
+
if ( $args['style'] ) {
|
30 |
+
$args['style'] = rtrim( $args['style'], ';' ) . ';';
|
31 |
+
}
|
32 |
+
|
33 |
+
// Font Awesome icon
|
34 |
+
if ( strpos( $args['icon'], 'icon:' ) !== false ) {
|
35 |
+
|
36 |
+
if ( $args['size'] ) {
|
37 |
+
$args['style'] .= 'font-size:' . $args['size'] . 'px;';
|
38 |
+
}
|
39 |
+
|
40 |
+
if ( $args['color'] ) {
|
41 |
+
$args['style'] .= 'color:' . $args['color'] . ';';
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( $args['enqueue-fa'] ) {
|
45 |
+
su_query_asset( 'css', 'font-awesome' );
|
46 |
+
}
|
47 |
+
|
48 |
+
return '<i class="fa fa-' . trim( str_replace( 'icon:', '', $args['icon'] ) ) . '" style="' . $args['style'] . '" aria-label="' . $args['alt'] . '"></i>';
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
// Image icon
|
53 |
+
elseif ( strpos( $args['icon'], '/' ) !== false ) {
|
54 |
+
|
55 |
+
if ( $args['size'] ) {
|
56 |
+
$args['style'] .= 'width:' . $args['size'] . 'px;height:' . $args['size'] . 'px;';
|
57 |
+
}
|
58 |
+
|
59 |
+
return '<img src="' . $args['icon'] . '" alt="' . $args['alt'] . '" style="' . $args['style'] . '" />';
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
return false;
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Create HTML dropdown.
|
69 |
+
*
|
70 |
+
* @since 5.0.5
|
71 |
+
* @param array $args Args.
|
72 |
+
* @return string Dropdown markup.
|
73 |
+
*/
|
74 |
+
function su_html_dropdown( $args ) {
|
75 |
+
|
76 |
+
$args = wp_parse_args( $args, array(
|
77 |
+
'id' => '',
|
78 |
+
'name' => '',
|
79 |
+
'class' => '',
|
80 |
+
'multiple' => '',
|
81 |
+
'size' => '',
|
82 |
+
'disabled' => '',
|
83 |
+
'selected' => '',
|
84 |
+
'none' => '',
|
85 |
+
'options' => array(),
|
86 |
+
'style' => '',
|
87 |
+
'noselect' => '',
|
88 |
+
) );
|
89 |
+
|
90 |
+
$options = array();
|
91 |
+
|
92 |
+
if ( ! is_array( $args['options'] ) ) {
|
93 |
+
$args['options'] = array();
|
94 |
+
}
|
95 |
+
if ( $args['id'] ) {
|
96 |
+
$args['id'] = ' id="' . $args['id'] . '"';
|
97 |
+
}
|
98 |
+
if ( $args['name'] ) {
|
99 |
+
$args['name'] = ' name="' . $args['name'] . '"';
|
100 |
+
}
|
101 |
+
if ( $args['class'] ) {
|
102 |
+
$args['class'] = ' class="' . $args['class'] . '"';
|
103 |
+
}
|
104 |
+
if ( $args['style'] ) {
|
105 |
+
$args['style'] = ' style="' . esc_attr( $args['style'] ) . '"';
|
106 |
+
}
|
107 |
+
if ( $args['multiple'] ) {
|
108 |
+
$args['multiple'] = ' multiple="multiple"';
|
109 |
+
}
|
110 |
+
if ( $args['disabled'] ) {
|
111 |
+
$args['disabled'] = ' disabled="disabled"';
|
112 |
+
}
|
113 |
+
if ( $args['size'] ) {
|
114 |
+
$args['size'] = ' size="' . $args['size'] . '"';
|
115 |
+
}
|
116 |
+
if ( $args['none'] ) {
|
117 |
+
$args['options'][0] = $args['none'];
|
118 |
+
}
|
119 |
+
|
120 |
+
foreach ( $args['options'] as $id => $text ) {
|
121 |
+
$options[] = '<option value="' . (string) $id . '">' . (string) $text . '</option>';
|
122 |
+
}
|
123 |
+
|
124 |
+
$options = implode( '', $options );
|
125 |
+
$options = str_replace(
|
126 |
+
'value="' . $args['selected'] . '"',
|
127 |
+
'value="' . $args['selected'] . '" selected="selected"',
|
128 |
+
$options
|
129 |
+
);
|
130 |
+
|
131 |
+
return $args['noselect']
|
132 |
+
? $options :
|
133 |
+
'<select' . $args['id'] . $args['name'] . $args['class'] . $args['multiple'] . $args['size'] . $args['disabled'] . $args['style'] . '>' . $options . '</select>';
|
134 |
+
|
135 |
+
}
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Functions responsible for shortcodes management.
|
5 |
+
*
|
6 |
+
* @since 5.0.5
|
7 |
+
* @package Shortcodes_Ultimate
|
8 |
+
* @subpackage Shortcodes_Ultimate/includes
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Add a shortcode.
|
13 |
+
*
|
14 |
+
* @since 5.0.5
|
15 |
+
* @param array $data New shortcode data.
|
16 |
+
* @param boolean $replace Replace existing shortcode or not.
|
17 |
+
*/
|
18 |
+
function su_add_shortcode( $data, $replace = true ) {
|
19 |
+
return Shortcodes_Ultimate_Shortcodes::add( $data, $replace );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Remove a shortcode.
|
24 |
+
*
|
25 |
+
* @since 5.0.5
|
26 |
+
* @param string $id Shortcode ID to remove.
|
27 |
+
*/
|
28 |
+
function su_remove_shortcode( $id ) {
|
29 |
+
return Shortcodes_Ultimate_Shortcodes::remove( $id );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get all shortcodes.
|
34 |
+
*
|
35 |
+
* @since 5.0.5
|
36 |
+
* @return array The collection of available shortcodes.
|
37 |
+
*/
|
38 |
+
function su_get_all_shortcodes() {
|
39 |
+
return Shortcodes_Ultimate_Shortcodes::get_all();
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get specific shortcode by ID.
|
44 |
+
*
|
45 |
+
* @since 5.0.5
|
46 |
+
* @param string $id The ID (without prefix) of shortcode.
|
47 |
+
* @return array|boolean Shortcode data if found, False otherwise.
|
48 |
+
*/
|
49 |
+
function su_get_shortcode( $id ) {
|
50 |
+
return Shortcodes_Ultimate_Shortcodes::get( $id );
|
51 |
+
}
|
File without changes
|
@@ -483,11 +483,10 @@
|
|
483 |
.su-expand-link a:focus {
|
484 |
display: inline;
|
485 |
text-decoration: none;
|
|
|
486 |
background: transparent;
|
487 |
border: none;
|
488 |
}
|
489 |
-
.su-expand-link-style-default .su-expand-link a,
|
490 |
-
.su-expand-link-style-default .su-expand-link a:hover { text-decoration: none; }
|
491 |
.su-expand-link-style-underlined .su-expand-link span { text-decoration: underline; }
|
492 |
.su-expand-link-style-dotted .su-expand-link span { border-bottom: 1px dotted #333; }
|
493 |
.su-expand-link-style-dashed .su-expand-link span { border-bottom: 1px dashed #333; }
|
483 |
.su-expand-link a:focus {
|
484 |
display: inline;
|
485 |
text-decoration: none;
|
486 |
+
box-shadow: none;
|
487 |
background: transparent;
|
488 |
border: none;
|
489 |
}
|
|
|
|
|
490 |
.su-expand-link-style-underlined .su-expand-link span { text-decoration: underline; }
|
491 |
.su-expand-link-style-dotted .su-expand-link span { border-bottom: 1px dotted #333; }
|
492 |
.su-expand-link-style-dashed .su-expand-link span { border-bottom: 1px dashed #333; }
|
@@ -9,14 +9,14 @@
|
|
9 |
border-bottom: 1px solid #999;
|
10 |
}
|
11 |
.su-heading-style-default .su-heading-inner {
|
12 |
-
padding: 1em
|
13 |
border-top: 4px solid #eee;
|
14 |
border-bottom: 4px solid #eee;
|
15 |
}
|
16 |
.su-heading.su-heading-align-left { text-align: left; }
|
17 |
-
.su-heading.su-heading-align-left .su-heading-inner { padding-left:
|
18 |
.su-heading.su-heading-align-right { text-align: right; }
|
19 |
-
.su-heading.su-heading-align-right .su-heading-inner { padding-right:
|
20 |
.su-heading.su-heading-align-center { text-align: center; }
|
21 |
|
22 |
/* Divider
|
@@ -30,7 +30,7 @@
|
|
30 |
}
|
31 |
.su-divider a {
|
32 |
display: inline-block;
|
33 |
-
font-size:
|
34 |
text-decoration: none;
|
35 |
outline: none;
|
36 |
padding-bottom: 5px;
|
@@ -49,11 +49,11 @@
|
|
49 |
clear: both;
|
50 |
overflow: hidden;
|
51 |
}
|
52 |
-
.su-spacer-5 { height: 5px }
|
53 |
-
.su-spacer-10 { height: 10px }
|
54 |
-
.su-spacer-20 { height: 20px }
|
55 |
-
.su-spacer-30 { height: 30px }
|
56 |
-
.su-spacer-40 { height: 40px }
|
57 |
|
58 |
/* Highlight
|
59 |
---------------------------------------------------------------*/
|
@@ -68,22 +68,20 @@
|
|
68 |
|
69 |
.su-label {
|
70 |
display: inline;
|
71 |
-
margin-right:
|
72 |
-
padding:
|
73 |
-
font-size:
|
74 |
-
height:
|
75 |
-
line-height:
|
76 |
color: #fff;
|
77 |
border-radius: 3px;
|
78 |
-
|
79 |
-
|
80 |
-
}
|
81 |
-
.su-label-type-
|
82 |
-
.su-label-type-
|
83 |
-
.su-label-type-
|
84 |
-
.su-label-type-
|
85 |
-
.su-label-type-black { background: #111 }
|
86 |
-
.su-label-type-info { background: #09c }
|
87 |
|
88 |
/* Dropcap
|
89 |
---------------------------------------------------------------*/
|
@@ -93,7 +91,7 @@
|
|
93 |
display: inline-block;
|
94 |
width: 2em;
|
95 |
height: 2em;
|
96 |
-
margin:
|
97 |
line-height: 2em;
|
98 |
text-align: center;
|
99 |
overflow: hidden;
|
@@ -101,20 +99,16 @@
|
|
101 |
}
|
102 |
.su-dropcap-style-default {
|
103 |
color: #fff;
|
104 |
-
background: rgb(69, 72, 77);
|
105 |
-
background: -moz-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
106 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(69, 72, 77, 1)), color-stop(100%, rgba(0, 0, 0, 1)));
|
107 |
-
background: -webkit-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
108 |
-
background: -o-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
109 |
-
background: -ms-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
110 |
-
background: linear-gradient(to bottom, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
111 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#45484d', endColorstr='#000000', GradientType=0);
|
112 |
text-shadow: -1px -1px 0 #000;
|
113 |
-
-moz-text-shadow: -1px -1px 0 #000;
|
114 |
-
-webkit-text-shadow: -1px -1px 0 #000;
|
115 |
border-radius: 50%;
|
116 |
-
-moz-border-radius: 50%;
|
117 |
-
-webkit-border-radius: 50%;
|
118 |
}
|
119 |
.su-dropcap-style-flat {
|
120 |
background: #444;
|
@@ -125,14 +119,14 @@
|
|
125 |
border-radius: 50%;
|
126 |
-moz-border-radius: 50%;
|
127 |
-webkit-border-radius: 50%;
|
128 |
-
background: rgb(255, 255, 255);
|
129 |
-
background: -moz-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
130 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(234, 234, 234, 1)));
|
131 |
-
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
132 |
-
background: -o-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
133 |
-
background: -ms-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
134 |
-
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
135 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eaeaea', GradientType=0);
|
136 |
}
|
137 |
.su-dropcap-style-simple {
|
138 |
width: 1em;
|
@@ -145,7 +139,9 @@
|
|
145 |
---------------------------------------------------------------*/
|
146 |
|
147 |
.su-frame,
|
148 |
-
.su-frame-inner {
|
|
|
|
|
149 |
.su-frame-align-left {
|
150 |
float: left;
|
151 |
margin: 0 1em 1em 0;
|
@@ -184,7 +180,7 @@
|
|
184 |
|
185 |
.su-list ul {
|
186 |
list-style: none !important;
|
187 |
-
margin: 0 0 1.5em
|
188 |
padding: 0 !important;
|
189 |
}
|
190 |
.su-list ul li {
|
@@ -223,13 +219,7 @@
|
|
223 |
text-align: center;
|
224 |
text-decoration: none !important;
|
225 |
box-sizing: content-box !important;
|
226 |
-
-moz-box-sizing: content-box !important;
|
227 |
-
-webkit-box-sizing: content-box !important;
|
228 |
transition: all .2s;
|
229 |
-
-o-transition: all .2s;
|
230 |
-
-ie-transition: all .2s;
|
231 |
-
-moz-transition: all .2s;
|
232 |
-
-webkit-transition: all .2s;
|
233 |
}
|
234 |
.su-button-wide {
|
235 |
display: block !important;
|
@@ -243,15 +233,11 @@
|
|
243 |
-moz-box-sizing: content-box !important;
|
244 |
-webkit-box-sizing: content-box !important;
|
245 |
transition: all .2s;
|
246 |
-
-o-transition: all .2s;
|
247 |
-
-ie-transition: all .2s;
|
248 |
-
-moz-transition: all .2s;
|
249 |
-
-webkit-transition: all .2s;
|
250 |
}
|
251 |
.su-button img {
|
252 |
border: none !important;
|
253 |
vertical-align: middle !important;
|
254 |
-
margin:
|
255 |
box-shadow: none !important;
|
256 |
-moz-box-shadow: none !important;
|
257 |
-webkit-box-shadow: none !important;
|
@@ -260,30 +246,30 @@
|
|
260 |
display: inline-block;
|
261 |
width: 1em;
|
262 |
height: 1em;
|
263 |
-
margin: 0
|
264 |
text-align: center;
|
265 |
line-height: 1em;
|
266 |
}
|
267 |
-
.su-button.su-button-float-icon img { margin: 0
|
268 |
.su-button small {
|
269 |
display: block;
|
270 |
-
margin:
|
271 |
color: inherit;
|
272 |
text-align: center;
|
273 |
font-style: normal;
|
274 |
-
font-size:
|
275 |
line-height: 1;
|
276 |
-
opacity:
|
277 |
filter: alpha(opacity=70);
|
278 |
}
|
279 |
@media screen and (max-width: 768px) {
|
280 |
.su-button span {
|
281 |
-
padding-top:
|
282 |
-
padding-bottom:
|
283 |
line-height: 1.2 !important;
|
284 |
}
|
285 |
.su-button small {
|
286 |
-
margin-top:
|
287 |
}
|
288 |
}
|
289 |
.su-button-style-default {
|
@@ -291,11 +277,8 @@
|
|
291 |
border-style: solid;
|
292 |
}
|
293 |
.su-button-style-default:hover {
|
294 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
|
295 |
filter: alpha(opacity=70);
|
296 |
-
|
297 |
-
-khtml-opacity: 0.7;
|
298 |
-
opacity: 0.7;
|
299 |
}
|
300 |
.su-button-style-default span {
|
301 |
border-top-width: 1px;
|
@@ -304,33 +287,32 @@
|
|
304 |
border-bottom-style: solid;
|
305 |
}
|
306 |
.su-button-style-flat,
|
307 |
-
.su-button-style-flat span {
|
308 |
-
|
309 |
-
|
|
|
|
|
310 |
.su-button-style-ghost { background: transparent !important; }
|
311 |
.su-button-style-ghost span {
|
312 |
border-width: 3px;
|
313 |
border-style: solid;
|
314 |
}
|
315 |
.su-button-style-ghost:hover span { border-color: inherit !important; }
|
316 |
-
.su-button-style-soft span { background: 0 -20px url('../images/styles/style-soft.png') repeat-x }
|
317 |
-
.su-button-style-soft:hover span { background: 0 0 url('../images/styles/style-soft.png') repeat-x }
|
318 |
-
.su-button-style-glass span { background: 0 50% url('../images/styles/style-glass.png') repeat-x }
|
319 |
-
.su-button-style-glass:hover span { background: 100% 50% url('../images/styles/style-glass.png') repeat-x }
|
320 |
-
.su-button-style-bubbles span { background: 0 50% url('../images/styles/style-bubbles.png') no-repeat }
|
321 |
-
.su-button-style-bubbles:hover span { background: -710px 50% url('../images/styles/style-bubbles.png') no-repeat }
|
322 |
-
.su-button-style-noise span { background: 0 0 url('../images/styles/style-noise.png') repeat-x }
|
323 |
-
.su-button-style-noise:hover span { background: 0 0 url('../images/styles/style-noise.png') repeat-x }
|
324 |
.su-button-style-stroked span {
|
325 |
margin: 1px;
|
326 |
border: 1px dashed #fff !important;
|
327 |
}
|
328 |
.su-button-style-stroked:hover span {
|
329 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
|
330 |
filter: alpha(opacity=70);
|
331 |
-
|
332 |
-
-khtml-opacity: 0.7;
|
333 |
-
opacity: 0.7;
|
334 |
}
|
335 |
.su-button-style-3d {
|
336 |
border-bottom-style: solid;
|
@@ -376,11 +358,11 @@
|
|
376 |
background: #f0f0f0 !important;
|
377 |
}
|
378 |
.su-table td {
|
379 |
-
padding:
|
380 |
border: 1px solid #ccc !important;
|
381 |
background: #fff !important;
|
382 |
}
|
383 |
-
.su-table .su-even td { background: #f7f7f7 !important }
|
384 |
|
385 |
/* QR code
|
386 |
---------------------------------------------------------------*/
|
@@ -388,7 +370,7 @@
|
|
388 |
.su-qrcode { display: inline-block; }
|
389 |
.su-qrcode-align-left {
|
390 |
float: left;
|
391 |
-
margin: 0
|
392 |
}
|
393 |
.su-qrcode-align-center {
|
394 |
display: block;
|
@@ -398,7 +380,7 @@
|
|
398 |
}
|
399 |
.su-qrcode-align-right {
|
400 |
float: right;
|
401 |
-
margin: 0 0
|
402 |
}
|
403 |
.su-qrcode a,
|
404 |
.su-qrcode a:hover,
|
@@ -410,7 +392,7 @@
|
|
410 |
text-decoration: none;
|
411 |
}
|
412 |
.su-qrcode-clickable a:hover {
|
413 |
-
opacity:
|
414 |
filter: alpha(opacity=70);
|
415 |
}
|
416 |
.su-qrcode img { max-width: 100%; }
|
9 |
border-bottom: 1px solid #999;
|
10 |
}
|
11 |
.su-heading-style-default .su-heading-inner {
|
12 |
+
padding: 1em .5em;
|
13 |
border-top: 4px solid #eee;
|
14 |
border-bottom: 4px solid #eee;
|
15 |
}
|
16 |
.su-heading.su-heading-align-left { text-align: left; }
|
17 |
+
.su-heading.su-heading-align-left .su-heading-inner { padding-left: .2em; }
|
18 |
.su-heading.su-heading-align-right { text-align: right; }
|
19 |
+
.su-heading.su-heading-align-right .su-heading-inner { padding-right: .2em; }
|
20 |
.su-heading.su-heading-align-center { text-align: center; }
|
21 |
|
22 |
/* Divider
|
30 |
}
|
31 |
.su-divider a {
|
32 |
display: inline-block;
|
33 |
+
font-size: .8em;
|
34 |
text-decoration: none;
|
35 |
outline: none;
|
36 |
padding-bottom: 5px;
|
49 |
clear: both;
|
50 |
overflow: hidden;
|
51 |
}
|
52 |
+
.su-spacer-5 { height: 5px; }
|
53 |
+
.su-spacer-10 { height: 10px; }
|
54 |
+
.su-spacer-20 { height: 20px; }
|
55 |
+
.su-spacer-30 { height: 30px; }
|
56 |
+
.su-spacer-40 { height: 40px; }
|
57 |
|
58 |
/* Highlight
|
59 |
---------------------------------------------------------------*/
|
68 |
|
69 |
.su-label {
|
70 |
display: inline;
|
71 |
+
margin-right: .3em;
|
72 |
+
padding: .1em .3em;
|
73 |
+
font-size: .8em;
|
74 |
+
height: .8em;
|
75 |
+
line-height: .8em;
|
76 |
color: #fff;
|
77 |
border-radius: 3px;
|
78 |
+
}
|
79 |
+
.su-label-type-default { background: #999; }
|
80 |
+
.su-label-type-success { background: #090; }
|
81 |
+
.su-label-type-warning { background: #f90; }
|
82 |
+
.su-label-type-important { background: #f03; }
|
83 |
+
.su-label-type-black { background: #111; }
|
84 |
+
.su-label-type-info { background: #09c; }
|
|
|
|
|
85 |
|
86 |
/* Dropcap
|
87 |
---------------------------------------------------------------*/
|
91 |
display: inline-block;
|
92 |
width: 2em;
|
93 |
height: 2em;
|
94 |
+
margin: .2em .5em .2em 0;
|
95 |
line-height: 2em;
|
96 |
text-align: center;
|
97 |
overflow: hidden;
|
99 |
}
|
100 |
.su-dropcap-style-default {
|
101 |
color: #fff;
|
102 |
+
background: rgb(69, 72, 77);
|
103 |
+
background: -moz-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
104 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(69, 72, 77, 1)), color-stop(100%, rgba(0, 0, 0, 1)));
|
105 |
+
background: -webkit-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
106 |
+
background: -o-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
107 |
+
background: -ms-linear-gradient(top, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
108 |
+
background: linear-gradient(to bottom, rgba(69, 72, 77, 1) 0%, rgba(0, 0, 0, 1) 100%);
|
109 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#45484d', endColorstr='#000000', GradientType=0);
|
110 |
text-shadow: -1px -1px 0 #000;
|
|
|
|
|
111 |
border-radius: 50%;
|
|
|
|
|
112 |
}
|
113 |
.su-dropcap-style-flat {
|
114 |
background: #444;
|
119 |
border-radius: 50%;
|
120 |
-moz-border-radius: 50%;
|
121 |
-webkit-border-radius: 50%;
|
122 |
+
background: rgb(255, 255, 255);
|
123 |
+
background: -moz-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
124 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255, 255, 255, 1)), color-stop(100%, rgba(234, 234, 234, 1)));
|
125 |
+
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
126 |
+
background: -o-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
127 |
+
background: -ms-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
128 |
+
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(234, 234, 234, 1) 100%);
|
129 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eaeaea', GradientType=0);
|
130 |
}
|
131 |
.su-dropcap-style-simple {
|
132 |
width: 1em;
|
139 |
---------------------------------------------------------------*/
|
140 |
|
141 |
.su-frame,
|
142 |
+
.su-frame-inner {
|
143 |
+
display: block;
|
144 |
+
}
|
145 |
.su-frame-align-left {
|
146 |
float: left;
|
147 |
margin: 0 1em 1em 0;
|
180 |
|
181 |
.su-list ul {
|
182 |
list-style: none !important;
|
183 |
+
margin: 0 0 1.5em !important;
|
184 |
padding: 0 !important;
|
185 |
}
|
186 |
.su-list ul li {
|
219 |
text-align: center;
|
220 |
text-decoration: none !important;
|
221 |
box-sizing: content-box !important;
|
|
|
|
|
222 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
223 |
}
|
224 |
.su-button-wide {
|
225 |
display: block !important;
|
233 |
-moz-box-sizing: content-box !important;
|
234 |
-webkit-box-sizing: content-box !important;
|
235 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
236 |
}
|
237 |
.su-button img {
|
238 |
border: none !important;
|
239 |
vertical-align: middle !important;
|
240 |
+
margin: -.2em .4em 0 -.3em !important;
|
241 |
box-shadow: none !important;
|
242 |
-moz-box-shadow: none !important;
|
243 |
-webkit-box-shadow: none !important;
|
246 |
display: inline-block;
|
247 |
width: 1em;
|
248 |
height: 1em;
|
249 |
+
margin: 0 .5em 0 0 !important;
|
250 |
text-align: center;
|
251 |
line-height: 1em;
|
252 |
}
|
253 |
+
.su-button.su-button-float-icon img { margin: 0 .5em !important; }
|
254 |
.su-button small {
|
255 |
display: block;
|
256 |
+
margin: -.2em 0 0;
|
257 |
color: inherit;
|
258 |
text-align: center;
|
259 |
font-style: normal;
|
260 |
+
font-size: .8em;
|
261 |
line-height: 1;
|
262 |
+
opacity: .7;
|
263 |
filter: alpha(opacity=70);
|
264 |
}
|
265 |
@media screen and (max-width: 768px) {
|
266 |
.su-button span {
|
267 |
+
padding-top: .25em !important;
|
268 |
+
padding-bottom: .25em !important;
|
269 |
line-height: 1.2 !important;
|
270 |
}
|
271 |
.su-button small {
|
272 |
+
margin-top: .2em !important;
|
273 |
}
|
274 |
}
|
275 |
.su-button-style-default {
|
277 |
border-style: solid;
|
278 |
}
|
279 |
.su-button-style-default:hover {
|
|
|
280 |
filter: alpha(opacity=70);
|
281 |
+
opacity: .7;
|
|
|
|
|
282 |
}
|
283 |
.su-button-style-default span {
|
284 |
border-top-width: 1px;
|
287 |
border-bottom-style: solid;
|
288 |
}
|
289 |
.su-button-style-flat,
|
290 |
+
.su-button-style-flat span {
|
291 |
+
border: none;
|
292 |
+
}
|
293 |
+
.su-button-style-flat span { position: relative; }
|
294 |
+
.su-button-style-flat:hover span { top: 1px; }
|
295 |
.su-button-style-ghost { background: transparent !important; }
|
296 |
.su-button-style-ghost span {
|
297 |
border-width: 3px;
|
298 |
border-style: solid;
|
299 |
}
|
300 |
.su-button-style-ghost:hover span { border-color: inherit !important; }
|
301 |
+
.su-button-style-soft span { background: 0 -20px url('../images/styles/style-soft.png') repeat-x; }
|
302 |
+
.su-button-style-soft:hover span { background: 0 0 url('../images/styles/style-soft.png') repeat-x; }
|
303 |
+
.su-button-style-glass span { background: 0 50% url('../images/styles/style-glass.png') repeat-x; }
|
304 |
+
.su-button-style-glass:hover span { background: 100% 50% url('../images/styles/style-glass.png') repeat-x; }
|
305 |
+
.su-button-style-bubbles span { background: 0 50% url('../images/styles/style-bubbles.png') no-repeat; }
|
306 |
+
.su-button-style-bubbles:hover span { background: -710px 50% url('../images/styles/style-bubbles.png') no-repeat; }
|
307 |
+
.su-button-style-noise span { background: 0 0 url('../images/styles/style-noise.png') repeat-x; }
|
308 |
+
.su-button-style-noise:hover span { background: 0 0 url('../images/styles/style-noise.png') repeat-x; }
|
309 |
.su-button-style-stroked span {
|
310 |
margin: 1px;
|
311 |
border: 1px dashed #fff !important;
|
312 |
}
|
313 |
.su-button-style-stroked:hover span {
|
|
|
314 |
filter: alpha(opacity=70);
|
315 |
+
opacity: .7;
|
|
|
|
|
316 |
}
|
317 |
.su-button-style-3d {
|
318 |
border-bottom-style: solid;
|
358 |
background: #f0f0f0 !important;
|
359 |
}
|
360 |
.su-table td {
|
361 |
+
padding: .5em 1em !important;
|
362 |
border: 1px solid #ccc !important;
|
363 |
background: #fff !important;
|
364 |
}
|
365 |
+
.su-table .su-even td { background: #f7f7f7 !important; }
|
366 |
|
367 |
/* QR code
|
368 |
---------------------------------------------------------------*/
|
370 |
.su-qrcode { display: inline-block; }
|
371 |
.su-qrcode-align-left {
|
372 |
float: left;
|
373 |
+
margin: 0 .5em .5em 0;
|
374 |
}
|
375 |
.su-qrcode-align-center {
|
376 |
display: block;
|
380 |
}
|
381 |
.su-qrcode-align-right {
|
382 |
float: right;
|
383 |
+
margin: 0 0 .5em .5em;
|
384 |
}
|
385 |
.su-qrcode a,
|
386 |
.su-qrcode a:hover,
|
392 |
text-decoration: none;
|
393 |
}
|
394 |
.su-qrcode-clickable a:hover {
|
395 |
+
opacity: .7;
|
396 |
filter: alpha(opacity=70);
|
397 |
}
|
398 |
.su-qrcode img { max-width: 100%; }
|
@@ -7,34 +7,33 @@
|
|
7 |
-webkit-backface-visibility: hidden;
|
8 |
-moz-backface-visibility: hidden;
|
9 |
-ms-backface-visibility: hidden;
|
10 |
-
-o-backface-visibility: hidden;
|
11 |
backface-visibility: hidden;
|
12 |
z-index: 1;
|
13 |
}
|
14 |
-
.su-slider-centered { margin: 0 auto 1.5em
|
15 |
.su-slider-slides {
|
16 |
position: relative;
|
17 |
width: 100%;
|
18 |
-webkit-transition-property: -webkit-transform, left, top;
|
19 |
-webkit-transition-duration: 0s;
|
20 |
-
-webkit-transform: translate3d(
|
21 |
-webkit-transition-timing-function: ease;
|
22 |
-moz-transition-property: -moz-transform, left, top;
|
23 |
-moz-transition-duration: 0s;
|
24 |
-
-moz-transform: translate3d(
|
25 |
-moz-transition-timing-function: ease;
|
26 |
-o-transition-property: -o-transform, left, top;
|
27 |
-o-transition-duration: 0s;
|
28 |
-
-o-transform: translate3d(
|
29 |
-o-transition-timing-function: ease;
|
30 |
-
-o-transform: translate(
|
31 |
-ms-transition-property: -ms-transform, left, top;
|
32 |
-ms-transition-duration: 0s;
|
33 |
-
-ms-transform: translate3d(
|
34 |
-ms-transition-timing-function: ease;
|
35 |
transition-property: transform, left, top;
|
36 |
transition-duration: 0s;
|
37 |
-
transform: translate3d(
|
38 |
transition-timing-function: ease;
|
39 |
}
|
40 |
.swiper-free-mode > .su-slider-slides {
|
@@ -60,10 +59,12 @@
|
|
60 |
}
|
61 |
.su-slider-responsive-yes .su-slider-slide > a,
|
62 |
.su-slider-responsive-yes .su-slider-slide > img,
|
63 |
-
.su-slider-responsive-yes .su-slider-slide > a > img {
|
64 |
-
|
65 |
-
|
66 |
-
.
|
|
|
|
|
67 |
.su-slider-slide-title {
|
68 |
position: absolute;
|
69 |
left: 20px;
|
@@ -74,7 +75,7 @@
|
|
74 |
color: #fff;
|
75 |
line-height: 1.3;
|
76 |
background: rgb(0, 0, 0);
|
77 |
-
background: rgba(0, 0, 0,
|
78 |
border-radius: 5px;
|
79 |
-moz-border-radius: 5px;
|
80 |
-webkit-border-radius: 5px;
|
@@ -85,7 +86,6 @@
|
|
85 |
opacity: 0;
|
86 |
transition: opacity 1s;
|
87 |
-o-transition: opacity 1s;
|
88 |
-
-ie-transition: opacity 1s;
|
89 |
-moz-transition: opacity 1s;
|
90 |
-webkit-transition: opacity 1s;
|
91 |
}
|
@@ -102,7 +102,7 @@
|
|
102 |
height: 40px;
|
103 |
margin-top: -20px !important;
|
104 |
background: rgb(0, 0, 0) 0 0 url('../images/swiper/default.png') no-repeat;
|
105 |
-
background-color: rgba(0, 0, 0,
|
106 |
cursor: pointer;
|
107 |
border-radius: 50%;
|
108 |
-moz-border-radius: 50%;
|
@@ -110,10 +110,6 @@
|
|
110 |
filter: alpha(opacity=0);
|
111 |
opacity: 0;
|
112 |
transition: all .2s;
|
113 |
-
-o-transition: all .2s;
|
114 |
-
-ie-transition: all .2s;
|
115 |
-
-moz-transition: all .2s;
|
116 |
-
-webkit-transition: all .2s;
|
117 |
}
|
118 |
.su-slider-prev {
|
119 |
right: 10px;
|
@@ -130,7 +126,7 @@
|
|
130 |
margin-left: 0;
|
131 |
margin-right: 0;
|
132 |
filter: alpha(opacity=70);
|
133 |
-
opacity:
|
134 |
}
|
135 |
.su-slider .su-slider-prev:hover,
|
136 |
.su-slider .su-slider-next:hover {
|
@@ -150,10 +146,6 @@
|
|
150 |
filter: alpha(opacity=0);
|
151 |
opacity: 0;
|
152 |
transition: all .2s;
|
153 |
-
-o-transition: all .2s;
|
154 |
-
-ie-transition: all .2s;
|
155 |
-
-moz-transition: all .2s;
|
156 |
-
-webkit-transition: all .2s;
|
157 |
}
|
158 |
.su-slider:hover .su-slider-pagination {
|
159 |
bottom: 20px;
|
@@ -166,24 +158,22 @@
|
|
166 |
height: 14px;
|
167 |
margin: 0;
|
168 |
background: rgb(0, 0, 0) 0 -999px url('../images/swiper/default.png') no-repeat;
|
169 |
-
background-color: rgba(0, 0, 0,
|
170 |
cursor: pointer;
|
171 |
border-radius: 50%;
|
172 |
-moz-border-radius: 50%;
|
173 |
-webkit-border-radius: 50%;
|
174 |
transition: all .2s;
|
175 |
-
-o-transition: all .2s;
|
176 |
-
-ie-transition: all .2s;
|
177 |
-
-moz-transition: all .2s;
|
178 |
-
-webkit-transition: all .2s;
|
179 |
}
|
180 |
-
.su-slider:hover .su-slider-pagination span { margin: 0 3px }
|
181 |
.su-slider .su-slider-pagination span.swiper-visible-switch {
|
182 |
background-color: rgb(255, 255, 255);
|
183 |
-
background-color: rgba(255, 255, 255,
|
184 |
}
|
185 |
.su-slider-pagination span:hover,
|
186 |
-
.su-slider-pagination span.swiper-active-switch {
|
|
|
|
|
187 |
|
188 |
/* Carousel
|
189 |
---------------------------------------------------------------*/
|
@@ -195,34 +185,33 @@
|
|
195 |
-webkit-backface-visibility: hidden;
|
196 |
-moz-backface-visibility: hidden;
|
197 |
-ms-backface-visibility: hidden;
|
198 |
-
-o-backface-visibility: hidden;
|
199 |
backface-visibility: hidden;
|
200 |
z-index: 1;
|
201 |
}
|
202 |
-
.su-carousel-centered { margin: 0 auto 1.5em
|
203 |
.su-carousel-slides {
|
204 |
position: relative;
|
205 |
width: 100%;
|
206 |
-webkit-transition-property: -webkit-transform, left, top;
|
207 |
-webkit-transition-duration: 0s;
|
208 |
-
-webkit-transform: translate3d(
|
209 |
-webkit-transition-timing-function: ease;
|
210 |
-moz-transition-property: -moz-transform, left, top;
|
211 |
-moz-transition-duration: 0s;
|
212 |
-
-moz-transform: translate3d(
|
213 |
-moz-transition-timing-function: ease;
|
214 |
-o-transition-property: -o-transform, left, top;
|
215 |
-o-transition-duration: 0s;
|
216 |
-
-o-transform: translate3d(
|
217 |
-o-transition-timing-function: ease;
|
218 |
-
-o-transform: translate(
|
219 |
-ms-transition-property: -ms-transform, left, top;
|
220 |
-ms-transition-duration: 0s;
|
221 |
-
-ms-transform: translate3d(
|
222 |
-ms-transition-timing-function: ease;
|
223 |
transition-property: transform, left, top;
|
224 |
transition-duration: 0s;
|
225 |
-
transform: translate3d(
|
226 |
transition-timing-function: ease;
|
227 |
}
|
228 |
.swiper-free-mode > .su-carousel-slides {
|
@@ -251,10 +240,12 @@
|
|
251 |
}
|
252 |
.su-carousel-responsive-yes .su-carousel-slide > a,
|
253 |
.su-carousel-responsive-yes .su-carousel-slide > img,
|
254 |
-
.su-carousel-responsive-yes .su-carousel-slide > a > img {
|
255 |
-
|
256 |
-
|
257 |
-
.
|
|
|
|
|
258 |
.su-carousel { }
|
259 |
.su-carousel .su-carousel-slide a { padding: 0 5px }
|
260 |
.su-carousel .su-carousel-slide img {
|
@@ -282,7 +273,6 @@
|
|
282 |
-webkit-box-sizing: border-box;
|
283 |
transition: opacity 1s;
|
284 |
-o-transition: opacity 1s;
|
285 |
-
-ie-transition: opacity 1s;
|
286 |
-moz-transition: opacity 1s;
|
287 |
-webkit-transition: opacity 1s;
|
288 |
}
|
@@ -295,7 +285,7 @@
|
|
295 |
height: 40px;
|
296 |
margin-top: -20px;
|
297 |
background: rgb(0, 0, 0) 0 0 url('../images/swiper/default.png') no-repeat;
|
298 |
-
background-color: rgba(0, 0, 0,
|
299 |
cursor: pointer;
|
300 |
border-radius: 50%;
|
301 |
-moz-border-radius: 50%;
|
@@ -303,10 +293,6 @@
|
|
303 |
filter: alpha(opacity=0);
|
304 |
opacity: 0;
|
305 |
transition: all .2s;
|
306 |
-
-o-transition: all .2s;
|
307 |
-
-ie-transition: all .2s;
|
308 |
-
-moz-transition: all .2s;
|
309 |
-
-webkit-transition: all .2s;
|
310 |
}
|
311 |
.su-carousel .su-carousel-prev {
|
312 |
right: 20px;
|
@@ -323,7 +309,7 @@
|
|
323 |
margin-left: 0;
|
324 |
margin-right: 0;
|
325 |
filter: alpha(opacity=70);
|
326 |
-
opacity:
|
327 |
}
|
328 |
.su-carousel .su-carousel-prev:hover,
|
329 |
.su-carousel .su-carousel-next:hover {
|
@@ -343,10 +329,6 @@
|
|
343 |
filter: alpha(opacity=0);
|
344 |
opacity: 0;
|
345 |
transition: all .2s;
|
346 |
-
-o-transition: all .2s;
|
347 |
-
-ie-transition: all .2s;
|
348 |
-
-moz-transition: all .2s;
|
349 |
-
-webkit-transition: all .2s;
|
350 |
}
|
351 |
.su-carousel:hover .su-carousel-pagination {
|
352 |
bottom: 20px;
|
@@ -359,16 +341,12 @@
|
|
359 |
height: 14px;
|
360 |
margin: 0;
|
361 |
background: rgb(0, 0, 0) 0 -999px url('../images/swiper/default.png') no-repeat;
|
362 |
-
background-color: rgba(0, 0, 0,
|
363 |
cursor: pointer;
|
364 |
border-radius: 50%;
|
365 |
-moz-border-radius: 50%;
|
366 |
-webkit-border-radius: 50%;
|
367 |
transition: all .2s;
|
368 |
-
-o-transition: all .2s;
|
369 |
-
-ie-transition: all .2s;
|
370 |
-
-moz-transition: all .2s;
|
371 |
-
-webkit-transition: all .2s;
|
372 |
}
|
373 |
.su-carousel:hover .su-carousel-pagination span { margin: 0 3px }
|
374 |
.su-carousel .su-carousel-pagination span.swiper-visible-switch {
|
7 |
-webkit-backface-visibility: hidden;
|
8 |
-moz-backface-visibility: hidden;
|
9 |
-ms-backface-visibility: hidden;
|
|
|
10 |
backface-visibility: hidden;
|
11 |
z-index: 1;
|
12 |
}
|
13 |
+
.su-slider-centered { margin: 0 auto 1.5em; }
|
14 |
.su-slider-slides {
|
15 |
position: relative;
|
16 |
width: 100%;
|
17 |
-webkit-transition-property: -webkit-transform, left, top;
|
18 |
-webkit-transition-duration: 0s;
|
19 |
+
-webkit-transform: translate3d(0, 0, 0);
|
20 |
-webkit-transition-timing-function: ease;
|
21 |
-moz-transition-property: -moz-transform, left, top;
|
22 |
-moz-transition-duration: 0s;
|
23 |
+
-moz-transform: translate3d(0, 0, 0);
|
24 |
-moz-transition-timing-function: ease;
|
25 |
-o-transition-property: -o-transform, left, top;
|
26 |
-o-transition-duration: 0s;
|
27 |
+
-o-transform: translate3d(0, 0, 0);
|
28 |
-o-transition-timing-function: ease;
|
29 |
+
-o-transform: translate(0, 0);
|
30 |
-ms-transition-property: -ms-transform, left, top;
|
31 |
-ms-transition-duration: 0s;
|
32 |
+
-ms-transform: translate3d(0, 0, 0);
|
33 |
-ms-transition-timing-function: ease;
|
34 |
transition-property: transform, left, top;
|
35 |
transition-duration: 0s;
|
36 |
+
transform: translate3d(0, 0, 0);
|
37 |
transition-timing-function: ease;
|
38 |
}
|
39 |
.swiper-free-mode > .su-slider-slides {
|
59 |
}
|
60 |
.su-slider-responsive-yes .su-slider-slide > a,
|
61 |
.su-slider-responsive-yes .su-slider-slide > img,
|
62 |
+
.su-slider-responsive-yes .su-slider-slide > a > img {
|
63 |
+
height: auto;
|
64 |
+
}
|
65 |
+
.su-slider-pages-no .su-slider-pagination { display: none; }
|
66 |
+
.swiper-wp8-horizontal { -ms-touch-action: pan-y; }
|
67 |
+
.swiper-wp8-vertical { -ms-touch-action: pan-x; }
|
68 |
.su-slider-slide-title {
|
69 |
position: absolute;
|
70 |
left: 20px;
|
75 |
color: #fff;
|
76 |
line-height: 1.3;
|
77 |
background: rgb(0, 0, 0);
|
78 |
+
background: rgba(0, 0, 0, .5);
|
79 |
border-radius: 5px;
|
80 |
-moz-border-radius: 5px;
|
81 |
-webkit-border-radius: 5px;
|
86 |
opacity: 0;
|
87 |
transition: opacity 1s;
|
88 |
-o-transition: opacity 1s;
|
|
|
89 |
-moz-transition: opacity 1s;
|
90 |
-webkit-transition: opacity 1s;
|
91 |
}
|
102 |
height: 40px;
|
103 |
margin-top: -20px !important;
|
104 |
background: rgb(0, 0, 0) 0 0 url('../images/swiper/default.png') no-repeat;
|
105 |
+
background-color: rgba(0, 0, 0, .5);
|
106 |
cursor: pointer;
|
107 |
border-radius: 50%;
|
108 |
-moz-border-radius: 50%;
|
110 |
filter: alpha(opacity=0);
|
111 |
opacity: 0;
|
112 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
.su-slider-prev {
|
115 |
right: 10px;
|
126 |
margin-left: 0;
|
127 |
margin-right: 0;
|
128 |
filter: alpha(opacity=70);
|
129 |
+
opacity: .7;
|
130 |
}
|
131 |
.su-slider .su-slider-prev:hover,
|
132 |
.su-slider .su-slider-next:hover {
|
146 |
filter: alpha(opacity=0);
|
147 |
opacity: 0;
|
148 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
.su-slider:hover .su-slider-pagination {
|
151 |
bottom: 20px;
|
158 |
height: 14px;
|
159 |
margin: 0;
|
160 |
background: rgb(0, 0, 0) 0 -999px url('../images/swiper/default.png') no-repeat;
|
161 |
+
background-color: rgba(0, 0, 0, .5);
|
162 |
cursor: pointer;
|
163 |
border-radius: 50%;
|
164 |
-moz-border-radius: 50%;
|
165 |
-webkit-border-radius: 50%;
|
166 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
+
.su-slider:hover .su-slider-pagination span { margin: 0 3px; }
|
169 |
.su-slider .su-slider-pagination span.swiper-visible-switch {
|
170 |
background-color: rgb(255, 255, 255);
|
171 |
+
background-color: rgba(255, 255, 255, .5);
|
172 |
}
|
173 |
.su-slider-pagination span:hover,
|
174 |
+
.su-slider-pagination span.swiper-active-switch {
|
175 |
+
background-position: 0 -40px;
|
176 |
+
}
|
177 |
|
178 |
/* Carousel
|
179 |
---------------------------------------------------------------*/
|
185 |
-webkit-backface-visibility: hidden;
|
186 |
-moz-backface-visibility: hidden;
|
187 |
-ms-backface-visibility: hidden;
|
|
|
188 |
backface-visibility: hidden;
|
189 |
z-index: 1;
|
190 |
}
|
191 |
+
.su-carousel-centered { margin: 0 auto 1.5em; }
|
192 |
.su-carousel-slides {
|
193 |
position: relative;
|
194 |
width: 100%;
|
195 |
-webkit-transition-property: -webkit-transform, left, top;
|
196 |
-webkit-transition-duration: 0s;
|
197 |
+
-webkit-transform: translate3d(0, 0, 0);
|
198 |
-webkit-transition-timing-function: ease;
|
199 |
-moz-transition-property: -moz-transform, left, top;
|
200 |
-moz-transition-duration: 0s;
|
201 |
+
-moz-transform: translate3d(0, 0, 0);
|
202 |
-moz-transition-timing-function: ease;
|
203 |
-o-transition-property: -o-transform, left, top;
|
204 |
-o-transition-duration: 0s;
|
205 |
+
-o-transform: translate3d(0, 0, 0);
|
206 |
-o-transition-timing-function: ease;
|
207 |
+
-o-transform: translate(0, 0);
|
208 |
-ms-transition-property: -ms-transform, left, top;
|
209 |
-ms-transition-duration: 0s;
|
210 |
+
-ms-transform: translate3d(0, 0, 0);
|
211 |
-ms-transition-timing-function: ease;
|
212 |
transition-property: transform, left, top;
|
213 |
transition-duration: 0s;
|
214 |
+
transform: translate3d(0, 0, 0);
|
215 |
transition-timing-function: ease;
|
216 |
}
|
217 |
.swiper-free-mode > .su-carousel-slides {
|
240 |
}
|
241 |
.su-carousel-responsive-yes .su-carousel-slide > a,
|
242 |
.su-carousel-responsive-yes .su-carousel-slide > img,
|
243 |
+
.su-carousel-responsive-yes .su-carousel-slide > a > img {
|
244 |
+
height: auto;
|
245 |
+
}
|
246 |
+
.su-carousel-pages-no .su-carousel-pagination { display: none; }
|
247 |
+
.swiper-wp8-horizontal { -ms-touch-action: pan-y; }
|
248 |
+
.swiper-wp8-vertical { -ms-touch-action: pan-x; }
|
249 |
.su-carousel { }
|
250 |
.su-carousel .su-carousel-slide a { padding: 0 5px }
|
251 |
.su-carousel .su-carousel-slide img {
|
273 |
-webkit-box-sizing: border-box;
|
274 |
transition: opacity 1s;
|
275 |
-o-transition: opacity 1s;
|
|
|
276 |
-moz-transition: opacity 1s;
|
277 |
-webkit-transition: opacity 1s;
|
278 |
}
|
285 |
height: 40px;
|
286 |
margin-top: -20px;
|
287 |
background: rgb(0, 0, 0) 0 0 url('../images/swiper/default.png') no-repeat;
|
288 |
+
background-color: rgba(0, 0, 0, .5);
|
289 |
cursor: pointer;
|
290 |
border-radius: 50%;
|
291 |
-moz-border-radius: 50%;
|
293 |
filter: alpha(opacity=0);
|
294 |
opacity: 0;
|
295 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
.su-carousel .su-carousel-prev {
|
298 |
right: 20px;
|
309 |
margin-left: 0;
|
310 |
margin-right: 0;
|
311 |
filter: alpha(opacity=70);
|
312 |
+
opacity: .7;
|
313 |
}
|
314 |
.su-carousel .su-carousel-prev:hover,
|
315 |
.su-carousel .su-carousel-next:hover {
|
329 |
filter: alpha(opacity=0);
|
330 |
opacity: 0;
|
331 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
332 |
}
|
333 |
.su-carousel:hover .su-carousel-pagination {
|
334 |
bottom: 20px;
|
341 |
height: 14px;
|
342 |
margin: 0;
|
343 |
background: rgb(0, 0, 0) 0 -999px url('../images/swiper/default.png') no-repeat;
|
344 |
+
background-color: rgba(0, 0, 0, .5);
|
345 |
cursor: pointer;
|
346 |
border-radius: 50%;
|
347 |
-moz-border-radius: 50%;
|
348 |
-webkit-border-radius: 50%;
|
349 |
transition: all .2s;
|
|
|
|
|
|
|
|
|
350 |
}
|
351 |
.su-carousel:hover .su-carousel-pagination span { margin: 0 3px }
|
352 |
.su-carousel .su-carousel-pagination span.swiper-visible-switch {
|
@@ -17,6 +17,8 @@
|
|
17 |
width: 100%;
|
18 |
height: 100%;
|
19 |
}
|
|
|
|
|
20 |
|
21 |
/* YouTube
|
22 |
---------------------------------------------------------------*/
|
17 |
width: 100%;
|
18 |
height: 100%;
|
19 |
}
|
20 |
+
/* Disable fitvid.js */
|
21 |
+
.su-responsive-media-yes .fluid-width-video-wrapper { position: static; }
|
22 |
|
23 |
/* YouTube
|
24 |
---------------------------------------------------------------*/
|
File without changes
|
@@ -3,23 +3,20 @@
|
|
3 |
/* Audio
|
4 |
---------------------------------------------------------------*/
|
5 |
|
6 |
-
.su-audio { }
|
7 |
.su-audio {
|
8 |
position: relative;
|
9 |
width: 100%;
|
10 |
height: 30px;
|
11 |
margin-bottom: 1.5em;
|
12 |
-
background: #7c8781;
|
13 |
-
background: -moz-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
14 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7c8781), color-stop(100%, #0a0809));
|
15 |
-
background: -webkit-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
16 |
-
background: -o-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
17 |
-
background: -ms-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
18 |
-
background: linear-gradient(to bottom, #7c8781 0%, #0a0809 100%);
|
19 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c8781', endColorstr='#0a0809', GradientType=0);
|
20 |
border-radius: 3px;
|
21 |
-
-moz-border-radius: 3px;
|
22 |
-
-webkit-border-radius: 3px;
|
23 |
}
|
24 |
.su-audio .jp-play,
|
25 |
.su-audio .jp-pause {
|
@@ -29,10 +26,6 @@
|
|
29 |
display: block;
|
30 |
width: 30px;
|
31 |
height: 30px;
|
32 |
-
-webkit-border-top-left-radius: 3px;
|
33 |
-
-webkit-border-bottom-left-radius: 3px;
|
34 |
-
-moz-border-radius-topleft: 3px;
|
35 |
-
-moz-border-radius-bottomleft: 3px;
|
36 |
border-top-left-radius: 3px;
|
37 |
border-bottom-left-radius: 3px;
|
38 |
cursor: pointer;
|
@@ -40,8 +33,8 @@
|
|
40 |
background-image: url('../images/player/default.png');
|
41 |
background-repeat: no-repeat;
|
42 |
}
|
43 |
-
.su-audio .jp-play { background-position: 0 0 }
|
44 |
-
.su-audio .jp-pause { background-position: -30px 0 }
|
45 |
.su-audio .jp-current-time,
|
46 |
.su-audio .jp-duration {
|
47 |
position: absolute;
|
@@ -52,11 +45,9 @@
|
|
52 |
font-size: 10px;
|
53 |
color: #eee;
|
54 |
text-shadow: 0 -1px 0 #000;
|
55 |
-
-moz-text-shadow: 0 -1px 0 #000;
|
56 |
-
-webkit-text-shadow: 0 -1px 0 #000;
|
57 |
}
|
58 |
-
.su-audio .jp-current-time { left: 45px }
|
59 |
-
.su-audio .jp-duration { right: 10px }
|
60 |
.su-audio .jp-seek-bar,
|
61 |
.su-audio .jp-play-bar {
|
62 |
position: absolute;
|
@@ -64,8 +55,6 @@
|
|
64 |
left: 0;
|
65 |
height: 10px;
|
66 |
border-radius: 3px;
|
67 |
-
-moz-border-radius: 3px;
|
68 |
-
-webkit-border-radius: 3px;
|
69 |
cursor: pointer;
|
70 |
}
|
71 |
.su-audio .jp-progress {
|
@@ -76,31 +65,27 @@
|
|
76 |
height: 10px;
|
77 |
background: #333;
|
78 |
box-shadow: 0 0 5px #000 inset;
|
79 |
-
-moz-box-shadow: 0 0 5px #000 inset;
|
80 |
-
-webkit-box-shadow: 0 0 5px #000 inset;
|
81 |
border-radius: 3px;
|
82 |
-
-moz-border-radius: 3px;
|
83 |
-
-webkit-border-radius: 3px;
|
84 |
}
|
85 |
.su-audio .jp-seek-bar {
|
86 |
-
background: #0b0b0b;
|
87 |
-
background: -moz-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
88 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0b0b0b), color-stop(100%, #666));
|
89 |
-
background: -webkit-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
90 |
-
background: -o-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
91 |
-
background: -ms-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
92 |
-
background: linear-gradient(to bottom, #0b0b0b 0%, #666 100%);
|
93 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b0b0b', endColorstr='#666666', GradientType=0);
|
94 |
}
|
95 |
.su-audio .jp-play-bar {
|
96 |
-
background: #6db3f2;
|
97 |
-
background: -moz-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
98 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6db3f2), color-stop(50%, #54a3ee), color-stop(51%, #3690f0), color-stop(100%, #1e69de));
|
99 |
-
background: -webkit-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
100 |
-
background: -o-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
101 |
-
background: -ms-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
102 |
-
background: linear-gradient(to bottom, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
103 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6db3f2', endColorstr='#1e69de', GradientType=0);
|
104 |
}
|
105 |
|
106 |
/* Video
|
@@ -119,17 +104,13 @@
|
|
119 |
height: 30px;
|
120 |
padding: 0 1em;
|
121 |
line-height: 30px;
|
122 |
-
font-size:
|
123 |
background: rgb(0, 0, 0);
|
124 |
-
background: rgba(0, 0, 0,
|
125 |
color: #fff;
|
126 |
transition: top .2s;
|
127 |
-
-o-transition: top .2s;
|
128 |
-
-ie-transition: top .2s;
|
129 |
-
-moz-transition: top .2s;
|
130 |
-
-webkit-transition: top .2s;
|
131 |
}
|
132 |
-
.su-video:hover .jp-title { top: 0 }
|
133 |
.su-video .jp-start {
|
134 |
position: absolute;
|
135 |
left: 0;
|
@@ -137,22 +118,12 @@
|
|
137 |
width: 100%;
|
138 |
height: 100%;
|
139 |
cursor: pointer;
|
140 |
-
|
141 |
-
filter: alpha(opacity=50);
|
142 |
-
-moz-opacity: 0.5;
|
143 |
-
-khtml-opacity: 0.5;
|
144 |
-
opacity: 0.5;
|
145 |
transition: opacity .2s;
|
146 |
-
|
147 |
-
-webkit-transition: opacity .2s;
|
148 |
-
-o-transition: opacity .2s;
|
149 |
}
|
150 |
.su-video:hover .jp-start {
|
151 |
-
|
152 |
-
filter: alpha(opacity=80);
|
153 |
-
-moz-opacity: 0.8;
|
154 |
-
-khtml-opacity: 0.8;
|
155 |
-
opacity: 0.8;
|
156 |
}
|
157 |
.su-video.jp-video-full {
|
158 |
position: fixed;
|
@@ -167,7 +138,20 @@
|
|
167 |
top: 0;
|
168 |
overflow: hidden;
|
169 |
}
|
170 |
-
.su-video .jp-gui {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
.su-video.jp-video-full .jp-gui {
|
172 |
position: fixed;
|
173 |
left: 0;
|
@@ -180,38 +164,14 @@
|
|
180 |
left: 0;
|
181 |
right: 0;
|
182 |
transition: bottom .2s;
|
183 |
-
-o-transition: bottom .2s;
|
184 |
-
-ie-transition: bottom .2s;
|
185 |
-
-moz-transition: bottom .2s;
|
186 |
-
-webkit-transition: bottom .2s;
|
187 |
}
|
188 |
-
.su-video-controls-no:hover .jp-gui { bottom: 0 }
|
189 |
.su-video img {
|
190 |
border-radius: 0 !important;
|
191 |
-
-moz-border-radius: 0 !important;
|
192 |
-
-webkit-border-radius: 0 !important;
|
193 |
border: none !important;
|
194 |
margin: 0 !important;
|
195 |
padding: 0 !important;
|
196 |
}
|
197 |
-
.su-video .jp-start { background: 50% 50% url('../images/player/default-start.png') no-repeat }
|
198 |
-
.su-video .jp-gui {
|
199 |
-
height: 30px;
|
200 |
-
background: #7c8781; /* Old browsers */
|
201 |
-
background: -moz-linear-gradient(top, #7c8781 0%, #0a0809 100%); /* FF3.6+ */
|
202 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7c8781), color-stop(100%, #0a0809)); /* Chrome,Safari4+ */
|
203 |
-
background: -webkit-linear-gradient(top, #7c8781 0%, #0a0809 100%); /* Chrome10+,Safari5.1+ */
|
204 |
-
background: -o-linear-gradient(top, #7c8781 0%, #0a0809 100%); /* Opera 11.10+ */
|
205 |
-
background: -ms-linear-gradient(top, #7c8781 0%, #0a0809 100%); /* IE10+ */
|
206 |
-
background: linear-gradient(to bottom, #7c8781 0%, #0a0809 100%); /* W3C */
|
207 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c8781', endColorstr='#0a0809', GradientType=0); /* IE6-9 */
|
208 |
-
-webkit-border-bottom-right-radius: 3px;
|
209 |
-
-webkit-border-bottom-left-radius: 3px;
|
210 |
-
-moz-border-radius-bottomright: 3px;
|
211 |
-
-moz-border-radius-bottomleft: 3px;
|
212 |
-
border-bottom-right-radius: 3px;
|
213 |
-
border-bottom-left-radius: 3px;
|
214 |
-
}
|
215 |
.su-video .jp-gui .jp-play,
|
216 |
.su-video .jp-gui .jp-pause {
|
217 |
position: absolute;
|
@@ -223,8 +183,8 @@
|
|
223 |
border-right: 1px solid #454947;
|
224 |
cursor: pointer;
|
225 |
}
|
226 |
-
.su-video .jp-gui .jp-play { background: 0 0 url('../images/player/default.png') no-repeat }
|
227 |
-
.su-video .jp-gui .jp-pause { background: -30px 0 url('../images/player/default.png') no-repeat }
|
228 |
.su-video .jp-full-screen,
|
229 |
.su-video .jp-restore-screen {
|
230 |
position: absolute;
|
@@ -236,8 +196,8 @@
|
|
236 |
border-left: 1px solid #454947;
|
237 |
cursor: pointer;
|
238 |
}
|
239 |
-
.su-video .jp-full-screen { background: 0 -30px url('../images/player/default.png') no-repeat }
|
240 |
-
.su-video .jp-restore-screen { background: -30px -30px url('../images/player/default.png') no-repeat }
|
241 |
.su-video .jp-progress {
|
242 |
position: absolute;
|
243 |
top: 10px;
|
@@ -246,11 +206,7 @@
|
|
246 |
height: 10px;
|
247 |
background: #333;
|
248 |
border-radius: 3px;
|
249 |
-
-moz-border-radius: 3px;
|
250 |
-
-webkit-border-radius: 3px;
|
251 |
box-shadow: 0 0 5px #000 inset;
|
252 |
-
-moz-box-shadow: 0 0 5px #000 inset;
|
253 |
-
-webkit-box-shadow: 0 0 5px #000 inset;
|
254 |
}
|
255 |
.su-video .jp-seek-bar,
|
256 |
.su-video .jp-play-bar {
|
@@ -260,28 +216,26 @@
|
|
260 |
height: 100%;
|
261 |
cursor: pointer;
|
262 |
border-radius: 3px;
|
263 |
-
-moz-border-radius: 3px;
|
264 |
-
-webkit-border-radius: 3px;
|
265 |
}
|
266 |
.su-video .jp-seek-bar {
|
267 |
-
background: #0b0b0b;
|
268 |
-
background: -moz-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
269 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0b0b0b), color-stop(100%, #666));
|
270 |
-
background: -webkit-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
271 |
-
background: -o-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
272 |
-
background: -ms-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
273 |
-
background: linear-gradient(to bottom, #0b0b0b 0%, #666 100%);
|
274 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b0b0b', endColorstr='#666666', GradientType=0);
|
275 |
}
|
276 |
.su-video .jp-play-bar {
|
277 |
-
background: #6db3f2;
|
278 |
-
background: -moz-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
279 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6db3f2), color-stop(50%, #54a3ee), color-stop(51%, #3690f0), color-stop(100%, #1e69de));
|
280 |
-
background: -webkit-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
281 |
-
background: -o-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
282 |
-
background: -ms-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
283 |
-
background: linear-gradient(to bottom, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
284 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6db3f2', endColorstr='#1e69de', GradientType=0);
|
285 |
}
|
286 |
.su-video .jp-current-time,
|
287 |
.su-video .jp-duration {
|
@@ -293,5 +247,5 @@
|
|
293 |
color: #f5f5f5;
|
294 |
font-size: 10px;
|
295 |
}
|
296 |
-
.su-video .jp-current-time { left: 50px }
|
297 |
-
.su-video .jp-duration { right: 50px }
|
3 |
/* Audio
|
4 |
---------------------------------------------------------------*/
|
5 |
|
|
|
6 |
.su-audio {
|
7 |
position: relative;
|
8 |
width: 100%;
|
9 |
height: 30px;
|
10 |
margin-bottom: 1.5em;
|
11 |
+
background: #7c8781;
|
12 |
+
background: -moz-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
13 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7c8781), color-stop(100%, #0a0809));
|
14 |
+
background: -webkit-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
15 |
+
background: -o-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
16 |
+
background: -ms-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
17 |
+
background: linear-gradient(to bottom, #7c8781 0%, #0a0809 100%);
|
18 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c8781', endColorstr='#0a0809', GradientType=0);
|
19 |
border-radius: 3px;
|
|
|
|
|
20 |
}
|
21 |
.su-audio .jp-play,
|
22 |
.su-audio .jp-pause {
|
26 |
display: block;
|
27 |
width: 30px;
|
28 |
height: 30px;
|
|
|
|
|
|
|
|
|
29 |
border-top-left-radius: 3px;
|
30 |
border-bottom-left-radius: 3px;
|
31 |
cursor: pointer;
|
33 |
background-image: url('../images/player/default.png');
|
34 |
background-repeat: no-repeat;
|
35 |
}
|
36 |
+
.su-audio .jp-play { background-position: 0 0; }
|
37 |
+
.su-audio .jp-pause { background-position: -30px 0; }
|
38 |
.su-audio .jp-current-time,
|
39 |
.su-audio .jp-duration {
|
40 |
position: absolute;
|
45 |
font-size: 10px;
|
46 |
color: #eee;
|
47 |
text-shadow: 0 -1px 0 #000;
|
|
|
|
|
48 |
}
|
49 |
+
.su-audio .jp-current-time { left: 45px; }
|
50 |
+
.su-audio .jp-duration { right: 10px; }
|
51 |
.su-audio .jp-seek-bar,
|
52 |
.su-audio .jp-play-bar {
|
53 |
position: absolute;
|
55 |
left: 0;
|
56 |
height: 10px;
|
57 |
border-radius: 3px;
|
|
|
|
|
58 |
cursor: pointer;
|
59 |
}
|
60 |
.su-audio .jp-progress {
|
65 |
height: 10px;
|
66 |
background: #333;
|
67 |
box-shadow: 0 0 5px #000 inset;
|
|
|
|
|
68 |
border-radius: 3px;
|
|
|
|
|
69 |
}
|
70 |
.su-audio .jp-seek-bar {
|
71 |
+
background: #0b0b0b;
|
72 |
+
background: -moz-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
73 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0b0b0b), color-stop(100%, #666));
|
74 |
+
background: -webkit-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
75 |
+
background: -o-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
76 |
+
background: -ms-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
77 |
+
background: linear-gradient(to bottom, #0b0b0b 0%, #666 100%);
|
78 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b0b0b', endColorstr='#666666', GradientType=0);
|
79 |
}
|
80 |
.su-audio .jp-play-bar {
|
81 |
+
background: #6db3f2;
|
82 |
+
background: -moz-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
83 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6db3f2), color-stop(50%, #54a3ee), color-stop(51%, #3690f0), color-stop(100%, #1e69de));
|
84 |
+
background: -webkit-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
85 |
+
background: -o-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
86 |
+
background: -ms-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
87 |
+
background: linear-gradient(to bottom, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
88 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6db3f2', endColorstr='#1e69de', GradientType=0);
|
89 |
}
|
90 |
|
91 |
/* Video
|
104 |
height: 30px;
|
105 |
padding: 0 1em;
|
106 |
line-height: 30px;
|
107 |
+
font-size: .9em;
|
108 |
background: rgb(0, 0, 0);
|
109 |
+
background: rgba(0, 0, 0, .5);
|
110 |
color: #fff;
|
111 |
transition: top .2s;
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
+
.su-video:hover .jp-title { top: 0; }
|
114 |
.su-video .jp-start {
|
115 |
position: absolute;
|
116 |
left: 0;
|
118 |
width: 100%;
|
119 |
height: 100%;
|
120 |
cursor: pointer;
|
121 |
+
opacity: .5;
|
|
|
|
|
|
|
|
|
122 |
transition: opacity .2s;
|
123 |
+
background: 50% 50% url('../images/player/default-start.png') no-repeat;
|
|
|
|
|
124 |
}
|
125 |
.su-video:hover .jp-start {
|
126 |
+
opacity: .8;
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
.su-video.jp-video-full {
|
129 |
position: fixed;
|
138 |
top: 0;
|
139 |
overflow: hidden;
|
140 |
}
|
141 |
+
.su-video .jp-gui {
|
142 |
+
position: relative;
|
143 |
+
height: 30px;
|
144 |
+
background: #7c8781;
|
145 |
+
background: -moz-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
146 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7c8781), color-stop(100%, #0a0809));
|
147 |
+
background: -webkit-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
148 |
+
background: -o-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
149 |
+
background: -ms-linear-gradient(top, #7c8781 0%, #0a0809 100%);
|
150 |
+
background: linear-gradient(to bottom, #7c8781 0%, #0a0809 100%);
|
151 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7c8781', endColorstr='#0a0809', GradientType=0);
|
152 |
+
border-bottom-right-radius: 3px;
|
153 |
+
border-bottom-left-radius: 3px;
|
154 |
+
}
|
155 |
.su-video.jp-video-full .jp-gui {
|
156 |
position: fixed;
|
157 |
left: 0;
|
164 |
left: 0;
|
165 |
right: 0;
|
166 |
transition: bottom .2s;
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
+
.su-video-controls-no:hover .jp-gui { bottom: 0; }
|
169 |
.su-video img {
|
170 |
border-radius: 0 !important;
|
|
|
|
|
171 |
border: none !important;
|
172 |
margin: 0 !important;
|
173 |
padding: 0 !important;
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
.su-video .jp-gui .jp-play,
|
176 |
.su-video .jp-gui .jp-pause {
|
177 |
position: absolute;
|
183 |
border-right: 1px solid #454947;
|
184 |
cursor: pointer;
|
185 |
}
|
186 |
+
.su-video .jp-gui .jp-play { background: 0 0 url('../images/player/default.png') no-repeat; }
|
187 |
+
.su-video .jp-gui .jp-pause { background: -30px 0 url('../images/player/default.png') no-repeat; }
|
188 |
.su-video .jp-full-screen,
|
189 |
.su-video .jp-restore-screen {
|
190 |
position: absolute;
|
196 |
border-left: 1px solid #454947;
|
197 |
cursor: pointer;
|
198 |
}
|
199 |
+
.su-video .jp-full-screen { background: 0 -30px url('../images/player/default.png') no-repeat; }
|
200 |
+
.su-video .jp-restore-screen { background: -30px -30px url('../images/player/default.png') no-repeat; }
|
201 |
.su-video .jp-progress {
|
202 |
position: absolute;
|
203 |
top: 10px;
|
206 |
height: 10px;
|
207 |
background: #333;
|
208 |
border-radius: 3px;
|
|
|
|
|
209 |
box-shadow: 0 0 5px #000 inset;
|
|
|
|
|
210 |
}
|
211 |
.su-video .jp-seek-bar,
|
212 |
.su-video .jp-play-bar {
|
216 |
height: 100%;
|
217 |
cursor: pointer;
|
218 |
border-radius: 3px;
|
|
|
|
|
219 |
}
|
220 |
.su-video .jp-seek-bar {
|
221 |
+
background: #0b0b0b;
|
222 |
+
background: -moz-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
223 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0b0b0b), color-stop(100%, #666));
|
224 |
+
background: -webkit-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
225 |
+
background: -o-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
226 |
+
background: -ms-linear-gradient(top, #0b0b0b 0%, #666 100%);
|
227 |
+
background: linear-gradient(to bottom, #0b0b0b 0%, #666 100%);
|
228 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b0b0b', endColorstr='#666666', GradientType=0);
|
229 |
}
|
230 |
.su-video .jp-play-bar {
|
231 |
+
background: #6db3f2;
|
232 |
+
background: -moz-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
233 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6db3f2), color-stop(50%, #54a3ee), color-stop(51%, #3690f0), color-stop(100%, #1e69de));
|
234 |
+
background: -webkit-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
235 |
+
background: -o-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
236 |
+
background: -ms-linear-gradient(top, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
237 |
+
background: linear-gradient(to bottom, #6db3f2 0%, #54a3ee 50%, #3690f0 51%, #1e69de 100%);
|
238 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6db3f2', endColorstr='#1e69de', GradientType=0);
|
239 |
}
|
240 |
.su-video .jp-current-time,
|
241 |
.su-video .jp-duration {
|
247 |
color: #f5f5f5;
|
248 |
font-size: 10px;
|
249 |
}
|
250 |
+
.su-video .jp-current-time { left: 50px; }
|
251 |
+
.su-video .jp-duration { right: 50px; }
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import 'box-shortcodes';
|
2 |
+
@import 'content-shortcodes';
|
3 |
+
@import 'galleries-shortcodes';
|
4 |
+
@import 'media-shortcodes';
|
5 |
+
@import 'other-shortcodes';
|
6 |
+
@import 'players-shortcodes';
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once $this->plugin_path . 'includes/shortcodes/heading.php';
|
4 |
+
require_once $this->plugin_path . 'includes/shortcodes/tabs.php';
|
5 |
+
require_once $this->plugin_path . 'includes/shortcodes/spoiler.php';
|
6 |
+
require_once $this->plugin_path . 'includes/shortcodes/accordion.php';
|
7 |
+
require_once $this->plugin_path . 'includes/shortcodes/divider.php';
|
8 |
+
require_once $this->plugin_path . 'includes/shortcodes/spacer.php';
|
9 |
+
require_once $this->plugin_path . 'includes/shortcodes/highlight.php';
|
10 |
+
require_once $this->plugin_path . 'includes/shortcodes/label.php';
|
11 |
+
require_once $this->plugin_path . 'includes/shortcodes/quote.php';
|
12 |
+
require_once $this->plugin_path . 'includes/shortcodes/pullquote.php';
|
13 |
+
require_once $this->plugin_path . 'includes/shortcodes/dropcap.php';
|
14 |
+
require_once $this->plugin_path . 'includes/shortcodes/frame.php';
|
15 |
+
require_once $this->plugin_path . 'includes/shortcodes/row.php';
|
16 |
+
require_once $this->plugin_path . 'includes/shortcodes/column.php';
|
17 |
+
require_once $this->plugin_path . 'includes/shortcodes/list.php';
|
18 |
+
require_once $this->plugin_path . 'includes/shortcodes/button.php';
|
19 |
+
require_once $this->plugin_path . 'includes/shortcodes/service.php';
|
20 |
+
require_once $this->plugin_path . 'includes/shortcodes/box.php';
|
21 |
+
require_once $this->plugin_path . 'includes/shortcodes/note.php';
|
22 |
+
require_once $this->plugin_path . 'includes/shortcodes/expand.php';
|
23 |
+
require_once $this->plugin_path . 'includes/shortcodes/lightbox.php';
|
24 |
+
require_once $this->plugin_path . 'includes/shortcodes/lightbox_content.php';
|
25 |
+
require_once $this->plugin_path . 'includes/shortcodes/tooltip.php';
|
26 |
+
require_once $this->plugin_path . 'includes/shortcodes/private.php';
|
27 |
+
require_once $this->plugin_path . 'includes/shortcodes/youtube.php';
|
28 |
+
require_once $this->plugin_path . 'includes/shortcodes/youtube_advanced.php';
|
29 |
+
require_once $this->plugin_path . 'includes/shortcodes/vimeo.php';
|
30 |
+
require_once $this->plugin_path . 'includes/shortcodes/screenr.php';
|
31 |
+
require_once $this->plugin_path . 'includes/shortcodes/dailymotion.php';
|
32 |
+
require_once $this->plugin_path . 'includes/shortcodes/audio.php';
|
33 |
+
require_once $this->plugin_path . 'includes/shortcodes/video.php';
|
34 |
+
require_once $this->plugin_path . 'includes/shortcodes/table.php';
|
35 |
+
require_once $this->plugin_path . 'includes/shortcodes/permalink.php';
|
36 |
+
require_once $this->plugin_path . 'includes/shortcodes/members.php';
|
37 |
+
require_once $this->plugin_path . 'includes/shortcodes/guests.php';
|
38 |
+
require_once $this->plugin_path . 'includes/shortcodes/feed.php';
|
39 |
+
require_once $this->plugin_path . 'includes/shortcodes/menu.php';
|
40 |
+
require_once $this->plugin_path . 'includes/shortcodes/subpages.php';
|
41 |
+
require_once $this->plugin_path . 'includes/shortcodes/siblings.php';
|
42 |
+
require_once $this->plugin_path . 'includes/shortcodes/document.php';
|
43 |
+
require_once $this->plugin_path . 'includes/shortcodes/gmap.php';
|
44 |
+
require_once $this->plugin_path . 'includes/shortcodes/slider.php';
|
45 |
+
require_once $this->plugin_path . 'includes/shortcodes/carousel.php';
|
46 |
+
require_once $this->plugin_path . 'includes/shortcodes/custom_gallery.php';
|
47 |
+
require_once $this->plugin_path . 'includes/shortcodes/posts.php';
|
48 |
+
require_once $this->plugin_path . 'includes/shortcodes/dummy_text.php';
|
49 |
+
require_once $this->plugin_path . 'includes/shortcodes/dummy_image.php';
|
50 |
+
require_once $this->plugin_path . 'includes/shortcodes/animate.php';
|
51 |
+
require_once $this->plugin_path . 'includes/shortcodes/meta.php';
|
52 |
+
require_once $this->plugin_path . 'includes/shortcodes/user.php';
|
53 |
+
require_once $this->plugin_path . 'includes/shortcodes/post.php';
|
54 |
+
require_once $this->plugin_path . 'includes/shortcodes/template.php';
|
55 |
+
require_once $this->plugin_path . 'includes/shortcodes/qrcode.php';
|
56 |
+
require_once $this->plugin_path . 'includes/shortcodes/scheduler.php';
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'accordion',
|
5 |
+
'callback' => 'su_shortcode_accordion',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/accordion.svg',
|
7 |
+
'name' => __( 'Accordion', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'required_child' => 'spoiler',
|
11 |
+
'atts' => array(
|
12 |
+
'class' => array(
|
13 |
+
'type' => 'extra_css_class',
|
14 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
16 |
+
'default' => '',
|
17 |
+
),
|
18 |
+
),
|
19 |
+
'content' => array(
|
20 |
+
'id' => 'spoiler',
|
21 |
+
'number' => 3,
|
22 |
+
),
|
23 |
+
'desc' => __( 'Accordion with spoilers', 'shortcodes-ultimate' ),
|
24 |
+
'note' => __( 'Did you know that you can wrap multiple spoilers with [accordion] shortcode to create accordion effect?', 'shortcodes-ultimate' ),
|
25 |
+
'example' => 'spoilers',
|
26 |
+
'icon' => 'list',
|
27 |
+
) );
|
28 |
+
|
29 |
+
function su_shortcode_accordion( $atts = null, $content = null ) {
|
30 |
+
|
31 |
+
$atts = shortcode_atts( array( 'class' => '' ), $atts, 'accordion' );
|
32 |
+
|
33 |
+
return '<div class="su-accordion' . su_get_css_class( $atts ) . '">' . do_shortcode( $content ) . '</div>';
|
34 |
+
|
35 |
+
}
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'animate',
|
5 |
+
'callback' => 'su_shortcode_animate',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/animate.svg',
|
7 |
+
'name' => __( 'Animation', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'type' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array_combine( su_get_config( 'animations' ), su_get_config( 'animations' ) ),
|
14 |
+
'default' => 'bounceIn',
|
15 |
+
'name' => __( 'Animation', 'shortcodes-ultimate' ),
|
16 |
+
'desc' => __( 'Select animation type', 'shortcodes-ultimate' )
|
17 |
+
),
|
18 |
+
'duration' => array(
|
19 |
+
'type' => 'slider',
|
20 |
+
'min' => 0,
|
21 |
+
'max' => 20,
|
22 |
+
'step' => 0.5,
|
23 |
+
'default' => 1,
|
24 |
+
'name' => __( 'Duration', 'shortcodes-ultimate' ),
|
25 |
+
'desc' => __( 'Animation duration (seconds)', 'shortcodes-ultimate' )
|
26 |
+
),
|
27 |
+
'delay' => array(
|
28 |
+
'type' => 'slider',
|
29 |
+
'min' => 0,
|
30 |
+
'max' => 20,
|
31 |
+
'step' => 0.5,
|
32 |
+
'default' => 0,
|
33 |
+
'name' => __( 'Delay', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'Animation delay (seconds)', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'inline' => array(
|
37 |
+
'type' => 'bool',
|
38 |
+
'default' => 'no',
|
39 |
+
'name' => __( 'Inline', 'shortcodes-ultimate' ),
|
40 |
+
'desc' => __( 'This parameter determines what HTML tag will be used for animation wrapper. Turn this option to YES and animated element will be wrapped in SPAN instead of DIV. Useful for inline animations, like buttons', 'shortcodes-ultimate' )
|
41 |
+
),
|
42 |
+
'class' => array(
|
43 |
+
'type' => 'extra_css_class',
|
44 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
45 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
46 |
+
'default' => '',
|
47 |
+
),
|
48 |
+
),
|
49 |
+
'content' => __( 'Animated content', 'shortcodes-ultimate' ),
|
50 |
+
'desc' => __( 'Wrapper for animation. Any nested element will be animated', 'shortcodes-ultimate' ),
|
51 |
+
'example' => 'animations',
|
52 |
+
'icon' => 'bolt',
|
53 |
+
) );
|
54 |
+
|
55 |
+
function su_shortcode_animate( $atts = null, $content = null ) {
|
56 |
+
$atts = shortcode_atts( array(
|
57 |
+
'type' => 'bounceIn',
|
58 |
+
'duration' => 1,
|
59 |
+
'delay' => 0,
|
60 |
+
'inline' => 'no',
|
61 |
+
'class' => ''
|
62 |
+
), $atts, 'animate' );
|
63 |
+
$tag = ( $atts['inline'] === 'yes' ) ? 'span' : 'div';
|
64 |
+
$time = '-webkit-animation-duration:' . $atts['duration'] . 's;-webkit-animation-delay:' . $atts['delay'] . 's;animation-duration:' . $atts['duration'] . 's;animation-delay:' . $atts['delay'] . 's;';
|
65 |
+
$return = '<' . $tag . ' class="su-animate' . su_get_css_class( $atts ) . '" style="visibility:hidden;' . $time . '" data-animation="' . $atts['type'] . '" data-duration="' . $atts['duration'] . '" data-delay="' . $atts['delay'] . '">' . do_shortcode( $content ) . '</' . $tag . '>';
|
66 |
+
su_query_asset( 'css', 'animate' );
|
67 |
+
su_query_asset( 'js', 'jquery' );
|
68 |
+
su_query_asset( 'js', 'jquery-inview' );
|
69 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
70 |
+
return $return;
|
71 |
+
}
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'audio',
|
5 |
+
'callback' => 'su_shortcode_audio',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/audio.svg',
|
7 |
+
'name' => __( 'Audio', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'type' => 'upload',
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'File', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Audio file url. Supported formats: mp3, ogg', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'width' => array(
|
18 |
+
'values' => array(),
|
19 |
+
'default' => '100%',
|
20 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'Player width. You can specify width in percents and player will be responsive. Example values: <b%value>200px</b>, <b%value>100%</b>', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'autoplay' => array(
|
24 |
+
'type' => 'bool',
|
25 |
+
'default' => 'no',
|
26 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Play file automatically when page is loaded', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'loop' => array(
|
30 |
+
'type' => 'bool',
|
31 |
+
'default' => 'no',
|
32 |
+
'name' => __( 'Loop', 'shortcodes-ultimate' ),
|
33 |
+
'desc' => __( 'Repeat when playback is ended', 'shortcodes-ultimate' )
|
34 |
+
),
|
35 |
+
'class' => array(
|
36 |
+
'type' => 'extra_css_class',
|
37 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
39 |
+
'default' => '',
|
40 |
+
),
|
41 |
+
),
|
42 |
+
'desc' => __( 'Custom audio player', 'shortcodes-ultimate' ),
|
43 |
+
'example' => 'media',
|
44 |
+
'icon' => 'play-circle',
|
45 |
+
) );
|
46 |
+
|
47 |
+
function su_shortcode_audio( $atts = null, $content = null ) {
|
48 |
+
|
49 |
+
$atts = shortcode_atts( array(
|
50 |
+
'url' => false,
|
51 |
+
'width' => 'auto',
|
52 |
+
'title' => '',
|
53 |
+
'autoplay' => 'no',
|
54 |
+
'loop' => 'no',
|
55 |
+
'class' => ''
|
56 |
+
), $atts, 'audio' );
|
57 |
+
|
58 |
+
if ( ! $atts['url'] ) {
|
59 |
+
return su_error_message( 'Audio', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
60 |
+
}
|
61 |
+
|
62 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
63 |
+
|
64 |
+
$id = uniqid( 'su_audio_player_' );
|
65 |
+
|
66 |
+
$width = ( $atts['width'] !== 'auto' )
|
67 |
+
? 'max-width:' . $atts['width']
|
68 |
+
: '';
|
69 |
+
|
70 |
+
if ( ! $atts['url'] ) {
|
71 |
+
return su_error_message( 'Audio', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
72 |
+
}
|
73 |
+
|
74 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
75 |
+
su_query_asset( 'js', 'jquery' );
|
76 |
+
su_query_asset( 'js', 'jplayer' );
|
77 |
+
su_query_asset( 'js', 'su-players-shortcodes' );
|
78 |
+
|
79 |
+
return '<div class="su-audio' . su_get_css_class( $atts ) . '" data-id="' . $id . '" data-audio="' . $atts['url'] . '" data-swf="' . plugins_url( 'assets/other/Jplayer.swf', SU_PLUGIN_FILE ) . '" data-autoplay="' . $atts['autoplay'] . '" data-loop="' . $atts['loop'] . '" style="' . $width . '"><div id="' . $id . '" class="jp-jplayer"></div><div id="' . $id . '_container" class="jp-audio"><div class="jp-type-single"><div class="jp-gui jp-interface"><div class="jp-controls"><span class="jp-play"></span><span class="jp-pause"></span><span class="jp-stop"></span><span class="jp-mute"></span><span class="jp-unmute"></span><span class="jp-volume-max"></span></div><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div><div class="jp-current-time"></div><div class="jp-duration"></div></div><div class="jp-title">' . $atts['title'] . '</div></div></div></div>';
|
80 |
+
|
81 |
+
}
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'box',
|
5 |
+
'callback' => 'su_shortcode_box',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/box.svg',
|
7 |
+
'name' => __( 'Box', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'atts' => array(
|
11 |
+
'title' => array(
|
12 |
+
'values' => array( ),
|
13 |
+
'default' => __( 'Box title', 'shortcodes-ultimate' ),
|
14 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ), 'desc' => __( 'Text for the box title', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'style' => array(
|
17 |
+
'type' => 'select',
|
18 |
+
'values' => array(
|
19 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
20 |
+
'soft' => __( 'Soft', 'shortcodes-ultimate' ),
|
21 |
+
'glass' => __( 'Glass', 'shortcodes-ultimate' ),
|
22 |
+
'bubbles' => __( 'Bubbles', 'shortcodes-ultimate' ),
|
23 |
+
'noise' => __( 'Noise', 'shortcodes-ultimate' )
|
24 |
+
),
|
25 |
+
'default' => 'default',
|
26 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Box style preset', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'box_color' => array(
|
30 |
+
'type' => 'color',
|
31 |
+
'values' => array( ),
|
32 |
+
'default' => '#333333',
|
33 |
+
'name' => __( 'Color', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'Color for the box title and borders', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'title_color' => array(
|
37 |
+
'type' => 'color',
|
38 |
+
'values' => array( ),
|
39 |
+
'default' => '#FFFFFF',
|
40 |
+
'name' => __( 'Title text color', 'shortcodes-ultimate' ), 'desc' => __( 'Color for the box title text', 'shortcodes-ultimate' )
|
41 |
+
),
|
42 |
+
'radius' => array(
|
43 |
+
'type' => 'slider',
|
44 |
+
'min' => 0,
|
45 |
+
'max' => 20,
|
46 |
+
'step' => 1,
|
47 |
+
'default' => 3,
|
48 |
+
'name' => __( 'Radius', 'shortcodes-ultimate' ),
|
49 |
+
'desc' => __( 'Box corners radius', 'shortcodes-ultimate' )
|
50 |
+
),
|
51 |
+
'class' => array(
|
52 |
+
'type' => 'extra_css_class',
|
53 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
54 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
55 |
+
'default' => '',
|
56 |
+
),
|
57 |
+
),
|
58 |
+
'content' => __( 'Box content', 'shortcodes-ultimate' ),
|
59 |
+
'desc' => __( 'Colored box with caption', 'shortcodes-ultimate' ),
|
60 |
+
'icon' => 'list-alt',
|
61 |
+
) );
|
62 |
+
|
63 |
+
function su_shortcode_box( $atts = null, $content = null ) {
|
64 |
+
|
65 |
+
$atts = shortcode_atts( array(
|
66 |
+
'title' => __( 'This is box title', 'shortcodes-ultimate' ),
|
67 |
+
'style' => 'default',
|
68 |
+
'box_color' => '#333333',
|
69 |
+
'title_color' => '#FFFFFF',
|
70 |
+
'color' => null, // 3.x
|
71 |
+
'radius' => '3',
|
72 |
+
'class' => ''
|
73 |
+
), $atts, 'box' );
|
74 |
+
|
75 |
+
if ( $atts['color'] !== null ) {
|
76 |
+
$atts['box_color'] = $atts['color'];
|
77 |
+
}
|
78 |
+
|
79 |
+
$atts['radius'] = is_numeric( $atts['radius'] )
|
80 |
+
? intval( $atts['radius'] )
|
81 |
+
: 0;
|
82 |
+
|
83 |
+
$atts['inner_radius'] = $atts['radius'] > 2
|
84 |
+
? $atts['radius'] - 2
|
85 |
+
: 0;
|
86 |
+
|
87 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
88 |
+
|
89 |
+
// Return result
|
90 |
+
return sprintf(
|
91 |
+
'<div class="su-box su-box-style-%1$s%2$s" style="border-color:%3$s;border-radius:%4$spx"><div class="su-box-title" style="background-color:%5$s;color:%6$s;border-top-left-radius:%7$spx;border-top-right-radius:%7$spx">%8$s</div><div class="su-box-content su-clearfix" style="border-bottom-left-radius:%7$spx;border-bottom-right-radius:%7$spx">%9$s</div></div>',
|
92 |
+
esc_attr( $atts['style'] ),
|
93 |
+
su_get_css_class( $atts ),
|
94 |
+
su_hex_shift( $atts['box_color'], 'darker', 20 ),
|
95 |
+
$atts['radius'],
|
96 |
+
$atts['box_color'],
|
97 |
+
$atts['title_color'],
|
98 |
+
$atts['inner_radius'],
|
99 |
+
su_do_attribute( $atts['title'] ),
|
100 |
+
su_do_nested_shortcodes( $content, 'box' )
|
101 |
+
);
|
102 |
+
|
103 |
+
}
|
@@ -0,0 +1,368 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'button',
|
5 |
+
'callback' => 'su_shortcode_button',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/button.svg',
|
7 |
+
'name' => __( 'Button', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'values' => array( ),
|
13 |
+
'default' => get_option( 'home' ),
|
14 |
+
'name' => __( 'Link', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Button link', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'target' => array(
|
18 |
+
'type' => 'select',
|
19 |
+
'values' => array(
|
20 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
21 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'default' => 'self',
|
24 |
+
'name' => __( 'Target', 'shortcodes-ultimate' ),
|
25 |
+
'desc' => __( 'Button link target', 'shortcodes-ultimate' )
|
26 |
+
),
|
27 |
+
'style' => array(
|
28 |
+
'type' => 'select',
|
29 |
+
'values' => array(
|
30 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
31 |
+
'flat' => __( 'Flat', 'shortcodes-ultimate' ),
|
32 |
+
'ghost' => __( 'Ghost', 'shortcodes-ultimate' ),
|
33 |
+
'soft' => __( 'Soft', 'shortcodes-ultimate' ),
|
34 |
+
'glass' => __( 'Glass', 'shortcodes-ultimate' ),
|
35 |
+
'bubbles' => __( 'Bubbles', 'shortcodes-ultimate' ),
|
36 |
+
'noise' => __( 'Noise', 'shortcodes-ultimate' ),
|
37 |
+
'stroked' => __( 'Stroked', 'shortcodes-ultimate' ),
|
38 |
+
'3d' => __( '3D', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'default' => 'default',
|
41 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ), 'desc' => __( 'Button background style preset', 'shortcodes-ultimate' )
|
42 |
+
),
|
43 |
+
'background' => array(
|
44 |
+
'type' => 'color',
|
45 |
+
'values' => array( ),
|
46 |
+
'default' => '#2D89EF',
|
47 |
+
'name' => __( 'Background', 'shortcodes-ultimate' ), 'desc' => __( 'Button background color', 'shortcodes-ultimate' )
|
48 |
+
),
|
49 |
+
'color' => array(
|
50 |
+
'type' => 'color',
|
51 |
+
'values' => array( ),
|
52 |
+
'default' => '#FFFFFF',
|
53 |
+
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
54 |
+
'desc' => __( 'Button text color', 'shortcodes-ultimate' )
|
55 |
+
),
|
56 |
+
'size' => array(
|
57 |
+
'type' => 'slider',
|
58 |
+
'min' => 1,
|
59 |
+
'max' => 20,
|
60 |
+
'step' => 1,
|
61 |
+
'default' => 3,
|
62 |
+
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
63 |
+
'desc' => __( 'Button size', 'shortcodes-ultimate' )
|
64 |
+
),
|
65 |
+
'wide' => array(
|
66 |
+
'type' => 'bool',
|
67 |
+
'default' => 'no',
|
68 |
+
'name' => __( 'Fluid', 'shortcodes-ultimate' ), 'desc' => __( 'Fluid buttons has 100% width', 'shortcodes-ultimate' )
|
69 |
+
),
|
70 |
+
'center' => array(
|
71 |
+
'type' => 'bool',
|
72 |
+
'default' => 'no',
|
73 |
+
'name' => __( 'Centered', 'shortcodes-ultimate' ), 'desc' => __( 'Is button centered on the page', 'shortcodes-ultimate' )
|
74 |
+
),
|
75 |
+
'radius' => array(
|
76 |
+
'type' => 'select',
|
77 |
+
'values' => array(
|
78 |
+
'auto' => __( 'Auto', 'shortcodes-ultimate' ),
|
79 |
+
'round' => __( 'Round', 'shortcodes-ultimate' ),
|
80 |
+
'0' => __( 'Square', 'shortcodes-ultimate' ),
|
81 |
+
'5' => '5px',
|
82 |
+
'10' => '10px',
|
83 |
+
'20' => '20px'
|
84 |
+
),
|
85 |
+
'default' => 'auto',
|
86 |
+
'name' => __( 'Radius', 'shortcodes-ultimate' ),
|
87 |
+
'desc' => __( 'Radius of button corners. Auto-radius calculation based on button size', 'shortcodes-ultimate' )
|
88 |
+
),
|
89 |
+
'icon' => array(
|
90 |
+
'type' => 'icon',
|
91 |
+
'default' => '',
|
92 |
+
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
93 |
+
'desc' => __( 'You can upload custom icon for this button or pick a built-in icon', 'shortcodes-ultimate' )
|
94 |
+
),
|
95 |
+
'icon_color' => array(
|
96 |
+
'type' => 'color',
|
97 |
+
'default' => '#FFFFFF',
|
98 |
+
'name' => __( 'Icon color', 'shortcodes-ultimate' ),
|
99 |
+
'desc' => __( 'This color will be applied to the selected icon. Does not works with uploaded icons', 'shortcodes-ultimate' )
|
100 |
+
),
|
101 |
+
'text_shadow' => array(
|
102 |
+
'type' => 'shadow',
|
103 |
+
'default' => 'none',
|
104 |
+
'name' => __( 'Text shadow', 'shortcodes-ultimate' ),
|
105 |
+
'desc' => __( 'Button text shadow', 'shortcodes-ultimate' )
|
106 |
+
),
|
107 |
+
'desc' => array(
|
108 |
+
'default' => '',
|
109 |
+
'name' => __( 'Description', 'shortcodes-ultimate' ),
|
110 |
+
'desc' => __( 'Small description under button text. This option is incompatible with icon.', 'shortcodes-ultimate' )
|
111 |
+
),
|
112 |
+
'onclick' => array(
|
113 |
+
'default' => '',
|
114 |
+
'name' => __( 'onClick', 'shortcodes-ultimate' ),
|
115 |
+
'desc' => __( 'Advanced JavaScript code for onClick action', 'shortcodes-ultimate' )
|
116 |
+
),
|
117 |
+
'rel' => array(
|
118 |
+
'default' => '',
|
119 |
+
'name' => __( 'Rel attribute', 'shortcodes-ultimate' ),
|
120 |
+
'desc' => __( 'Here you can add value for the rel attribute.<br>Example values: <b%value>nofollow</b>, <b%value>lightbox</b>', 'shortcodes-ultimate' )
|
121 |
+
),
|
122 |
+
'title' => array(
|
123 |
+
'default' => '',
|
124 |
+
'name' => __( 'Title attribute', 'shortcodes-ultimate' ),
|
125 |
+
'desc' => __( 'Here you can add value for the title attribute', 'shortcodes-ultimate' )
|
126 |
+
),
|
127 |
+
'id' => array(
|
128 |
+
'default' => '',
|
129 |
+
'name' => __( 'Button ID', 'shortcodes-ultimate' ),
|
130 |
+
'desc' => __( 'Custom value for the ID attribute', 'shortcodes-ultimate' )
|
131 |
+
),
|
132 |
+
'class' => array(
|
133 |
+
'type' => 'extra_css_class',
|
134 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
135 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
136 |
+
'default' => '',
|
137 |
+
),
|
138 |
+
),
|
139 |
+
'content' => __( 'Button text', 'shortcodes-ultimate' ),
|
140 |
+
'desc' => __( 'Styled button', 'shortcodes-ultimate' ),
|
141 |
+
'example' => 'buttons',
|
142 |
+
'icon' => 'heart',
|
143 |
+
) );
|
144 |
+
|
145 |
+
function su_shortcode_button( $atts = null, $content = null ) {
|
146 |
+
|
147 |
+
$atts = shortcode_atts( array(
|
148 |
+
'url' => get_option( 'home' ),
|
149 |
+
'link' => null, // 3.x
|
150 |
+
'target' => 'self',
|
151 |
+
'style' => 'default',
|
152 |
+
'background' => '#2D89EF',
|
153 |
+
'color' => '#FFFFFF',
|
154 |
+
'dark' => null, // 3.x
|
155 |
+
'size' => 3,
|
156 |
+
'wide' => 'no',
|
157 |
+
'center' => 'no',
|
158 |
+
'radius' => 'auto',
|
159 |
+
'icon' => false,
|
160 |
+
'icon_color' => '#FFFFFF',
|
161 |
+
'ts_color' => null, // Dep. 4.3.2
|
162 |
+
'ts_pos' => null, // Dep. 4.3.2
|
163 |
+
'text_shadow' => 'none',
|
164 |
+
'desc' => '',
|
165 |
+
'onclick' => '',
|
166 |
+
'rel' => '',
|
167 |
+
'title' => '',
|
168 |
+
'id' => '',
|
169 |
+
'class' => ''
|
170 |
+
), $atts, 'button' );
|
171 |
+
|
172 |
+
if ( $atts['link'] !== null ) {
|
173 |
+
$atts['url'] = $atts['link'];
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( $atts['dark'] !== null ) {
|
177 |
+
$atts['background'] = $atts['color'];
|
178 |
+
$atts['color'] = ( $atts['dark'] ) ? '#000' : '#fff';
|
179 |
+
}
|
180 |
+
|
181 |
+
// 3.x
|
182 |
+
if ( is_numeric( $atts['style'] ) ) {
|
183 |
+
$atts['style'] = str_replace( array( '1', '2', '3', '4', '5' ), array( 'default', 'glass', 'bubbles', 'noise', 'stroked' ), $atts['style'] );
|
184 |
+
}
|
185 |
+
|
186 |
+
// Prepare vars
|
187 |
+
$a_css = array();
|
188 |
+
$span_css = array();
|
189 |
+
$img_css = array();
|
190 |
+
$small_css = array();
|
191 |
+
$radius = '0px';
|
192 |
+
$before = $after = '';
|
193 |
+
|
194 |
+
// Text shadow values
|
195 |
+
$shadows = array(
|
196 |
+
'none' => '0 0',
|
197 |
+
'top' => '0 -1px',
|
198 |
+
'right' => '1px 0',
|
199 |
+
'bottom' => '0 1px',
|
200 |
+
'left' => '-1px 0',
|
201 |
+
'top-right' => '1px -1px',
|
202 |
+
'top-left' => '-1px -1px',
|
203 |
+
'bottom-right' => '1px 1px',
|
204 |
+
'bottom-left' => '-1px 1px'
|
205 |
+
);
|
206 |
+
|
207 |
+
// Common styles for button
|
208 |
+
$styles = array(
|
209 |
+
'size' => round( ( $atts['size'] + 7 ) * 1.3 ),
|
210 |
+
'ts_color' => ( $atts['ts_color'] === 'light' ) ? su_hex_shift( $atts['background'], 'lighter', 50 ) : su_hex_shift( $atts['background'], 'darker', 40 ),
|
211 |
+
'ts_pos' => ( $atts['ts_pos'] !== null ) ? $shadows[$atts['ts_pos']] : $shadows['none']
|
212 |
+
);
|
213 |
+
|
214 |
+
// Calculate border-radius
|
215 |
+
if ( $atts['radius'] == 'auto' ) {
|
216 |
+
$radius = round( $atts['size'] + 2 ) . 'px';
|
217 |
+
}
|
218 |
+
elseif ( $atts['radius'] == 'round' ) {
|
219 |
+
$radius = round( ( ( $atts['size'] * 2 ) + 2 ) * 2 + $styles['size'] ) . 'px';
|
220 |
+
}
|
221 |
+
elseif ( is_numeric( $atts['radius'] ) ) {
|
222 |
+
$radius = intval( $atts['radius'] ) . 'px';
|
223 |
+
}
|
224 |
+
|
225 |
+
// CSS rules for <a> tag
|
226 |
+
$a_rules = array(
|
227 |
+
'color' => $atts['color'],
|
228 |
+
'background-color' => $atts['background'],
|
229 |
+
'border-color' => su_hex_shift( $atts['background'], 'darker', 20 ),
|
230 |
+
'border-radius' => $radius,
|
231 |
+
'-moz-border-radius' => $radius,
|
232 |
+
'-webkit-border-radius' => $radius
|
233 |
+
);
|
234 |
+
|
235 |
+
// CSS rules for <span> tag
|
236 |
+
$span_rules = array(
|
237 |
+
'color' => $atts['color'],
|
238 |
+
'padding' => ( $atts['icon'] ) ? round( ( $atts['size'] ) / 2 + 4 ) . 'px ' . round( $atts['size'] * 2 + 10 ) . 'px' : '0px ' . round( $atts['size'] * 2 + 10 ) . 'px',
|
239 |
+
'font-size' => $styles['size'] . 'px',
|
240 |
+
'line-height' => ( $atts['icon'] ) ? round( $styles['size'] * 1.5 ) . 'px' : round( $styles['size'] * 2 ) . 'px',
|
241 |
+
'border-color' => su_hex_shift( $atts['background'], 'lighter', 30 ),
|
242 |
+
'border-radius' => $radius,
|
243 |
+
'-moz-border-radius' => $radius,
|
244 |
+
'-webkit-border-radius' => $radius,
|
245 |
+
'text-shadow' => $styles['ts_pos'] . ' 1px ' . $styles['ts_color'],
|
246 |
+
'-moz-text-shadow' => $styles['ts_pos'] . ' 1px ' . $styles['ts_color'],
|
247 |
+
'-webkit-text-shadow' => $styles['ts_pos'] . ' 1px ' . $styles['ts_color']
|
248 |
+
);
|
249 |
+
|
250 |
+
// Apply new text-shadow value
|
251 |
+
if ( $atts['ts_color'] === null && $atts['ts_pos'] === null ) {
|
252 |
+
$span_rules['text-shadow'] = $atts['text_shadow'];
|
253 |
+
$span_rules['-moz-text-shadow'] = $atts['text_shadow'];
|
254 |
+
$span_rules['-webkit-text-shadow'] = $atts['text_shadow'];
|
255 |
+
}
|
256 |
+
|
257 |
+
// CSS rules for <img> tag
|
258 |
+
$img_rules = array(
|
259 |
+
'width' => round( $styles['size'] * 1.5 ) . 'px',
|
260 |
+
'height' => round( $styles['size'] * 1.5 ) . 'px'
|
261 |
+
);
|
262 |
+
|
263 |
+
// CSS rules for <small> tag
|
264 |
+
$small_rules = array(
|
265 |
+
'padding-bottom' => round( ( $atts['size'] ) / 2 + 4 ) . 'px',
|
266 |
+
'color' => $atts['color']
|
267 |
+
);
|
268 |
+
|
269 |
+
// Create style attr value for <a> tag
|
270 |
+
foreach ( $a_rules as $a_rule => $a_value ) {
|
271 |
+
$a_css[] = $a_rule . ':' . $a_value;
|
272 |
+
}
|
273 |
+
|
274 |
+
// Create style attr value for <span> tag
|
275 |
+
foreach ( $span_rules as $span_rule => $span_value ) {
|
276 |
+
$span_css[] = $span_rule . ':' . $span_value;
|
277 |
+
}
|
278 |
+
|
279 |
+
// Create style attr value for <img> tag
|
280 |
+
foreach ( $img_rules as $img_rule => $img_value ) {
|
281 |
+
$img_css[] = $img_rule . ':' . $img_value;
|
282 |
+
}
|
283 |
+
|
284 |
+
// Create style attr value for <img> tag
|
285 |
+
foreach ( $small_rules as $small_rule => $small_value ) {
|
286 |
+
$small_css[] = $small_rule . ':' . $small_value;
|
287 |
+
}
|
288 |
+
|
289 |
+
// Prepare button classes
|
290 |
+
$classes = array( 'su-button', 'su-button-style-' . $atts['style'] );
|
291 |
+
|
292 |
+
// Additional classes
|
293 |
+
if ( $atts['class'] ) {
|
294 |
+
$classes[] = $atts['class'];
|
295 |
+
}
|
296 |
+
|
297 |
+
// Wide class
|
298 |
+
if ( $atts['wide'] === 'yes' ) {
|
299 |
+
$classes[] = 'su-button-wide';
|
300 |
+
}
|
301 |
+
|
302 |
+
// Prepare icon
|
303 |
+
if ( $atts['icon'] ) {
|
304 |
+
|
305 |
+
if ( strpos( $atts['icon'], 'icon:' ) !== false ) {
|
306 |
+
|
307 |
+
$icon = '<i class="fa fa-' . trim( str_replace( 'icon:', '', $atts['icon'] ) ) . '" style="font-size:' . $styles['size'] . 'px;color:' . $atts['icon_color'] . '"></i>';
|
308 |
+
|
309 |
+
su_query_asset( 'css', 'font-awesome' );
|
310 |
+
|
311 |
+
}
|
312 |
+
else {
|
313 |
+
$icon = '<img src="' . $atts['icon'] . '" alt="' . esc_attr( $content ) . '" style="' . implode( $img_css, ';' ) . '" />';
|
314 |
+
}
|
315 |
+
|
316 |
+
}
|
317 |
+
else {
|
318 |
+
$icon = '';
|
319 |
+
}
|
320 |
+
|
321 |
+
// Prepare <small> with description
|
322 |
+
$desc = $atts['desc']
|
323 |
+
? '<small style="' . implode( $small_css, ';' ) . '">' . su_do_attribute( $atts['desc'] ) . '</small>'
|
324 |
+
: '';
|
325 |
+
|
326 |
+
// Wrap with div if button centered
|
327 |
+
if ( $atts['center'] === 'yes' ) {
|
328 |
+
$before .= '<div class="su-button-center">';
|
329 |
+
$after .= '</div>';
|
330 |
+
}
|
331 |
+
|
332 |
+
// Replace icon marker in content,
|
333 |
+
// add float-icon class to rearrange margins
|
334 |
+
if ( strpos( $content, '%icon%' ) !== false ) {
|
335 |
+
$content = str_replace( '%icon%', $icon, $content );
|
336 |
+
$classes[] = 'su-button-float-icon';
|
337 |
+
}
|
338 |
+
|
339 |
+
// Button text has no icon marker, append icon to begin of the text
|
340 |
+
else {
|
341 |
+
$content = $icon . ' ' . $content;
|
342 |
+
}
|
343 |
+
|
344 |
+
// Prepare onclick action
|
345 |
+
$atts['onclick'] = $atts['onclick']
|
346 |
+
? ' onClick="' . $atts['onclick'] . '"'
|
347 |
+
: '';
|
348 |
+
|
349 |
+
// Prepare rel attribute
|
350 |
+
$atts['rel'] = $atts['rel']
|
351 |
+
? ' rel="' . $atts['rel'] . '"'
|
352 |
+
: '';
|
353 |
+
|
354 |
+
// Prepare title attribute
|
355 |
+
$atts['title'] = $atts['title']
|
356 |
+
? ' title="' . su_do_attribute( $atts['title'] ) . '"'
|
357 |
+
: '';
|
358 |
+
|
359 |
+
// Add ID attribute
|
360 |
+
$atts['id'] = ! empty( $atts['id'] )
|
361 |
+
? sprintf( ' id="%s"', esc_attr( $atts['id'] ) )
|
362 |
+
: '';
|
363 |
+
|
364 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
365 |
+
|
366 |
+
return $before . '<a href="' . su_do_attribute( $atts['url'] ) . '" class="' . implode( $classes, ' ' ) . '" style="' . implode( $a_css, ';' ) . '" target="_' . $atts['target'] . '"' . $atts['onclick'] . $atts['rel'] . $atts['title'] . $atts['id'] . '><span style="' . implode( $span_css, ';' ) . '">' . do_shortcode( stripcslashes( $content ) ) . $desc . '</span></a>' . $after;
|
367 |
+
|
368 |
+
}
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'carousel',
|
5 |
+
'callback' => 'su_shortcode_carousel',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/carousel.svg',
|
7 |
+
'name' => __( 'Carousel', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'gallery',
|
10 |
+
'atts' => array(
|
11 |
+
'source' => array(
|
12 |
+
'type' => 'image_source',
|
13 |
+
'default' => 'none',
|
14 |
+
'name' => __( 'Source', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'limit' => array(
|
18 |
+
'type' => 'slider',
|
19 |
+
'min' => -1,
|
20 |
+
'max' => 100,
|
21 |
+
'step' => 1,
|
22 |
+
'default' => 20,
|
23 |
+
'name' => __( 'Limit', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => __( 'Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'shortcodes-ultimate' )
|
25 |
+
),
|
26 |
+
'link' => array(
|
27 |
+
'type' => 'select',
|
28 |
+
'values' => array(
|
29 |
+
'none' => __( 'None', 'shortcodes-ultimate' ),
|
30 |
+
'image' => __( 'Full-size image', 'shortcodes-ultimate' ),
|
31 |
+
'lightbox' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
32 |
+
'custom' => __( 'Slide link (added in media editor)', 'shortcodes-ultimate' ),
|
33 |
+
'attachment' => __( 'Attachment page', 'shortcodes-ultimate' ),
|
34 |
+
'post' => __( 'Post permalink', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'default' => 'none',
|
37 |
+
'name' => __( 'Links', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Select which links will be used for images in this gallery', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'target' => array(
|
41 |
+
'type' => 'select',
|
42 |
+
'values' => array(
|
43 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
44 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'default' => 'self',
|
47 |
+
'name' => __( 'Links target', 'shortcodes-ultimate' ),
|
48 |
+
'desc' => __( 'Open links in', 'shortcodes-ultimate' )
|
49 |
+
),
|
50 |
+
'width' => array(
|
51 |
+
'type' => 'slider',
|
52 |
+
'min' => 100,
|
53 |
+
'max' => 1600,
|
54 |
+
'step' => 20,
|
55 |
+
'default' => 600,
|
56 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
57 |
+
'desc' => __( 'Carousel width (in pixels)', 'shortcodes-ultimate' )
|
58 |
+
),
|
59 |
+
'height' => array(
|
60 |
+
'type' => 'slider',
|
61 |
+
'min' => 20,
|
62 |
+
'max' => 1600,
|
63 |
+
'step' => 20,
|
64 |
+
'default' => 100,
|
65 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
66 |
+
'desc' => __( 'Carousel height (in pixels)', 'shortcodes-ultimate' )
|
67 |
+
),
|
68 |
+
'responsive' => array(
|
69 |
+
'type' => 'bool',
|
70 |
+
'default' => 'yes',
|
71 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
72 |
+
'desc' => __( 'Ignore width and height parameters and make carousel responsive', 'shortcodes-ultimate' )
|
73 |
+
),
|
74 |
+
'items' => array(
|
75 |
+
'type' => 'number',
|
76 |
+
'min' => 1,
|
77 |
+
'max' => 20,
|
78 |
+
'step' => 1,
|
79 |
+
'default' => 3,
|
80 |
+
'name' => __( 'Items to show', 'shortcodes-ultimate' ),
|
81 |
+
'desc' => __( 'How much carousel items is visible', 'shortcodes-ultimate' )
|
82 |
+
),
|
83 |
+
'scroll' => array(
|
84 |
+
'type' => 'number',
|
85 |
+
'min' => 1,
|
86 |
+
'max' => 20,
|
87 |
+
'step' => 1, 'default' => 1,
|
88 |
+
'name' => __( 'Scroll number', 'shortcodes-ultimate' ),
|
89 |
+
'desc' => __( 'How much items are scrolled in one transition', 'shortcodes-ultimate' )
|
90 |
+
),
|
91 |
+
'title' => array(
|
92 |
+
'type' => 'bool',
|
93 |
+
'default' => 'yes',
|
94 |
+
'name' => __( 'Show titles', 'shortcodes-ultimate' ), 'desc' => __( 'Display titles for each item', 'shortcodes-ultimate' )
|
95 |
+
),
|
96 |
+
'centered' => array(
|
97 |
+
'type' => 'bool',
|
98 |
+
'default' => 'yes',
|
99 |
+
'name' => __( 'Center', 'shortcodes-ultimate' ), 'desc' => __( 'Is carousel centered on the page', 'shortcodes-ultimate' )
|
100 |
+
),
|
101 |
+
'arrows' => array(
|
102 |
+
'type' => 'bool',
|
103 |
+
'default' => 'yes',
|
104 |
+
'name' => __( 'Arrows', 'shortcodes-ultimate' ), 'desc' => __( 'Show left and right arrows', 'shortcodes-ultimate' )
|
105 |
+
),
|
106 |
+
'pages' => array(
|
107 |
+
'type' => 'bool',
|
108 |
+
'default' => 'no',
|
109 |
+
'name' => __( 'Pagination', 'shortcodes-ultimate' ),
|
110 |
+
'desc' => __( 'Show pagination', 'shortcodes-ultimate' )
|
111 |
+
),
|
112 |
+
'mousewheel' => array(
|
113 |
+
'type' => 'bool',
|
114 |
+
'default' => 'yes', 'name' => __( 'Mouse wheel control', 'shortcodes-ultimate' ),
|
115 |
+
'desc' => __( 'Allow to rotate carousel with mouse wheel', 'shortcodes-ultimate' )
|
116 |
+
),
|
117 |
+
'autoplay' => array(
|
118 |
+
'type' => 'number',
|
119 |
+
'min' => 0,
|
120 |
+
'max' => 100000,
|
121 |
+
'step' => 100,
|
122 |
+
'default' => 5000,
|
123 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
124 |
+
'desc' => __( 'Choose interval between auto animations. Set to 0 to disable autoplay', 'shortcodes-ultimate' )
|
125 |
+
),
|
126 |
+
'speed' => array(
|
127 |
+
'type' => 'number',
|
128 |
+
'min' => 0,
|
129 |
+
'max' => 20000,
|
130 |
+
'step' => 100,
|
131 |
+
'default' => 600,
|
132 |
+
'name' => __( 'Speed', 'shortcodes-ultimate' ), 'desc' => __( 'Specify animation speed', 'shortcodes-ultimate' )
|
133 |
+
),
|
134 |
+
'class' => array(
|
135 |
+
'type' => 'extra_css_class',
|
136 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
137 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
138 |
+
'default' => '',
|
139 |
+
),
|
140 |
+
),
|
141 |
+
'desc' => __( 'Customizable image carousel', 'shortcodes-ultimate' ),
|
142 |
+
'icon' => 'picture-o',
|
143 |
+
) );
|
144 |
+
|
145 |
+
function su_shortcode_carousel( $atts = null, $content = null ) {
|
146 |
+
$return = '';
|
147 |
+
$atts = shortcode_atts( array(
|
148 |
+
'source' => 'none',
|
149 |
+
'limit' => 20,
|
150 |
+
'gallery' => null, // Dep. 4.3.2
|
151 |
+
'link' => 'none',
|
152 |
+
'target' => 'self',
|
153 |
+
'width' => 600,
|
154 |
+
'height' => 100,
|
155 |
+
'responsive' => 'yes',
|
156 |
+
'items' => 3,
|
157 |
+
'scroll' => 1,
|
158 |
+
'title' => 'yes',
|
159 |
+
'centered' => 'yes',
|
160 |
+
'arrows' => 'yes',
|
161 |
+
'pages' => 'no',
|
162 |
+
'mousewheel' => 'yes',
|
163 |
+
'autoplay' => 3000,
|
164 |
+
'speed' => 600,
|
165 |
+
'class' => ''
|
166 |
+
), $atts, 'carousel' );
|
167 |
+
// Get slides
|
168 |
+
$slides = (array) su_get_slides( $atts );
|
169 |
+
// Loop slides
|
170 |
+
if ( count( $slides ) ) {
|
171 |
+
// Prepare unique ID
|
172 |
+
$id = uniqid( 'su_carousel_' );
|
173 |
+
// Links target
|
174 |
+
$target = ( $atts['target'] === 'yes' || $atts['target'] === 'blank' ) ? ' target="_blank"' : '';
|
175 |
+
// Centered class
|
176 |
+
$centered = ( $atts['centered'] === 'yes' ) ? ' su-carousel-centered' : '';
|
177 |
+
// Wheel control
|
178 |
+
$mousewheel = ( $atts['mousewheel'] === 'yes' ) ? 'true' : 'false';
|
179 |
+
// Prepare width and height
|
180 |
+
$size = ( $atts['responsive'] === 'yes' ) ? 'width:100%' : 'width:' . intval( $atts['width'] ) . 'px;height:' . intval( $atts['height'] ) . 'px';
|
181 |
+
// Add lightbox class
|
182 |
+
if ( $atts['link'] === 'lightbox' ) $atts['class'] .= ' su-lightbox-gallery';
|
183 |
+
// Open slider
|
184 |
+
$return .= '<div id="' . $id . '" class="su-carousel' . $centered . ' su-carousel-pages-' . $atts['pages'] . ' su-carousel-responsive-' . $atts['responsive'] . su_get_css_class( $atts ) . '" style="' . $size . '" data-autoplay="' . $atts['autoplay'] . '" data-speed="' . $atts['speed'] . '" data-mousewheel="' . $mousewheel . '" data-items="' . $atts['items'] . '" data-scroll="' . $atts['scroll'] . '"><div class="su-carousel-slides">';
|
185 |
+
// Create slides
|
186 |
+
foreach ( (array) $slides as $slide ) {
|
187 |
+
// Crop the image
|
188 |
+
$image = su_image_resize( $slide['image'], ( round( $atts['width'] / $atts['items'] ) - 18 ), $atts['height'] );
|
189 |
+
// Prepare slide title
|
190 |
+
$title = ( $atts['title'] === 'yes' && $slide['title'] ) ? '<span class="su-carousel-slide-title">' . stripslashes( $slide['title'] ) . '</span>' : '';
|
191 |
+
// Open slide
|
192 |
+
$return .= '<div class="su-carousel-slide">';
|
193 |
+
// Slide content with link
|
194 |
+
if ( $slide['link'] ) $return .= '<a href="' . $slide['link'] . '"' . $target . ' title="' . esc_attr( $slide['title'] ) . '"><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
195 |
+
// Slide content without link
|
196 |
+
else $return .= '<a><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
197 |
+
// Close slide
|
198 |
+
$return .= '</div>';
|
199 |
+
}
|
200 |
+
// Close slides
|
201 |
+
$return .= '</div>';
|
202 |
+
// Open nav section
|
203 |
+
$return .= '<div class="su-carousel-nav">';
|
204 |
+
// Append direction nav
|
205 |
+
if ( $atts['arrows'] === 'yes'
|
206 |
+
) $return .= '<div class="su-carousel-direction"><span class="su-carousel-prev"></span><span class="su-carousel-next"></span></div>';
|
207 |
+
// Append pagination nav
|
208 |
+
$return .= '<div class="su-carousel-pagination"></div>';
|
209 |
+
// Close nav section
|
210 |
+
$return .= '</div>';
|
211 |
+
// Close slider
|
212 |
+
$return .= '</div>';
|
213 |
+
// Add lightbox assets
|
214 |
+
if ( $atts['link'] === 'lightbox' ) {
|
215 |
+
su_query_asset( 'css', 'magnific-popup' );
|
216 |
+
su_query_asset( 'js', 'magnific-popup' );
|
217 |
+
}
|
218 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
219 |
+
su_query_asset( 'js', 'jquery' );
|
220 |
+
su_query_asset( 'js', 'swiper' );
|
221 |
+
su_query_asset( 'js', 'su-galleries-shortcodes' );
|
222 |
+
}
|
223 |
+
// Slides not found
|
224 |
+
else $return = su_error_message( 'Carousel', __( 'images not found', 'shortcodes-ultimate' ) );
|
225 |
+
return $return;
|
226 |
+
}
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'column',
|
5 |
+
'callback' => 'su_shortcode_column',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/column.svg',
|
7 |
+
'name' => __( 'Column', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'required_parent' => 'row',
|
11 |
+
'atts' => array(
|
12 |
+
'size' => array(
|
13 |
+
'type' => 'select',
|
14 |
+
'values' => array(
|
15 |
+
'1/1' => __( 'Full width', 'shortcodes-ultimate' ),
|
16 |
+
'1/2' => __( 'One half', 'shortcodes-ultimate' ),
|
17 |
+
'1/3' => __( 'One third', 'shortcodes-ultimate' ),
|
18 |
+
'2/3' => __( 'Two third', 'shortcodes-ultimate' ),
|
19 |
+
'1/4' => __( 'One fourth', 'shortcodes-ultimate' ),
|
20 |
+
'3/4' => __( 'Three fourth', 'shortcodes-ultimate' ),
|
21 |
+
'1/5' => __( 'One fifth', 'shortcodes-ultimate' ),
|
22 |
+
'2/5' => __( 'Two fifth', 'shortcodes-ultimate' ),
|
23 |
+
'3/5' => __( 'Three fifth', 'shortcodes-ultimate' ),
|
24 |
+
'4/5' => __( 'Four fifth', 'shortcodes-ultimate' ),
|
25 |
+
'1/6' => __( 'One sixth', 'shortcodes-ultimate' ),
|
26 |
+
'5/6' => __( 'Five sixth', 'shortcodes-ultimate' )
|
27 |
+
),
|
28 |
+
'default' => '1/2',
|
29 |
+
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
30 |
+
'desc' => __( 'Select column width. This width will be calculated depend page width', 'shortcodes-ultimate' )
|
31 |
+
),
|
32 |
+
'center' => array(
|
33 |
+
'type' => 'bool',
|
34 |
+
'default' => 'no',
|
35 |
+
'name' => __( 'Centered', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'Is this column centered on the page', 'shortcodes-ultimate' )
|
37 |
+
),
|
38 |
+
'class' => array(
|
39 |
+
'type' => 'extra_css_class',
|
40 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
41 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
42 |
+
'default' => '',
|
43 |
+
),
|
44 |
+
),
|
45 |
+
'content' => __( 'Column content', 'shortcodes-ultimate' ),
|
46 |
+
'desc' => __( 'Flexible and responsive columns', 'shortcodes-ultimate' ),
|
47 |
+
'note' => __( 'Did you know that you need to wrap columns with [row] shortcode?', 'shortcodes-ultimate' ),
|
48 |
+
'example' => 'columns',
|
49 |
+
'icon' => 'columns',
|
50 |
+
) );
|
51 |
+
|
52 |
+
function su_shortcode_column( $atts = null, $content = null ) {
|
53 |
+
|
54 |
+
$atts = shortcode_atts( array(
|
55 |
+
'size' => '1/2',
|
56 |
+
'center' => 'no',
|
57 |
+
'last' => null,
|
58 |
+
'class' => ''
|
59 |
+
), $atts, 'column' );
|
60 |
+
|
61 |
+
if ( $atts['last'] !== null && $atts['last'] == '1' ) {
|
62 |
+
$atts['class'] .= ' su-column-last';
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( $atts['center'] === 'yes' ) {
|
66 |
+
$atts['class'] .= ' su-column-centered';
|
67 |
+
}
|
68 |
+
|
69 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
70 |
+
|
71 |
+
return '<div class="su-column su-column-size-' . str_replace( '/', '-', $atts['size'] ) . su_get_css_class( $atts ) . '"><div class="su-column-inner su-clearfix">' . su_do_nested_shortcodes( $content, 'column' ) . '</div></div>';
|
72 |
+
|
73 |
+
}
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'custom_gallery',
|
5 |
+
'callback' => 'su_shortcode_custom_gallery',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/custom_gallery.svg',
|
7 |
+
'name' => __( 'Gallery', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'gallery',
|
10 |
+
'atts' => array(
|
11 |
+
'source' => array(
|
12 |
+
'type' => 'image_source',
|
13 |
+
'default' => 'none',
|
14 |
+
'name' => __( 'Source', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'limit' => array(
|
18 |
+
'type' => 'slider',
|
19 |
+
'min' => -1,
|
20 |
+
'max' => 100,
|
21 |
+
'step' => 1,
|
22 |
+
'default' => 20,
|
23 |
+
'name' => __( 'Limit', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => __( 'Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'shortcodes-ultimate' )
|
25 |
+
),
|
26 |
+
'link' => array(
|
27 |
+
'type' => 'select',
|
28 |
+
'values' => array(
|
29 |
+
'none' => __( 'None', 'shortcodes-ultimate' ),
|
30 |
+
'image' => __( 'Full-size image', 'shortcodes-ultimate' ),
|
31 |
+
'lightbox' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
32 |
+
'custom' => __( 'Slide link (added in media editor)', 'shortcodes-ultimate' ),
|
33 |
+
'attachment' => __( 'Attachment page', 'shortcodes-ultimate' ),
|
34 |
+
'post' => __( 'Post permalink', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'default' => 'none',
|
37 |
+
'name' => __( 'Links', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Select which links will be used for images in this gallery', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'target' => array(
|
41 |
+
'type' => 'select',
|
42 |
+
'values' => array(
|
43 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
44 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'default' => 'self',
|
47 |
+
'name' => __( 'Links target', 'shortcodes-ultimate' ),
|
48 |
+
'desc' => __( 'Open links in', 'shortcodes-ultimate' )
|
49 |
+
),
|
50 |
+
'width' => array(
|
51 |
+
'type' => 'slider',
|
52 |
+
'min' => 10,
|
53 |
+
'max' => 1600,
|
54 |
+
'step' => 10,
|
55 |
+
'default' => 90,
|
56 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ), 'desc' => __( 'Single item width (in pixels)', 'shortcodes-ultimate' )
|
57 |
+
),
|
58 |
+
'height' => array(
|
59 |
+
'type' => 'slider',
|
60 |
+
'min' => 10,
|
61 |
+
'max' => 1600,
|
62 |
+
'step' => 10,
|
63 |
+
'default' => 90,
|
64 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ), 'desc' => __( 'Single item height (in pixels)', 'shortcodes-ultimate' )
|
65 |
+
),
|
66 |
+
'title' => array(
|
67 |
+
'type' => 'select',
|
68 |
+
'values' => array(
|
69 |
+
'never' => __( 'Never', 'shortcodes-ultimate' ),
|
70 |
+
'hover' => __( 'On mouse over', 'shortcodes-ultimate' ),
|
71 |
+
'always' => __( 'Always', 'shortcodes-ultimate' )
|
72 |
+
),
|
73 |
+
'default' => 'hover',
|
74 |
+
'name' => __( 'Show titles', 'shortcodes-ultimate' ),
|
75 |
+
'desc' => __( 'Title display mode', 'shortcodes-ultimate' )
|
76 |
+
),
|
77 |
+
'class' => array(
|
78 |
+
'type' => 'extra_css_class',
|
79 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
80 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
81 |
+
'default' => '',
|
82 |
+
),
|
83 |
+
),
|
84 |
+
'desc' => __( 'Customizable image gallery', 'shortcodes-ultimate' ),
|
85 |
+
'icon' => 'picture-o',
|
86 |
+
) );
|
87 |
+
|
88 |
+
function su_shortcode_custom_gallery( $atts = null, $content = null ) {
|
89 |
+
$return = '';
|
90 |
+
$atts = shortcode_atts( array(
|
91 |
+
'source' => 'none',
|
92 |
+
'limit' => 20,
|
93 |
+
'gallery' => null, // Dep. 4.4.0
|
94 |
+
'link' => 'none',
|
95 |
+
'width' => 90,
|
96 |
+
'height' => 90,
|
97 |
+
'title' => 'hover',
|
98 |
+
'target' => 'self',
|
99 |
+
'class' => ''
|
100 |
+
), $atts, 'custom_gallery' );
|
101 |
+
$slides = (array) su_get_slides( $atts );
|
102 |
+
// Loop slides
|
103 |
+
if ( count( $slides ) ) {
|
104 |
+
// Prepare links target
|
105 |
+
$atts['target'] = ( $atts['target'] === 'yes' || $atts['target'] === 'blank' ) ? ' target="_blank"' : '';
|
106 |
+
// Add lightbox class
|
107 |
+
if ( $atts['link'] === 'lightbox' ) $atts['class'] .= ' su-lightbox-gallery';
|
108 |
+
// Open gallery
|
109 |
+
$return = '<div class="su-custom-gallery su-custom-gallery-title-' . $atts['title'] . su_get_css_class( $atts ) . '">';
|
110 |
+
// Create slides
|
111 |
+
foreach ( $slides as $slide ) {
|
112 |
+
// Crop image
|
113 |
+
$image = su_image_resize( $slide['image'], $atts['width'], $atts['height'] );
|
114 |
+
// Prepare slide title
|
115 |
+
$title = ( $slide['title'] ) ? '<span class="su-custom-gallery-title">' . stripslashes( $slide['title'] ) . '</span>' : '';
|
116 |
+
// Open slide
|
117 |
+
$return .= '<div class="su-custom-gallery-slide">';
|
118 |
+
// Slide content with link
|
119 |
+
if ( $slide['link'] ) $return .= '<a href="' . $slide['link'] . '"' . $atts['target'] . ' title="' . esc_attr( $slide['title'] ) . '"><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" />' . $title . '</a>';
|
120 |
+
// Slide content without link
|
121 |
+
else $return .= '<a><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" />' . $title . '</a>';
|
122 |
+
// Close slide
|
123 |
+
$return .= '</div>';
|
124 |
+
}
|
125 |
+
// Clear floats
|
126 |
+
$return .= '<div class="su-clear"></div>';
|
127 |
+
// Close gallery
|
128 |
+
$return .= '</div>';
|
129 |
+
// Add lightbox assets
|
130 |
+
if ( $atts['link'] === 'lightbox' ) {
|
131 |
+
su_query_asset( 'css', 'magnific-popup' );
|
132 |
+
su_query_asset( 'js', 'jquery' );
|
133 |
+
su_query_asset( 'js', 'magnific-popup' );
|
134 |
+
su_query_asset( 'js', 'su-galleries-shortcodes' );
|
135 |
+
}
|
136 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
137 |
+
}
|
138 |
+
// Slides not found
|
139 |
+
else $return = su_error_message( 'Custom Gallery', __( 'images not found', 'shortcodes-ultimate' ) );
|
140 |
+
return $return;
|
141 |
+
}
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'dailymotion',
|
5 |
+
'callback' => 'su_shortcode_dailymotion',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/dailymotion.svg',
|
7 |
+
'name' => __( 'Dailymotion', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Url of Dailymotion page with video', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'width' => array(
|
17 |
+
'type' => 'slider',
|
18 |
+
'min' => 200,
|
19 |
+
'max' => 1600,
|
20 |
+
'step' => 20,
|
21 |
+
'default' => 600,
|
22 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
23 |
+
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
24 |
+
),
|
25 |
+
'height' => array(
|
26 |
+
'type' => 'slider',
|
27 |
+
'min' => 200,
|
28 |
+
'max' => 1600,
|
29 |
+
'step' => 20,
|
30 |
+
'default' => 400,
|
31 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
32 |
+
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
33 |
+
),
|
34 |
+
'responsive' => array(
|
35 |
+
'type' => 'bool',
|
36 |
+
'default' => 'yes',
|
37 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'autoplay' => array(
|
41 |
+
'type' => 'bool',
|
42 |
+
'default' => 'no',
|
43 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
44 |
+
'desc' => __( 'Start the playback of the video automatically after the player load. May not work on some mobile OS versions', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'background' => array(
|
47 |
+
'type' => 'color',
|
48 |
+
'default' => '#FFC300',
|
49 |
+
'name' => __( 'Background color', 'shortcodes-ultimate' ),
|
50 |
+
'desc' => __( 'HTML color of the background of controls elements', 'shortcodes-ultimate' )
|
51 |
+
),
|
52 |
+
'foreground' => array(
|
53 |
+
'type' => 'color',
|
54 |
+
'default' => '#F7FFFD',
|
55 |
+
'name' => __( 'Foreground color', 'shortcodes-ultimate' ),
|
56 |
+
'desc' => __( 'HTML color of the foreground of controls elements', 'shortcodes-ultimate' )
|
57 |
+
),
|
58 |
+
'highlight' => array(
|
59 |
+
'type' => 'color',
|
60 |
+
'default' => '#171D1B',
|
61 |
+
'name' => __( 'Highlight color', 'shortcodes-ultimate' ),
|
62 |
+
'desc' => __( 'HTML color of the controls elements\' highlights', 'shortcodes-ultimate' )
|
63 |
+
),
|
64 |
+
'logo' => array(
|
65 |
+
'type' => 'bool',
|
66 |
+
'default' => 'yes',
|
67 |
+
'name' => __( 'Show logo', 'shortcodes-ultimate' ),
|
68 |
+
'desc' => __( 'Allows to hide or show the Dailymotion logo', 'shortcodes-ultimate' )
|
69 |
+
),
|
70 |
+
'quality' => array(
|
71 |
+
'type' => 'select',
|
72 |
+
'values' => array(
|
73 |
+
'240' => '240',
|
74 |
+
'380' => '380',
|
75 |
+
'480' => '480',
|
76 |
+
'720' => '720',
|
77 |
+
'1080' => '1080'
|
78 |
+
),
|
79 |
+
'default' => '380',
|
80 |
+
'name' => __( 'Quality', 'shortcodes-ultimate' ),
|
81 |
+
'desc' => __( 'Determines the quality that must be played by default if available', 'shortcodes-ultimate' )
|
82 |
+
),
|
83 |
+
'related' => array(
|
84 |
+
'type' => 'bool',
|
85 |
+
'default' => 'yes',
|
86 |
+
'name' => __( 'Show related videos', 'shortcodes-ultimate' ),
|
87 |
+
'desc' => __( 'Show related videos at the end of the video', 'shortcodes-ultimate' )
|
88 |
+
),
|
89 |
+
'info' => array(
|
90 |
+
'type' => 'bool',
|
91 |
+
'default' => 'yes',
|
92 |
+
'name' => __( 'Show video info', 'shortcodes-ultimate' ),
|
93 |
+
'desc' => __( 'Show videos info (title/author) on the start screen', 'shortcodes-ultimate' )
|
94 |
+
),
|
95 |
+
'class' => array(
|
96 |
+
'type' => 'extra_css_class',
|
97 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
98 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
99 |
+
'default' => '',
|
100 |
+
),
|
101 |
+
),
|
102 |
+
'desc' => __( 'Dailymotion video', 'shortcodes-ultimate' ),
|
103 |
+
'icon' => 'youtube-play',
|
104 |
+
) );
|
105 |
+
|
106 |
+
function su_shortcode_dailymotion( $atts = null, $content = null ) {
|
107 |
+
|
108 |
+
$atts = shortcode_atts( array(
|
109 |
+
'url' => false,
|
110 |
+
'width' => 600,
|
111 |
+
'height' => 400,
|
112 |
+
'responsive' => 'yes',
|
113 |
+
'autoplay' => 'no',
|
114 |
+
'background' => '#FFC300',
|
115 |
+
'foreground' => '#F7FFFD',
|
116 |
+
'highlight' => '#171D1B',
|
117 |
+
'logo' => 'yes',
|
118 |
+
'quality' => '380',
|
119 |
+
'related' => 'yes',
|
120 |
+
'info' => 'yes',
|
121 |
+
'class' => ''
|
122 |
+
), $atts, 'dailymotion' );
|
123 |
+
|
124 |
+
if ( ! $atts['url'] ) {
|
125 |
+
return su_error_message( 'Dailymotion', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
126 |
+
}
|
127 |
+
|
128 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
129 |
+
$id = strtok( basename( $atts['url'] ), '_' );
|
130 |
+
|
131 |
+
if ( ! $id ) {
|
132 |
+
return su_error_message( 'Screenr', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
133 |
+
}
|
134 |
+
|
135 |
+
$params = array();
|
136 |
+
$dm_options = array( 'autoplay', 'background', 'foreground', 'highlight', 'logo', 'quality', 'related', 'info' );
|
137 |
+
|
138 |
+
foreach ( $dm_options as $dm_option ) {
|
139 |
+
$params[] = $dm_option . '=' . str_replace( array( 'yes', 'no', '#' ), array( '1', '0', '' ), $atts[ $dm_option ] );
|
140 |
+
}
|
141 |
+
|
142 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
143 |
+
|
144 |
+
return '<div class="su-dailymotion su-responsive-media-' . $atts['responsive'] . su_get_css_class( $atts ) . '"><iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="//www.dailymotion.com/embed/video/' . $id . '?' . implode( '&', $params ) . '" frameborder="0" allowfullscreen="true"></iframe></div>';
|
145 |
+
|
146 |
+
}
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'divider',
|
5 |
+
'callback' => 'su_shortcode_divider',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/divider.svg',
|
7 |
+
'name' => __( 'Divider', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'top' => array(
|
12 |
+
'type' => 'bool',
|
13 |
+
'default' => 'yes',
|
14 |
+
'name' => __( 'Show TOP link', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Show link to top of the page or not', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'text' => array(
|
18 |
+
'values' => array( ),
|
19 |
+
'default' => __( 'Go to top', 'shortcodes-ultimate' ),
|
20 |
+
'name' => __( 'Link text', 'shortcodes-ultimate' ), 'desc' => __( 'Text for the GO TOP link', 'shortcodes-ultimate' )
|
21 |
+
),
|
22 |
+
'style' => array(
|
23 |
+
'type' => 'select',
|
24 |
+
'values' => array(
|
25 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
26 |
+
'dotted' => __( 'Dotted', 'shortcodes-ultimate' ),
|
27 |
+
'dashed' => __( 'Dashed', 'shortcodes-ultimate' ),
|
28 |
+
'double' => __( 'Double', 'shortcodes-ultimate' )
|
29 |
+
),
|
30 |
+
'default' => 'default',
|
31 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
32 |
+
'desc' => __( 'Choose style for this divider', 'shortcodes-ultimate' )
|
33 |
+
),
|
34 |
+
'divider_color' => array(
|
35 |
+
'type' => 'color',
|
36 |
+
'values' => array( ),
|
37 |
+
'default' => '#999999',
|
38 |
+
'name' => __( 'Divider color', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Pick the color for divider', 'shortcodes-ultimate' )
|
40 |
+
),
|
41 |
+
'link_color' => array(
|
42 |
+
'type' => 'color',
|
43 |
+
'values' => array( ),
|
44 |
+
'default' => '#999999',
|
45 |
+
'name' => __( 'Link color', 'shortcodes-ultimate' ),
|
46 |
+
'desc' => __( 'Pick the color for TOP link', 'shortcodes-ultimate' )
|
47 |
+
),
|
48 |
+
'size' => array(
|
49 |
+
'type' => 'slider',
|
50 |
+
'min' => 0,
|
51 |
+
'max' => 40,
|
52 |
+
'step' => 1,
|
53 |
+
'default' => 3,
|
54 |
+
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
55 |
+
'desc' => __( 'Height of the divider (in pixels)', 'shortcodes-ultimate' )
|
56 |
+
),
|
57 |
+
'margin' => array(
|
58 |
+
'type' => 'slider',
|
59 |
+
'min' => 0,
|
60 |
+
'max' => 200,
|
61 |
+
'step' => 5,
|
62 |
+
'default' => 15,
|
63 |
+
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
64 |
+
'desc' => __( 'Adjust the top and bottom margins of this divider (in pixels)', 'shortcodes-ultimate' )
|
65 |
+
),
|
66 |
+
'class' => array(
|
67 |
+
'type' => 'extra_css_class',
|
68 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
69 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
70 |
+
'default' => '',
|
71 |
+
),
|
72 |
+
),
|
73 |
+
'desc' => __( 'Content divider with optional TOP link', 'shortcodes-ultimate' ),
|
74 |
+
'icon' => 'ellipsis-h',
|
75 |
+
) );
|
76 |
+
|
77 |
+
function su_shortcode_divider( $atts = null, $content = null ) {
|
78 |
+
|
79 |
+
$atts = shortcode_atts( array(
|
80 |
+
'top' => 'yes',
|
81 |
+
'text' => __( 'Go to top', 'shortcodes-ultimate' ),
|
82 |
+
'style' => 'default',
|
83 |
+
'divider_color' => '#999999',
|
84 |
+
'link_color' => '#999999',
|
85 |
+
'size' => '3',
|
86 |
+
'margin' => '15',
|
87 |
+
'class' => ''
|
88 |
+
), $atts, 'divider' );
|
89 |
+
|
90 |
+
// Prepare TOP link
|
91 |
+
$top = $atts['top'] === 'yes'
|
92 |
+
? '<a href="#" style="color:' . $atts['link_color'] . '">' . su_do_attribute( $atts['text'] ) . '</a>'
|
93 |
+
: '';
|
94 |
+
|
95 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
96 |
+
|
97 |
+
return '<div class="su-divider su-divider-style-' . $atts['style'] . su_get_css_class( $atts ) . '" style="margin:' . $atts['margin'] . 'px 0;border-width:' . $atts['size'] . 'px;border-color:' . $atts['divider_color'] . '">' . $top . '</div>';
|
98 |
+
|
99 |
+
}
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'document',
|
5 |
+
'callback' => 'su_shortcode_document',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/document.svg',
|
7 |
+
'name' => __( 'Document', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'type' => 'upload',
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Url to uploaded document. Supported formats: doc, xls, pdf etc.', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'width' => array(
|
18 |
+
'type' => 'slider',
|
19 |
+
'min' => 200,
|
20 |
+
'max' => 1600,
|
21 |
+
'step' => 20,
|
22 |
+
'default' => 600,
|
23 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => __( 'Viewer width', 'shortcodes-ultimate' )
|
25 |
+
),
|
26 |
+
'height' => array(
|
27 |
+
'type' => 'slider',
|
28 |
+
'min' => 200,
|
29 |
+
'max' => 1600,
|
30 |
+
'step' => 20,
|
31 |
+
'default' => 600,
|
32 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
33 |
+
'desc' => __( 'Viewer height', 'shortcodes-ultimate' )
|
34 |
+
),
|
35 |
+
'responsive' => array(
|
36 |
+
'type' => 'bool',
|
37 |
+
'default' => 'yes',
|
38 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Ignore width and height parameters and make viewer responsive', 'shortcodes-ultimate' )
|
40 |
+
),
|
41 |
+
'class' => array(
|
42 |
+
'type' => 'extra_css_class',
|
43 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
44 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
45 |
+
'default' => '',
|
46 |
+
),
|
47 |
+
),
|
48 |
+
'desc' => __( 'Document viewer by Google', 'shortcodes-ultimate' ),
|
49 |
+
'icon' => 'file-text',
|
50 |
+
) );
|
51 |
+
|
52 |
+
function su_shortcode_document( $atts = null, $content = null ) {
|
53 |
+
$atts = shortcode_atts( array(
|
54 |
+
'url' => '',
|
55 |
+
'file' => null, // 3.x
|
56 |
+
'width' => 600,
|
57 |
+
'height' => 400,
|
58 |
+
'responsive' => 'yes',
|
59 |
+
'class' => ''
|
60 |
+
), $atts, 'document' );
|
61 |
+
if ( $atts['file'] !== null ) $atts['url'] = $atts['file'];
|
62 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
63 |
+
return '<div class="su-document su-responsive-media-' . $atts['responsive'] . '"><iframe src="//docs.google.com/viewer?embedded=true&url=' . $atts['url'] . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" class="su-document' . su_get_css_class( $atts ) . '"></iframe></div>';
|
64 |
+
}
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'dropcap',
|
5 |
+
'callback' => 'su_shortcode_dropcap',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/dropcap.svg',
|
7 |
+
'name' => __( 'Dropcap', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'style' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
15 |
+
'flat' => __( 'Flat', 'shortcodes-ultimate' ),
|
16 |
+
'light' => __( 'Light', 'shortcodes-ultimate' ),
|
17 |
+
'simple' => __( 'Simple', 'shortcodes-ultimate' )
|
18 |
+
),
|
19 |
+
'default' => 'default',
|
20 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ), 'desc' => __( 'Dropcap style preset', 'shortcodes-ultimate' )
|
21 |
+
),
|
22 |
+
'size' => array(
|
23 |
+
'type' => 'slider',
|
24 |
+
'min' => 1,
|
25 |
+
'max' => 5,
|
26 |
+
'step' => 1,
|
27 |
+
'default' => 3,
|
28 |
+
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'Choose dropcap size', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'class' => array(
|
32 |
+
'type' => 'extra_css_class',
|
33 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
35 |
+
'default' => '',
|
36 |
+
),
|
37 |
+
),
|
38 |
+
'content' => __( 'D', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Dropcap', 'shortcodes-ultimate' ),
|
40 |
+
'icon' => 'bold',
|
41 |
+
) );
|
42 |
+
|
43 |
+
function su_shortcode_dropcap( $atts = null, $content = null ) {
|
44 |
+
|
45 |
+
$atts = shortcode_atts( array(
|
46 |
+
'style' => 'default',
|
47 |
+
'size' => 3,
|
48 |
+
'class' => ''
|
49 |
+
), $atts, 'dropcap' );
|
50 |
+
|
51 |
+
$atts['style'] = str_replace( array( '1', '2', '3' ), array( 'default', 'light', 'default' ), $atts['style'] ); // 3.x
|
52 |
+
|
53 |
+
// Calculate font-size
|
54 |
+
$em = $atts['size'] * 0.5 . 'em';
|
55 |
+
|
56 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
57 |
+
|
58 |
+
return '<span class="su-dropcap su-dropcap-style-' . $atts['style'] . su_get_css_class( $atts ) . '" style="font-size:' . $em . '">' . do_shortcode( $content ) . '</span>';
|
59 |
+
|
60 |
+
}
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'dummy_image',
|
5 |
+
'callback' => 'su_shortcode_dummy_image',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/dummy_image.svg',
|
7 |
+
'name' => __( 'Dummy image', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'width' => array(
|
12 |
+
'type' => 'slider',
|
13 |
+
'min' => 10,
|
14 |
+
'max' => 1600,
|
15 |
+
'step' => 10,
|
16 |
+
'default' => 500,
|
17 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
18 |
+
'desc' => __( 'Image width', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'height' => array(
|
21 |
+
'type' => 'slider',
|
22 |
+
'min' => 10,
|
23 |
+
'max' => 1600,
|
24 |
+
'step' => 10,
|
25 |
+
'default' => 300,
|
26 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Image height', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'theme' => array(
|
30 |
+
'type' => 'select',
|
31 |
+
'values' => array(
|
32 |
+
'any' => __( 'Any', 'shortcodes-ultimate' ),
|
33 |
+
'abstract' => __( 'Abstract', 'shortcodes-ultimate' ),
|
34 |
+
'animals' => __( 'Animals', 'shortcodes-ultimate' ),
|
35 |
+
'business' => __( 'Business', 'shortcodes-ultimate' ),
|
36 |
+
'cats' => __( 'Cats', 'shortcodes-ultimate' ),
|
37 |
+
'city' => __( 'City', 'shortcodes-ultimate' ),
|
38 |
+
'food' => __( 'Food', 'shortcodes-ultimate' ),
|
39 |
+
'nightlife' => __( 'Night life', 'shortcodes-ultimate' ),
|
40 |
+
'fashion' => __( 'Fashion', 'shortcodes-ultimate' ),
|
41 |
+
'people' => __( 'People', 'shortcodes-ultimate' ),
|
42 |
+
'nature' => __( 'Nature', 'shortcodes-ultimate' ),
|
43 |
+
'sports' => __( 'Sports', 'shortcodes-ultimate' ),
|
44 |
+
'technics' => __( 'Technics', 'shortcodes-ultimate' ),
|
45 |
+
'transport' => __( 'Transport', 'shortcodes-ultimate' )
|
46 |
+
),
|
47 |
+
'default' => 'any',
|
48 |
+
'name' => __( 'Theme', 'shortcodes-ultimate' ),
|
49 |
+
'desc' => __( 'Select the theme for this image', 'shortcodes-ultimate' )
|
50 |
+
),
|
51 |
+
'class' => array(
|
52 |
+
'type' => 'extra_css_class',
|
53 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
54 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
55 |
+
'default' => '',
|
56 |
+
),
|
57 |
+
),
|
58 |
+
'desc' => __( 'Image placeholder with random image', 'shortcodes-ultimate' ),
|
59 |
+
'icon' => 'picture-o',
|
60 |
+
) );
|
61 |
+
|
62 |
+
function su_shortcode_dummy_image( $atts = null, $content = null ) {
|
63 |
+
$atts = shortcode_atts( array(
|
64 |
+
'width' => 500,
|
65 |
+
'height' => 300,
|
66 |
+
'theme' => 'any',
|
67 |
+
'class' => ''
|
68 |
+
), $atts, 'dummy_image' );
|
69 |
+
$url = 'http://lorempixel.com/' . $atts['width'] . '/' . $atts['height'] . '/';
|
70 |
+
if ( $atts['theme'] !== 'any' ) $url .= $atts['theme'] . '/' . rand( 0, 10 ) . '/';
|
71 |
+
return '<img src="' . $url . '" alt="' . __( 'Dummy image', 'shortcodes-ultimate' ) . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" class="su-dummy-image' . su_get_css_class( $atts ) . '" />';
|
72 |
+
}
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'dummy_text',
|
5 |
+
'callback' => 'su_shortcode_dummy_text',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/dummy_text.svg',
|
7 |
+
'name' => __( 'Dummy text', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'what' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'paras' => __( 'Paragraphs', 'shortcodes-ultimate' ),
|
15 |
+
'words' => __( 'Words', 'shortcodes-ultimate' ),
|
16 |
+
'bytes' => __( 'Bytes', 'shortcodes-ultimate' ),
|
17 |
+
),
|
18 |
+
'default' => 'paras',
|
19 |
+
'name' => __( 'What', 'shortcodes-ultimate' ),
|
20 |
+
'desc' => __( 'What to generate', 'shortcodes-ultimate' )
|
21 |
+
),
|
22 |
+
'amount' => array(
|
23 |
+
'type' => 'slider',
|
24 |
+
'min' => 1,
|
25 |
+
'max' => 100,
|
26 |
+
'step' => 1,
|
27 |
+
'default' => 1,
|
28 |
+
'name' => __( 'Amount', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'How many items (paragraphs or words) to generate. Minimum words amount is 5', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'cache' => array(
|
32 |
+
'type' => 'bool',
|
33 |
+
'default' => 'yes',
|
34 |
+
'name' => __( 'Cache', 'shortcodes-ultimate' ),
|
35 |
+
'desc' => __( 'Generated text will be cached. Be careful with this option. If you disable it and insert many dummy_text shortcodes the page load time will be highly increased', 'shortcodes-ultimate' )
|
36 |
+
),
|
37 |
+
'class' => array(
|
38 |
+
'type' => 'extra_css_class',
|
39 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
40 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
41 |
+
'default' => '',
|
42 |
+
),
|
43 |
+
),
|
44 |
+
'desc' => __( 'Text placeholder', 'shortcodes-ultimate' ),
|
45 |
+
'icon' => 'text-height',
|
46 |
+
) );
|
47 |
+
|
48 |
+
function su_shortcode_dummy_text( $atts = null, $content = null ) {
|
49 |
+
$atts = shortcode_atts( array(
|
50 |
+
'amount' => 1,
|
51 |
+
'what' => 'paras',
|
52 |
+
'cache' => 'yes',
|
53 |
+
'class' => ''
|
54 |
+
), $atts, 'dummy_text' );
|
55 |
+
$transient = 'su/cache/dummy_text/' . sanitize_text_field( $atts['what'] ) . '/' . intval( $atts['amount'] );
|
56 |
+
$return = get_transient( $transient );
|
57 |
+
if ( $return && $atts['cache'] === 'yes' ) return $return;
|
58 |
+
else {
|
59 |
+
$xml = simplexml_load_file( 'http://www.lipsum.com/feed/xml?amount=' . $atts['amount'] . '&what=' . $atts['what'] . '&start=0' );
|
60 |
+
$return = '<div class="su-dummy-text' . su_get_css_class( $atts ) . '">' . wpautop( str_replace( "\n", "\n\n", $xml->lipsum ) ) . '</div>';
|
61 |
+
set_transient( $transient, $return, 60*60*24*30 );
|
62 |
+
return $return;
|
63 |
+
}
|
64 |
+
}
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'expand',
|
5 |
+
'callback' => 'su_shortcode_expand',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/expand.svg',
|
7 |
+
'name' => __( 'Expand', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'atts' => array(
|
11 |
+
'more_text' => array(
|
12 |
+
'default' => __( 'Show more', 'shortcodes-ultimate' ),
|
13 |
+
'name' => __( 'More text', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Enter the text for more link', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'less_text' => array(
|
17 |
+
'default' => __( 'Show less', 'shortcodes-ultimate' ),
|
18 |
+
'name' => __( 'Less text', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'Enter the text for less link', 'shortcodes-ultimate' )
|
20 |
+
),
|
21 |
+
'height' => array(
|
22 |
+
'type' => 'slider',
|
23 |
+
'min' => 0,
|
24 |
+
'max' => 1000,
|
25 |
+
'step' => 10,
|
26 |
+
'default' => 100,
|
27 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
28 |
+
'desc' => __( 'Height for collapsed state (in pixels)', 'shortcodes-ultimate' )
|
29 |
+
),
|
30 |
+
'hide_less' => array(
|
31 |
+
'type' => 'bool',
|
32 |
+
'default' => 'no',
|
33 |
+
'name' => __( 'Hide less link', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'This option allows you to hide less link, when the text block has been expanded', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'text_color' => array(
|
37 |
+
'type' => 'color',
|
38 |
+
'values' => array( ),
|
39 |
+
'default' => '#333333',
|
40 |
+
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
41 |
+
'desc' => __( 'Pick the text color', 'shortcodes-ultimate' )
|
42 |
+
),
|
43 |
+
'link_color' => array(
|
44 |
+
'type' => 'color',
|
45 |
+
'values' => array( ),
|
46 |
+
'default' => '#0088FF',
|
47 |
+
'name' => __( 'Link color', 'shortcodes-ultimate' ),
|
48 |
+
'desc' => __( 'Pick the link color', 'shortcodes-ultimate' )
|
49 |
+
),
|
50 |
+
'link_style' => array(
|
51 |
+
'type' => 'select',
|
52 |
+
'values' => array(
|
53 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
54 |
+
'underlined' => __( 'Underlined', 'shortcodes-ultimate' ),
|
55 |
+
'dotted' => __( 'Dotted', 'shortcodes-ultimate' ),
|
56 |
+
'dashed' => __( 'Dashed', 'shortcodes-ultimate' ),
|
57 |
+
'button' => __( 'Button', 'shortcodes-ultimate' ),
|
58 |
+
),
|
59 |
+
'default' => 'default',
|
60 |
+
'name' => __( 'Link style', 'shortcodes-ultimate' ),
|
61 |
+
'desc' => __( 'Select the style for more/less link', 'shortcodes-ultimate' )
|
62 |
+
),
|
63 |
+
'link_align' => array(
|
64 |
+
'type' => 'select',
|
65 |
+
'values' => array(
|
66 |
+
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
67 |
+
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
68 |
+
'right' => __( 'Right', 'shortcodes-ultimate' ),
|
69 |
+
),
|
70 |
+
'default' => 'left',
|
71 |
+
'name' => __( 'Link align', 'shortcodes-ultimate' ),
|
72 |
+
'desc' => __( 'Select link alignment', 'shortcodes-ultimate' )
|
73 |
+
),
|
74 |
+
'more_icon' => array(
|
75 |
+
'type' => 'icon',
|
76 |
+
'default' => '',
|
77 |
+
'name' => __( 'More icon', 'shortcodes-ultimate' ),
|
78 |
+
'desc' => __( 'Add an icon to the more link', 'shortcodes-ultimate' )
|
79 |
+
),
|
80 |
+
'less_icon' => array(
|
81 |
+
'type' => 'icon',
|
82 |
+
'default' => '',
|
83 |
+
'name' => __( 'Less icon', 'shortcodes-ultimate' ),
|
84 |
+
'desc' => __( 'Add an icon to the less link', 'shortcodes-ultimate' )
|
85 |
+
),
|
86 |
+
'class' => array(
|
87 |
+
'type' => 'extra_css_class',
|
88 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
89 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
90 |
+
'default' => '',
|
91 |
+
),
|
92 |
+
),
|
93 |
+
'content' => __( 'This text block can be expanded', 'shortcodes-ultimate' ),
|
94 |
+
'desc' => __( 'Expandable text block', 'shortcodes-ultimate' ),
|
95 |
+
'icon' => 'sort-amount-asc',
|
96 |
+
) );
|
97 |
+
|
98 |
+
function su_shortcode_expand( $atts = null, $content = null ) {
|
99 |
+
|
100 |
+
$atts = shortcode_atts( array(
|
101 |
+
'more_text' => __( 'Show more', 'shortcodes-ultimate' ),
|
102 |
+
'less_text' => __( 'Show less', 'shortcodes-ultimate' ),
|
103 |
+
'height' => '100',
|
104 |
+
'hide_less' => 'no',
|
105 |
+
'text_color' => '#333333',
|
106 |
+
'link_color' => '#0088FF',
|
107 |
+
'link_style' => 'default',
|
108 |
+
'link_align' => 'left',
|
109 |
+
'more_icon' => '',
|
110 |
+
'less_icon' => '',
|
111 |
+
'class' => ''
|
112 |
+
), $atts, 'expand' );
|
113 |
+
|
114 |
+
// Prepare more icon
|
115 |
+
$more_icon = ( $atts['more_icon'] ) ? su_html_icon( $atts['more_icon'] ) : '';
|
116 |
+
$less_icon = ( $atts['less_icon'] ) ? su_html_icon( $atts['less_icon'] ) : '';
|
117 |
+
|
118 |
+
if ( $more_icon || $less_icon ) {
|
119 |
+
su_query_asset( 'css', 'font-awesome' );
|
120 |
+
}
|
121 |
+
|
122 |
+
// Prepare less link
|
123 |
+
$less = $atts['hide_less'] !== 'yes'
|
124 |
+
? '<div class="su-expand-link su-expand-link-less" style="text-align:' . $atts['link_align'] . '"><a href="javascript:;" style="color:' . $atts['link_color'] . ';border-color:' . $atts['link_color'] . '">' . $less_icon . '<span style="border-color:' . $atts['link_color'] . '">' . $atts['less_text'] . '</span></a></div>'
|
125 |
+
: '';
|
126 |
+
|
127 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
128 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
129 |
+
|
130 |
+
return '<div class="su-expand su-expand-collapsed su-expand-link-style-' . $atts['link_style'] . su_get_css_class( $atts ) . '" data-height="' . $atts['height'] . '"><div class="su-expand-content" style="color:' . $atts['text_color'] . ';max-height:' . intval( $atts['height'] ) . 'px;overflow:hidden">' . do_shortcode( $content ) . '</div><div class="su-expand-link su-expand-link-more" style="text-align:' . $atts['link_align'] . '"><a href="javascript:;" style="color:' . $atts['link_color'] . ';border-color:' . $atts['link_color'] . '">' . $more_icon . '<span style="border-color:' . $atts['link_color'] . '">' . $atts['more_text'] . '</span></a></div>' . $less . '</div>';
|
131 |
+
|
132 |
+
}
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'feed',
|
5 |
+
'callback' => 'su_shortcode_feed',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/feed.svg',
|
7 |
+
'name' => __( 'RSS feed', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'content other',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'values' => array( ),
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Url to RSS-feed', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'limit' => array(
|
18 |
+
'type' => 'slider',
|
19 |
+
'min' => 1,
|
20 |
+
'max' => 20,
|
21 |
+
'step' => 1,
|
22 |
+
'default' => 3,
|
23 |
+
'name' => __( 'Limit', 'shortcodes-ultimate' ), 'desc' => __( 'Number of items to show', 'shortcodes-ultimate' )
|
24 |
+
),
|
25 |
+
'class' => array(
|
26 |
+
'type' => 'extra_css_class',
|
27 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
28 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
29 |
+
'default' => '',
|
30 |
+
),
|
31 |
+
),
|
32 |
+
'desc' => __( 'Feed grabber', 'shortcodes-ultimate' ),
|
33 |
+
'icon' => 'rss',
|
34 |
+
) );
|
35 |
+
|
36 |
+
function su_shortcode_feed( $atts = null, $content = null ) {
|
37 |
+
$atts = shortcode_atts( array(
|
38 |
+
'url' => get_bloginfo_rss( 'rss2_url' ),
|
39 |
+
'limit' => 3,
|
40 |
+
'class' => ''
|
41 |
+
), $atts, 'feed' );
|
42 |
+
if ( !function_exists( 'wp_rss' ) ) include_once ABSPATH . WPINC . '/rss.php';
|
43 |
+
ob_start();
|
44 |
+
echo '<div class="su-feed' . su_get_css_class( $atts ) . '">';
|
45 |
+
wp_rss( $atts['url'], $atts['limit'] );
|
46 |
+
echo '</div>';
|
47 |
+
$return = ob_get_contents();
|
48 |
+
ob_end_clean();
|
49 |
+
return $return;
|
50 |
+
}
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'frame',
|
5 |
+
'callback' => 'su_shortcode_frame',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/frame.svg',
|
7 |
+
'deprecated' => true,
|
8 |
+
'name' => __( 'Frame', 'shortcodes-ultimate' ),
|
9 |
+
'type' => 'wrap',
|
10 |
+
'group' => 'content',
|
11 |
+
'atts' => array(
|
12 |
+
'align' => array(
|
13 |
+
'type' => 'select',
|
14 |
+
'values' => array(
|
15 |
+
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
16 |
+
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
17 |
+
'right' => __( 'Right', 'shortcodes-ultimate' )
|
18 |
+
),
|
19 |
+
'default' => 'left',
|
20 |
+
'name' => __( 'Align', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'Frame alignment', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'class' => array(
|
24 |
+
'default' => '',
|
25 |
+
'name' => __( 'Class', 'shortcodes-ultimate' ),
|
26 |
+
'desc' => __( 'Extra CSS class', 'shortcodes-ultimate' )
|
27 |
+
)
|
28 |
+
),
|
29 |
+
'content' => '<img src="http://lorempixel.com/g/400/200/" />',
|
30 |
+
'desc' => __( 'Styled image frame', 'shortcodes-ultimate' ),
|
31 |
+
'icon' => 'picture-o',
|
32 |
+
) );
|
33 |
+
|
34 |
+
function su_shortcode_frame( $atts = null, $content = null ) {
|
35 |
+
|
36 |
+
$atts = shortcode_atts( array(
|
37 |
+
'style' => 'default',
|
38 |
+
'align' => 'left',
|
39 |
+
'class' => ''
|
40 |
+
), $atts, 'frame' );
|
41 |
+
|
42 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
43 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
44 |
+
|
45 |
+
return '<span class="su-frame su-frame-align-' . $atts['align'] . ' su-frame-style-' . $atts['style'] . su_get_css_class( $atts ) . '"><span class="su-frame-inner">' . do_shortcode( $content ) . '</span></span>';
|
46 |
+
|
47 |
+
}
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'gmap',
|
5 |
+
'callback' => 'su_shortcode_gmap',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/gmap.svg',
|
7 |
+
'name' => __( 'Google map', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'width' => array(
|
12 |
+
'type' => 'slider',
|
13 |
+
'min' => 200,
|
14 |
+
'max' => 1600,
|
15 |
+
'step' => 20,
|
16 |
+
'default' => 600,
|
17 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
18 |
+
'desc' => __( 'Map width', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'height' => array(
|
21 |
+
'type' => 'slider',
|
22 |
+
'min' => 200,
|
23 |
+
'max' => 1600,
|
24 |
+
'step' => 20,
|
25 |
+
'default' => 400,
|
26 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Map height', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'responsive' => array(
|
30 |
+
'type' => 'bool',
|
31 |
+
'default' => 'yes',
|
32 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
33 |
+
'desc' => __( 'Ignore width and height parameters and make map responsive', 'shortcodes-ultimate' )
|
34 |
+
),
|
35 |
+
'address' => array(
|
36 |
+
'values' => array( ),
|
37 |
+
'default' => '',
|
38 |
+
'name' => __( 'Marker', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Address for the marker. You can type it in any language', 'shortcodes-ultimate' )
|
40 |
+
),
|
41 |
+
'zoom' => array(
|
42 |
+
'type' => 'slider',
|
43 |
+
'min' => 0,
|
44 |
+
'max' => 21,
|
45 |
+
'step' => 1,
|
46 |
+
'default' => 0,
|
47 |
+
'name' => __( 'Zoom', 'shortcodes-ultimate' ),
|
48 |
+
'desc' => __( 'Zoom sets the initial zoom level of the map. Accepted values range from 1 (the whole world) to 21 (individual buildings). Use 0 (zero) to set zoom level depending on displayed object (automatic)', 'shortcodes-ultimate' )
|
49 |
+
),
|
50 |
+
'class' => array(
|
51 |
+
'type' => 'extra_css_class',
|
52 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
53 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
54 |
+
'default' => '',
|
55 |
+
),
|
56 |
+
),
|
57 |
+
'desc' => __( 'Maps by Google', 'shortcodes-ultimate' ),
|
58 |
+
'icon' => 'globe',
|
59 |
+
) );
|
60 |
+
|
61 |
+
function su_shortcode_gmap( $atts = null, $content = null ) {
|
62 |
+
|
63 |
+
$atts = shortcode_atts( array(
|
64 |
+
'width' => 600,
|
65 |
+
'height' => 400,
|
66 |
+
'responsive' => 'yes',
|
67 |
+
'address' => 'Moscow',
|
68 |
+
'zoom' => 0,
|
69 |
+
'class' => ''
|
70 |
+
), $atts, 'gmap' );
|
71 |
+
|
72 |
+
$atts['zoom'] = is_numeric( $atts['zoom'] ) && $atts['zoom'] > 0
|
73 |
+
? '&z=' . $atts['zoom']
|
74 |
+
: '';
|
75 |
+
|
76 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
77 |
+
|
78 |
+
return sprintf(
|
79 |
+
'<div class="su-gmap su-responsive-media-%s%s"><iframe width="%s" height="%s" src="//maps.google.com/maps?q=%s&output=embed%s"></iframe></div>',
|
80 |
+
esc_attr( $atts['responsive'] ),
|
81 |
+
su_get_css_class( $atts ),
|
82 |
+
intval( $atts['width'] ),
|
83 |
+
intval( $atts['height'] ),
|
84 |
+
urlencode( su_do_attribute( $atts['address'] ) ),
|
85 |
+
$atts['zoom']
|
86 |
+
);
|
87 |
+
|
88 |
+
}
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'guests',
|
5 |
+
'callback' => 'su_shortcode_guests',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/guests.svg',
|
7 |
+
'name' => __( 'Guests', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'class' => array(
|
12 |
+
'type' => 'extra_css_class',
|
13 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
15 |
+
'default' => '',
|
16 |
+
),
|
17 |
+
),
|
18 |
+
'content' => __( 'This content will be available only for non-logged visitors', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'Content for guests only', 'shortcodes-ultimate' ),
|
20 |
+
'icon' => 'user',
|
21 |
+
) );
|
22 |
+
|
23 |
+
function su_shortcode_guests( $atts = null, $content = null ) {
|
24 |
+
$atts = shortcode_atts( array( 'class' => '' ), $atts, 'guests' );
|
25 |
+
$return = '';
|
26 |
+
if ( !is_user_logged_in() && !is_null( $content ) ) {
|
27 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
28 |
+
$return = '<div class="su-guests' . su_get_css_class( $atts ) . '">' . do_shortcode( $content ) . '</div>';
|
29 |
+
}
|
30 |
+
return $return;
|
31 |
+
}
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'heading',
|
5 |
+
'callback' => 'su_shortcode_heading',
|
6 |
+
'name' => __( 'Heading', 'shortcodes-ultimate' ),
|
7 |
+
'type' => 'wrap',
|
8 |
+
'group' => 'content',
|
9 |
+
'atts' => array(
|
10 |
+
'style' => array(
|
11 |
+
'type' => 'select',
|
12 |
+
'values' => array(
|
13 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
14 |
+
),
|
15 |
+
'default' => 'default',
|
16 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
17 |
+
'desc' => __( 'Choose style for this heading', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
18 |
+
),
|
19 |
+
'size' => array(
|
20 |
+
'type' => 'slider',
|
21 |
+
'min' => 7,
|
22 |
+
'max' => 48,
|
23 |
+
'step' => 1,
|
24 |
+
'default' => 13,
|
25 |
+
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
26 |
+
'desc' => __( 'Select heading size (pixels)', 'shortcodes-ultimate' )
|
27 |
+
),
|
28 |
+
'align' => array(
|
29 |
+
'type' => 'select',
|
30 |
+
'values' => array(
|
31 |
+
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
32 |
+
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
33 |
+
'right' => __( 'Right', 'shortcodes-ultimate' )
|
34 |
+
),
|
35 |
+
'default' => 'center',
|
36 |
+
'name' => __( 'Align', 'shortcodes-ultimate' ),
|
37 |
+
'desc' => __( 'Heading text alignment', 'shortcodes-ultimate' )
|
38 |
+
),
|
39 |
+
'margin' => array(
|
40 |
+
'type' => 'slider',
|
41 |
+
'min' => 0,
|
42 |
+
'max' => 200,
|
43 |
+
'step' => 10,
|
44 |
+
'default' => 20,
|
45 |
+
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
46 |
+
'desc' => __( 'Bottom margin (pixels)', 'shortcodes-ultimate' )
|
47 |
+
),
|
48 |
+
'class' => array(
|
49 |
+
'type' => 'extra_css_class',
|
50 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
51 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
52 |
+
'default' => '',
|
53 |
+
),
|
54 |
+
),
|
55 |
+
'content' => __( 'Heading text', 'shortcodes-ultimate' ),
|
56 |
+
'desc' => __( 'Styled heading', 'shortcodes-ultimate' ),
|
57 |
+
'icon' => 'h-square',
|
58 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/heading.svg',
|
59 |
+
) );
|
60 |
+
|
61 |
+
function su_shortcode_heading( $atts = null, $content = null ) {
|
62 |
+
|
63 |
+
$atts = shortcode_atts( array(
|
64 |
+
'style' => 'default',
|
65 |
+
'size' => 13,
|
66 |
+
'align' => 'center',
|
67 |
+
'margin' => '20',
|
68 |
+
'class' => ''
|
69 |
+
), $atts, 'heading' );
|
70 |
+
|
71 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
72 |
+
|
73 |
+
return '<div class="su-heading su-heading-style-' . $atts['style'] . ' su-heading-align-' . $atts['align'] . su_get_css_class( $atts ) . '" style="font-size:' . intval( $atts['size'] ) . 'px;margin-bottom:' . $atts['margin'] . 'px"><div class="su-heading-inner">' . do_shortcode( $content ) . '</div></div>';
|
74 |
+
|
75 |
+
}
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'highlight',
|
5 |
+
'callback' => 'su_shortcode_highlight',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/highlight.svg',
|
7 |
+
'name' => __( 'Highlight', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'background' => array(
|
12 |
+
'type' => 'color',
|
13 |
+
'values' => array( ),
|
14 |
+
'default' => '#DDFF99',
|
15 |
+
'name' => __( 'Background', 'shortcodes-ultimate' ),
|
16 |
+
'desc' => __( 'Highlighted text background color', 'shortcodes-ultimate' )
|
17 |
+
),
|
18 |
+
'color' => array(
|
19 |
+
'type' => 'color',
|
20 |
+
'values' => array( ),
|
21 |
+
'default' => '#000000',
|
22 |
+
'name' => __( 'Text color', 'shortcodes-ultimate' ), 'desc' => __( 'Highlighted text color', 'shortcodes-ultimate' )
|
23 |
+
),
|
24 |
+
'class' => array(
|
25 |
+
'type' => 'extra_css_class',
|
26 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
28 |
+
'default' => '',
|
29 |
+
),
|
30 |
+
),
|
31 |
+
'content' => __( 'Highlighted text', 'shortcodes-ultimate' ),
|
32 |
+
'desc' => __( 'Highlighted text', 'shortcodes-ultimate' ),
|
33 |
+
'icon' => 'pencil',
|
34 |
+
) );
|
35 |
+
|
36 |
+
function su_shortcode_highlight( $atts = null, $content = null ) {
|
37 |
+
|
38 |
+
$atts = shortcode_atts( array(
|
39 |
+
'background' => '#ddff99',
|
40 |
+
'bg' => null, // 3.x
|
41 |
+
'color' => '#000000',
|
42 |
+
'class' => ''
|
43 |
+
), $atts, 'highlight' );
|
44 |
+
|
45 |
+
if ( $atts['bg'] !== null ) {
|
46 |
+
$atts['background'] = $atts['bg'];
|
47 |
+
}
|
48 |
+
|
49 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
50 |
+
|
51 |
+
return '<span class="su-highlight' . su_get_css_class( $atts ) . '" style="background:' . $atts['background'] . ';color:' . $atts['color'] . '"> ' . do_shortcode( $content ) . ' </span>';
|
52 |
+
|
53 |
+
}
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'label',
|
5 |
+
'callback' => 'su_shortcode_label',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/label.svg',
|
7 |
+
'name' => __( 'Label', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'type' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
15 |
+
'success' => __( 'Success', 'shortcodes-ultimate' ),
|
16 |
+
'warning' => __( 'Warning', 'shortcodes-ultimate' ),
|
17 |
+
'important' => __( 'Important', 'shortcodes-ultimate' ),
|
18 |
+
'black' => __( 'Black', 'shortcodes-ultimate' ),
|
19 |
+
'info' => __( 'Info', 'shortcodes-ultimate' )
|
20 |
+
),
|
21 |
+
'default' => 'default',
|
22 |
+
'name' => __( 'Type', 'shortcodes-ultimate' ),
|
23 |
+
'desc' => __( 'Style of the label', 'shortcodes-ultimate' )
|
24 |
+
),
|
25 |
+
'class' => array(
|
26 |
+
'type' => 'extra_css_class',
|
27 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
28 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
29 |
+
'default' => '',
|
30 |
+
),
|
31 |
+
),
|
32 |
+
'content' => __( 'Label', 'shortcodes-ultimate' ),
|
33 |
+
'desc' => __( 'Styled label', 'shortcodes-ultimate' ),
|
34 |
+
'icon' => 'tag',
|
35 |
+
) );
|
36 |
+
|
37 |
+
function su_shortcode_label( $atts = null, $content = null ) {
|
38 |
+
|
39 |
+
$atts = shortcode_atts( array(
|
40 |
+
'type' => 'default',
|
41 |
+
'style' => null, // 3.x
|
42 |
+
'class' => ''
|
43 |
+
), $atts, 'label' );
|
44 |
+
|
45 |
+
if ( $atts['style'] !== null ) $atts['type'] = $atts['style'];
|
46 |
+
|
47 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
48 |
+
|
49 |
+
return '<span class="su-label su-label-type-' . $atts['type'] . su_get_css_class( $atts ) . '">' . do_shortcode( $content ) . '</span>';
|
50 |
+
|
51 |
+
}
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'lightbox',
|
5 |
+
'callback' => 'su_shortcode_lightbox',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/lightbox.svg',
|
7 |
+
'name' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'gallery',
|
10 |
+
'possible_sibling' => 'lightbox_content',
|
11 |
+
'article' => 'http://docs.getshortcodes.com/article/76-how-to-use-lightbox-shortcode',
|
12 |
+
'atts' => array(
|
13 |
+
'type' => array(
|
14 |
+
'type' => 'select',
|
15 |
+
'values' => array(
|
16 |
+
'iframe' => __( 'Iframe', 'shortcodes-ultimate' ),
|
17 |
+
'image' => __( 'Image', 'shortcodes-ultimate' ),
|
18 |
+
'inline' => __( 'Inline (html content)', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'default' => 'iframe',
|
21 |
+
'name' => __( 'Content type', 'shortcodes-ultimate' ),
|
22 |
+
'desc' => __( 'Select type of the lightbox window content', 'shortcodes-ultimate' )
|
23 |
+
),
|
24 |
+
'src' => array(
|
25 |
+
'default' => '',
|
26 |
+
'name' => __( 'Content source', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Insert here URL or CSS selector. Use URL for Iframe and Image content types. Use CSS selector for Inline content type.<br />Example values:<br /><b%value>http://www.youtube.com/watch?v=XXXXXXXXX</b> - YouTube video (iframe)<br /><b%value>http://example.com/wp-content/uploads/image.jpg</b> - uploaded image (image)<br /><b%value>http://example.com/</b> - any web page (iframe)<br /><b%value>#my-custom-popup</b> - any HTML content (inline)', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'class' => array(
|
30 |
+
'type' => 'extra_css_class',
|
31 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
32 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
33 |
+
'default' => '',
|
34 |
+
),
|
35 |
+
),
|
36 |
+
'content' => __( 'Click here to open lightbox', 'shortcodes-ultimate' ),
|
37 |
+
'desc' => __( 'Lightbox window with custom content', 'shortcodes-ultimate' ),
|
38 |
+
'icon' => 'external-link',
|
39 |
+
) );
|
40 |
+
|
41 |
+
function su_shortcode_lightbox( $atts = null, $content = null ) {
|
42 |
+
|
43 |
+
$atts = shortcode_atts( array(
|
44 |
+
'src' => false,
|
45 |
+
'type' => 'iframe',
|
46 |
+
'class' => ''
|
47 |
+
), $atts, 'lightbox' );
|
48 |
+
|
49 |
+
if ( ! $atts['src'] ) {
|
50 |
+
return su_error_message( 'Lightbox', __( 'please specify correct source', 'shortcodes-ultimate' ) );
|
51 |
+
}
|
52 |
+
|
53 |
+
su_query_asset( 'css', 'magnific-popup' );
|
54 |
+
su_query_asset( 'js', 'jquery' );
|
55 |
+
su_query_asset( 'js', 'magnific-popup' );
|
56 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
57 |
+
|
58 |
+
return '<span class="su-lightbox' . su_get_css_class( $atts ) . '" data-mfp-src="' . su_do_attribute( $atts['src'] ) . '" data-mfp-type="' . $atts['type'] . '">' . do_shortcode( $content ) . '</span>';
|
59 |
+
|
60 |
+
}
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'lightbox_content',
|
5 |
+
'callback' => 'su_shortcode_lightbox_content',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/lightbox_content.svg',
|
7 |
+
'name' => __( 'Lightbox content', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'gallery',
|
10 |
+
'required_sibling' => 'lightbox',
|
11 |
+
'article' => 'http://docs.getshortcodes.com/article/76-how-to-use-lightbox-shortcode',
|
12 |
+
'atts' => array(
|
13 |
+
'id' => array(
|
14 |
+
'default' => '',
|
15 |
+
'name' => __( 'ID', 'shortcodes-ultimate' ),
|
16 |
+
'desc' => sprintf( __( 'Enter here the ID from Content source field. %s Example value: %s', 'shortcodes-ultimate' ), '<br>', '<b%value>my-custom-popup</b>' )
|
17 |
+
),
|
18 |
+
'width' => array(
|
19 |
+
'default' => '50%',
|
20 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => sprintf( __( 'Adjust the width for inline content (in pixels or percents). %s Example values: %s, %s, %s', 'shortcodes-ultimate' ), '<br>', '<b%value>300px</b>', '<b%value>600px</b>', '<b%value>90%</b>' )
|
22 |
+
),
|
23 |
+
'margin' => array(
|
24 |
+
'type' => 'slider',
|
25 |
+
'min' => 0,
|
26 |
+
'max' => 600,
|
27 |
+
'step' => 5,
|
28 |
+
'default' => 40,
|
29 |
+
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
30 |
+
'desc' => __( 'Adjust the margin for inline content (in pixels)', 'shortcodes-ultimate' )
|
31 |
+
),
|
32 |
+
'padding' => array(
|
33 |
+
'type' => 'slider',
|
34 |
+
'min' => 0,
|
35 |
+
'max' => 600,
|
36 |
+
'step' => 5,
|
37 |
+
'default' => 40,
|
38 |
+
'name' => __( 'Padding', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Adjust the padding for inline content (in pixels)', 'shortcodes-ultimate' )
|
40 |
+
),
|
41 |
+
'text_align' => array(
|
42 |
+
'type' => 'select',
|
43 |
+
'values' => array(
|
44 |
+
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
45 |
+
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
46 |
+
'right' => __( 'Right', 'shortcodes-ultimate' )
|
47 |
+
),
|
48 |
+
'default' => 'center',
|
49 |
+
'name' => __( 'Text alignment', 'shortcodes-ultimate' ),
|
50 |
+
'desc' => __( 'Select the text alignment', 'shortcodes-ultimate' )
|
51 |
+
),
|
52 |
+
'background' => array(
|
53 |
+
'type' => 'color',
|
54 |
+
'default' => '#FFFFFF',
|
55 |
+
'name' => __( 'Background color', 'shortcodes-ultimate' ),
|
56 |
+
'desc' => __( 'Pick a background color', 'shortcodes-ultimate' )
|
57 |
+
),
|
58 |
+
'color' => array(
|
59 |
+
'type' => 'color',
|
60 |
+
'default' => '#333333',
|
61 |
+
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
62 |
+
'desc' => __( 'Pick a text color', 'shortcodes-ultimate' )
|
63 |
+
),
|
64 |
+
'color' => array(
|
65 |
+
'type' => 'color',
|
66 |
+
'default' => '#333333',
|
67 |
+
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
68 |
+
'desc' => __( 'Pick a text color', 'shortcodes-ultimate' )
|
69 |
+
),
|
70 |
+
'shadow' => array(
|
71 |
+
'type' => 'shadow',
|
72 |
+
'default' => '0px 0px 15px #333333',
|
73 |
+
'name' => __( 'Shadow', 'shortcodes-ultimate' ),
|
74 |
+
'desc' => __( 'Adjust the shadow for content box', 'shortcodes-ultimate' )
|
75 |
+
),
|
76 |
+
'class' => array(
|
77 |
+
'type' => 'extra_css_class',
|
78 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
79 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
80 |
+
'default' => '',
|
81 |
+
),
|
82 |
+
),
|
83 |
+
'content' => __( 'Inline content', 'shortcodes-ultimate' ),
|
84 |
+
'desc' => __( 'Inline content for lightbox', 'shortcodes-ultimate' ),
|
85 |
+
'icon' => 'external-link',
|
86 |
+
) );
|
87 |
+
|
88 |
+
function su_shortcode_lightbox_content( $atts = null, $content = null ) {
|
89 |
+
|
90 |
+
$atts = shortcode_atts( array(
|
91 |
+
'id' => '',
|
92 |
+
'width' => '50%',
|
93 |
+
'margin' => '40',
|
94 |
+
'padding' => '40',
|
95 |
+
'text_align' => 'center',
|
96 |
+
'background' => '#FFFFFF',
|
97 |
+
'color' => '#333333',
|
98 |
+
'shadow' => '0px 0px 15px #333333',
|
99 |
+
'class' => ''
|
100 |
+
), $atts, 'lightbox_content' );
|
101 |
+
|
102 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
103 |
+
|
104 |
+
if ( ! $atts['id'] ) {
|
105 |
+
return su_error_message( 'Lightbox content', __( 'please specify correct ID for this block. You should use same ID as in the Content source field (when inserting lightbox shortcode)', 'shortcodes-ultimate' ) );
|
106 |
+
}
|
107 |
+
|
108 |
+
$return = '<div class="su-lightbox-content ' . su_get_css_class( $atts ) . '" id="' . trim( $atts['id'], '#' ) . '" style="display:none;width:' . $atts['width'] . ';margin-top:' . $atts['margin'] . 'px;margin-bottom:' . $atts['margin'] . 'px;padding:' . $atts['padding'] . 'px;background-color:' . $atts['background'] . ';color:' . $atts['color'] . ';box-shadow:' . $atts['shadow'] . ';text-align:' . $atts['text_align'] . '">' . do_shortcode( $content ) . '</div>';
|
109 |
+
|
110 |
+
return did_action( 'su/generator/preview/before' )
|
111 |
+
? '<div class="su-lightbox-content-preview">' . $return . '</div>'
|
112 |
+
: $return;
|
113 |
+
|
114 |
+
}
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'list',
|
5 |
+
'callback' => 'su_shortcode_list',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/list.svg',
|
7 |
+
'name' => __( 'List', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'icon' => array(
|
12 |
+
'type' => 'icon',
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'You can upload custom icon for this list or pick a built-in icon', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'icon_color' => array(
|
18 |
+
'type' => 'color',
|
19 |
+
'default' => '#333333',
|
20 |
+
'name' => __( 'Icon color', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'This color will be applied to the selected icon. Does not works with uploaded icons', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'class' => array(
|
24 |
+
'type' => 'extra_css_class',
|
25 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
26 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
27 |
+
'default' => '',
|
28 |
+
),
|
29 |
+
),
|
30 |
+
'content' => __( "<ul>\n<li>List item</li>\n<li>List item</li>\n<li>List item</li>\n</ul>", 'shortcodes-ultimate' ),
|
31 |
+
'desc' => __( 'Styled unordered list', 'shortcodes-ultimate' ),
|
32 |
+
'icon' => 'list-ol',
|
33 |
+
) );
|
34 |
+
|
35 |
+
function su_shortcode_list( $atts = null, $content = null ) {
|
36 |
+
|
37 |
+
$atts = shortcode_atts( array(
|
38 |
+
'icon' => 'icon: star',
|
39 |
+
'icon_color' => '#333',
|
40 |
+
'style' => null,
|
41 |
+
'class' => ''
|
42 |
+
), $atts, 'list' );
|
43 |
+
|
44 |
+
// Backward compatibility // 4.2.3+
|
45 |
+
if ( $atts['style'] !== null ) {
|
46 |
+
switch ( $atts['style'] ) {
|
47 |
+
case 'star':
|
48 |
+
$atts['icon'] = 'icon: star';
|
49 |
+
$atts['icon_color'] = '#ffd647';
|
50 |
+
break;
|
51 |
+
case 'arrow':
|
52 |
+
$atts['icon'] = 'icon: arrow-right';
|
53 |
+
$atts['icon_color'] = '#00d1ce';
|
54 |
+
break;
|
55 |
+
case 'check':
|
56 |
+
$atts['icon'] = 'icon: check';
|
57 |
+
$atts['icon_color'] = '#17bf20';
|
58 |
+
break;
|
59 |
+
case 'cross':
|
60 |
+
$atts['icon'] = 'icon: remove';
|
61 |
+
$atts['icon_color'] = '#ff142b';
|
62 |
+
break;
|
63 |
+
case 'thumbs':
|
64 |
+
$atts['icon'] = 'icon: thumbs-o-up';
|
65 |
+
$atts['icon_color'] = '#8a8a8a';
|
66 |
+
break;
|
67 |
+
case 'link':
|
68 |
+
$atts['icon'] = 'icon: external-link';
|
69 |
+
$atts['icon_color'] = '#5c5c5c';
|
70 |
+
break;
|
71 |
+
case 'gear':
|
72 |
+
$atts['icon'] = 'icon: cog';
|
73 |
+
$atts['icon_color'] = '#ccc';
|
74 |
+
break;
|
75 |
+
case 'time':
|
76 |
+
$atts['icon'] = 'icon: time';
|
77 |
+
$atts['icon_color'] = '#a8a8a8';
|
78 |
+
break;
|
79 |
+
case 'note':
|
80 |
+
$atts['icon'] = 'icon: edit';
|
81 |
+
$atts['icon_color'] = '#f7d02c';
|
82 |
+
break;
|
83 |
+
case 'plus':
|
84 |
+
$atts['icon'] = 'icon: plus-sign';
|
85 |
+
$atts['icon_color'] = '#61dc3c';
|
86 |
+
break;
|
87 |
+
case 'guard':
|
88 |
+
$atts['icon'] = 'icon: shield';
|
89 |
+
$atts['icon_color'] = '#1bbe08';
|
90 |
+
break;
|
91 |
+
case 'event':
|
92 |
+
$atts['icon'] = 'icon: bullhorn';
|
93 |
+
$atts['icon_color'] = '#ff4c42';
|
94 |
+
break;
|
95 |
+
case 'idea':
|
96 |
+
$atts['icon'] = 'icon: sun';
|
97 |
+
$atts['icon_color'] = '#ffd880';
|
98 |
+
break;
|
99 |
+
case 'settings':
|
100 |
+
$atts['icon'] = 'icon: cogs';
|
101 |
+
$atts['icon_color'] = '#8a8a8a';
|
102 |
+
break;
|
103 |
+
case 'twitter':
|
104 |
+
$atts['icon'] = 'icon: twitter-sign';
|
105 |
+
$atts['icon_color'] = '#00ced6';
|
106 |
+
break;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( strpos( $atts['icon'], 'icon:' ) !== false ) {
|
111 |
+
$atts['icon'] = '<i class="fa fa-' . trim( str_replace( 'icon:', '', $atts['icon'] ) ) . '" style="color:' . $atts['icon_color'] . '"></i>';
|
112 |
+
su_query_asset( 'css', 'font-awesome' );
|
113 |
+
}
|
114 |
+
|
115 |
+
else {
|
116 |
+
$atts['icon'] = '<img src="' . $atts['icon'] . '" alt="" />';
|
117 |
+
}
|
118 |
+
|
119 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
120 |
+
|
121 |
+
return '<div class="su-list su-list-style-' . $atts['style'] . su_get_css_class( $atts ) . '">' . str_replace( '<li>', '<li>' . $atts['icon'] . ' ', su_do_nested_shortcodes( $content, 'list' ) ) . '</div>';
|
122 |
+
|
123 |
+
}
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'media',
|
5 |
+
'callback' => 'su_shortcode_media',
|
6 |
+
'deprecated' => true,
|
7 |
+
'hidden' => true,
|
8 |
+
) );
|
9 |
+
|
10 |
+
function su_shortcode_media( $atts = null, $content = null ) {
|
11 |
+
|
12 |
+
$atts = shortcode_atts( array(
|
13 |
+
'url' => '',
|
14 |
+
'width' => 600,
|
15 |
+
'height' => 400,
|
16 |
+
'class' => ''
|
17 |
+
), $atts, 'media' );
|
18 |
+
|
19 |
+
if ( strpos( $atts['url'], 'youtu' ) !== false ) {
|
20 |
+
return su_shortcode_youtube( $atts, $content );
|
21 |
+
}
|
22 |
+
elseif ( strpos( $atts['url'], 'vimeo' ) !== false ) {
|
23 |
+
return su_shortcode_vimeo( $atts, $content );
|
24 |
+
}
|
25 |
+
else {
|
26 |
+
return '<img src="' . $atts['url'] . '" width="' . $atts['width'] . '" height="' . $atts['height'] . '" style="max-width:100%" />';
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'members',
|
5 |
+
'callback' => 'su_shortcode_members',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/members.svg',
|
7 |
+
'name' => __( 'Members', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'message' => array(
|
12 |
+
'default' => __( 'This content is for registered users only. Please %login%.', 'shortcodes-ultimate' ),
|
13 |
+
'name' => __( 'Message', 'shortcodes-ultimate' ), 'desc' => __( 'Message for not logged users', 'shortcodes-ultimate' )
|
14 |
+
),
|
15 |
+
'color' => array(
|
16 |
+
'type' => 'color',
|
17 |
+
'default' => '#ffcc00',
|
18 |
+
'name' => __( 'Box color', 'shortcodes-ultimate' ), 'desc' => __( 'This color will applied only to box for not logged users', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'login_text' => array(
|
21 |
+
'default' => __( 'login', 'shortcodes-ultimate' ),
|
22 |
+
'name' => __( 'Login link text', 'shortcodes-ultimate' ), 'desc' => __( 'Text for the login link', 'shortcodes-ultimate' )
|
23 |
+
),
|
24 |
+
'login_url' => array(
|
25 |
+
'default' => wp_login_url(),
|
26 |
+
'name' => __( 'Login link url', 'shortcodes-ultimate' ), 'desc' => __( 'Login link url', 'shortcodes-ultimate' )
|
27 |
+
),
|
28 |
+
'class' => array(
|
29 |
+
'type' => 'extra_css_class',
|
30 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
31 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
32 |
+
'default' => '',
|
33 |
+
),
|
34 |
+
),
|
35 |
+
'content' => __( 'Content for logged members', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'Content for logged in members only', 'shortcodes-ultimate' ),
|
37 |
+
'icon' => 'lock',
|
38 |
+
) );
|
39 |
+
|
40 |
+
function su_shortcode_members( $atts = null, $content = null ) {
|
41 |
+
|
42 |
+
$atts = shortcode_atts( array(
|
43 |
+
'message' => __( 'This content is for registered users only. Please %login%.', 'shortcodes-ultimate' ),
|
44 |
+
'color' => '#ffcc00',
|
45 |
+
'style' => null, // 3.x
|
46 |
+
'login_text' => __( 'login', 'shortcodes-ultimate' ),
|
47 |
+
'login_url' => wp_login_url(),
|
48 |
+
'login' => null, // 3.x
|
49 |
+
'class' => ''
|
50 |
+
), $atts, 'members' );
|
51 |
+
|
52 |
+
if ( $atts['style'] !== null ) {
|
53 |
+
$atts['color'] = str_replace( array( '0', '1', '2' ), array( '#fff', '#FFFF29', '#1F9AFF' ), $atts['style'] );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( is_feed() ) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( is_user_logged_in() ) {
|
61 |
+
return do_shortcode( $content );
|
62 |
+
}
|
63 |
+
|
64 |
+
// 3.x
|
65 |
+
if ( $atts['login'] !== null && $atts['login'] == '0' ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
$login = '<a href="' . esc_attr( $atts['login_url'] ) . '">' . $atts['login_text'] . '</a>';
|
70 |
+
|
71 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
72 |
+
|
73 |
+
return '<div class="su-members' . su_get_css_class( $atts ) . '" style="background-color:' . su_hex_shift( $atts['color'], 'lighter', 50 ) . ';border-color:' .su_hex_shift( $atts['color'], 'darker', 20 ) . ';color:' .su_hex_shift( $atts['color'], 'darker', 60 ) . '">' . str_replace( '%login%', $login, su_do_attribute( $atts['message'] ) ) . '</div>';
|
74 |
+
|
75 |
+
}
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'menu',
|
5 |
+
'callback' => 'su_shortcode_menu',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/menu.svg',
|
7 |
+
'name' => __( 'Menu', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'name' => array(
|
12 |
+
'values' => array( ),
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'Menu name', 'shortcodes-ultimate' ), 'desc' => __( 'Custom menu name. Ex: Main menu', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'class' => array(
|
17 |
+
'type' => 'extra_css_class',
|
18 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
20 |
+
'default' => '',
|
21 |
+
),
|
22 |
+
),
|
23 |
+
'desc' => __( 'Custom menu by name', 'shortcodes-ultimate' ),
|
24 |
+
'icon' => 'bars',
|
25 |
+
) );
|
26 |
+
|
27 |
+
function su_shortcode_menu( $atts = null, $content = null ) {
|
28 |
+
$atts = shortcode_atts( array(
|
29 |
+
'name' => false,
|
30 |
+
'class' => ''
|
31 |
+
), $atts, 'menu' );
|
32 |
+
$return = wp_nav_menu( array(
|
33 |
+
'echo' => false,
|
34 |
+
'menu' => $atts['name'],
|
35 |
+
'container' => false,
|
36 |
+
'fallback_cb' => 'su_shortcode_menu_fallback',
|
37 |
+
'items_wrap' => '<ul id="%1$s" class="%2$s' . su_get_css_class( $atts ) . '">%3$s</ul>'
|
38 |
+
) );
|
39 |
+
return ( $atts['name'] ) ? $return : false;
|
40 |
+
}
|
41 |
+
|
42 |
+
function su_shortcode_menu_fallback() {
|
43 |
+
return __( 'This menu doesn\'t exists, or has no elements', 'shortcodes-ultimate' );
|
44 |
+
}
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'meta',
|
5 |
+
'callback' => 'su_shortcode_meta',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/meta.svg',
|
7 |
+
'name' => __( 'Meta data', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'data',
|
10 |
+
'atts' => array(
|
11 |
+
'key' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Key', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Meta key name', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'default' => array(
|
17 |
+
'default' => '',
|
18 |
+
'name' => __( 'Default', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'This text will be shown if data is not found', 'shortcodes-ultimate' )
|
20 |
+
),
|
21 |
+
'before' => array(
|
22 |
+
'default' => '',
|
23 |
+
'name' => __( 'Before', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => __( 'This content will be shown before the value', 'shortcodes-ultimate' )
|
25 |
+
),
|
26 |
+
'after' => array(
|
27 |
+
'default' => '',
|
28 |
+
'name' => __( 'After', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'This content will be shown after the value', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'post_id' => array(
|
32 |
+
'default' => '',
|
33 |
+
'name' => __( 'Post ID', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'You can specify custom post ID. Leave this field empty to use an ID of the current post. Current post ID may not work in Live Preview mode', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'filter' => array(
|
37 |
+
'default' => '',
|
38 |
+
'name' => __( 'Filter', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Name of your function must include word <b>filter</b>. Example function: ', 'shortcodes-ultimate' ) . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>"
|
40 |
+
)
|
41 |
+
),
|
42 |
+
'desc' => __( 'Post meta', 'shortcodes-ultimate' ),
|
43 |
+
'icon' => 'info-circle',
|
44 |
+
) );
|
45 |
+
|
46 |
+
function su_shortcode_meta( $atts = null, $content = null ) {
|
47 |
+
$atts = shortcode_atts( array(
|
48 |
+
'key' => '',
|
49 |
+
'default' => '',
|
50 |
+
'before' => '',
|
51 |
+
'after' => '',
|
52 |
+
'post_id' => '',
|
53 |
+
'filter' => ''
|
54 |
+
), $atts, 'meta' );
|
55 |
+
// Define current post ID
|
56 |
+
if ( !$atts['post_id'] ) $atts['post_id'] = get_the_ID();
|
57 |
+
// Check post ID
|
58 |
+
if ( !is_numeric( $atts['post_id'] ) || $atts['post_id'] < 1 ) return sprintf( '<p class="su-error">Meta: %s</p>', __( 'post ID is incorrect', 'shortcodes-ultimate' ) );
|
59 |
+
// Check key name
|
60 |
+
if ( !$atts['key'] ) return sprintf( '<p class="su-error">Meta: %s</p>', __( 'please specify meta key name', 'shortcodes-ultimate' ) );
|
61 |
+
// Get the meta
|
62 |
+
$meta = get_post_meta( $atts['post_id'], $atts['key'], true );
|
63 |
+
// Set default value if meta is empty
|
64 |
+
if ( !$meta ) $meta = $atts['default'];
|
65 |
+
// Apply cutom filter
|
66 |
+
if (
|
67 |
+
$atts['filter'] &&
|
68 |
+
su_is_filter_safe( $atts['filter'] ) &&
|
69 |
+
function_exists( $atts['filter'] )
|
70 |
+
) {
|
71 |
+
$meta = call_user_func( $atts['filter'], $meta );
|
72 |
+
}
|
73 |
+
// Return result
|
74 |
+
return ( $meta ) ? $atts['before'] . $meta . $atts['after'] : '';
|
75 |
+
}
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'note',
|
5 |
+
'callback' => 'su_shortcode_note',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/note.svg',
|
7 |
+
'name' => __( 'Note', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'atts' => array(
|
11 |
+
'note_color' => array(
|
12 |
+
'type' => 'color',
|
13 |
+
'values' => array( ),
|
14 |
+
'default' => '#FFFF66',
|
15 |
+
'name' => __( 'Background', 'shortcodes-ultimate' ), 'desc' => __( 'Note background color', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'text_color' => array(
|
18 |
+
'type' => 'color',
|
19 |
+
'values' => array( ),
|
20 |
+
'default' => '#333333',
|
21 |
+
'name' => __( 'Text color', 'shortcodes-ultimate' ),
|
22 |
+
'desc' => __( 'Note text color', 'shortcodes-ultimate' )
|
23 |
+
),
|
24 |
+
'radius' => array(
|
25 |
+
'type' => 'slider',
|
26 |
+
'min' => 0,
|
27 |
+
'max' => 20,
|
28 |
+
'step' => 1,
|
29 |
+
'default' => 3,
|
30 |
+
'name' => __( 'Radius', 'shortcodes-ultimate' ), 'desc' => __( 'Note corners radius', 'shortcodes-ultimate' )
|
31 |
+
),
|
32 |
+
'class' => array(
|
33 |
+
'type' => 'extra_css_class',
|
34 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
35 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
36 |
+
'default' => '',
|
37 |
+
),
|
38 |
+
),
|
39 |
+
'content' => __( 'Note text', 'shortcodes-ultimate' ),
|
40 |
+
'desc' => __( 'Colored box', 'shortcodes-ultimate' ),
|
41 |
+
'icon' => 'list-alt',
|
42 |
+
) );
|
43 |
+
|
44 |
+
function su_shortcode_note( $atts = null, $content = null ) {
|
45 |
+
|
46 |
+
$atts = shortcode_atts( array(
|
47 |
+
'note_color' => '#FFFF66',
|
48 |
+
'text_color' => '#333333',
|
49 |
+
'background' => null, // 3.x
|
50 |
+
'color' => null, // 3.x
|
51 |
+
'radius' => '3',
|
52 |
+
'class' => ''
|
53 |
+
), $atts, 'note' );
|
54 |
+
|
55 |
+
if ( $atts['color'] !== null ) {
|
56 |
+
$atts['note_color'] = $atts['color'];
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( $atts['background'] !== null ) {
|
60 |
+
$atts['note_color'] = $atts['background'];
|
61 |
+
}
|
62 |
+
|
63 |
+
// Prepare border-radius
|
64 |
+
$radius = $atts['radius'] != '0'
|
65 |
+
? 'border-radius:' . $atts['radius'] . 'px;-moz-border-radius:' . $atts['radius'] . 'px;-webkit-border-radius:' . $atts['radius'] . 'px;'
|
66 |
+
: '';
|
67 |
+
|
68 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
69 |
+
|
70 |
+
return '<div class="su-note' . su_get_css_class( $atts ) . '" style="border-color:' . su_hex_shift( $atts['note_color'], 'darker', 10 ) . ';' . $radius . '"><div class="su-note-inner su-clearfix" style="background-color:' . $atts['note_color'] . ';border-color:' . su_hex_shift( $atts['note_color'], 'lighter', 80 ) . ';color:' . $atts['text_color'] . ';' . $radius . '">' . su_do_nested_shortcodes( $content, 'note' ) . '</div></div>';
|
71 |
+
|
72 |
+
}
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'permalink',
|
5 |
+
'callback' => 'su_shortcode_permalink',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/permalink.svg',
|
7 |
+
'name' => __( 'Permalink', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'mixed',
|
9 |
+
'group' => 'content other',
|
10 |
+
'atts' => array(
|
11 |
+
'id' => array(
|
12 |
+
'default' => 1,
|
13 |
+
'name' => __( 'ID', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Post or page ID', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'target' => array(
|
17 |
+
'type' => 'select',
|
18 |
+
'values' => array(
|
19 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
20 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
21 |
+
),
|
22 |
+
'default' => 'self',
|
23 |
+
'name' => __( 'Target', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => __( 'Link target', 'shortcodes-ultimate' )
|
25 |
+
),
|
26 |
+
'title' => array(
|
27 |
+
'default' => '',
|
28 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'A value for the title attribute of the link', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'rel' => array(
|
32 |
+
'default' => '',
|
33 |
+
'name' => __( 'Rel', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'A value for the rel attribute of the link', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'class' => array(
|
37 |
+
'type' => 'extra_css_class',
|
38 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
40 |
+
'default' => '',
|
41 |
+
),
|
42 |
+
),
|
43 |
+
'content' => '',
|
44 |
+
'desc' => __( 'Permalink to specified post/page', 'shortcodes-ultimate' ),
|
45 |
+
'icon' => 'link',
|
46 |
+
) );
|
47 |
+
|
48 |
+
function su_shortcode_permalink( $atts = null, $content = null ) {
|
49 |
+
|
50 |
+
$atts = shortcode_atts( array(
|
51 |
+
'id' => 1,
|
52 |
+
'p' => null, // 3.x
|
53 |
+
'target' => 'self',
|
54 |
+
'title' => '',
|
55 |
+
'rel' => '',
|
56 |
+
'class' => '',
|
57 |
+
), $atts, 'permalink' );
|
58 |
+
|
59 |
+
if ( $atts['p'] !== null ) {
|
60 |
+
$atts['id'] = $atts['p'];
|
61 |
+
}
|
62 |
+
|
63 |
+
$atts['id'] = su_do_attribute( $atts['id'] );
|
64 |
+
|
65 |
+
if ( ! $content ) {
|
66 |
+
$content = get_the_title( $atts['id'] );
|
67 |
+
}
|
68 |
+
|
69 |
+
return sprintf(
|
70 |
+
'<a href="%s" title="%s" target="_%s" rel="%s" class="%s">%s</a>',
|
71 |
+
get_permalink( $atts['id'] ),
|
72 |
+
esc_attr( $atts['title'] ),
|
73 |
+
esc_attr( $atts['target'] ),
|
74 |
+
esc_attr( $atts['rel'] ),
|
75 |
+
su_get_css_class( $atts ),
|
76 |
+
do_shortcode( $content )
|
77 |
+
);
|
78 |
+
|
79 |
+
}
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'post',
|
5 |
+
'type' => 'single',
|
6 |
+
'group' => 'data',
|
7 |
+
'callback' => 'su_shortcode_post',
|
8 |
+
'icon' => 'info-circle',
|
9 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/post.svg',
|
10 |
+
'name' => __( 'Post data', 'shortcodes-ultimate' ),
|
11 |
+
'desc' => __( 'The utility shortcode to display various post data, like post title, status or excerpt', 'shortcodes-ultimate' ),
|
12 |
+
'atts' => array(
|
13 |
+
'field' => array(
|
14 |
+
'type' => 'select',
|
15 |
+
'values' => array(
|
16 |
+
'ID' => __( 'Post ID', 'shortcodes-ultimate' ),
|
17 |
+
'post_author' => __( 'Post author', 'shortcodes-ultimate' ),
|
18 |
+
'post_date' => __( 'Post date', 'shortcodes-ultimate' ),
|
19 |
+
'post_date_gmt' => __( 'Post date', 'shortcodes-ultimate' ) . ' GMT',
|
20 |
+
'post_content' => __( 'Post content', 'shortcodes-ultimate' ),
|
21 |
+
'post_title' => __( 'Post title', 'shortcodes-ultimate' ),
|
22 |
+
'post_excerpt' => __( 'Post excerpt', 'shortcodes-ultimate' ),
|
23 |
+
'post_status' => __( 'Post status', 'shortcodes-ultimate' ),
|
24 |
+
'comment_status' => __( 'Comment status', 'shortcodes-ultimate' ),
|
25 |
+
'ping_status' => __( 'Ping status', 'shortcodes-ultimate' ),
|
26 |
+
'post_name' => __( 'Post name', 'shortcodes-ultimate' ),
|
27 |
+
'post_modified' => __( 'Post modified', 'shortcodes-ultimate' ),
|
28 |
+
'post_modified_gmt' => __( 'Post modified', 'shortcodes-ultimate' ) . ' GMT',
|
29 |
+
'post_content_filtered' => __( 'Filtered post content', 'shortcodes-ultimate' ),
|
30 |
+
'post_parent' => __( 'Post parent', 'shortcodes-ultimate' ),
|
31 |
+
'guid' => __( 'GUID', 'shortcodes-ultimate' ),
|
32 |
+
'menu_order' => __( 'Menu order', 'shortcodes-ultimate' ),
|
33 |
+
'post_type' => __( 'Post type', 'shortcodes-ultimate' ),
|
34 |
+
'post_mime_type' => __( 'Post mime type', 'shortcodes-ultimate' ),
|
35 |
+
'comment_count' => __( 'Comment count', 'shortcodes-ultimate' )
|
36 |
+
),
|
37 |
+
'default' => 'post_title',
|
38 |
+
'name' => __( 'Field', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Post data field name', 'shortcodes-ultimate' )
|
40 |
+
),
|
41 |
+
'default' => array(
|
42 |
+
'default' => '',
|
43 |
+
'name' => __( 'Default', 'shortcodes-ultimate' ),
|
44 |
+
'desc' => __( 'This text will be shown if data is not found', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'before' => array(
|
47 |
+
'default' => '',
|
48 |
+
'name' => __( 'Before', 'shortcodes-ultimate' ),
|
49 |
+
'desc' => __( 'This content will be shown before the value', 'shortcodes-ultimate' )
|
50 |
+
),
|
51 |
+
'after' => array(
|
52 |
+
'default' => '',
|
53 |
+
'name' => __( 'After', 'shortcodes-ultimate' ),
|
54 |
+
'desc' => __( 'This content will be shown after the value', 'shortcodes-ultimate' )
|
55 |
+
),
|
56 |
+
'post_id' => array(
|
57 |
+
'default' => '',
|
58 |
+
'name' => __( 'Post ID', 'shortcodes-ultimate' ),
|
59 |
+
'desc' => __( 'You can specify custom post ID. Post slug is also allowed. Leave this field empty to use ID of the current post. Current post ID may not work in Live Preview mode', 'shortcodes-ultimate' )
|
60 |
+
),
|
61 |
+
'post_type' => array(
|
62 |
+
'type' => 'post_type',
|
63 |
+
'default' => 'post',
|
64 |
+
'name' => __( 'Post type', 'shortcodes-ultimate' ),
|
65 |
+
'desc' => __( 'Post type of the post you want to display the data from', 'shortcodes-ultimate' )
|
66 |
+
),
|
67 |
+
'filter' => array(
|
68 |
+
'default' => '',
|
69 |
+
'name' => __( 'Filter', 'shortcodes-ultimate' ),
|
70 |
+
'desc' => __( 'You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Name of your function must include word <b>filter</b>. Example function: ', 'shortcodes-ultimate' ) . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>"
|
71 |
+
)
|
72 |
+
),
|
73 |
+
) );
|
74 |
+
|
75 |
+
function su_shortcode_post( $atts = null, $content = null ) {
|
76 |
+
|
77 |
+
$atts = shortcode_atts( array(
|
78 |
+
'field' => 'post_title',
|
79 |
+
'default' => '',
|
80 |
+
'before' => '',
|
81 |
+
'after' => '',
|
82 |
+
'post_id' => '',
|
83 |
+
'post_type' => 'post',
|
84 |
+
'filter' => ''
|
85 |
+
), $atts, 'post' );
|
86 |
+
|
87 |
+
if ( ! $atts['post_id'] ) {
|
88 |
+
$atts['post_id'] = get_the_ID();
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( ! $atts['post_id'] ) {
|
92 |
+
return su_error_message( 'Post', __( 'invalid post ID', 'shortcodes-ultimate' ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
$post = is_numeric( $atts['post_id'] )
|
96 |
+
? get_post( $atts['post_id'] )
|
97 |
+
: get_page_by_path( $atts['post_id'], OBJECT, $atts['post_type'] );
|
98 |
+
|
99 |
+
$data = empty( $post ) || empty( $post->{$atts['field']} )
|
100 |
+
? $atts['default']
|
101 |
+
: $post->{$atts['field']};
|
102 |
+
|
103 |
+
if (
|
104 |
+
$atts['filter'] &&
|
105 |
+
su_is_filter_safe( $atts['filter'] ) &&
|
106 |
+
function_exists( $atts['filter'] )
|
107 |
+
) {
|
108 |
+
$data = call_user_func( $atts['filter'], $data );
|
109 |
+
}
|
110 |
+
|
111 |
+
return $data ? $atts['before'] . $data . $atts['after'] : '';
|
112 |
+
|
113 |
+
}
|
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'posts',
|
5 |
+
'callback' => 'su_shortcode_posts',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/posts.svg',
|
7 |
+
'name' => __( 'Posts', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'other',
|
10 |
+
'article' => 'http://docs.getshortcodes.com/article/43-posts',
|
11 |
+
'atts' => array(
|
12 |
+
'template' => array(
|
13 |
+
'default' => 'templates/default-loop.php', 'name' => __( 'Template', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Relative path to the template file. Default templates placed in the plugin directory (templates folder). You can copy them under your theme directory and modify as you want. You can use following default templates that already available in the plugin directory:<br/><b%value>templates/default-loop.php</b> - posts loop<br/><b%value>templates/teaser-loop.php</b> - posts loop with thumbnail and title<br/><b%value>templates/single-post.php</b> - single post template<br/><b%value>templates/list-loop.php</b> - unordered list with posts titles', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'id' => array(
|
17 |
+
'default' => '',
|
18 |
+
'name' => __( 'Post ID\'s', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'Enter comma separated ID\'s of the posts that you want to show', 'shortcodes-ultimate' )
|
20 |
+
),
|
21 |
+
'posts_per_page' => array(
|
22 |
+
'type' => 'number',
|
23 |
+
'min' => -1,
|
24 |
+
'max' => 10000,
|
25 |
+
'step' => 1,
|
26 |
+
'default' => get_option( 'posts_per_page' ),
|
27 |
+
'name' => __( 'Posts per page', 'shortcodes-ultimate' ),
|
28 |
+
'desc' => __( 'Specify number of posts that you want to show. Enter -1 to get all posts', 'shortcodes-ultimate' )
|
29 |
+
),
|
30 |
+
'post_type' => array(
|
31 |
+
'type' => 'post_type',
|
32 |
+
'multiple' => true,
|
33 |
+
'values' => array(),
|
34 |
+
'default' => 'post',
|
35 |
+
'name' => __( 'Post types', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'Select post types. Hold Ctrl key to select multiple post types', 'shortcodes-ultimate' )
|
37 |
+
),
|
38 |
+
'taxonomy' => array(
|
39 |
+
'type' => 'taxonomy',
|
40 |
+
'values' => array(),
|
41 |
+
'default' => 'category',
|
42 |
+
'name' => __( 'Taxonomy', 'shortcodes-ultimate' ),
|
43 |
+
'desc' => __( 'Select taxonomy to show posts from', 'shortcodes-ultimate' )
|
44 |
+
),
|
45 |
+
'tax_term' => array(
|
46 |
+
'type' => 'term',
|
47 |
+
'multiple' => true,
|
48 |
+
'values' => array(),
|
49 |
+
'default' => '',
|
50 |
+
'name' => __( 'Terms', 'shortcodes-ultimate' ),
|
51 |
+
'desc' => __( 'Select terms to show posts from', 'shortcodes-ultimate' )
|
52 |
+
),
|
53 |
+
'tax_operator' => array(
|
54 |
+
'type' => 'select',
|
55 |
+
'values' => array(
|
56 |
+
'IN' => __( 'IN - posts that have any of selected categories terms', 'shortcodes-ultimate' ),
|
57 |
+
'NOT IN' => __( 'NOT IN - posts that is does not have any of selected terms', 'shortcodes-ultimate' ),
|
58 |
+
'AND' => __( 'AND - posts that have all selected terms', 'shortcodes-ultimate' ),
|
59 |
+
),
|
60 |
+
'default' => 'IN',
|
61 |
+
'name' => __( 'Taxonomy term operator', 'shortcodes-ultimate' ),
|
62 |
+
'desc' => __( 'Operator to test', 'shortcodes-ultimate' )
|
63 |
+
),
|
64 |
+
// 'author' => array(
|
65 |
+
// 'type' => 'select',
|
66 |
+
// 'multiple' => true,
|
67 |
+
// 'values' => Su_Tools::get_users(),
|
68 |
+
// 'default' => 'default',
|
69 |
+
// 'name' => __( 'Authors', 'shortcodes-ultimate' ),
|
70 |
+
// 'desc' => __( 'Choose the authors whose posts you want to show. Enter here comma-separated list of users (IDs). Example: 1,7,18', 'shortcodes-ultimate' )
|
71 |
+
// ),
|
72 |
+
'author' => array(
|
73 |
+
'default' => '',
|
74 |
+
'name' => __( 'Authors', 'shortcodes-ultimate' ),
|
75 |
+
'desc' => __( 'Enter here comma-separated list of author\'s IDs. Example: 1,7,18', 'shortcodes-ultimate' )
|
76 |
+
),
|
77 |
+
'meta_key' => array(
|
78 |
+
'default' => '',
|
79 |
+
'name' => __( 'Meta key', 'shortcodes-ultimate' ),
|
80 |
+
'desc' => __( 'Enter meta key name to show posts that have this key', 'shortcodes-ultimate' )
|
81 |
+
),
|
82 |
+
'offset' => array(
|
83 |
+
'type' => 'number',
|
84 |
+
'min' => 0,
|
85 |
+
'max' => 10000,
|
86 |
+
'step' => 1, 'default' => 0,
|
87 |
+
'name' => __( 'Offset', 'shortcodes-ultimate' ),
|
88 |
+
'desc' => __( 'Specify offset to start posts loop not from first post', 'shortcodes-ultimate' )
|
89 |
+
),
|
90 |
+
'order' => array(
|
91 |
+
'type' => 'select',
|
92 |
+
'values' => array(
|
93 |
+
'desc' => __( 'Descending', 'shortcodes-ultimate' ),
|
94 |
+
'asc' => __( 'Ascending', 'shortcodes-ultimate' )
|
95 |
+
),
|
96 |
+
'default' => 'DESC',
|
97 |
+
'name' => __( 'Order', 'shortcodes-ultimate' ),
|
98 |
+
'desc' => __( 'Posts order', 'shortcodes-ultimate' )
|
99 |
+
),
|
100 |
+
'orderby' => array(
|
101 |
+
'type' => 'select',
|
102 |
+
'values' => array(
|
103 |
+
'none' => __( 'None', 'shortcodes-ultimate' ),
|
104 |
+
'id' => __( 'Post ID', 'shortcodes-ultimate' ),
|
105 |
+
'author' => __( 'Post author', 'shortcodes-ultimate' ),
|
106 |
+
'title' => __( 'Post title', 'shortcodes-ultimate' ),
|
107 |
+
'name' => __( 'Post slug', 'shortcodes-ultimate' ),
|
108 |
+
'date' => __( 'Date', 'shortcodes-ultimate' ), 'modified' => __( 'Last modified date', 'shortcodes-ultimate' ),
|
109 |
+
'parent' => __( 'Post parent', 'shortcodes-ultimate' ),
|
110 |
+
'rand' => __( 'Random', 'shortcodes-ultimate' ), 'comment_count' => __( 'Comments number', 'shortcodes-ultimate' ),
|
111 |
+
'menu_order' => __( 'Menu order', 'shortcodes-ultimate' ), 'meta_value' => __( 'Meta key values', 'shortcodes-ultimate' ),
|
112 |
+
),
|
113 |
+
'default' => 'date',
|
114 |
+
'name' => __( 'Order by', 'shortcodes-ultimate' ),
|
115 |
+
'desc' => __( 'Order posts by', 'shortcodes-ultimate' )
|
116 |
+
),
|
117 |
+
'post_parent' => array(
|
118 |
+
'default' => '',
|
119 |
+
'name' => __( 'Post parent', 'shortcodes-ultimate' ),
|
120 |
+
'desc' => __( 'Show childrens of entered post (enter post ID)', 'shortcodes-ultimate' )
|
121 |
+
),
|
122 |
+
'post_status' => array(
|
123 |
+
'type' => 'select',
|
124 |
+
'values' => array(
|
125 |
+
'publish' => __( 'Published', 'shortcodes-ultimate' ),
|
126 |
+
'pending' => __( 'Pending', 'shortcodes-ultimate' ),
|
127 |
+
'draft' => __( 'Draft', 'shortcodes-ultimate' ),
|
128 |
+
'auto-draft' => __( 'Auto-draft', 'shortcodes-ultimate' ),
|
129 |
+
'future' => __( 'Future post', 'shortcodes-ultimate' ),
|
130 |
+
'private' => __( 'Private post', 'shortcodes-ultimate' ),
|
131 |
+
'inherit' => __( 'Inherit', 'shortcodes-ultimate' ),
|
132 |
+
'trash' => __( 'Trashed', 'shortcodes-ultimate' ),
|
133 |
+
'any' => __( 'Any', 'shortcodes-ultimate' ),
|
134 |
+
),
|
135 |
+
'default' => 'publish',
|
136 |
+
'name' => __( 'Post status', 'shortcodes-ultimate' ),
|
137 |
+
'desc' => __( 'Show only posts with selected status', 'shortcodes-ultimate' )
|
138 |
+
),
|
139 |
+
'ignore_sticky_posts' => array(
|
140 |
+
'type' => 'bool',
|
141 |
+
'default' => 'no',
|
142 |
+
'name' => __( 'Ignore sticky', 'shortcodes-ultimate' ),
|
143 |
+
'desc' => __( 'Select Yes to ignore posts that is sticked', 'shortcodes-ultimate' )
|
144 |
+
)
|
145 |
+
),
|
146 |
+
'desc' => __( 'Custom posts query with customizable template', 'shortcodes-ultimate' ),
|
147 |
+
'icon' => 'th-list',
|
148 |
+
) );
|
149 |
+
|
150 |
+
function su_shortcode_posts( $atts = null, $content = null ) {
|
151 |
+
|
152 |
+
$original_atts = $atts;
|
153 |
+
|
154 |
+
// Parse attributes
|
155 |
+
$atts = shortcode_atts( array(
|
156 |
+
'template' => 'templates/default-loop.php',
|
157 |
+
'id' => false,
|
158 |
+
'posts_per_page' => get_option( 'posts_per_page' ),
|
159 |
+
'post_type' => 'post',
|
160 |
+
'taxonomy' => 'category',
|
161 |
+
'tax_term' => false,
|
162 |
+
'tax_operator' => 'IN',
|
163 |
+
'author' => '',
|
164 |
+
'tag' => '',
|
165 |
+
'meta_key' => '',
|
166 |
+
'offset' => 0,
|
167 |
+
'order' => 'DESC',
|
168 |
+
'orderby' => 'date',
|
169 |
+
'post_parent' => false,
|
170 |
+
'post_status' => 'publish',
|
171 |
+
'ignore_sticky_posts' => 'no'
|
172 |
+
), $atts, 'posts' );
|
173 |
+
|
174 |
+
$author = sanitize_text_field( $atts['author'] );
|
175 |
+
$id = $atts['id']; // Sanitized later as an array of integers
|
176 |
+
$ignore_sticky_posts = ( bool ) ( $atts['ignore_sticky_posts'] === 'yes' ) ? true : false;
|
177 |
+
$meta_key = sanitize_text_field( $atts['meta_key'] );
|
178 |
+
$offset = intval( $atts['offset'] );
|
179 |
+
$order = sanitize_key( $atts['order'] );
|
180 |
+
$orderby = sanitize_key( $atts['orderby'] );
|
181 |
+
$post_parent = $atts['post_parent'];
|
182 |
+
$post_status = $atts['post_status'];
|
183 |
+
$post_type = sanitize_text_field( $atts['post_type'] );
|
184 |
+
$posts_per_page = intval( $atts['posts_per_page'] );
|
185 |
+
$tag = sanitize_text_field( $atts['tag'] );
|
186 |
+
$tax_operator = $atts['tax_operator'];
|
187 |
+
$tax_term = sanitize_text_field( $atts['tax_term'] );
|
188 |
+
$taxonomy = sanitize_key( $atts['taxonomy'] );
|
189 |
+
// Set up initial query for post
|
190 |
+
$args = array(
|
191 |
+
'category_name' => '',
|
192 |
+
'order' => $order,
|
193 |
+
'orderby' => $orderby,
|
194 |
+
'post_type' => explode( ',', $post_type ),
|
195 |
+
'posts_per_page' => $posts_per_page,
|
196 |
+
'tag' => $tag
|
197 |
+
);
|
198 |
+
// Ignore Sticky Posts
|
199 |
+
if ( $ignore_sticky_posts ) $args['ignore_sticky_posts'] = true;
|
200 |
+
// Meta key (for ordering)
|
201 |
+
if ( !empty( $meta_key ) ) $args['meta_key'] = $meta_key;
|
202 |
+
// If Post IDs
|
203 |
+
if ( $id ) {
|
204 |
+
$posts_in = array_map( 'intval', explode( ',', $id ) );
|
205 |
+
$args['post__in'] = $posts_in;
|
206 |
+
}
|
207 |
+
// Post Author
|
208 |
+
if ( !empty( $author ) ) $args['author'] = $author;
|
209 |
+
// Offset
|
210 |
+
if ( !empty( $offset ) ) $args['offset'] = $offset;
|
211 |
+
// Post Status
|
212 |
+
$post_status = explode( ', ', $post_status );
|
213 |
+
$validated = array();
|
214 |
+
$available = array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash', 'any' );
|
215 |
+
foreach ( $post_status as $unvalidated ) {
|
216 |
+
if ( in_array( $unvalidated, $available ) ) $validated[] = $unvalidated;
|
217 |
+
}
|
218 |
+
if ( !empty( $validated ) ) $args['post_status'] = $validated;
|
219 |
+
// If taxonomy attributes, create a taxonomy query
|
220 |
+
if ( !empty( $taxonomy ) && !empty( $tax_term ) ) {
|
221 |
+
// Term string to array
|
222 |
+
$tax_term = explode( ',', $tax_term );
|
223 |
+
// Validate operator
|
224 |
+
$tax_operator = str_replace( array( 0, 1, 2 ), array( 'IN', 'NOT IN', 'AND' ), $tax_operator );
|
225 |
+
if ( !in_array( $tax_operator, array( 'IN', 'NOT IN', 'AND' ) ) ) $tax_operator = 'IN';
|
226 |
+
$tax_args = array( 'tax_query' => array( array(
|
227 |
+
'taxonomy' => $taxonomy,
|
228 |
+
'field' => ( is_numeric( $tax_term[0] ) ) ? 'id' : 'slug',
|
229 |
+
'terms' => $tax_term,
|
230 |
+
'operator' => $tax_operator ) ) );
|
231 |
+
// Check for multiple taxonomy queries
|
232 |
+
$count = 2;
|
233 |
+
$more_tax_queries = false;
|
234 |
+
while (
|
235 |
+
isset( $original_atts['taxonomy_' . $count] ) &&
|
236 |
+
! empty( $original_atts['taxonomy_' . $count] ) &&
|
237 |
+
isset( $original_atts['tax_' . $count . '_term'] ) &&
|
238 |
+
! empty( $original_atts['tax_' . $count . '_term'] )
|
239 |
+
) {
|
240 |
+
// Sanitize values
|
241 |
+
$more_tax_queries = true;
|
242 |
+
$taxonomy = sanitize_key( $original_atts['taxonomy_' . $count] );
|
243 |
+
$terms = explode( ', ', sanitize_text_field( $original_atts['tax_' . $count . '_term'] ) );
|
244 |
+
$tax_operator = isset( $original_atts['tax_' . $count . '_operator'] ) ? $original_atts[
|
245 |
+
'tax_' . $count . '_operator'] : 'IN';
|
246 |
+
$tax_operator = in_array( $tax_operator, array( 'IN', 'NOT IN', 'AND' ) ) ? $tax_operator : 'IN';
|
247 |
+
$tax_args['tax_query'][] = array( 'taxonomy' => $taxonomy,
|
248 |
+
'field' => 'slug',
|
249 |
+
'terms' => $terms,
|
250 |
+
'operator' => $tax_operator );
|
251 |
+
$count++;
|
252 |
+
}
|
253 |
+
if ( $more_tax_queries ) {
|
254 |
+
|
255 |
+
$tax_relation = 'AND';
|
256 |
+
|
257 |
+
if (
|
258 |
+
isset( $original_atts['tax_relation'] ) &&
|
259 |
+
in_array( $original_atts['tax_relation'], array( 'AND', 'OR' ) )
|
260 |
+
) {
|
261 |
+
$tax_relation = $original_atts['tax_relation'];
|
262 |
+
}
|
263 |
+
|
264 |
+
$args['tax_query']['relation'] = $tax_relation;
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
$args = array_merge( $args, $tax_args );
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
// If post parent attribute, set up parent
|
273 |
+
if ( $post_parent ) {
|
274 |
+
if ( 'current' == $post_parent ) {
|
275 |
+
global $post;
|
276 |
+
$post_parent = $post->ID;
|
277 |
+
}
|
278 |
+
$args['post_parent'] = intval( $post_parent );
|
279 |
+
}
|
280 |
+
// Save original posts
|
281 |
+
global $posts;
|
282 |
+
$original_posts = $posts;
|
283 |
+
// Query posts
|
284 |
+
$posts = new WP_Query( $args );
|
285 |
+
// Buffer output
|
286 |
+
ob_start();
|
287 |
+
// Search for template in stylesheet directory
|
288 |
+
if ( file_exists( STYLESHEETPATH . '/' . $atts['template'] ) ) load_template( STYLESHEETPATH . '/' . $atts['template'], false );
|
289 |
+
// Search for template in theme directory
|
290 |
+
elseif ( file_exists( TEMPLATEPATH . '/' . $atts['template'] ) ) load_template( TEMPLATEPATH . '/' . $atts['template'], false );
|
291 |
+
// Search for template in plugin directory
|
292 |
+
elseif ( file_exists( path_join( dirname( SU_PLUGIN_FILE ), $atts['template'] ) ) ) load_template( path_join( dirname( SU_PLUGIN_FILE ), $atts['template'] ), false );
|
293 |
+
// Template not found
|
294 |
+
else echo su_error_message( 'Posts', __( 'template not found', 'shortcodes-ultimate' ) );
|
295 |
+
$output = ob_get_contents();
|
296 |
+
ob_end_clean();
|
297 |
+
// Return original posts
|
298 |
+
$posts = $original_posts;
|
299 |
+
// Reset the query
|
300 |
+
wp_reset_postdata();
|
301 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
302 |
+
return $output;
|
303 |
+
}
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'private',
|
5 |
+
'callback' => 'su_shortcode_private',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/private.svg',
|
7 |
+
'name' => __( 'Private', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'class' => array(
|
12 |
+
'type' => 'extra_css_class',
|
13 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
15 |
+
'default' => '',
|
16 |
+
),
|
17 |
+
),
|
18 |
+
'content' => __( 'Private note text', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'Private note for post authors. Any content wrapped with this shortcode will only be visible to post authors (users with publish_posts capability).', 'shortcodes-ultimate' ),
|
20 |
+
'icon' => 'lock',
|
21 |
+
) );
|
22 |
+
|
23 |
+
function su_shortcode_private( $atts = null, $content = null ) {
|
24 |
+
|
25 |
+
$atts = shortcode_atts( array( 'class' => '' ), $atts, 'private' );
|
26 |
+
|
27 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
28 |
+
|
29 |
+
return ( current_user_can( 'publish_posts' ) )
|
30 |
+
? '<div class="su-private' . su_get_css_class( $atts ) . '"><div class="su-private-shell">' . do_shortcode( $content ) . '</div></div>'
|
31 |
+
: '';
|
32 |
+
|
33 |
+
}
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'pullquote',
|
5 |
+
'callback' => 'su_shortcode_pullquote',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/pullquote.svg',
|
7 |
+
'name' => __( 'Pullquote', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'atts' => array(
|
11 |
+
'align' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
15 |
+
'right' => __( 'Right', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'default' => 'left',
|
18 |
+
'name' => __( 'Align', 'shortcodes-ultimate' ), 'desc' => __( 'Pullquote alignment (float)', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'class' => array(
|
21 |
+
'type' => 'extra_css_class',
|
22 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
23 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
24 |
+
'default' => '',
|
25 |
+
),
|
26 |
+
),
|
27 |
+
'content' => __( 'Pullquote', 'shortcodes-ultimate' ),
|
28 |
+
'desc' => __( 'Pullquote', 'shortcodes-ultimate' ),
|
29 |
+
'icon' => 'quote-left',
|
30 |
+
) );
|
31 |
+
|
32 |
+
function su_shortcode_pullquote( $atts = null, $content = null ) {
|
33 |
+
|
34 |
+
$atts = shortcode_atts( array(
|
35 |
+
'align' => 'left',
|
36 |
+
'class' => ''
|
37 |
+
), $atts, 'pullquote' );
|
38 |
+
|
39 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
40 |
+
|
41 |
+
return '<div class="su-pullquote su-pullquote-align-' . $atts['align'] . su_get_css_class( $atts ) . '">' . do_shortcode( $content ) . '</div>';
|
42 |
+
|
43 |
+
}
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'qrcode',
|
5 |
+
'callback' => 'su_shortcode_qrcode',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/qrcode.svg',
|
7 |
+
'name' => __( 'QR code', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'data' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Data', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'The text to store within the QR code. You can use here any text or even URL', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'title' => array(
|
17 |
+
'default' => '',
|
18 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => __( 'Enter here short description. This text will be used in alt attribute of QR code', 'shortcodes-ultimate' )
|
20 |
+
),
|
21 |
+
'size' => array(
|
22 |
+
'type' => 'slider',
|
23 |
+
'min' => 10,
|
24 |
+
'max' => 1000,
|
25 |
+
'step' => 10,
|
26 |
+
'default' => 200,
|
27 |
+
'name' => __( 'Size', 'shortcodes-ultimate' ),
|
28 |
+
'desc' => __( 'Image width and height (in pixels)', 'shortcodes-ultimate' )
|
29 |
+
),
|
30 |
+
'margin' => array(
|
31 |
+
'type' => 'slider',
|
32 |
+
'min' => 0,
|
33 |
+
'max' => 50,
|
34 |
+
'step' => 5,
|
35 |
+
'default' => 0,
|
36 |
+
'name' => __( 'Margin', 'shortcodes-ultimate' ),
|
37 |
+
'desc' => __( 'Thickness of a margin (in pixels)', 'shortcodes-ultimate' )
|
38 |
+
),
|
39 |
+
'align' => array(
|
40 |
+
'type' => 'select',
|
41 |
+
'values' => array(
|
42 |
+
'none' => __( 'None', 'shortcodes-ultimate' ),
|
43 |
+
'left' => __( 'Left', 'shortcodes-ultimate' ),
|
44 |
+
'center' => __( 'Center', 'shortcodes-ultimate' ),
|
45 |
+
'right' => __( 'Right', 'shortcodes-ultimate' ),
|
46 |
+
),
|
47 |
+
'default' => 'none',
|
48 |
+
'name' => __( 'Align', 'shortcodes-ultimate' ),
|
49 |
+
'desc' => __( 'Choose image alignment', 'shortcodes-ultimate' )
|
50 |
+
),
|
51 |
+
'link' => array(
|
52 |
+
'default' => '',
|
53 |
+
'name' => __( 'Link', 'shortcodes-ultimate' ),
|
54 |
+
'desc' => __( 'You can make this QR code clickable. Enter here the URL', 'shortcodes-ultimate' )
|
55 |
+
),
|
56 |
+
'target' => array(
|
57 |
+
'type' => 'select',
|
58 |
+
'values' => array(
|
59 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
60 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' ),
|
61 |
+
),
|
62 |
+
'default' => 'blank',
|
63 |
+
'name' => __( 'Link target', 'shortcodes-ultimate' ),
|
64 |
+
'desc' => __( 'Select link target', 'shortcodes-ultimate' )
|
65 |
+
),
|
66 |
+
'color' => array(
|
67 |
+
'type' => 'color',
|
68 |
+
'default' => '#000000',
|
69 |
+
'name' => __( 'Primary color', 'shortcodes-ultimate' ),
|
70 |
+
'desc' => __( 'Pick a primary color', 'shortcodes-ultimate' )
|
71 |
+
),
|
72 |
+
'background' => array(
|
73 |
+
'type' => 'color',
|
74 |
+
'default' => '#ffffff',
|
75 |
+
'name' => __( 'Background color', 'shortcodes-ultimate' ),
|
76 |
+
'desc' => __( 'Pick a background color', 'shortcodes-ultimate' )
|
77 |
+
),
|
78 |
+
'class' => array(
|
79 |
+
'type' => 'extra_css_class',
|
80 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
81 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
82 |
+
'default' => '',
|
83 |
+
),
|
84 |
+
),
|
85 |
+
'desc' => __( 'Advanced QR code generator', 'shortcodes-ultimate' ),
|
86 |
+
'icon' => 'qrcode',
|
87 |
+
) );
|
88 |
+
|
89 |
+
function su_shortcode_qrcode( $atts = null, $content = null ) {
|
90 |
+
$atts = shortcode_atts( array(
|
91 |
+
'data' => '',
|
92 |
+
'title' => '',
|
93 |
+
'size' => 200,
|
94 |
+
'margin' => 0,
|
95 |
+
'align' => 'none',
|
96 |
+
'link' => '',
|
97 |
+
'target' => 'blank',
|
98 |
+
'color' => '#000000',
|
99 |
+
'background' => '#ffffff',
|
100 |
+
'class' => ''
|
101 |
+
), $atts, 'qrcode' );
|
102 |
+
// Check the data
|
103 |
+
if ( !$atts['data'] ) {
|
104 |
+
return su_error_message( 'QR code', __( 'please specify the data', 'shortcodes-ultimate' ) );
|
105 |
+
}
|
106 |
+
// Prepare link
|
107 |
+
$href = ( $atts['link'] ) ? ' href="' . $atts['link'] . '"' : '';
|
108 |
+
// Prepare clickable class
|
109 |
+
if ( $atts['link'] ) $atts['class'] .= ' su-qrcode-clickable';
|
110 |
+
// Prepare title
|
111 |
+
$atts['title'] = esc_attr( $atts['title'] );
|
112 |
+
// Query assets
|
113 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
114 |
+
// Return result
|
115 |
+
return '<span class="su-qrcode su-qrcode-align-' . $atts['align'] . su_get_css_class( $atts ) . '"><a' . $href . ' target="_' . $atts['target'] . '" title="' . $atts['title'] . '"><img src="https://api.qrserver.com/v1/create-qr-code/?data=' . urlencode( $atts['data'] ) . '&size=' . $atts['size'] . 'x' . $atts['size'] . '&format=png&margin=' . $atts['margin'] . '&color=' . su_hex2rgb( $atts['color'] ) . '&bgcolor=' . su_hex2rgb( $atts['background'] ) . '" alt="' . $atts['title'] . '" /></a></span>';
|
116 |
+
}
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'quote',
|
5 |
+
'callback' => 'su_shortcode_quote',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/quote.svg',
|
7 |
+
'name' => __( 'Quote', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'atts' => array(
|
11 |
+
'style' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'default' => __( 'Default', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'default' => 'default',
|
17 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
18 |
+
'desc' => __( 'Choose style for this quote', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
19 |
+
),
|
20 |
+
'cite' => array(
|
21 |
+
'default' => '',
|
22 |
+
'name' => __( 'Cite', 'shortcodes-ultimate' ),
|
23 |
+
'desc' => __( 'Quote author name', 'shortcodes-ultimate' )
|
24 |
+
),
|
25 |
+
'url' => array(
|
26 |
+
'values' => array( ),
|
27 |
+
'default' => '',
|
28 |
+
'name' => __( 'Cite url', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'Url of the quote author. Leave empty to disable link', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'class' => array(
|
32 |
+
'type' => 'extra_css_class',
|
33 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
35 |
+
'default' => '',
|
36 |
+
),
|
37 |
+
),
|
38 |
+
'content' => __( 'Quote', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'Blockquote alternative', 'shortcodes-ultimate' ),
|
40 |
+
'icon' => 'quote-right',
|
41 |
+
) );
|
42 |
+
|
43 |
+
function su_shortcode_quote( $atts = null, $content = null ) {
|
44 |
+
|
45 |
+
$atts = shortcode_atts( array(
|
46 |
+
'style' => 'default',
|
47 |
+
'cite' => false,
|
48 |
+
'url' => false,
|
49 |
+
'class' => ''
|
50 |
+
), $atts, 'quote' );
|
51 |
+
|
52 |
+
$cite_link = $atts['url'] && $atts['cite']
|
53 |
+
? '<a href="' . $atts['url'] . '" target="_blank">' . $atts['cite'] . '</a>'
|
54 |
+
: $atts['cite'];
|
55 |
+
|
56 |
+
$cite = $atts['cite']
|
57 |
+
? '<span class="su-quote-cite">' . $cite_link . '</span>'
|
58 |
+
: '';
|
59 |
+
|
60 |
+
$cite_class = $atts['cite']
|
61 |
+
? ' su-quote-has-cite'
|
62 |
+
: '';
|
63 |
+
|
64 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
65 |
+
|
66 |
+
return '<div class="su-quote su-quote-style-' . $atts['style'] . $cite_class . su_get_css_class( $atts ) . '"><div class="su-quote-inner su-clearfix">' . do_shortcode( $content ) . su_do_attribute( $cite ) . '</div></div>';
|
67 |
+
|
68 |
+
}
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'row',
|
5 |
+
'callback' => 'su_shortcode_row',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/row.svg',
|
7 |
+
'name' => __( 'Columns', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'required_child' => 'column',
|
11 |
+
'article' => 'http://docs.getshortcodes.com/article/44-row-column',
|
12 |
+
'atts' => array(
|
13 |
+
'class' => array(
|
14 |
+
'type' => 'extra_css_class',
|
15 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
16 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
17 |
+
'default' => '',
|
18 |
+
),
|
19 |
+
),
|
20 |
+
'content' => array(
|
21 |
+
'id' => 'column',
|
22 |
+
'number' => 2,
|
23 |
+
),
|
24 |
+
'desc' => __( 'Row for flexible columns', 'shortcodes-ultimate' ),
|
25 |
+
'icon' => 'columns',
|
26 |
+
) );
|
27 |
+
|
28 |
+
function su_shortcode_row( $atts = null, $content = null ) {
|
29 |
+
|
30 |
+
$atts = shortcode_atts( array( 'class' => '' ), $atts );
|
31 |
+
|
32 |
+
return '<div class="su-row' . su_get_css_class( $atts ) . '">' . su_do_nested_shortcodes( $content, 'row' ) . '</div>';
|
33 |
+
|
34 |
+
}
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'scheduler',
|
5 |
+
'callback' => 'su_shortcode_scheduler',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/scheduler.svg',
|
7 |
+
'name' => __( 'Scheduler', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'time' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Time', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => sprintf( __( 'In this field you can specify one or more time ranges. Every day at this time the content of shortcode will be visible. %s %s %s - show content from 9:00 to 18:00 %s - show content from 9:00 to 13:00 and from 14:00 to 18:00 %s - example with minutes (content will be visible each day, 45 minutes) %s - example with seconds', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>9-18</b>', '<br><b%value>9-13, 14-18</b>', '<br><b%value>9:30-10:15</b>', '<br><b%value>9:00:00-17:59:59</b>' )
|
15 |
+
),
|
16 |
+
'days_week' => array(
|
17 |
+
'default' => '',
|
18 |
+
'name' => __( 'Days of the week', 'shortcodes-ultimate' ),
|
19 |
+
'desc' => sprintf( __( 'In this field you can specify one or more days of the week. Every week at these days the content of shortcode will be visible. %s 0 - Sunday %s 1 - Monday %s 2 - Tuesday %s 3 - Wednesday %s 4 - Thursday %s 5 - Friday %s 6 - Saturday %s %s %s - show content from Monday to Friday %s - show content only at Sunday %s - show content at Sunday and from Wednesday to Friday', 'shortcodes-ultimate' ), '<br><br>', '<br>', '<br>', '<br>', '<br>', '<br>', '<br>', '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>1-5</b>', '<br><b%value>0</b>', '<br><b%value>0, 3-5</b>' )
|
20 |
+
),
|
21 |
+
'days_month' => array(
|
22 |
+
'default' => '',
|
23 |
+
'name' => __( 'Days of the month', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => sprintf( __( 'In this field you can specify one or more days of the month. Every month at these days the content of shortcode will be visible. %s %s %s - show content only at first day of month %s - show content from 1th to 5th %s - show content from 10th to 15th and from 20th to 25th', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>1</b>', '<br><b%value>1-5</b>', '<br><b%value>10-15, 20-25</b>' )
|
25 |
+
),
|
26 |
+
'months' => array(
|
27 |
+
'default' => '',
|
28 |
+
'name' => __( 'Months', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => sprintf( __( 'In this field you can specify the month or months in which the content will be visible. %s %s %s - show content only in January %s - show content from February to June %s - show content in January, March and from May to July', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>1</b>', '<br><b%value>2-6</b>', '<br><b%value>1, 3, 5-7</b>' )
|
30 |
+
),
|
31 |
+
'years' => array(
|
32 |
+
'default' => '',
|
33 |
+
'name' => __( 'Years', 'shortcodes-ultimate' ),
|
34 |
+
'desc' => sprintf( __( 'In this field you can specify the year or years in which the content will be visible. %s %s %s - show content only in 2014 %s - show content from 2014 to 2016 %s - show content in 2014, 2018 and from 2020 to 2022', 'shortcodes-ultimate' ), '<br><br>', __( 'Examples (click to set)', 'shortcodes-ultimate' ), '<br><b%value>2014</b>', '<br><b%value>2014-2016</b>', '<br><b%value>2014, 2018, 2020-2022</b>' )
|
35 |
+
),
|
36 |
+
'alt' => array(
|
37 |
+
'default' => '',
|
38 |
+
'name' => __( 'Alternative text', 'shortcodes-ultimate' ),
|
39 |
+
'desc' => __( 'In this field you can type the text which will be shown if content is not visible at the current moment', 'shortcodes-ultimate' )
|
40 |
+
)
|
41 |
+
),
|
42 |
+
'content' => __( 'Scheduled content', 'shortcodes-ultimate' ),
|
43 |
+
'desc' => __( 'Allows to show the content only at the specified time period', 'shortcodes-ultimate' ),
|
44 |
+
'note' => __( 'This shortcode allows you to show content only at the specified time.', 'shortcodes-ultimate' ) . '<br><br>' . __( 'Please pay special attention to the descriptions, which are located below each text field. It will save you a lot of time', 'shortcodes-ultimate' ) . '<br><br>' . __( 'By default, the content of this shortcode will be visible all the time. By using fields below, you can add some limitations. For example, if you type 1-5 in the Days of the week field, content will be only shown from Monday to Friday. Using the same principles, you can limit content visibility from years to seconds.', 'shortcodes-ultimate' ),
|
45 |
+
'icon' => 'clock-o',
|
46 |
+
) );
|
47 |
+
|
48 |
+
function su_shortcode_scheduler( $atts = null, $content = null ) {
|
49 |
+
|
50 |
+
$atts = shortcode_atts( array(
|
51 |
+
'time' => 'all',
|
52 |
+
'days_week' => 'all',
|
53 |
+
'days_month' => 'all',
|
54 |
+
'months' => 'all',
|
55 |
+
'years' => 'all',
|
56 |
+
'alt' => ''
|
57 |
+
), $atts, 'scheduler' );
|
58 |
+
|
59 |
+
$timestamp = current_time( 'timestamp', 0 );
|
60 |
+
$now = array(
|
61 |
+
'time' => $timestamp,
|
62 |
+
'day_week' => date( 'w', $timestamp ),
|
63 |
+
'day_month' => date( 'j', $timestamp ),
|
64 |
+
'month' => date( 'n', $timestamp ),
|
65 |
+
'year' => date( 'Y', $timestamp ),
|
66 |
+
);
|
67 |
+
|
68 |
+
if ( $atts['years'] !== 'all' ) {
|
69 |
+
|
70 |
+
$atts['years'] = preg_replace( "/[^0-9-,]/", '', $atts['years'] );
|
71 |
+
|
72 |
+
$selected_years = su_parse_range( $atts['years'] );
|
73 |
+
|
74 |
+
if ( ! in_array( $now['year'], $selected_years ) ) {
|
75 |
+
return su_do_attribute( $atts['alt'] );
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( $atts['months'] !== 'all' ) {
|
81 |
+
|
82 |
+
$atts['months'] = preg_replace( "/[^0-9-,]/", '', $atts['months'] );
|
83 |
+
|
84 |
+
$selected_months = su_parse_range( $atts['months'] );
|
85 |
+
|
86 |
+
if ( ! in_array( $now['month'], $selected_months ) ) {
|
87 |
+
return su_do_attribute( $atts['alt'] );
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
if ( $atts['days_month'] !== 'all' ) {
|
93 |
+
|
94 |
+
$atts['days_month'] = preg_replace( "/[^0-9-,]/", '', $atts['days_month'] );
|
95 |
+
|
96 |
+
$selected_days_month = su_parse_range( $atts['days_month'] );
|
97 |
+
|
98 |
+
if ( ! in_array( $now['day_month'], $selected_days_month ) ) {
|
99 |
+
return su_do_attribute( $atts['alt'] );
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
if ( $atts['days_week'] !== 'all' ) {
|
105 |
+
|
106 |
+
$atts['days_week'] = preg_replace( "/[^0-9-,]/", '', $atts['days_week'] );
|
107 |
+
|
108 |
+
$selected_days_week = su_parse_range( $atts['days_week'] );
|
109 |
+
|
110 |
+
if ( ! in_array( $now['day_week'], $selected_days_week ) ) {
|
111 |
+
return su_do_attribute( $atts['alt'] );
|
112 |
+
}
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
if ( $atts['time'] !== 'all' ) {
|
117 |
+
|
118 |
+
$valid_time = false;
|
119 |
+
$atts['time'] = preg_replace( "/[^0-9-,:]/", '', $atts['time'] );
|
120 |
+
|
121 |
+
foreach ( explode( ',', $atts['time'] ) as $range ) {
|
122 |
+
|
123 |
+
$range = explode( '-', $range );
|
124 |
+
|
125 |
+
if ( ! isset( $range[1] ) ) {
|
126 |
+
$range[1] = $range[0] . ':59:59';
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( strpos( $range[0], ':' ) === false ) {
|
130 |
+
$range[0] .= ':00:00';
|
131 |
+
}
|
132 |
+
if ( strpos( $range[1], ':' ) === false ) {
|
133 |
+
$range[1] .= ':00:00';
|
134 |
+
}
|
135 |
+
|
136 |
+
if (
|
137 |
+
$now['time'] >= strtotime( $range[0], $now['time'] ) &&
|
138 |
+
$now['time'] <= strtotime( $range[1], $now['time'] )
|
139 |
+
) {
|
140 |
+
$valid_time = true;
|
141 |
+
break;
|
142 |
+
}
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
if ( ! $valid_time ) {
|
147 |
+
return su_do_attribute( $atts['alt'] );
|
148 |
+
}
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
return do_shortcode( $content );
|
153 |
+
|
154 |
+
}
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'screenr',
|
5 |
+
'callback' => 'su_shortcode_screenr',
|
6 |
+
'deprecated' => true,
|
7 |
+
) );
|
8 |
+
|
9 |
+
function su_shortcode_screenr( $atts = null, $content = null ) {
|
10 |
+
|
11 |
+
$atts = shortcode_atts( array(
|
12 |
+
'url' => false,
|
13 |
+
'width' => 600,
|
14 |
+
'height' => 400,
|
15 |
+
'responsive' => 'yes',
|
16 |
+
'class' => ''
|
17 |
+
), $atts, 'screenr' );
|
18 |
+
|
19 |
+
if ( ! $atts['url'] ) {
|
20 |
+
return su_error_message( 'Screenr', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
21 |
+
}
|
22 |
+
|
23 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
24 |
+
$id = ( preg_match( '~(?:<iframe [^>]*src=")?(?:https?:\/\/(?:[\w]+\.)*screenr\.com(?:[\/\w]*\/videos?)?\/([a-zA-Z0-9]+)[^\s]*)"?(?:[^>]*></iframe>)?(?:<p>.*</p>)?~ix', $atts['url'], $match ) ) ? $match[1] : false;
|
25 |
+
|
26 |
+
if ( ! $id ) {
|
27 |
+
return su_error_message( 'Screenr', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
31 |
+
|
32 |
+
return '<div class="su-screenr su-responsive-media-' . $atts['responsive'] . su_get_css_class( $atts ) . '"><iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="http://screenr.com/embed/' . $id . '" frameborder="0" allowfullscreen="true"></iframe></div>';
|
33 |
+
|
34 |
+
}
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'service',
|
5 |
+
'callback' => 'su_shortcode_service',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/service.svg',
|
7 |
+
'name' => __( 'Service', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'box',
|
10 |
+
'atts' => array(
|
11 |
+
'title' => array(
|
12 |
+
'values' => array( ),
|
13 |
+
'default' => __( 'Service title', 'shortcodes-ultimate' ),
|
14 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Service name', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'icon' => array(
|
18 |
+
'type' => 'icon',
|
19 |
+
'default' => 'icon: star',
|
20 |
+
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'You can upload custom icon for this box', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'icon_color' => array(
|
24 |
+
'type' => 'color',
|
25 |
+
'default' => '#333333',
|
26 |
+
'name' => __( 'Icon color', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'This color will be applied to the selected icon. Does not works with uploaded icons', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'size' => array(
|
30 |
+
'type' => 'slider',
|
31 |
+
'min' => 10,
|
32 |
+
'max' => 128,
|
33 |
+
'step' => 2,
|
34 |
+
'default' => 32,
|
35 |
+
'name' => __( 'Icon size', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'Size of the uploaded icon in pixels', 'shortcodes-ultimate' )
|
37 |
+
),
|
38 |
+
'class' => array(
|
39 |
+
'type' => 'extra_css_class',
|
40 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
41 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
42 |
+
'default' => '',
|
43 |
+
),
|
44 |
+
),
|
45 |
+
'content' => __( 'Service description', 'shortcodes-ultimate' ),
|
46 |
+
'desc' => __( 'Service box with title', 'shortcodes-ultimate' ),
|
47 |
+
'icon' => 'check-square-o',
|
48 |
+
) );
|
49 |
+
|
50 |
+
function su_shortcode_service( $atts = null, $content = null ) {
|
51 |
+
|
52 |
+
$atts = shortcode_atts( array(
|
53 |
+
'title' => __( 'Service title', 'shortcodes-ultimate' ),
|
54 |
+
'icon' => 'icon: star',
|
55 |
+
'icon_color' => '#333',
|
56 |
+
'size' => 32,
|
57 |
+
'class' => ''
|
58 |
+
), $atts, 'service' );
|
59 |
+
|
60 |
+
// RTL
|
61 |
+
$rtl = is_rtl()
|
62 |
+
? 'right'
|
63 |
+
: 'left';
|
64 |
+
|
65 |
+
// Built-in icon
|
66 |
+
if ( strpos( $atts['icon'], 'icon:' ) !== false ) {
|
67 |
+
|
68 |
+
$atts['icon'] = '<i class="fa fa-' . trim( str_replace( 'icon:', '', $atts['icon'] ) ) . '" style="font-size:' . $atts['size'] . 'px;color:' . $atts['icon_color'] . '"></i>';
|
69 |
+
|
70 |
+
su_query_asset( 'css', 'font-awesome' );
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
// Uploaded icon
|
75 |
+
else {
|
76 |
+
$atts['icon'] = '<img src="' . $atts['icon'] . '" width="' . $atts['size'] . '" height="' . $atts['size'] . '" alt="' . $atts['title'] . '" />';
|
77 |
+
}
|
78 |
+
|
79 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
80 |
+
|
81 |
+
return '<div class="su-service' . su_get_css_class( $atts ) . '"><div class="su-service-title" style="padding-' . $rtl . ':' . round( $atts['size'] + 14 ) . 'px;min-height:' . $atts['size'] . 'px;line-height:' . $atts['size'] . 'px">' . $atts['icon'] . ' ' . su_do_attribute( $atts['title'] ) . '</div><div class="su-service-content su-clearfix" style="padding-' . $rtl . ':' . round( $atts['size'] + 14 ) . 'px">' . do_shortcode( $content ) . '</div></div>';
|
82 |
+
|
83 |
+
}
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'siblings',
|
5 |
+
'callback' => 'su_shortcode_siblings',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/siblings.svg',
|
7 |
+
'name' => __( 'Siblings', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'depth' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array( 1, 2, 3 ), 'default' => 1,
|
14 |
+
'name' => __( 'Depth', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Max depth level', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'class' => array(
|
18 |
+
'type' => 'extra_css_class',
|
19 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
20 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
21 |
+
'default' => '',
|
22 |
+
),
|
23 |
+
),
|
24 |
+
'desc' => __( 'List of cureent page siblings', 'shortcodes-ultimate' ),
|
25 |
+
'icon' => 'bars',
|
26 |
+
) );
|
27 |
+
|
28 |
+
function su_shortcode_siblings( $atts = null, $content = null ) {
|
29 |
+
|
30 |
+
$atts = shortcode_atts( array(
|
31 |
+
'depth' => 1,
|
32 |
+
'class' => ''
|
33 |
+
), $atts, 'siblings' );
|
34 |
+
|
35 |
+
global $post;
|
36 |
+
|
37 |
+
if ( empty( $post ) || empty( $post->post_parent ) ) {
|
38 |
+
return;
|
39 |
+
}
|
40 |
+
|
41 |
+
$return = wp_list_pages( array(
|
42 |
+
'title_li' => '',
|
43 |
+
'echo' => 0,
|
44 |
+
'child_of' => $post->post_parent,
|
45 |
+
'depth' => $atts['depth'],
|
46 |
+
'exclude' => $post->ID
|
47 |
+
) );
|
48 |
+
|
49 |
+
return $return
|
50 |
+
? '<ul class="su-siblings' . su_get_css_class( $atts ) . '">' . $return . '</ul>'
|
51 |
+
: '';
|
52 |
+
}
|
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'slider',
|
5 |
+
'callback' => 'su_shortcode_slider',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/slider.svg',
|
7 |
+
'name' => __( 'Slider', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'gallery',
|
10 |
+
'atts' => array(
|
11 |
+
'source' => array(
|
12 |
+
'type' => 'image_source',
|
13 |
+
'default' => 'none',
|
14 |
+
'name' => __( 'Source', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Choose images source. You can use images from Media library or retrieve it from posts (thumbnails) posted under specified blog category. You can also pick any custom taxonomy', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'limit' => array(
|
18 |
+
'type' => 'slider',
|
19 |
+
'min' => -1,
|
20 |
+
'max' => 100,
|
21 |
+
'step' => 1,
|
22 |
+
'default' => 20,
|
23 |
+
'name' => __( 'Limit', 'shortcodes-ultimate' ),
|
24 |
+
'desc' => __( 'Maximum number of image source posts (for recent posts, category and custom taxonomy)', 'shortcodes-ultimate' )
|
25 |
+
),
|
26 |
+
'link' => array(
|
27 |
+
'type' => 'select',
|
28 |
+
'values' => array(
|
29 |
+
'none' => __( 'None', 'shortcodes-ultimate' ),
|
30 |
+
'image' => __( 'Full-size image', 'shortcodes-ultimate' ),
|
31 |
+
'lightbox' => __( 'Lightbox', 'shortcodes-ultimate' ),
|
32 |
+
'custom' => __( 'Slide link (added in media editor)', 'shortcodes-ultimate' ),
|
33 |
+
'attachment' => __( 'Attachment page', 'shortcodes-ultimate' ),
|
34 |
+
'post' => __( 'Post permalink', 'shortcodes-ultimate' )
|
35 |
+
),
|
36 |
+
'default' => 'none',
|
37 |
+
'name' => __( 'Links', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Select which links will be used for images in this gallery', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'target' => array(
|
41 |
+
'type' => 'select',
|
42 |
+
'values' => array(
|
43 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
44 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'default' => 'self',
|
47 |
+
'name' => __( 'Links target', 'shortcodes-ultimate' ),
|
48 |
+
'desc' => __( 'Open links in', 'shortcodes-ultimate' )
|
49 |
+
),
|
50 |
+
'width' => array(
|
51 |
+
'type' => 'slider',
|
52 |
+
'min' => 200,
|
53 |
+
'max' => 1600,
|
54 |
+
'step' => 20,
|
55 |
+
'default' => 600,
|
56 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ), 'desc' => __( 'Slider width (in pixels)', 'shortcodes-ultimate' )
|
57 |
+
),
|
58 |
+
'height' => array(
|
59 |
+
'type' => 'slider',
|
60 |
+
'min' => 200,
|
61 |
+
'max' => 1600,
|
62 |
+
'step' => 20,
|
63 |
+
'default' => 300,
|
64 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ), 'desc' => __( 'Slider height (in pixels)', 'shortcodes-ultimate' )
|
65 |
+
),
|
66 |
+
'responsive' => array(
|
67 |
+
'type' => 'bool',
|
68 |
+
'default' => 'yes',
|
69 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
70 |
+
'desc' => __( 'Ignore width and height parameters and make slider responsive', 'shortcodes-ultimate' )
|
71 |
+
),
|
72 |
+
'title' => array(
|
73 |
+
'type' => 'bool',
|
74 |
+
'default' => 'yes',
|
75 |
+
'name' => __( 'Show titles', 'shortcodes-ultimate' ), 'desc' => __( 'Display slide titles', 'shortcodes-ultimate' )
|
76 |
+
),
|
77 |
+
'centered' => array(
|
78 |
+
'type' => 'bool',
|
79 |
+
'default' => 'yes',
|
80 |
+
'name' => __( 'Center', 'shortcodes-ultimate' ), 'desc' => __( 'Is slider centered on the page', 'shortcodes-ultimate' )
|
81 |
+
),
|
82 |
+
'arrows' => array(
|
83 |
+
'type' => 'bool',
|
84 |
+
'default' => 'yes',
|
85 |
+
'name' => __( 'Arrows', 'shortcodes-ultimate' ), 'desc' => __( 'Show left and right arrows', 'shortcodes-ultimate' )
|
86 |
+
),
|
87 |
+
'pages' => array(
|
88 |
+
'type' => 'bool',
|
89 |
+
'default' => 'yes',
|
90 |
+
'name' => __( 'Pagination', 'shortcodes-ultimate' ),
|
91 |
+
'desc' => __( 'Show pagination', 'shortcodes-ultimate' )
|
92 |
+
),
|
93 |
+
'mousewheel' => array(
|
94 |
+
'type' => 'bool',
|
95 |
+
'default' => 'yes', 'name' => __( 'Mouse wheel control', 'shortcodes-ultimate' ),
|
96 |
+
'desc' => __( 'Allow to change slides with mouse wheel', 'shortcodes-ultimate' )
|
97 |
+
),
|
98 |
+
'autoplay' => array(
|
99 |
+
'type' => 'number',
|
100 |
+
'min' => 0,
|
101 |
+
'max' => 100000,
|
102 |
+
'step' => 100,
|
103 |
+
'default' => 5000,
|
104 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
105 |
+
'desc' => __( 'Choose interval between slide animations. Set to 0 to disable autoplay', 'shortcodes-ultimate' )
|
106 |
+
),
|
107 |
+
'speed' => array(
|
108 |
+
'type' => 'number',
|
109 |
+
'min' => 0,
|
110 |
+
'max' => 20000,
|
111 |
+
'step' => 100,
|
112 |
+
'default' => 600,
|
113 |
+
'name' => __( 'Speed', 'shortcodes-ultimate' ), 'desc' => __( 'Specify animation speed', 'shortcodes-ultimate' )
|
114 |
+
),
|
115 |
+
'class' => array(
|
116 |
+
'type' => 'extra_css_class',
|
117 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
118 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
119 |
+
'default' => '',
|
120 |
+
),
|
121 |
+
),
|
122 |
+
'desc' => __( 'Customizable image slider', 'shortcodes-ultimate' ),
|
123 |
+
'icon' => 'picture-o',
|
124 |
+
) );
|
125 |
+
|
126 |
+
function su_shortcode_slider( $atts = null, $content = null ) {
|
127 |
+
$return = '';
|
128 |
+
$atts = shortcode_atts( array(
|
129 |
+
'source' => 'none',
|
130 |
+
'limit' => 20,
|
131 |
+
'gallery' => null, // Dep. 4.3.2
|
132 |
+
'link' => 'none',
|
133 |
+
'target' => 'self',
|
134 |
+
'width' => 600,
|
135 |
+
'height' => 300,
|
136 |
+
'responsive' => 'yes',
|
137 |
+
'title' => 'yes',
|
138 |
+
'centered' => 'yes',
|
139 |
+
'arrows' => 'yes',
|
140 |
+
'pages' => 'yes',
|
141 |
+
'mousewheel' => 'yes',
|
142 |
+
'autoplay' => 3000,
|
143 |
+
'speed' => 600,
|
144 |
+
'class' => ''
|
145 |
+
), $atts, 'slider' );
|
146 |
+
// Get slides
|
147 |
+
$slides = (array) su_get_slides( $atts );
|
148 |
+
// Loop slides
|
149 |
+
if ( count( $slides ) ) {
|
150 |
+
// Prepare unique ID
|
151 |
+
$id = uniqid( 'su_slider_' );
|
152 |
+
// Links target
|
153 |
+
$target = ( $atts['target'] === 'yes' || $atts['target'] === 'blank' ) ? ' target="_blank"' : '';
|
154 |
+
// Centered class
|
155 |
+
$centered = ( $atts['centered'] === 'yes' ) ? ' su-slider-centered' : '';
|
156 |
+
// Wheel control
|
157 |
+
$mousewheel = ( $atts['mousewheel'] === 'yes' ) ? 'true' : 'false';
|
158 |
+
// Prepare width and height
|
159 |
+
$size = ( $atts['responsive'] === 'yes' ) ? 'width:100%' : 'width:' . intval( $atts['width'] ) . 'px;height:' . intval( $atts['height'] ) . 'px';
|
160 |
+
// Add lightbox class
|
161 |
+
if ( $atts['link'] === 'lightbox' ) $atts['class'] .= ' su-lightbox-gallery';
|
162 |
+
// Open slider
|
163 |
+
$return .= '<div id="' . $id . '" class="su-slider' . $centered . ' su-slider-pages-' . $atts['pages'] . ' su-slider-responsive-' . $atts['responsive'] . su_get_css_class( $atts ) . '" style="' . $size . '" data-autoplay="' . $atts['autoplay'] . '" data-speed="' . $atts['speed'] . '" data-mousewheel="' . $mousewheel . '"><div class="su-slider-slides">';
|
164 |
+
// Create slides
|
165 |
+
foreach ( $slides as $slide ) {
|
166 |
+
// Crop the image
|
167 |
+
$image = su_image_resize( $slide['image'], $atts['width'], $atts['height'] );
|
168 |
+
// Prepare slide title
|
169 |
+
$title = ( $atts['title'] === 'yes' && $slide['title'] ) ? '<span class="su-slider-slide-title">' . stripslashes( $slide['title'] ) . '</span>' : '';
|
170 |
+
// Open slide
|
171 |
+
$return .= '<div class="su-slider-slide">';
|
172 |
+
// Slide content with link
|
173 |
+
if ( $slide['link'] ) $return .= '<a href="' . $slide['link'] . '" ' . $target . ' title="' . esc_attr( $slide['title'] ) . '"><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
174 |
+
// Slide content without link
|
175 |
+
else $return .= '<a><img src="' . $image['url'] . '" alt="' . esc_attr( $slide['title'] ) . '" />' . $title . '</a>';
|
176 |
+
// Close slide
|
177 |
+
$return .= '</div>';
|
178 |
+
}
|
179 |
+
// Close slides
|
180 |
+
$return .= '</div>';
|
181 |
+
// Open nav section
|
182 |
+
$return .= '<div class="su-slider-nav">';
|
183 |
+
// Append direction nav
|
184 |
+
if ( $atts['arrows'] === 'yes' ) $return .= '<div class="su-slider-direction"><span class="su-slider-prev"></span><span class="su-slider-next"></span></div>';
|
185 |
+
// Append pagination nav
|
186 |
+
$return .= '<div class="su-slider-pagination"></div>';
|
187 |
+
// Close nav section
|
188 |
+
$return .= '</div>';
|
189 |
+
// Close slider
|
190 |
+
$return .= '</div>';
|
191 |
+
// Add lightbox assets
|
192 |
+
if ( $atts['link'] === 'lightbox' ) {
|
193 |
+
su_query_asset( 'css', 'magnific-popup' );
|
194 |
+
su_query_asset( 'js', 'magnific-popup' );
|
195 |
+
}
|
196 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
197 |
+
su_query_asset( 'js', 'jquery' );
|
198 |
+
su_query_asset( 'js', 'swiper' );
|
199 |
+
su_query_asset( 'js', 'su-galleries-shortcodes' );
|
200 |
+
}
|
201 |
+
// Slides not found
|
202 |
+
else $return = su_error_message( 'Slider', __( 'images not found', 'shortcodes-ultimate' ) );
|
203 |
+
return $return;
|
204 |
+
}
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'spacer',
|
5 |
+
'callback' => 'su_shortcode_spacer',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/spacer.svg',
|
7 |
+
'name' => __( 'Spacer', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'content other',
|
10 |
+
'atts' => array(
|
11 |
+
'size' => array(
|
12 |
+
'type' => 'slider',
|
13 |
+
'min' => 0,
|
14 |
+
'max' => 800,
|
15 |
+
'step' => 10,
|
16 |
+
'default' => 20,
|
17 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
18 |
+
'desc' => __( 'Height of the spacer in pixels', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'class' => array(
|
21 |
+
'type' => 'extra_css_class',
|
22 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
23 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
24 |
+
'default' => '',
|
25 |
+
),
|
26 |
+
),
|
27 |
+
'desc' => __( 'Empty space with adjustable height', 'shortcodes-ultimate' ),
|
28 |
+
'icon' => 'arrows-v',
|
29 |
+
) );
|
30 |
+
|
31 |
+
function su_shortcode_spacer( $atts = null, $content = null ) {
|
32 |
+
|
33 |
+
$atts = shortcode_atts( array(
|
34 |
+
'size' => '20',
|
35 |
+
'class' => ''
|
36 |
+
), $atts, 'spacer' );
|
37 |
+
|
38 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
39 |
+
|
40 |
+
return '<div class="su-spacer' . su_get_css_class( $atts ) . '" style="height:' . (string) $atts['size'] . 'px"></div>';
|
41 |
+
|
42 |
+
}
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'spoiler',
|
5 |
+
'callback' => 'su_shortcode_spoiler',
|
6 |
+
'name' => __( 'Spoiler', 'shortcodes-ultimate' ),
|
7 |
+
'type' => 'wrap',
|
8 |
+
'group' => 'box',
|
9 |
+
'atts' => array(
|
10 |
+
'title' => array(
|
11 |
+
'default' => __( 'Spoiler title', 'shortcodes-ultimate' ),
|
12 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ), 'desc' => __( 'Text in spoiler title', 'shortcodes-ultimate' )
|
13 |
+
),
|
14 |
+
'open' => array(
|
15 |
+
'type' => 'bool',
|
16 |
+
'default' => 'no',
|
17 |
+
'name' => __( 'Open', 'shortcodes-ultimate' ),
|
18 |
+
'desc' => __( 'Is spoiler content visible by default', 'shortcodes-ultimate' )
|
19 |
+
),
|
20 |
+
'style' => array(
|
21 |
+
'type' => 'select',
|
22 |
+
'values' => array(
|
23 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
24 |
+
'fancy' => __( 'Fancy', 'shortcodes-ultimate' ),
|
25 |
+
'simple' => __( 'Simple', 'shortcodes-ultimate' )
|
26 |
+
),
|
27 |
+
'default' => 'default',
|
28 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'Choose style for this spoiler', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
30 |
+
),
|
31 |
+
'icon' => array(
|
32 |
+
'type' => 'select',
|
33 |
+
'values' => array(
|
34 |
+
'plus' => __( 'Plus', 'shortcodes-ultimate' ),
|
35 |
+
'plus-circle' => __( 'Plus circle', 'shortcodes-ultimate' ),
|
36 |
+
'plus-square-1' => __( 'Plus square 1', 'shortcodes-ultimate' ),
|
37 |
+
'plus-square-2' => __( 'Plus square 2', 'shortcodes-ultimate' ),
|
38 |
+
'arrow' => __( 'Arrow', 'shortcodes-ultimate' ),
|
39 |
+
'arrow-circle-1' => __( 'Arrow circle 1', 'shortcodes-ultimate' ),
|
40 |
+
'arrow-circle-2' => __( 'Arrow circle 2', 'shortcodes-ultimate' ),
|
41 |
+
'chevron' => __( 'Chevron', 'shortcodes-ultimate' ),
|
42 |
+
'chevron-circle' => __( 'Chevron circle', 'shortcodes-ultimate' ),
|
43 |
+
'caret' => __( 'Caret', 'shortcodes-ultimate' ),
|
44 |
+
'caret-square' => __( 'Caret square', 'shortcodes-ultimate' ),
|
45 |
+
'folder-1' => __( 'Folder 1', 'shortcodes-ultimate' ),
|
46 |
+
'folder-2' => __( 'Folder 2', 'shortcodes-ultimate' )
|
47 |
+
),
|
48 |
+
'default' => 'plus',
|
49 |
+
'name' => __( 'Icon', 'shortcodes-ultimate' ),
|
50 |
+
'desc' => __( 'Icons for spoiler', 'shortcodes-ultimate' )
|
51 |
+
),
|
52 |
+
'anchor' => array(
|
53 |
+
'default' => '',
|
54 |
+
'name' => __( 'Anchor', 'shortcodes-ultimate' ),
|
55 |
+
'desc' => __( 'You can use unique anchor for this spoiler to access it with hash in page url. For example: type here <b%value>Hello</b> and then use url like http://example.com/page-url#Hello. This spoiler will be open and scrolled in', 'shortcodes-ultimate' )
|
56 |
+
),
|
57 |
+
'class' => array(
|
58 |
+
'type' => 'extra_css_class',
|
59 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
60 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
61 |
+
'default' => '',
|
62 |
+
),
|
63 |
+
),
|
64 |
+
'content' => __( 'Hidden content', 'shortcodes-ultimate' ),
|
65 |
+
'desc' => __( 'Spoiler with hidden content', 'shortcodes-ultimate' ),
|
66 |
+
'note' => __( 'Did you know that you can wrap multiple spoilers with [accordion] shortcode to create accordion effect?', 'shortcodes-ultimate' ),
|
67 |
+
'example' => 'spoilers',
|
68 |
+
'icon' => 'list-ul',
|
69 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/spoiler.svg',
|
70 |
+
) );
|
71 |
+
|
72 |
+
function su_shortcode_spoiler( $atts = null, $content = null ) {
|
73 |
+
$atts = shortcode_atts( array(
|
74 |
+
'title' => __( 'Spoiler title', 'shortcodes-ultimate' ),
|
75 |
+
'open' => 'no',
|
76 |
+
'style' => 'default',
|
77 |
+
'icon' => 'plus',
|
78 |
+
'anchor' => '',
|
79 |
+
'class' => ''
|
80 |
+
), $atts, 'spoiler' );
|
81 |
+
$atts['style'] = str_replace( array( '1', '2' ), array( 'default', 'fancy' ), $atts['style'] );
|
82 |
+
$atts['anchor'] = ( $atts['anchor'] ) ? ' data-anchor="' . str_replace( array( ' ', '#' ), '', sanitize_text_field( $atts['anchor'] ) ) . '"' : '';
|
83 |
+
if ( $atts['open'] !== 'yes' ) $atts['class'] .= ' su-spoiler-closed';
|
84 |
+
su_query_asset( 'css', 'font-awesome' );
|
85 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
86 |
+
su_query_asset( 'js', 'jquery' );
|
87 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
88 |
+
do_action( 'su/shortcode/spoiler', $atts );
|
89 |
+
return '<div class="su-spoiler su-spoiler-style-' . $atts['style'] . ' su-spoiler-icon-' . $atts['icon'] . su_get_css_class( $atts ) . '"' . $atts['anchor'] . '><div class="su-spoiler-title"><span class="su-spoiler-icon"></span>' . su_do_attribute( $atts['title'] ) . '</div><div class="su-spoiler-content su-clearfix">' . su_do_nested_shortcodes( $content, 'spoiler' ) . '</div></div>';
|
90 |
+
}
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'subpages',
|
5 |
+
'callback' => 'su_shortcode_subpages',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/subpages.svg',
|
7 |
+
'name' => __( 'Sub pages', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'depth' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array( 1, 2, 3, 4, 5 ), 'default' => 1,
|
14 |
+
'name' => __( 'Depth', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Max depth level of children pages', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'p' => array(
|
18 |
+
'values' => array( ),
|
19 |
+
'default' => '',
|
20 |
+
'name' => __( 'Parent ID', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'ID of the parent page. Leave blank to use current page', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'class' => array(
|
24 |
+
'type' => 'extra_css_class',
|
25 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
26 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
27 |
+
'default' => '',
|
28 |
+
),
|
29 |
+
),
|
30 |
+
'desc' => __( 'List of sub pages', 'shortcodes-ultimate' ),
|
31 |
+
'icon' => 'bars',
|
32 |
+
) );
|
33 |
+
|
34 |
+
function su_shortcode_subpages( $atts = null, $content = null ) {
|
35 |
+
$atts = shortcode_atts( array(
|
36 |
+
'depth' => 1,
|
37 |
+
'p' => false,
|
38 |
+
'class' => ''
|
39 |
+
), $atts, 'subpages' );
|
40 |
+
global $post;
|
41 |
+
$child_of = ( $atts['p'] ) ? $atts['p'] : get_the_ID();
|
42 |
+
$return = wp_list_pages( array(
|
43 |
+
'title_li' => '',
|
44 |
+
'echo' => 0,
|
45 |
+
'child_of' => $child_of,
|
46 |
+
'depth' => $atts['depth']
|
47 |
+
) );
|
48 |
+
return ( $return ) ? '<ul class="su-subpages' . su_get_css_class( $atts ) . '">' . $return . '</ul>' : false;
|
49 |
+
}
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'table',
|
5 |
+
'callback' => 'su_shortcode_table',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/table.svg',
|
7 |
+
'name' => __( 'Table', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'content',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'type' => 'upload',
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'CSV file', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Upload CSV file if you want to create HTML-table from file', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'responsive' => array(
|
18 |
+
'type' => 'bool',
|
19 |
+
'default' => 'no',
|
20 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'Add horizontal scrollbar if table width larger than page width', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'class' => array(
|
24 |
+
'type' => 'extra_css_class',
|
25 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
26 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
27 |
+
'default' => '',
|
28 |
+
),
|
29 |
+
),
|
30 |
+
'content' => __( "<table>\n<tr>\n\t<td>Table</td>\n\t<td>Table</td>\n</tr>\n<tr>\n\t<td>Table</td>\n\t<td>Table</td>\n</tr>\n</table>", 'shortcodes-ultimate' ),
|
31 |
+
'desc' => __( 'Styled table from HTML or CSV file', 'shortcodes-ultimate' ),
|
32 |
+
'icon' => 'table',
|
33 |
+
) );
|
34 |
+
|
35 |
+
function su_shortcode_table( $atts = null, $content = null ) {
|
36 |
+
|
37 |
+
$atts = shortcode_atts( array(
|
38 |
+
'url' => false,
|
39 |
+
'responsive' => false,
|
40 |
+
'class' => ''
|
41 |
+
), $atts, 'table' );
|
42 |
+
|
43 |
+
if ( $atts['responsive'] ) {
|
44 |
+
$atts['class'] .= ' su-table-responsive';
|
45 |
+
}
|
46 |
+
|
47 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
48 |
+
su_query_asset( 'js', 'jquery' );
|
49 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
50 |
+
|
51 |
+
$table_data = $atts['url']
|
52 |
+
? su_parse_csv( $atts['url'] ) :
|
53 |
+
do_shortcode( $content );
|
54 |
+
|
55 |
+
return '<div class="su-table' . su_get_css_class( $atts ) . '">' . $table_data . '</div>';
|
56 |
+
|
57 |
+
}
|
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'tabs',
|
5 |
+
'callback' => 'su_shortcode_tabs',
|
6 |
+
'name' => __( 'Tabs', 'shortcodes-ultimate' ),
|
7 |
+
'type' => 'wrap',
|
8 |
+
'group' => 'box',
|
9 |
+
'required_child' => 'tab',
|
10 |
+
'desc' => __( 'Tabs container', 'shortcodes-ultimate' ),
|
11 |
+
'icon' => 'list-alt',
|
12 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/tabs.svg',
|
13 |
+
'atts' => array(
|
14 |
+
'style' => array(
|
15 |
+
'type' => 'select',
|
16 |
+
'values' => array(
|
17 |
+
'default' => __( 'Default', 'shortcodes-ultimate' )
|
18 |
+
),
|
19 |
+
'default' => 'default',
|
20 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'Choose style for this tabs', 'shortcodes-ultimate' ) . '%su_skins_link%'
|
22 |
+
),
|
23 |
+
'active' => array(
|
24 |
+
'type' => 'number',
|
25 |
+
'min' => 1,
|
26 |
+
'max' => 100,
|
27 |
+
'step' => 1,
|
28 |
+
'default' => 1,
|
29 |
+
'name' => __( 'Active tab', 'shortcodes-ultimate' ),
|
30 |
+
'desc' => __( 'Select which tab is open by default', 'shortcodes-ultimate' )
|
31 |
+
),
|
32 |
+
'vertical' => array(
|
33 |
+
'type' => 'bool',
|
34 |
+
'default' => 'no',
|
35 |
+
'name' => __( 'Vertical', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'Align tabs vertically', 'shortcodes-ultimate' )
|
37 |
+
),
|
38 |
+
'class' => array(
|
39 |
+
'type' => 'extra_css_class',
|
40 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
41 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
42 |
+
'default' => '',
|
43 |
+
),
|
44 |
+
),
|
45 |
+
'content' => array(
|
46 |
+
'id' => 'tab',
|
47 |
+
'number' => 3,
|
48 |
+
),
|
49 |
+
) );
|
50 |
+
|
51 |
+
su_add_shortcode( array(
|
52 |
+
'id' => 'tab',
|
53 |
+
'callback' => 'su_shortcode_tab',
|
54 |
+
'name' => __( 'Tab', 'shortcodes-ultimate' ),
|
55 |
+
'type' => 'wrap',
|
56 |
+
'group' => 'box',
|
57 |
+
'required_parent' => 'tabs',
|
58 |
+
'content' => __( 'Tab content', 'shortcodes-ultimate' ),
|
59 |
+
'desc' => __( 'Single tab', 'shortcodes-ultimate' ),
|
60 |
+
'note' => __( 'Did you know that you need to wrap single tabs with [tabs] shortcode?', 'shortcodes-ultimate' ),
|
61 |
+
'icon' => 'list-alt',
|
62 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/tab.svg',
|
63 |
+
'atts' => array(
|
64 |
+
'title' => array(
|
65 |
+
'default' => __( 'Tab name', 'shortcodes-ultimate' ),
|
66 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
67 |
+
'desc' => __( 'Tab title', 'shortcodes-ultimate' )
|
68 |
+
),
|
69 |
+
'disabled' => array(
|
70 |
+
'type' => 'bool',
|
71 |
+
'default' => 'no',
|
72 |
+
'name' => __( 'Disabled', 'shortcodes-ultimate' ),
|
73 |
+
'desc' => __( 'Is this tab disabled', 'shortcodes-ultimate' )
|
74 |
+
),
|
75 |
+
'anchor' => array(
|
76 |
+
'default' => '',
|
77 |
+
'name' => __( 'Anchor', 'shortcodes-ultimate' ),
|
78 |
+
'desc' => __( 'You can use unique anchor for this tab to access it with hash in page url. For example: use <b%value>Hello</b> and then navigate to url like http://example.com/page-url#Hello. This tab will be activated and scrolled in', 'shortcodes-ultimate' )
|
79 |
+
),
|
80 |
+
'url' => array(
|
81 |
+
'default' => '',
|
82 |
+
'name' => __( 'URL', 'shortcodes-ultimate' ),
|
83 |
+
'desc' => __( 'Link tab to any webpage. Use full URL to turn the tab title into link', 'shortcodes-ultimate' )
|
84 |
+
),
|
85 |
+
'target' => array(
|
86 |
+
'type' => 'select',
|
87 |
+
'values' => array(
|
88 |
+
'self' => __( 'Open in same tab', 'shortcodes-ultimate' ),
|
89 |
+
'blank' => __( 'Open in new tab', 'shortcodes-ultimate' )
|
90 |
+
),
|
91 |
+
'default' => 'blank',
|
92 |
+
'name' => __( 'Link target', 'shortcodes-ultimate' ),
|
93 |
+
'desc' => __( 'Choose how to open the custom tab link', 'shortcodes-ultimate' )
|
94 |
+
),
|
95 |
+
'class' => array(
|
96 |
+
'type' => 'extra_css_class',
|
97 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
98 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
99 |
+
'default' => '',
|
100 |
+
),
|
101 |
+
),
|
102 |
+
) );
|
103 |
+
|
104 |
+
$shortcodes_ultimate_global_tabs = array();
|
105 |
+
$shortcodes_ultimate_global_tabs_count = 0;
|
106 |
+
|
107 |
+
function su_shortcode_tabs( $atts = null, $content = null ) {
|
108 |
+
|
109 |
+
global $shortcodes_ultimate_global_tabs, $shortcodes_ultimate_global_tabs_count;
|
110 |
+
|
111 |
+
$atts = shortcode_atts( array(
|
112 |
+
'active' => 1,
|
113 |
+
'vertical' => 'no',
|
114 |
+
'style' => 'default', // 3.x
|
115 |
+
'class' => ''
|
116 |
+
), $atts, 'tabs' );
|
117 |
+
|
118 |
+
if ( $atts['style'] === '3' ) {
|
119 |
+
$atts['vertical'] = 'yes';
|
120 |
+
}
|
121 |
+
|
122 |
+
if ( $atts['vertical'] === 'yes' ) {
|
123 |
+
$atts['class'] .= ' su-tabs-vertical';
|
124 |
+
}
|
125 |
+
|
126 |
+
do_shortcode( $content );
|
127 |
+
|
128 |
+
$tabs = array();
|
129 |
+
$panes = array();
|
130 |
+
|
131 |
+
if ( ! is_array( $shortcodes_ultimate_global_tabs ) ) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
|
135 |
+
if ( $shortcodes_ultimate_global_tabs_count < $atts['active'] ) {
|
136 |
+
$atts['active'] = $shortcodes_ultimate_global_tabs_count;
|
137 |
+
}
|
138 |
+
|
139 |
+
foreach ( $shortcodes_ultimate_global_tabs as $tab ) {
|
140 |
+
|
141 |
+
$tabs[] = '<span class="' . su_get_css_class( $tab ) . $tab['disabled'] . '"' . $tab['anchor'] . $tab['url'] . $tab['target'] . '>' . su_do_attribute( $tab['title'] ) . '</span>';
|
142 |
+
|
143 |
+
$panes[] = '<div class="su-tabs-pane su-clearfix' . su_get_css_class( $tab ) . '">' . $tab['content'] . '</div>';
|
144 |
+
|
145 |
+
}
|
146 |
+
|
147 |
+
$output = '<div class="su-tabs su-tabs-style-' . $atts['style'] . su_get_css_class( $atts ) . '" data-active="' . (string) $atts['active'] . '"><div class="su-tabs-nav">' . implode( '', $tabs ) . '</div><div class="su-tabs-panes">' . implode( "\n", $panes ) . '</div></div>';
|
148 |
+
|
149 |
+
// Reset tabs
|
150 |
+
$shortcodes_ultimate_global_tabs = array();
|
151 |
+
$shortcodes_ultimate_global_tabs_count = 0;
|
152 |
+
|
153 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
154 |
+
su_query_asset( 'js', 'jquery' );
|
155 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
156 |
+
|
157 |
+
return $output;
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
function su_shortcode_tab( $atts = null, $content = null ) {
|
162 |
+
|
163 |
+
global $shortcodes_ultimate_global_tabs, $shortcodes_ultimate_global_tabs_count;
|
164 |
+
|
165 |
+
$atts = shortcode_atts( array(
|
166 |
+
'title' => __( 'Tab title', 'shortcodes-ultimate' ),
|
167 |
+
'disabled' => 'no',
|
168 |
+
'anchor' => '',
|
169 |
+
'url' => '',
|
170 |
+
'target' => 'blank',
|
171 |
+
'class' => ''
|
172 |
+
), $atts, 'tab' );
|
173 |
+
|
174 |
+
$x = $shortcodes_ultimate_global_tabs_count;
|
175 |
+
|
176 |
+
$shortcodes_ultimate_global_tabs[ $x ] = array(
|
177 |
+
'title' => $atts['title'],
|
178 |
+
'content' => do_shortcode( $content ),
|
179 |
+
'disabled' => ( $atts['disabled'] === 'yes' ) ? ' su-tabs-disabled' : '',
|
180 |
+
'anchor' => ( $atts['anchor'] ) ? ' data-anchor="' . str_replace( array( ' ', '#' ), '', sanitize_text_field( $atts['anchor'] ) ) . '"' : '',
|
181 |
+
'url' => ' data-url="' . $atts['url'] . '"',
|
182 |
+
'target' => ' data-target="' . $atts['target'] . '"',
|
183 |
+
'class' => $atts['class']
|
184 |
+
);
|
185 |
+
|
186 |
+
$shortcodes_ultimate_global_tabs_count++;
|
187 |
+
|
188 |
+
}
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'template',
|
5 |
+
'callback' => 'su_shortcode_template',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/template.svg',
|
7 |
+
'name' => __( 'Template', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'name' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Template name', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => sprintf( __( 'Use template file name (with optional .php extension). If you need to use templates from theme sub-folder, use relative path. Example values: %s, %s, %s', 'shortcodes-ultimate' ), '<b%value>page</b>', '<b%value>page.php</b>', '<b%value>includes/page.php</b>' )
|
15 |
+
)
|
16 |
+
),
|
17 |
+
'desc' => __( 'Theme template', 'shortcodes-ultimate' ),
|
18 |
+
'icon' => 'puzzle-piece',
|
19 |
+
) );
|
20 |
+
|
21 |
+
function su_shortcode_template( $atts = null, $content = null ) {
|
22 |
+
$atts = shortcode_atts( array(
|
23 |
+
'name' => ''
|
24 |
+
), $atts, 'template' );
|
25 |
+
// Check template name
|
26 |
+
if ( !$atts['name'] ) return sprintf( '<p class="su-error">Template: %s</p>', __( 'please specify template name', 'shortcodes-ultimate' ) );
|
27 |
+
// Get template output
|
28 |
+
ob_start();
|
29 |
+
get_template_part( str_replace( '.php', '', $atts['name'] ) );
|
30 |
+
$output = ob_get_contents();
|
31 |
+
ob_end_clean();
|
32 |
+
// Return result
|
33 |
+
return $output;
|
34 |
+
}
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'tooltip',
|
5 |
+
'callback' => 'su_shortcode_tooltip',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/tooltip.svg',
|
7 |
+
'name' => __( 'Tooltip', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'wrap',
|
9 |
+
'group' => 'other',
|
10 |
+
'atts' => array(
|
11 |
+
'style' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'light' => __( 'Basic: Light', 'shortcodes-ultimate' ),
|
15 |
+
'dark' => __( 'Basic: Dark', 'shortcodes-ultimate' ),
|
16 |
+
'yellow' => __( 'Basic: Yellow', 'shortcodes-ultimate' ),
|
17 |
+
'green' => __( 'Basic: Green', 'shortcodes-ultimate' ),
|
18 |
+
'red' => __( 'Basic: Red', 'shortcodes-ultimate' ),
|
19 |
+
'blue' => __( 'Basic: Blue', 'shortcodes-ultimate' ),
|
20 |
+
'youtube' => __( 'Youtube', 'shortcodes-ultimate' ),
|
21 |
+
'tipsy' => __( 'Tipsy', 'shortcodes-ultimate' ),
|
22 |
+
'bootstrap' => __( 'Bootstrap', 'shortcodes-ultimate' ),
|
23 |
+
'jtools' => __( 'jTools', 'shortcodes-ultimate' ),
|
24 |
+
'tipped' => __( 'Tipped', 'shortcodes-ultimate' ),
|
25 |
+
'cluetip' => __( 'Cluetip', 'shortcodes-ultimate' ),
|
26 |
+
),
|
27 |
+
'default' => 'yellow',
|
28 |
+
'name' => __( 'Style', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'Tooltip window style', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'position' => array(
|
32 |
+
'type' => 'select',
|
33 |
+
'values' => array(
|
34 |
+
'north' => __( 'Top', 'shortcodes-ultimate' ),
|
35 |
+
'south' => __( 'Bottom', 'shortcodes-ultimate' ),
|
36 |
+
'west' => __( 'Left', 'shortcodes-ultimate' ),
|
37 |
+
'east' => __( 'Right', 'shortcodes-ultimate' )
|
38 |
+
),
|
39 |
+
'default' => 'top',
|
40 |
+
'name' => __( 'Position', 'shortcodes-ultimate' ),
|
41 |
+
'desc' => __( 'Tooltip position', 'shortcodes-ultimate' )
|
42 |
+
),
|
43 |
+
'shadow' => array(
|
44 |
+
'type' => 'bool',
|
45 |
+
'default' => 'no',
|
46 |
+
'name' => __( 'Shadow', 'shortcodes-ultimate' ),
|
47 |
+
'desc' => __( 'Add shadow to tooltip. This option is only works with basic styes, e.g. blue, green etc.', 'shortcodes-ultimate' )
|
48 |
+
),
|
49 |
+
'rounded' => array(
|
50 |
+
'type' => 'bool',
|
51 |
+
'default' => 'no',
|
52 |
+
'name' => __( 'Rounded corners', 'shortcodes-ultimate' ),
|
53 |
+
'desc' => __( 'Use rounded for tooltip. This option is only works with basic styes, e.g. blue, green etc.', 'shortcodes-ultimate' )
|
54 |
+
),
|
55 |
+
'size' => array(
|
56 |
+
'type' => 'select',
|
57 |
+
'values' => array(
|
58 |
+
'default' => __( 'Default', 'shortcodes-ultimate' ),
|
59 |
+
'1' => 1,
|
60 |
+
'2' => 2,
|
61 |
+
'3' => 3,
|
62 |
+
'4' => 4,
|
63 |
+
'5' => 5,
|
64 |
+
'6' => 6,
|
65 |
+
),
|
66 |
+
'default' => 'default',
|
67 |
+
'name' => __( 'Font size', 'shortcodes-ultimate' ),
|
68 |
+
'desc' => __( 'Tooltip font size', 'shortcodes-ultimate' )
|
69 |
+
),
|
70 |
+
'title' => array(
|
71 |
+
'default' => '',
|
72 |
+
'name' => __( 'Tooltip title', 'shortcodes-ultimate' ),
|
73 |
+
'desc' => __( 'Enter title for tooltip window. Leave this field empty to hide the title', 'shortcodes-ultimate' )
|
74 |
+
),
|
75 |
+
'content' => array(
|
76 |
+
'default' => __( 'Tooltip text', 'shortcodes-ultimate' ),
|
77 |
+
'name' => __( 'Tooltip content', 'shortcodes-ultimate' ),
|
78 |
+
'desc' => __( 'Enter tooltip content here', 'shortcodes-ultimate' )
|
79 |
+
),
|
80 |
+
'behavior' => array(
|
81 |
+
'type' => 'select',
|
82 |
+
'values' => array(
|
83 |
+
'hover' => __( 'Show and hide on mouse hover', 'shortcodes-ultimate' ),
|
84 |
+
'click' => __( 'Show and hide by mouse click', 'shortcodes-ultimate' ),
|
85 |
+
'always' => __( 'Always visible', 'shortcodes-ultimate' )
|
86 |
+
),
|
87 |
+
'default' => 'hover',
|
88 |
+
'name' => __( 'Behavior', 'shortcodes-ultimate' ),
|
89 |
+
'desc' => __( 'Select tooltip behavior', 'shortcodes-ultimate' )
|
90 |
+
),
|
91 |
+
'close' => array(
|
92 |
+
'type' => 'bool',
|
93 |
+
'default' => 'no',
|
94 |
+
'name' => __( 'Close button', 'shortcodes-ultimate' ),
|
95 |
+
'desc' => __( 'Show close button', 'shortcodes-ultimate' )
|
96 |
+
),
|
97 |
+
'class' => array(
|
98 |
+
'type' => 'extra_css_class',
|
99 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
100 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
101 |
+
'default' => '',
|
102 |
+
),
|
103 |
+
),
|
104 |
+
'content' => __( 'Hover me to open tooltip', 'shortcodes-ultimate' ),
|
105 |
+
'desc' => __( 'Tooltip window with custom content', 'shortcodes-ultimate' ),
|
106 |
+
'icon' => 'comment-o',
|
107 |
+
) );
|
108 |
+
|
109 |
+
function su_shortcode_tooltip( $atts = null, $content = null ) {
|
110 |
+
|
111 |
+
$atts = shortcode_atts( array(
|
112 |
+
'style' => 'yellow',
|
113 |
+
'position' => 'north',
|
114 |
+
'shadow' => 'no',
|
115 |
+
'rounded' => 'no',
|
116 |
+
'size' => 'default',
|
117 |
+
'title' => '',
|
118 |
+
'content' => __( 'Tooltip text', 'shortcodes-ultimate' ),
|
119 |
+
'behavior' => 'hover',
|
120 |
+
'close' => 'no',
|
121 |
+
'class' => ''
|
122 |
+
), $atts, 'tooltip' );
|
123 |
+
|
124 |
+
// Prepare style
|
125 |
+
$atts['style'] = in_array( $atts['style'], array( 'light', 'dark', 'green', 'red', 'blue', 'youtube', 'tipsy', 'bootstrap', 'jtools', 'tipped', 'cluetip' ) )
|
126 |
+
? $atts['style']
|
127 |
+
: 'plain';
|
128 |
+
|
129 |
+
// Position
|
130 |
+
$atts['position'] = str_replace( array( 'top', 'right', 'bottom', 'left' ), array( 'north', 'east', 'south', 'west' ), $atts['position'] );
|
131 |
+
$position = array(
|
132 |
+
'my' => str_replace( array( 'north', 'east', 'south', 'west' ), array( 'bottom center', 'center left', 'top center', 'center right' ), $atts['position'] ),
|
133 |
+
'at' => str_replace( array( 'north', 'east', 'south', 'west' ), array( 'top center', 'center right', 'bottom center', 'center left' ), $atts['position'] )
|
134 |
+
);
|
135 |
+
|
136 |
+
// Prepare classes
|
137 |
+
$classes = array( 'su-qtip qtip-' . $atts['style'] );
|
138 |
+
$classes[] = 'su-qtip-size-' . $atts['size'];
|
139 |
+
|
140 |
+
if ( $atts['shadow'] === 'yes' ) {
|
141 |
+
$classes[] = 'qtip-shadow';
|
142 |
+
}
|
143 |
+
|
144 |
+
if ( $atts['rounded'] === 'yes' ) {
|
145 |
+
$classes[] = 'qtip-rounded';
|
146 |
+
}
|
147 |
+
|
148 |
+
// Query assets
|
149 |
+
su_query_asset( 'css', 'qtip' );
|
150 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
151 |
+
su_query_asset( 'js', 'jquery' );
|
152 |
+
su_query_asset( 'js', 'qtip' );
|
153 |
+
su_query_asset( 'js', 'su-other-shortcodes' );
|
154 |
+
|
155 |
+
return '<span class="su-tooltip' . su_get_css_class( $atts ) . '" data-close="' . $atts['close'] . '" data-behavior="' . $atts['behavior'] . '" data-my="' . $position['my'] . '" data-at="' . $position['at'] . '" data-classes="' . implode( ' ', $classes ) . '" data-title="' . $atts['title'] . '" title="' . esc_attr( $atts['content'] ) . '">' . do_shortcode( $content ) . '</span>';
|
156 |
+
|
157 |
+
}
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'user',
|
5 |
+
'callback' => 'su_shortcode_user',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/user.svg',
|
7 |
+
'name' => __( 'User data', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'data',
|
10 |
+
'atts' => array(
|
11 |
+
'field' => array(
|
12 |
+
'type' => 'select',
|
13 |
+
'values' => array(
|
14 |
+
'display_name' => __( 'Display name', 'shortcodes-ultimate' ),
|
15 |
+
'ID' => __( 'ID', 'shortcodes-ultimate' ),
|
16 |
+
'user_login' => __( 'Login', 'shortcodes-ultimate' ),
|
17 |
+
'user_nicename' => __( 'Nice name', 'shortcodes-ultimate' ),
|
18 |
+
'user_email' => __( 'Email', 'shortcodes-ultimate' ),
|
19 |
+
'user_url' => __( 'URL', 'shortcodes-ultimate' ),
|
20 |
+
'user_registered' => __( 'Registered', 'shortcodes-ultimate' ),
|
21 |
+
'user_activation_key' => __( 'Activation key', 'shortcodes-ultimate' ),
|
22 |
+
'user_status' => __( 'Status', 'shortcodes-ultimate' )
|
23 |
+
),
|
24 |
+
'default' => 'display_name',
|
25 |
+
'name' => __( 'Field', 'shortcodes-ultimate' ),
|
26 |
+
'desc' => __( 'User data field name', 'shortcodes-ultimate' )
|
27 |
+
),
|
28 |
+
'default' => array(
|
29 |
+
'default' => '',
|
30 |
+
'name' => __( 'Default', 'shortcodes-ultimate' ),
|
31 |
+
'desc' => __( 'This text will be shown if data is not found', 'shortcodes-ultimate' )
|
32 |
+
),
|
33 |
+
'before' => array(
|
34 |
+
'default' => '',
|
35 |
+
'name' => __( 'Before', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'This content will be shown before the value', 'shortcodes-ultimate' )
|
37 |
+
),
|
38 |
+
'after' => array(
|
39 |
+
'default' => '',
|
40 |
+
'name' => __( 'After', 'shortcodes-ultimate' ),
|
41 |
+
'desc' => __( 'This content will be shown after the value', 'shortcodes-ultimate' )
|
42 |
+
),
|
43 |
+
'user_id' => array(
|
44 |
+
'default' => '',
|
45 |
+
'name' => __( 'User ID', 'shortcodes-ultimate' ),
|
46 |
+
'desc' => __( 'You can specify custom user ID. Leave this field empty to use an ID of the current user', 'shortcodes-ultimate' )
|
47 |
+
),
|
48 |
+
'filter' => array(
|
49 |
+
'default' => '',
|
50 |
+
'name' => __( 'Filter', 'shortcodes-ultimate' ),
|
51 |
+
'desc' => __( 'You can apply custom filter to the retrieved value. Enter here function name. Your function must accept one argument and return modified value. Name of your function must include word <b>filter</b>. Example function: ', 'shortcodes-ultimate' ) . "<br /><pre><code style='display:block;padding:5px'>function my_custom_filter( \$value ) {\n\treturn 'Value is: ' . \$value;\n}</code></pre>"
|
52 |
+
)
|
53 |
+
),
|
54 |
+
'desc' => __( 'User data', 'shortcodes-ultimate' ),
|
55 |
+
'icon' => 'info-circle',
|
56 |
+
) );
|
57 |
+
|
58 |
+
function su_shortcode_user( $atts = null, $content = null ) {
|
59 |
+
$atts = shortcode_atts( array(
|
60 |
+
'field' => 'display_name',
|
61 |
+
'default' => '',
|
62 |
+
'before' => '',
|
63 |
+
'after' => '',
|
64 |
+
'user_id' => '',
|
65 |
+
'filter' => ''
|
66 |
+
), $atts, 'user' );
|
67 |
+
// Check for password requests
|
68 |
+
if ( $atts['field'] === 'user_pass' ) return sprintf( '<p class="su-error">User: %s</p>', __( 'password field is not allowed', 'shortcodes-ultimate' ) );
|
69 |
+
// Define current user ID
|
70 |
+
if ( !$atts['user_id'] ) $atts['user_id'] = get_current_user_id();
|
71 |
+
// Check user ID
|
72 |
+
if ( !is_numeric( $atts['user_id'] ) || $atts['user_id'] < 0 ) return sprintf( '<p class="su-error">User: %s</p>', __( 'user ID is incorrect', 'shortcodes-ultimate' ) );
|
73 |
+
// Get user data
|
74 |
+
$user = get_user_by( 'id', $atts['user_id'] );
|
75 |
+
// Get user data if user was found
|
76 |
+
$user = ( $user && isset( $user->data->{$atts['field']} ) ) ? $user->data->{$atts['field']} : $atts['default'];
|
77 |
+
// Apply cutom filter
|
78 |
+
if (
|
79 |
+
$atts['filter'] &&
|
80 |
+
su_is_filter_safe( $atts['filter'] ) &&
|
81 |
+
function_exists( $atts['filter'] )
|
82 |
+
) {
|
83 |
+
$user = call_user_func( $atts['filter'], $user );
|
84 |
+
}
|
85 |
+
// Return result
|
86 |
+
return ( $user ) ? $atts['before'] . $user . $atts['after'] : '';
|
87 |
+
}
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'video',
|
5 |
+
'callback' => 'su_shortcode_video',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/video.svg',
|
7 |
+
'name' => __( 'Video', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'type' => 'upload',
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'File', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Url to mp4/flv video-file', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'poster' => array(
|
18 |
+
'type' => 'upload',
|
19 |
+
'default' => '',
|
20 |
+
'name' => __( 'Poster', 'shortcodes-ultimate' ),
|
21 |
+
'desc' => __( 'Url to poster image, that will be shown before playback', 'shortcodes-ultimate' )
|
22 |
+
),
|
23 |
+
'title' => array(
|
24 |
+
'values' => array( ),
|
25 |
+
'default' => '',
|
26 |
+
'name' => __( 'Title', 'shortcodes-ultimate' ),
|
27 |
+
'desc' => __( 'Player title', 'shortcodes-ultimate' )
|
28 |
+
),
|
29 |
+
'width' => array(
|
30 |
+
'type' => 'slider',
|
31 |
+
'min' => 200,
|
32 |
+
'max' => 1600,
|
33 |
+
'step' => 20,
|
34 |
+
'default' => 600,
|
35 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
36 |
+
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
37 |
+
),
|
38 |
+
'height' => array(
|
39 |
+
'type' => 'slider',
|
40 |
+
'min' => 200,
|
41 |
+
'max' => 1600,
|
42 |
+
'step' => 20,
|
43 |
+
'default' => 300,
|
44 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
45 |
+
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
46 |
+
),
|
47 |
+
'controls' => array(
|
48 |
+
'type' => 'bool',
|
49 |
+
'default' => 'yes',
|
50 |
+
'name' => __( 'Controls', 'shortcodes-ultimate' ),
|
51 |
+
'desc' => __( 'Show player controls (play/pause etc.) or not', 'shortcodes-ultimate' )
|
52 |
+
),
|
53 |
+
'autoplay' => array(
|
54 |
+
'type' => 'bool',
|
55 |
+
'default' => 'no',
|
56 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
57 |
+
'desc' => __( 'Play file automatically when page is loaded', 'shortcodes-ultimate' )
|
58 |
+
),
|
59 |
+
'loop' => array(
|
60 |
+
'type' => 'bool',
|
61 |
+
'default' => 'no',
|
62 |
+
'name' => __( 'Loop', 'shortcodes-ultimate' ),
|
63 |
+
'desc' => __( 'Repeat when playback is ended', 'shortcodes-ultimate' )
|
64 |
+
),
|
65 |
+
'class' => array(
|
66 |
+
'type' => 'extra_css_class',
|
67 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
68 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
69 |
+
'default' => '',
|
70 |
+
),
|
71 |
+
),
|
72 |
+
'desc' => __( 'Custom video player', 'shortcodes-ultimate' ),
|
73 |
+
'example' => 'media',
|
74 |
+
'icon' => 'play-circle',
|
75 |
+
) );
|
76 |
+
|
77 |
+
function su_shortcode_video( $atts = null, $content = null ) {
|
78 |
+
|
79 |
+
$atts = shortcode_atts( array(
|
80 |
+
'url' => false,
|
81 |
+
'poster' => false,
|
82 |
+
'title' => '',
|
83 |
+
'width' => 600,
|
84 |
+
'height' => 300,
|
85 |
+
'controls' => 'yes',
|
86 |
+
'autoplay' => 'no',
|
87 |
+
'loop' => 'no',
|
88 |
+
'class' => ''
|
89 |
+
), $atts, 'video' );
|
90 |
+
|
91 |
+
if ( ! $atts['url'] ) {
|
92 |
+
return su_error_message( 'Video', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
96 |
+
|
97 |
+
$id = uniqid( 'su_video_player_' );
|
98 |
+
|
99 |
+
if ( ! $atts['url'] ) {
|
100 |
+
return su_error_message( 'Video', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
101 |
+
}
|
102 |
+
|
103 |
+
$title = $atts['title']
|
104 |
+
? '<div class="jp-title">' . $atts['title'] . '</div>'
|
105 |
+
: '';
|
106 |
+
|
107 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
108 |
+
su_query_asset( 'js', 'jquery' );
|
109 |
+
su_query_asset( 'js', 'jplayer' );
|
110 |
+
su_query_asset( 'js', 'su-players-shortcodes' );
|
111 |
+
|
112 |
+
return '<div style="width:' . $atts['width'] . 'px"><div id="' . $id . '" class="su-video jp-video su-video-controls-' . $atts['controls'] . su_get_css_class( $atts ) . '" data-id="' . $id . '" data-video="' . $atts['url'] . '" data-swf="' . plugins_url( 'assets/other/Jplayer.swf', SU_PLUGIN_FILE ) . '" data-autoplay="' . $atts['autoplay'] . '" data-loop="' . $atts['loop'] . '" data-poster="' . $atts['poster'] . '"><div id="' . $id . '_player" class="jp-jplayer" style="width:' . $atts['width'] . 'px;height:' . $atts['height'] . 'px"></div>' . $title . '<div class="jp-start jp-play"></div><div class="jp-gui"><div class="jp-interface"><div class="jp-progress"><div class="jp-seek-bar"><div class="jp-play-bar"></div></div></div><div class="jp-current-time"></div><div class="jp-duration"></div><div class="jp-controls-holder"><span class="jp-play"></span><span class="jp-pause"></span><span class="jp-mute"></span><span class="jp-unmute"></span><span class="jp-full-screen"></span><span class="jp-restore-screen"></span><div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div></div></div></div></div></div>';
|
113 |
+
|
114 |
+
}
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'vimeo',
|
5 |
+
'callback' => 'su_shortcode_vimeo',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/vimeo.svg',
|
7 |
+
'name' => __( 'Vimeo', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Url', 'shortcodes-ultimate' ), 'desc' => __( 'Url of Vimeo page with video', 'shortcodes-ultimate' )
|
14 |
+
),
|
15 |
+
'width' => array(
|
16 |
+
'type' => 'slider',
|
17 |
+
'min' => 200,
|
18 |
+
'max' => 1600,
|
19 |
+
'step' => 20,
|
20 |
+
'default' => 600,
|
21 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
22 |
+
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
23 |
+
),
|
24 |
+
'height' => array(
|
25 |
+
'type' => 'slider',
|
26 |
+
'min' => 200,
|
27 |
+
'max' => 1600,
|
28 |
+
'step' => 20,
|
29 |
+
'default' => 400,
|
30 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
31 |
+
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
32 |
+
),
|
33 |
+
'responsive' => array(
|
34 |
+
'type' => 'bool',
|
35 |
+
'default' => 'yes',
|
36 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
37 |
+
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
38 |
+
),
|
39 |
+
'autoplay' => array(
|
40 |
+
'type' => 'bool',
|
41 |
+
'default' => 'no',
|
42 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
43 |
+
'desc' => __( 'Play video automatically when page is loaded', 'shortcodes-ultimate' )
|
44 |
+
),
|
45 |
+
'dnt' => array(
|
46 |
+
'type' => 'bool',
|
47 |
+
'default' => 'no',
|
48 |
+
'name' => __( 'Do not track', 'shortcodes-ultimate' ),
|
49 |
+
'desc' => __( 'Setting this parameter to YES will block the player from tracking any playback session data. Will have the same effect as enabling a Do Not Track header in your browser', 'shortcodes-ultimate' )
|
50 |
+
),
|
51 |
+
'class' => array(
|
52 |
+
'type' => 'extra_css_class',
|
53 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
54 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
55 |
+
'default' => '',
|
56 |
+
),
|
57 |
+
),
|
58 |
+
'desc' => __( 'Vimeo video', 'shortcodes-ultimate' ),
|
59 |
+
'example' => 'media',
|
60 |
+
'icon' => 'youtube-play',
|
61 |
+
) );
|
62 |
+
|
63 |
+
function su_shortcode_vimeo( $atts = null, $content = null ) {
|
64 |
+
|
65 |
+
$atts = shortcode_atts( array(
|
66 |
+
'url' => '',
|
67 |
+
'width' => 600,
|
68 |
+
'height' => 400,
|
69 |
+
'autoplay' => 'no',
|
70 |
+
'dnt' => 'no',
|
71 |
+
'mute' => 'no',
|
72 |
+
'responsive' => 'yes',
|
73 |
+
'class' => ''
|
74 |
+
), $atts, 'vimeo' );
|
75 |
+
|
76 |
+
if ( ! $atts['url'] ) {
|
77 |
+
return su_error_message( 'Vimeo', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
78 |
+
}
|
79 |
+
|
80 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
81 |
+
|
82 |
+
$video_id = preg_match( '~(?:<iframe [^>]*src=")?(?:https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/videos?)?\/([0-9]+)[^\s]*)"?(?:[^>]*></iframe>)?(?:<p>.*</p>)?~ix', $atts['url'], $match )
|
83 |
+
? $match[1]
|
84 |
+
: false;
|
85 |
+
|
86 |
+
if ( ! $video_id ) {
|
87 |
+
return su_error_message( 'Vimeo', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
88 |
+
}
|
89 |
+
|
90 |
+
$url_params = array(
|
91 |
+
'title' => 0,
|
92 |
+
'byline' => 0,
|
93 |
+
'portrait' => 0,
|
94 |
+
'color' => 'ffffff',
|
95 |
+
'autoplay' => $atts['autoplay'] === 'yes' ? 1 : 0,
|
96 |
+
'dnt' => $atts['dnt'] === 'yes' ? 1 : 0,
|
97 |
+
'muted' => $atts['mute'] === 'yes' ? 1 : 0,
|
98 |
+
);
|
99 |
+
|
100 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
101 |
+
|
102 |
+
return '<div class="su-vimeo su-responsive-media-' . $atts['responsive'] . su_get_css_class( $atts ) . '"><iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="//player.vimeo.com/video/' . $video_id . '?' . http_build_query( $url_params ) . '" frameborder="0" allowfullscreen="true"></iframe></div>';
|
103 |
+
|
104 |
+
}
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'youtube',
|
5 |
+
'callback' => 'su_shortcode_youtube',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/youtube.svg',
|
7 |
+
'name' => __( 'YouTube', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'default' => '',
|
13 |
+
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
14 |
+
'desc' => __( 'Url of YouTube page with video. Ex: http://youtube.com/watch?v=XXXXXX', 'shortcodes-ultimate' )
|
15 |
+
),
|
16 |
+
'width' => array(
|
17 |
+
'type' => 'slider',
|
18 |
+
'min' => 200,
|
19 |
+
'max' => 1600,
|
20 |
+
'step' => 20,
|
21 |
+
'default' => 600,
|
22 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
23 |
+
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
24 |
+
),
|
25 |
+
'height' => array(
|
26 |
+
'type' => 'slider',
|
27 |
+
'min' => 200,
|
28 |
+
'max' => 1600,
|
29 |
+
'step' => 20,
|
30 |
+
'default' => 400,
|
31 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
32 |
+
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
33 |
+
),
|
34 |
+
'responsive' => array(
|
35 |
+
'type' => 'bool',
|
36 |
+
'default' => 'yes',
|
37 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'autoplay' => array(
|
41 |
+
'type' => 'bool',
|
42 |
+
'default' => 'no',
|
43 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
44 |
+
'desc' => __( 'Play video automatically when page is loaded', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'mute' => array(
|
47 |
+
'type' => 'bool',
|
48 |
+
'default' => 'no',
|
49 |
+
'name' => __( 'Mute', 'shortcodes-ultimate' ),
|
50 |
+
'desc' => __( 'Mute the player', 'shortcodes-ultimate' )
|
51 |
+
),
|
52 |
+
'class' => array(
|
53 |
+
'type' => 'extra_css_class',
|
54 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
55 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
56 |
+
'default' => '',
|
57 |
+
),
|
58 |
+
),
|
59 |
+
'desc' => __( 'YouTube video', 'shortcodes-ultimate' ),
|
60 |
+
'example' => 'media',
|
61 |
+
'icon' => 'youtube-play',
|
62 |
+
) );
|
63 |
+
|
64 |
+
function su_shortcode_youtube( $atts = null, $content = null ) {
|
65 |
+
|
66 |
+
$atts = shortcode_atts( array(
|
67 |
+
'url' => false,
|
68 |
+
'width' => 600,
|
69 |
+
'height' => 400,
|
70 |
+
'autoplay' => 'no',
|
71 |
+
'mute' => 'no',
|
72 |
+
'responsive' => 'yes',
|
73 |
+
'class' => ''
|
74 |
+
), $atts, 'youtube' );
|
75 |
+
|
76 |
+
if ( ! $atts['url'] ) {
|
77 |
+
return su_error_message( 'YouTube', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
78 |
+
}
|
79 |
+
|
80 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
81 |
+
|
82 |
+
$video_id = preg_match( '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $atts['url'], $match )
|
83 |
+
? $match[1]
|
84 |
+
: false;
|
85 |
+
|
86 |
+
if ( ! $video_id ) {
|
87 |
+
return su_error_message( 'YouTube', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
88 |
+
}
|
89 |
+
|
90 |
+
$url_params = array();
|
91 |
+
|
92 |
+
if ( $atts['autoplay'] === 'yes' ) {
|
93 |
+
$url_params['autoplay'] = '1';
|
94 |
+
}
|
95 |
+
|
96 |
+
if ( $atts['mute'] === 'yes' ) {
|
97 |
+
$url_params['mute'] = '1';
|
98 |
+
}
|
99 |
+
|
100 |
+
$domain = strpos( $atts['url'], 'youtube-nocookie.com' ) !== false
|
101 |
+
? 'www.youtube-nocookie.com'
|
102 |
+
: 'www.youtube.com';
|
103 |
+
|
104 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
105 |
+
|
106 |
+
return '<div class="su-youtube su-responsive-media-' . $atts['responsive'] . su_get_css_class( $atts ) . '"><iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="https://' . $domain . '/embed/' . $video_id . '?' . http_build_query( $url_params ) . '" frameborder="0" allowfullscreen="true"></iframe></div>';
|
107 |
+
|
108 |
+
}
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
su_add_shortcode( array(
|
4 |
+
'id' => 'youtube_advanced',
|
5 |
+
'callback' => 'su_shortcode_youtube_advanced',
|
6 |
+
'image' => su_get_plugin_url() . 'admin/images/shortcodes/youtube_advanced.svg',
|
7 |
+
'name' => __( 'YouTube advanced', 'shortcodes-ultimate' ),
|
8 |
+
'type' => 'single',
|
9 |
+
'group' => 'media',
|
10 |
+
'atts' => array(
|
11 |
+
'url' => array(
|
12 |
+
'values' => array( ),
|
13 |
+
'default' => '',
|
14 |
+
'name' => __( 'Url', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => __( 'Url of YouTube page with video. Ex: http://youtube.com/watch?v=XXXXXX', 'shortcodes-ultimate' )
|
16 |
+
),
|
17 |
+
'playlist' => array(
|
18 |
+
'default' => '',
|
19 |
+
'name' => __( 'Playlist', 'shortcodes-ultimate' ),
|
20 |
+
'desc' => __( 'Value is a comma-separated list of video IDs to play. If you specify a value, the first video that plays will be the VIDEO_ID specified in the URL path, and the videos specified in the playlist parameter will play thereafter', 'shortcodes-ultimate' )
|
21 |
+
),
|
22 |
+
'width' => array(
|
23 |
+
'type' => 'slider',
|
24 |
+
'min' => 200,
|
25 |
+
'max' => 1600,
|
26 |
+
'step' => 20,
|
27 |
+
'default' => 600,
|
28 |
+
'name' => __( 'Width', 'shortcodes-ultimate' ),
|
29 |
+
'desc' => __( 'Player width', 'shortcodes-ultimate' )
|
30 |
+
),
|
31 |
+
'height' => array(
|
32 |
+
'type' => 'slider',
|
33 |
+
'min' => 200,
|
34 |
+
'max' => 1600,
|
35 |
+
'step' => 20,
|
36 |
+
'default' => 400,
|
37 |
+
'name' => __( 'Height', 'shortcodes-ultimate' ),
|
38 |
+
'desc' => __( 'Player height', 'shortcodes-ultimate' )
|
39 |
+
),
|
40 |
+
'responsive' => array(
|
41 |
+
'type' => 'bool',
|
42 |
+
'default' => 'yes',
|
43 |
+
'name' => __( 'Responsive', 'shortcodes-ultimate' ),
|
44 |
+
'desc' => __( 'Ignore width and height parameters and make player responsive', 'shortcodes-ultimate' )
|
45 |
+
),
|
46 |
+
'controls' => array(
|
47 |
+
'type' => 'select',
|
48 |
+
'values' => array(
|
49 |
+
'no' => __( '0 - Hide controls', 'shortcodes-ultimate' ),
|
50 |
+
'yes' => __( '1 - Show controls', 'shortcodes-ultimate' ),
|
51 |
+
'alt' => __( '2 - Show controls when playback is started', 'shortcodes-ultimate' )
|
52 |
+
),
|
53 |
+
'default' => 'yes',
|
54 |
+
'name' => __( 'Controls', 'shortcodes-ultimate' ),
|
55 |
+
'desc' => __( 'This parameter indicates whether the video player controls will display', 'shortcodes-ultimate' )
|
56 |
+
),
|
57 |
+
'autohide' => array(
|
58 |
+
'type' => 'select',
|
59 |
+
'values' => array(
|
60 |
+
'no' => __( '0 - Do not hide controls', 'shortcodes-ultimate' ),
|
61 |
+
'yes' => __( '1 - Hide all controls on mouse out', 'shortcodes-ultimate' ),
|
62 |
+
'alt' => __( '2 - Hide progress bar on mouse out', 'shortcodes-ultimate' )
|
63 |
+
),
|
64 |
+
'default' => 'alt',
|
65 |
+
'name' => __( 'Autohide', 'shortcodes-ultimate' ),
|
66 |
+
'desc' => __( 'This parameter indicates whether the video controls will automatically hide after a video begins playing', 'shortcodes-ultimate' )
|
67 |
+
),
|
68 |
+
'showinfo' => array(
|
69 |
+
'type' => 'bool',
|
70 |
+
'default' => 'yes',
|
71 |
+
'name' => __( 'Show title bar', 'shortcodes-ultimate' ),
|
72 |
+
'desc' => __( 'If you set the parameter value to NO, then the player will not display information like the video title and uploader before the video starts playing.', 'shortcodes-ultimate' )
|
73 |
+
),
|
74 |
+
'autoplay' => array(
|
75 |
+
'type' => 'bool',
|
76 |
+
'default' => 'no',
|
77 |
+
'name' => __( 'Autoplay', 'shortcodes-ultimate' ),
|
78 |
+
'desc' => __( 'Play video automatically when page is loaded', 'shortcodes-ultimate' )
|
79 |
+
),
|
80 |
+
'mute' => array(
|
81 |
+
'type' => 'bool',
|
82 |
+
'default' => 'no',
|
83 |
+
'name' => __( 'Mute', 'shortcodes-ultimate' ),
|
84 |
+
'desc' => __( 'Mute the player', 'shortcodes-ultimate' )
|
85 |
+
),
|
86 |
+
'loop' => array(
|
87 |
+
'type' => 'bool',
|
88 |
+
'default' => 'no',
|
89 |
+
'name' => __( 'Loop', 'shortcodes-ultimate' ),
|
90 |
+
'desc' => __( 'Setting of YES will cause the player to play the initial video again and again', 'shortcodes-ultimate' )
|
91 |
+
),
|
92 |
+
'rel' => array(
|
93 |
+
'type' => 'bool',
|
94 |
+
'default' => 'yes',
|
95 |
+
'name' => __( 'Related videos', 'shortcodes-ultimate' ),
|
96 |
+
'desc' => __( 'This parameter indicates whether the player should show related videos when playback of the initial video ends', 'shortcodes-ultimate' )
|
97 |
+
),
|
98 |
+
'fs' => array(
|
99 |
+
'type' => 'bool',
|
100 |
+
'default' => 'yes',
|
101 |
+
'name' => __( 'Show full-screen button', 'shortcodes-ultimate' ),
|
102 |
+
'desc' => __( 'Setting this parameter to NO prevents the fullscreen button from displaying', 'shortcodes-ultimate' )
|
103 |
+
),
|
104 |
+
'modestbranding' => array(
|
105 |
+
'type' => 'bool',
|
106 |
+
'default' => 'no',
|
107 |
+
'name' => 'modestbranding',
|
108 |
+
'desc' => __( 'This parameter lets you use a YouTube player that does not show a YouTube logo. Set the parameter value to YES to prevent the YouTube logo from displaying in the control bar. Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user\'s mouse pointer hovers over the player', 'shortcodes-ultimate' )
|
109 |
+
),
|
110 |
+
'theme' => array(
|
111 |
+
'type' => 'select',
|
112 |
+
'values' => array(
|
113 |
+
'dark' => __( 'Dark theme', 'shortcodes-ultimate' ),
|
114 |
+
'light' => __( 'Light theme', 'shortcodes-ultimate' )
|
115 |
+
),
|
116 |
+
'default' => 'dark',
|
117 |
+
'name' => __( 'Theme', 'shortcodes-ultimate' ),
|
118 |
+
'desc' => __( 'This parameter indicates whether the embedded player will display player controls (like a play button or volume control) within a dark or light control bar', 'shortcodes-ultimate' )
|
119 |
+
),
|
120 |
+
'https' => array(
|
121 |
+
'type' => 'bool',
|
122 |
+
'default' => 'no',
|
123 |
+
'name' => __( 'Force HTTPS', 'shortcodes-ultimate' ),
|
124 |
+
'desc' => __( 'Use HTTPS in player iframe', 'shortcodes-ultimate' )
|
125 |
+
),
|
126 |
+
'wmode' => array(
|
127 |
+
'default' => '',
|
128 |
+
'name' => __( 'WMode', 'shortcodes-ultimate' ),
|
129 |
+
'desc' => sprintf( __( 'Here you can specify wmode value for the embed URL. %s Example values: %s, %s', 'shortcodes-ultimate' ), '<br>', '<b%value>transparent</b>', '<b%value>opaque</b>' )
|
130 |
+
),
|
131 |
+
'playsinline' => array(
|
132 |
+
'type' => 'bool',
|
133 |
+
'default' => 'no',
|
134 |
+
'name' => __( 'Plays inline', 'shortcodes-ultimate' ),
|
135 |
+
'desc' => __( 'This parameter controls whether videos play inline or fullscreen in an HTML5 player on iOS', 'shortcodes-ultimate' )
|
136 |
+
),
|
137 |
+
'class' => array(
|
138 |
+
'type' => 'extra_css_class',
|
139 |
+
'name' => __( 'Extra CSS class', 'shortcodes-ultimate' ),
|
140 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s)', 'shortcodes-ultimate' ),
|
141 |
+
'default' => '',
|
142 |
+
),
|
143 |
+
),
|
144 |
+
'desc' => __( 'YouTube video player with advanced settings', 'shortcodes-ultimate' ),
|
145 |
+
'example' => 'media',
|
146 |
+
'icon' => 'youtube-play',
|
147 |
+
) );
|
148 |
+
|
149 |
+
function su_shortcode_youtube_advanced( $atts = null, $content = null ) {
|
150 |
+
|
151 |
+
$atts = shortcode_atts( array(
|
152 |
+
'url' => false,
|
153 |
+
'width' => 600,
|
154 |
+
'height' => 400,
|
155 |
+
'responsive' => 'yes',
|
156 |
+
'autohide' => 'alt',
|
157 |
+
'autoplay' => 'no',
|
158 |
+
'mute' => 'no',
|
159 |
+
'controls' => 'yes',
|
160 |
+
'fs' => 'yes',
|
161 |
+
'loop' => 'no',
|
162 |
+
'modestbranding' => 'no',
|
163 |
+
'playlist' => '',
|
164 |
+
'rel' => 'yes',
|
165 |
+
'showinfo' => 'yes',
|
166 |
+
'theme' => 'dark',
|
167 |
+
'https' => 'no',
|
168 |
+
'wmode' => '',
|
169 |
+
'playsinline' => 'no',
|
170 |
+
'class' => ''
|
171 |
+
), $atts, 'youtube_advanced' );
|
172 |
+
|
173 |
+
if ( ! $atts['url'] ) {
|
174 |
+
return su_error_message( 'YouTube Advanced', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
175 |
+
}
|
176 |
+
|
177 |
+
$atts['url'] = su_do_attribute( $atts['url'] );
|
178 |
+
|
179 |
+
$video_id = preg_match( '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $atts['url'], $match )
|
180 |
+
? $match[1]
|
181 |
+
: false;
|
182 |
+
|
183 |
+
if ( ! $video_id ) {
|
184 |
+
return su_error_message( 'YouTube Advanced', __( 'please specify correct url', 'shortcodes-ultimate' ) );
|
185 |
+
}
|
186 |
+
|
187 |
+
$url_params = array();
|
188 |
+
$yt_options = array(
|
189 |
+
'autohide',
|
190 |
+
'autoplay',
|
191 |
+
'mute',
|
192 |
+
'controls',
|
193 |
+
'fs',
|
194 |
+
'loop',
|
195 |
+
'modestbranding',
|
196 |
+
'playlist',
|
197 |
+
'rel',
|
198 |
+
'showinfo',
|
199 |
+
'theme',
|
200 |
+
'wmode',
|
201 |
+
'playsinline'
|
202 |
+
);
|
203 |
+
|
204 |
+
foreach ( $yt_options as $yt_option ) {
|
205 |
+
$url_params[ $yt_option ] = str_replace( array( 'no', 'yes', 'alt' ), array( '0', '1', '2' ), $atts[ $yt_option ] );
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( $url_params['loop'] === '1' && $url_params['playlist'] === '' ) {
|
209 |
+
$url_params['playlist'] = $video_id;
|
210 |
+
}
|
211 |
+
|
212 |
+
$url_params = http_build_query( $url_params );
|
213 |
+
|
214 |
+
$protocol = $atts['https'] === 'yes'
|
215 |
+
? 'https'
|
216 |
+
: 'http';
|
217 |
+
|
218 |
+
$domain = strpos( $atts['url'], 'youtube-nocookie.com' ) !== false
|
219 |
+
? 'www.youtube-nocookie.com'
|
220 |
+
: 'www.youtube.com';
|
221 |
+
|
222 |
+
su_query_asset( 'css', 'su-shortcodes' );
|
223 |
+
|
224 |
+
return '<div class="su-youtube su-responsive-media-' . $atts['responsive'] . su_get_css_class( $atts ) . '"><iframe width="' . $atts['width'] . '" height="' . $atts['height'] . '" src="' . $protocol . '://' . $domain . '/embed/' . $video_id . '?' . $url_params . '" frameborder="0" allowfullscreen="true"></iframe></div>';
|
225 |
+
|
226 |
+
}
|
@@ -4,6 +4,7 @@ License: GPLv3
|
|
4 |
Donate link: https://paypal.me/anovladimir
|
5 |
Tags: shortcode, toggle, columns, button, slider, video, map, visual, responsive, shortcodes, youtube, vimeo, audio, mp3, tabs, jquery, box, accordion, toggle, pullquote, list, image, gallery, navigation, permalink, feed, rss, members, membership, guests, carousel, icons, rtl, multilingual
|
6 |
Requires at least: 3.5
|
|
|
7 |
Tested up to: 4.9
|
8 |
Stable tag: trunk
|
9 |
|
@@ -105,6 +106,28 @@ For help with premium add-ons, please [open new support ticket](https://getshort
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
= 5.0.4 =
|
109 |
* Fixed: added missing FontAwesome icons
|
110 |
* Fixed: is_plugin_active call removed on frontend
|
4 |
Donate link: https://paypal.me/anovladimir
|
5 |
Tags: shortcode, toggle, columns, button, slider, video, map, visual, responsive, shortcodes, youtube, vimeo, audio, mp3, tabs, jquery, box, accordion, toggle, pullquote, list, image, gallery, navigation, permalink, feed, rss, members, membership, guests, carousel, icons, rtl, multilingual
|
6 |
Requires at least: 3.5
|
7 |
+
Requires PHP: 5.2.4
|
8 |
Tested up to: 4.9
|
9 |
Stable tag: trunk
|
10 |
|
106 |
|
107 |
== Changelog ==
|
108 |
|
109 |
+
= 5.0.5 =
|
110 |
+
|
111 |
+
Improvements:
|
112 |
+
* Improved compatibility with fitvid.js;
|
113 |
+
* Improved appearance of the `Show more` and `Show less` links of the `su_expand` shortcode;
|
114 |
+
* The new option `mute` for `su_youtube` and `su_youtube_advanced` shortcodes;
|
115 |
+
* Support for the `youtube-nocookie.com` domain in `su_youtube` and `su_youtube_advanced` shortcodes;
|
116 |
+
* Support for nested shortcodes in the `title` attribute of the `su_button` shortcode;
|
117 |
+
* The new option `dnt` (do not track) for the `su_vimeo` shortcode, [learn more](https://help.vimeo.com/hc/en-us/articles/360001494447-Using-Player-Parameters);
|
118 |
+
* The new option `mute` for the `su_vimeo` shortcode;
|
119 |
+
* https support for the `su_dailymotion` shortcode;
|
120 |
+
* New options `title` and `rel` for the `su_permalink` shortcode;
|
121 |
+
* The `su_post` shortcode now support slugs in the `post_id` attribute;
|
122 |
+
* The new option `zoom` for `su_gmap`.
|
123 |
+
|
124 |
+
Changes:
|
125 |
+
* Shortcodes styles merged into a single stylesheet.
|
126 |
+
|
127 |
+
Fixes:
|
128 |
+
* Fixed warning in `su_siblings` shortcode.
|
129 |
+
|
130 |
+
|
131 |
= 5.0.4 =
|
132 |
* Fixed: added missing FontAwesome icons
|
133 |
* Fixed: is_plugin_active call removed on frontend
|
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Shortcodes Ultimate
|
4 |
* Plugin URI: https://getshortcodes.com/
|
5 |
-
* Version: 5.0.
|
6 |
* Author: Vladimir Anokhin
|
7 |
* Author URI: https://vanokhin.com/
|
8 |
* Description: A comprehensive collection of visual components for WordPress
|
@@ -15,17 +15,13 @@
|
|
15 |
* Define plugin constants.
|
16 |
*/
|
17 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
18 |
-
define( 'SU_PLUGIN_VERSION', '5.0.
|
19 |
-
define( 'SU_ENABLE_CACHE', false );
|
20 |
|
21 |
/**
|
22 |
* Load dependencies.
|
23 |
*/
|
24 |
-
require_once 'inc/core/load.php';
|
25 |
require_once 'inc/core/assets.php';
|
26 |
-
require_once 'inc/core/shortcodes.php';
|
27 |
require_once 'inc/core/tools.php';
|
28 |
-
require_once 'inc/core/data.php';
|
29 |
require_once 'inc/core/generator-views.php';
|
30 |
require_once 'inc/core/generator.php';
|
31 |
require_once 'inc/core/widget.php';
|
@@ -54,7 +50,7 @@ function run_shortcodes_ultimate() {
|
|
54 |
|
55 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-shortcodes-ultimate.php';
|
56 |
|
57 |
-
$plugin = new Shortcodes_Ultimate( __FILE__,
|
58 |
|
59 |
do_action( 'su/ready' );
|
60 |
|
2 |
/**
|
3 |
* Plugin Name: Shortcodes Ultimate
|
4 |
* Plugin URI: https://getshortcodes.com/
|
5 |
+
* Version: 5.0.5
|
6 |
* Author: Vladimir Anokhin
|
7 |
* Author URI: https://vanokhin.com/
|
8 |
* Description: A comprehensive collection of visual components for WordPress
|
15 |
* Define plugin constants.
|
16 |
*/
|
17 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
18 |
+
define( 'SU_PLUGIN_VERSION', '5.0.5' );
|
|
|
19 |
|
20 |
/**
|
21 |
* Load dependencies.
|
22 |
*/
|
|
|
23 |
require_once 'inc/core/assets.php';
|
|
|
24 |
require_once 'inc/core/tools.php';
|
|
|
25 |
require_once 'inc/core/generator-views.php';
|
26 |
require_once 'inc/core/generator.php';
|
27 |
require_once 'inc/core/widget.php';
|
50 |
|
51 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-shortcodes-ultimate.php';
|
52 |
|
53 |
+
$plugin = new Shortcodes_Ultimate( __FILE__, SU_PLUGIN_VERSION );
|
54 |
|
55 |
do_action( 'su/ready' );
|
56 |
|