Version Description
- Made compatible with (with TinyMCE 3 & 4).
- Made translation-ready
- Added "centre" position for buttons.
Download this release
Release Info
Developer | MyThemeShop |
Plugin | WP Shortcode by MyThemeShop |
Version | 1.2 |
Comparing to | |
See all releases |
Version 1.2
- css/wp-shortcode.css +539 -0
- images/code.png +0 -0
- images/cross.png +0 -0
- images/speaker.png +0 -0
- images/thumb.png +0 -0
- images/tick.png +0 -0
- images/toggle-down.png +0 -0
- images/toggle-up.png +0 -0
- js/wp-shortcode.js +28 -0
- languages/default.mo +0 -0
- languages/default.po +351 -0
- readme.txt +61 -0
- tinymce/editor_plugin.css +26 -0
- tinymce/editor_plugin.js +80 -0
- tinymce/editor_plugin.php +77 -0
- tinymce/langs.php +6 -0
- tinymce/mnm_config.php +9 -0
- tinymce/shortcode.png +0 -0
- tinymce/shortcodes.php +351 -0
- tinymce/tinymce.js +93 -0
- tinymce/tinymce.php +85 -0
- wp-shortcode.php +396 -0
css/wp-shortcode.css
ADDED
@@ -0,0 +1,539 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*-----------------------------------------------
|
2 |
+
/* Plugin: WP Shortcode
|
3 |
+
/* Author: MyThemeShop
|
4 |
+
/* Version: 1.2
|
5 |
+
/*---------------------------------------------*/
|
6 |
+
|
7 |
+
/*-[ Notifications ]---------------------------*/
|
8 |
+
.message_box { margin: 15px 0 }
|
9 |
+
pre {
|
10 |
+
overflow: auto;
|
11 |
+
background: #F7F7F7 url('../images/code.png') 10px 2px no-repeat;
|
12 |
+
padding: 2em 1em 1em 1em;
|
13 |
+
border: 1px solid #DDD;
|
14 |
+
margin: 15px 0;
|
15 |
+
}
|
16 |
+
.note {
|
17 |
+
background: #FEF4C8;
|
18 |
+
color: #666;
|
19 |
+
border: 1px solid #FDEBA5;
|
20 |
+
}
|
21 |
+
.note p {
|
22 |
+
padding: 0.5em 1em 0.5em 2.5em;
|
23 |
+
background: url('../images/thumb.png') left no-repeat;
|
24 |
+
margin: 0.3em 0.8em;
|
25 |
+
}
|
26 |
+
.announce {
|
27 |
+
background: #D7EFFB;
|
28 |
+
color: #666;
|
29 |
+
border: 1px solid #BEE5F8;
|
30 |
+
}
|
31 |
+
.announce p {
|
32 |
+
padding: 0.5em 1em 0.5em 2.5em;
|
33 |
+
background: url('../images/speaker.png') left no-repeat;
|
34 |
+
margin: 0.3em 0.8em;
|
35 |
+
}
|
36 |
+
.success {
|
37 |
+
background: #E8F6D2;
|
38 |
+
color: #666;
|
39 |
+
border: 1px solid #DEF1BF;
|
40 |
+
}
|
41 |
+
.success p {
|
42 |
+
padding: 0.5em 1em 0.5em 2.5em;
|
43 |
+
background: url('../images/tick.png') left no-repeat;
|
44 |
+
margin: 0.3em 0.8em;
|
45 |
+
}
|
46 |
+
.warning {
|
47 |
+
background: #FFE7E7;
|
48 |
+
color: #666;
|
49 |
+
border: 1px solid #FFDBDB;
|
50 |
+
}
|
51 |
+
.warning p {
|
52 |
+
padding: 0.5em 1em 0.5em 2.5em;
|
53 |
+
background: url('../images/cross.png') left no-repeat;
|
54 |
+
margin: 0.3em 0.8em;
|
55 |
+
}
|
56 |
+
/*-[ Buttons ]---------------------------------*/
|
57 |
+
.article .buttons {
|
58 |
+
font-size: 12px;
|
59 |
+
text-decoration: none;
|
60 |
+
position: relative;
|
61 |
+
border-radius: 5px;
|
62 |
+
-webkit-border-radius: 5px;
|
63 |
+
-moz-border-radius: 5px;
|
64 |
+
margin: 15px 15px 15px 0;
|
65 |
+
padding: 12px 10px;
|
66 |
+
overflow: hidden;
|
67 |
+
display: inline-block;
|
68 |
+
width: auto;
|
69 |
+
}
|
70 |
+
.buttons span { float: none; overflow: hidden;}
|
71 |
+
a.buttons { color: #fff!important; text-decoration: none; }
|
72 |
+
a.buttons.left {
|
73 |
+
margin-right: 15px;
|
74 |
+
margin-bottom: 15px;
|
75 |
+
float: left;
|
76 |
+
|
77 |
+
}
|
78 |
+
a.buttons.right {
|
79 |
+
margin-left: 15px;
|
80 |
+
margin-bottom: 15px;
|
81 |
+
float: right;
|
82 |
+
}
|
83 |
+
div.button-center {
|
84 |
+
width: 100%;
|
85 |
+
text-align: center;
|
86 |
+
}
|
87 |
+
a.buttons.center {
|
88 |
+
clear: both;
|
89 |
+
display: inline-block;
|
90 |
+
float: none;
|
91 |
+
width: auto;
|
92 |
+
}
|
93 |
+
a.btn_white { color: #4F4F4F!important }
|
94 |
+
.btn_brown {
|
95 |
+
background-color: #D9C2A5;
|
96 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #D9C2A5), color-stop(100%, #C3A178));
|
97 |
+
background-image: -webkit-linear-gradient(top, #D9C2A5, #C3A178);
|
98 |
+
background-image: -moz-linear-gradient(top, #D9C2A5, #C3A178);
|
99 |
+
background-image: -ms-linear-gradient(top, #D9C2A5, #C3A178);
|
100 |
+
background-image: -o-linear-gradient(top, #D9C2A5, #C3A178);
|
101 |
+
background-image: linear-gradient(top, #D9C2A5, #C3A178);
|
102 |
+
border-top: 1px solid #BD986A;
|
103 |
+
border-right: 1px solid #BD986A;
|
104 |
+
border-bottom: 1px solid #9A7445;
|
105 |
+
border-left: 1px solid #BD986A;
|
106 |
+
-webkit-border-radius: 4px;
|
107 |
+
-moz-border-radius: 4px;
|
108 |
+
border-radius: 4px;
|
109 |
+
-webkit-box-shadow: inset 0 1px 0 0 #DFCC9F;
|
110 |
+
-moz-box-shadow: inset 0 1px 0 0 #DFCC9F;
|
111 |
+
box-shadow: inset 0 1px 0 0 #DFCC9F;
|
112 |
+
color: white;
|
113 |
+
font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
114 |
+
line-height: 1;
|
115 |
+
padding: 8px 25px;
|
116 |
+
text-shadow: 0 -1px 1px #BA905E;
|
117 |
+
text-transform: uppercase;
|
118 |
+
padding: 12px 10px;
|
119 |
+
}
|
120 |
+
.btn_brown:hover {
|
121 |
+
background-color: #D1B593;
|
122 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #D1B593), color-stop(100%, #BC966B));
|
123 |
+
background-image: -webkit-linear-gradient(top, #D1B593, #BC966B);
|
124 |
+
background-image: -moz-linear-gradient(top, #D1B593, #BC966B);
|
125 |
+
background-image: -ms-linear-gradient(top, #D1B593, #BC966B);
|
126 |
+
background-image: -o-linear-gradient(top, #D1B593, #BC966B);
|
127 |
+
background-image: linear-gradient(top, #D1B593, #BC966B);
|
128 |
+
border-top: 1px solid #BD986A;
|
129 |
+
border-right: 1px solid #BD986A;
|
130 |
+
border-bottom: 1px solid #9A7445;
|
131 |
+
border-left: 1px solid #BD986A;
|
132 |
+
-webkit-box-shadow: inset 0 1px 0 0 #DFCC9F;
|
133 |
+
-moz-box-shadow: inset 0 1px 0 0 #DFCC9F;
|
134 |
+
box-shadow: inset 0 1px 0 0 #DFCC9F;
|
135 |
+
cursor: pointer;
|
136 |
+
color: white!important;
|
137 |
+
}
|
138 |
+
.btn_brown:active {
|
139 |
+
border: 1px solid #B2824C;
|
140 |
+
-webkit-box-shadow: inset 0 0 8px 2px #C19B70;
|
141 |
+
-moz-box-shadow: inset 0 0 8px 2px #C19B70;
|
142 |
+
box-shadow: inset 0 0 8px 2px #C19B70;
|
143 |
+
}
|
144 |
+
.btn_blue {
|
145 |
+
background-color: #A5B8DA;
|
146 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #A5B8DA), color-stop(100%, #7089B3));
|
147 |
+
background-image: -webkit-linear-gradient(top, #A5B8DA, #7089B3);
|
148 |
+
background-image: -moz-linear-gradient(top, #A5B8DA, #7089B3);
|
149 |
+
background-image: -ms-linear-gradient(top, #A5B8DA, #7089B3);
|
150 |
+
background-image: -o-linear-gradient(top, #A5B8DA, #7089B3);
|
151 |
+
background-image: linear-gradient(top, #A5B8DA, #7089B3);
|
152 |
+
border-top: 1px solid #758FBA;
|
153 |
+
border-right: 1px solid #6C84AB;
|
154 |
+
border-bottom: 1px solid #5C6F91;
|
155 |
+
border-left: 1px solid #6C84AB;
|
156 |
+
-webkit-border-radius: 4px;
|
157 |
+
-moz-border-radius: 4px;
|
158 |
+
border-radius: 4px;
|
159 |
+
-webkit-box-shadow: inset 0 1px 0 0 #aec3e5;
|
160 |
+
-moz-box-shadow: inset 0 1px 0 0 #aec3e5;
|
161 |
+
box-shadow: inset 0 1px 0 0 #aec3e5;
|
162 |
+
color: white;
|
163 |
+
font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
164 |
+
line-height: 1;
|
165 |
+
padding: 8px 25px;
|
166 |
+
text-shadow: 0 -1px 1px #64799E;
|
167 |
+
text-transform: uppercase;
|
168 |
+
padding: 12px 10px;
|
169 |
+
}
|
170 |
+
.btn_blue:hover {
|
171 |
+
background-color: #9badcc;
|
172 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #9badcc), color-stop(100%, #687fa6));
|
173 |
+
background-image: -webkit-linear-gradient(top, #9badcc, #687fa6);
|
174 |
+
background-image: -moz-linear-gradient(top, #9badcc, #687fa6);
|
175 |
+
background-image: -ms-linear-gradient(top, #9badcc, #687fa6);
|
176 |
+
background-image: -o-linear-gradient(top, #9badcc, #687fa6);
|
177 |
+
background-image: linear-gradient(top, #9badcc, #687fa6);
|
178 |
+
border-top: 1px solid #6d86ad;
|
179 |
+
border-right: 1px solid #647a9e;
|
180 |
+
border-bottom: 1px solid #546685;
|
181 |
+
border-left: 1px solid #647a9e;
|
182 |
+
-webkit-box-shadow: inset 0 1px 0 0 #a5b9d9;
|
183 |
+
-moz-box-shadow: inset 0 1px 0 0 #a5b9d9;
|
184 |
+
box-shadow: inset 0 1px 0 0 #a5b9d9;
|
185 |
+
cursor: pointer;
|
186 |
+
color: white!important;
|
187 |
+
}
|
188 |
+
.btn_blue:active {
|
189 |
+
border: 1px solid #546685;
|
190 |
+
-webkit-box-shadow: inset 0 0 8px 2px #7e8da6;
|
191 |
+
-moz-box-shadow: inset 0 0 8px 2px #7e8da6;
|
192 |
+
box-shadow: inset 0 0 8px 2px #7e8da6;
|
193 |
+
}
|
194 |
+
.btn_green {
|
195 |
+
background-color: #6CB24C;
|
196 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6CB24C), color-stop(100%, #52873A));
|
197 |
+
background-image: -webkit-linear-gradient(top, #6CB24C, #52873A);
|
198 |
+
background-image: -moz-linear-gradient(top, #6CB24C, #52873A);
|
199 |
+
background-image: -ms-linear-gradient(top, #6CB24C, #52873A);
|
200 |
+
background-image: -o-linear-gradient(top, #6CB24C, #52873A);
|
201 |
+
background-image: linear-gradient(top, #6CB24C, #52873A);
|
202 |
+
border-top: 1px solid #477532;
|
203 |
+
border-right: 1px solid #477532;
|
204 |
+
border-bottom: 1px solid #3A6029;
|
205 |
+
border-left: 1px solid #477532;
|
206 |
+
-webkit-border-radius: 4px;
|
207 |
+
-moz-border-radius: 4px;
|
208 |
+
border-radius: 4px;
|
209 |
+
-webkit-box-shadow: inset 0 1px 0 0 #8FC477;
|
210 |
+
-moz-box-shadow: inset 0 1px 0 0 #8FC477;
|
211 |
+
box-shadow: inset 0 1px 0 0 #8FC477;
|
212 |
+
color: white;
|
213 |
+
font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
214 |
+
line-height: 1;
|
215 |
+
padding: 12px 10px;
|
216 |
+
text-shadow: 0 -1px 1px #416B2D;
|
217 |
+
text-transform: uppercase;
|
218 |
+
}
|
219 |
+
.btn_green:hover {
|
220 |
+
background-color: #5F9D43;
|
221 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #68AB49), color-stop(100%, #4A7834));
|
222 |
+
background-image: -webkit-linear-gradient(top, #68AB49, #4A7834);
|
223 |
+
background-image: -moz-linear-gradient(top, #68AB49, #4A7834);
|
224 |
+
background-image: -ms-linear-gradient(top, #68AB49, #4A7834);
|
225 |
+
background-image: -o-linear-gradient(top, #68AB49, #4A7834);
|
226 |
+
background-image: linear-gradient(top, #68AB49, #4A7834);
|
227 |
+
border-top: 1px solid #4E8037;
|
228 |
+
border-right: 1px solid #4E8037;
|
229 |
+
border-bottom: 1px solid #3A6029;
|
230 |
+
border-left: 1px solid #4E8037;
|
231 |
+
-webkit-box-shadow: inset 0 1px 0 0 #8FC477;
|
232 |
+
-moz-box-shadow: inset 0 1px 0 0 #8FC477;
|
233 |
+
box-shadow: inset 0 1px 0 0 #8FC477;
|
234 |
+
cursor: pointer;
|
235 |
+
color: white!important;
|
236 |
+
}
|
237 |
+
.btn_green:active {
|
238 |
+
border: 1px solid #436D30;
|
239 |
+
-webkit-box-shadow: inset 0 0 8px 2px #467131;
|
240 |
+
-moz-box-shadow: inset 0 0 8px 2px #467131;
|
241 |
+
box-shadow: inset 0 0 8px 2px #467131;
|
242 |
+
}
|
243 |
+
.btn_yellow {
|
244 |
+
background-color: #FFDA6B;
|
245 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFDA6B), color-stop(100%, #FEAE2D));
|
246 |
+
background-image: -webkit-linear-gradient(top, #FFDA6B, #FEAE2D);
|
247 |
+
background-image: -moz-linear-gradient(top, #FFDA6B, #FEAE2D);
|
248 |
+
background-image: -ms-linear-gradient(top, #FFDA6B, #FEAE2D);
|
249 |
+
background-image: -o-linear-gradient(top, #FFDA6B, #FEAE2D);
|
250 |
+
background-image: linear-gradient(top, #FFDA6B, #FEAE2D);
|
251 |
+
border-top: 1px solid #D6AB00;
|
252 |
+
border-right: 1px solid #D6AB00;
|
253 |
+
border-bottom: 1px solid #BC9600;
|
254 |
+
border-left: 1px solid #D6AB00;
|
255 |
+
-webkit-border-radius: 4px;
|
256 |
+
-moz-border-radius: 4px;
|
257 |
+
border-radius: 4px;
|
258 |
+
-webkit-box-shadow: inset 0 1px 0 0 #FFE599;
|
259 |
+
-moz-box-shadow: inset 0 1px 0 0 #FFE599;
|
260 |
+
box-shadow: inset 0 1px 0 0 #FFE599;
|
261 |
+
color: #fff;
|
262 |
+
line-height: 1;
|
263 |
+
padding: 8px 25px;
|
264 |
+
text-shadow: 0 1px 1px #BC9600;
|
265 |
+
text-transform: uppercase;
|
266 |
+
font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
267 |
+
line-height: 1;
|
268 |
+
padding: 12px 10px;
|
269 |
+
}
|
270 |
+
.btn_yellow:hover {
|
271 |
+
background-color: #FFD351;
|
272 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFD351), color-stop(100%, #FDA00B));
|
273 |
+
background-image: -webkit-linear-gradient(top, #FFD351, #FDA00B);
|
274 |
+
background-image: -moz-linear-gradient(top, #FFD351, #FDA00B);
|
275 |
+
background-image: -ms-linear-gradient(top, #FFD351, #FDA00B);
|
276 |
+
background-image: -o-linear-gradient(top, #FFD351, #FDA00B);
|
277 |
+
background-image: linear-gradient(top, #FFD351, #FDA00B);
|
278 |
+
border-top: 1px solid #D6AB00;
|
279 |
+
border-right: 1px solid #D6AB00;
|
280 |
+
border-bottom: 1px solid #BC9600;
|
281 |
+
border-left: 1px solid #D6AB00;
|
282 |
+
-webkit-box-shadow: inset 0 1px 0 0 #FFE599;
|
283 |
+
-moz-box-shadow: inset 0 1px 0 0 #FFE599;
|
284 |
+
box-shadow: inset 0 1px 0 0 #FFE599;
|
285 |
+
cursor: pointer;
|
286 |
+
color: #fff!important;
|
287 |
+
}
|
288 |
+
.btn_yellow:active {
|
289 |
+
border: 1px solid #F29202;
|
290 |
+
-webkit-box-shadow: inset 0 0 8px 2px #F29202;
|
291 |
+
-moz-box-shadow: inset 0 0 8px 2px #F29202;
|
292 |
+
box-shadow: inset 0 0 8px 2px #F29202;
|
293 |
+
}
|
294 |
+
.btn_red {
|
295 |
+
background-color: #E83030;
|
296 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #E83030), color-stop(100%, #B71414));
|
297 |
+
background-image: -webkit-linear-gradient(top, #E83030, #B71414);
|
298 |
+
background-image: -moz-linear-gradient(top, #E83030, #B71414);
|
299 |
+
background-image: -ms-linear-gradient(top, #E83030, #B71414);
|
300 |
+
background-image: -o-linear-gradient(top, #E83030, #B71414);
|
301 |
+
background-image: linear-gradient(top, #E83030, #B71414);
|
302 |
+
border-top: 1px solid #9C1111;
|
303 |
+
border-right: 1px solid #9C1111;
|
304 |
+
border-bottom: 1px solid #890F0F;
|
305 |
+
border-left: 1px solid #9C1111;
|
306 |
+
-webkit-border-radius: 4px;
|
307 |
+
-moz-border-radius: 4px;
|
308 |
+
border-radius: 4px;
|
309 |
+
-webkit-box-shadow: inset 0 1px 0 0 #FF6B6B;
|
310 |
+
-moz-box-shadow: inset 0 1px 0 0 #FF6B6B;
|
311 |
+
box-shadow: inset 0 1px 0 0 #FF6B6B;
|
312 |
+
color: white;
|
313 |
+
font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
314 |
+
line-height: 1;
|
315 |
+
padding: 8px 25px;
|
316 |
+
text-shadow: 0 -1px 1px #A01111;
|
317 |
+
text-transform: uppercase;
|
318 |
+
padding: 12px 10px;
|
319 |
+
}
|
320 |
+
.btn_red:hover {
|
321 |
+
background-color: #E63131;
|
322 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #E63131), color-stop(100%, #9C1111));
|
323 |
+
background-image: -webkit-linear-gradient(top, #E63131, #9C1111);
|
324 |
+
background-image: -moz-linear-gradient(top, #E63131, #9C1111);
|
325 |
+
background-image: -ms-linear-gradient(top, #E63131, #9C1111);
|
326 |
+
background-image: -o-linear-gradient(top, #E63131, #9C1111);
|
327 |
+
background-image: linear-gradient(top, #E63131, #9C1111);
|
328 |
+
border-top: 1px solid #9C1111;
|
329 |
+
border-right: 1px solid #9C1111;
|
330 |
+
border-bottom: 1px solid #890F0F;
|
331 |
+
border-left: 1px solid #9C1111;
|
332 |
+
-webkit-box-shadow: inset 0 1px 0 0 #FE4C4C;
|
333 |
+
-moz-box-shadow: inset 0 1px 0 0 #FE4C4C;
|
334 |
+
box-shadow: inset 0 1px 0 0 #FE4C4C;
|
335 |
+
cursor: pointer;
|
336 |
+
color: white!important;
|
337 |
+
}
|
338 |
+
.btn_red:active {
|
339 |
+
border: 1px solid #890F0F;
|
340 |
+
-webkit-box-shadow: inset 0 0 8px 2px #890F0F;
|
341 |
+
-moz-box-shadow: inset 0 0 8px 2px #890F0F;
|
342 |
+
box-shadow: inset 0 0 8px 2px #890F0F;
|
343 |
+
}
|
344 |
+
.btn_white {
|
345 |
+
background-color: #F7F7F7;
|
346 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #F7F7F7), color-stop(100%, #E0E0E0));
|
347 |
+
background-image: -webkit-linear-gradient(top, #F7F7F7, #E0E0E0);
|
348 |
+
background-image: -moz-linear-gradient(top, #F7F7F7, #E0E0E0);
|
349 |
+
background-image: -ms-linear-gradient(top, #F7F7F7, #E0E0E0);
|
350 |
+
background-image: -o-linear-gradient(top, #F7F7F7, #E0E0E0);
|
351 |
+
background-image: linear-gradient(top, #F7F7F7, #E0E0E0);
|
352 |
+
border-top: 1px solid #CECECE;
|
353 |
+
border-right: 1px solid #CECECE;
|
354 |
+
border-bottom: 1px solid #C4C4C4;
|
355 |
+
border-left: 1px solid #CECECE;
|
356 |
+
-webkit-border-radius: 4px;
|
357 |
+
-moz-border-radius: 4px;
|
358 |
+
border-radius: 4px;
|
359 |
+
-webkit-box-shadow: inset 0 1px 0 0 #FFFFFF;
|
360 |
+
-moz-box-shadow: inset 0 1px 0 0 #FFFFFF;
|
361 |
+
box-shadow: inset 0 1px 0 0 #FFFFFF;
|
362 |
+
color: #4F4F4F;
|
363 |
+
font: bold 11px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
364 |
+
line-height: 1;
|
365 |
+
padding: 8px 25px;
|
366 |
+
text-shadow: 0 -1px 1px #fff;
|
367 |
+
text-transform: uppercase;
|
368 |
+
padding: 12px 10px;
|
369 |
+
}
|
370 |
+
.btn_white:hover {
|
371 |
+
background-color: #F4F4F4;
|
372 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #F4F4F4), color-stop(100%, #D3D3D3));
|
373 |
+
background-image: -webkit-linear-gradient(top, #F4F4F4, #D3D3D3);
|
374 |
+
background-image: -moz-linear-gradient(top, #F4F4F4, #D3D3D3);
|
375 |
+
background-image: -ms-linear-gradient(top, #F4F4F4, #D3D3D3);
|
376 |
+
background-image: -o-linear-gradient(top, #F4F4F4, #D3D3D3);
|
377 |
+
background-image: linear-gradient(top, #F4F4F4, #D3D3D3);
|
378 |
+
border-top: 1px solid #CECECE;
|
379 |
+
border-right: 1px solid #CECECE;
|
380 |
+
border-bottom: 1px solid #C4C4C4;
|
381 |
+
border-left: 1px solid #CECECE;
|
382 |
+
-webkit-box-shadow: inset 0 1px 0 0 #fff;
|
383 |
+
-moz-box-shadow: inset 0 1px 0 0 #fff;
|
384 |
+
box-shadow: inset 0 1px 0 0 #fff;
|
385 |
+
cursor: pointer;
|
386 |
+
color: #4F4F4F!important;
|
387 |
+
}
|
388 |
+
.btn_white:active {
|
389 |
+
border: 1px solid #C1C1C1;
|
390 |
+
-webkit-box-shadow: inset 0 0 8px 2px #C1C1C1;
|
391 |
+
-moz-box-shadow: inset 0 0 8px 2px #C1C1C1;
|
392 |
+
box-shadow: inset 0 0 8px 2px #C1C1C1;
|
393 |
+
}
|
394 |
+
/*-[ Video Shortcode ]-------------------------*/
|
395 |
+
.textwidget .youtube-video, .textwidget .vimeo-video, .textwidget .googlemaps { margin: 0 }
|
396 |
+
.youtube-video, .vimeo-video { margin: 10px 0 10px 0 }
|
397 |
+
/*-[ Google Maps ]-----------------------------*/
|
398 |
+
.googlemaps { margin: 5px 15px 10px 0 }
|
399 |
+
/*-[ Columns ]---------------------------------*/
|
400 |
+
.one_half { width: 48% }
|
401 |
+
.one_third { width: 30.66% }
|
402 |
+
.two_third { width: 65.33% }
|
403 |
+
.one_fourth { width: 22% }
|
404 |
+
.three_fourth { width: 74% }
|
405 |
+
.one_fifth { width: 16.8% }
|
406 |
+
.two_fifth { width: 37.6% }
|
407 |
+
.three_fifth { width: 58.4% }
|
408 |
+
.four_fifth { width: 67.2% }
|
409 |
+
.one_sixth { width: 13.33% }
|
410 |
+
.five_sixth { width: 82.67% }
|
411 |
+
.one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth, .three_fifth, .four_fifth, .one_sixth, .five_sixth {
|
412 |
+
position: relative;
|
413 |
+
margin-right: 4%;
|
414 |
+
margin-bottom: 15px;
|
415 |
+
float: left;
|
416 |
+
}
|
417 |
+
.column-last {
|
418 |
+
margin-right: 0!important;
|
419 |
+
clear: right;
|
420 |
+
}
|
421 |
+
/*-[ Tabs ]------------------------------------*/
|
422 |
+
.tab_widget {
|
423 |
+
display: block;
|
424 |
+
position: relative;
|
425 |
+
margin: 0 0 20px 0;
|
426 |
+
}
|
427 |
+
.tab_widget ul.wps_tabs {
|
428 |
+
display: block;
|
429 |
+
position: relative;
|
430 |
+
list-style: none;
|
431 |
+
height: 40px;
|
432 |
+
border-bottom: 1px solid #DDD;
|
433 |
+
margin: 0;
|
434 |
+
}
|
435 |
+
.tab_widget ul.wps_tabs li {
|
436 |
+
float: left;
|
437 |
+
margin: 0;
|
438 |
+
padding: 0;
|
439 |
+
height: 39px;
|
440 |
+
line-height: 39px;
|
441 |
+
border: 1px solid #DDD;
|
442 |
+
border-left: none;
|
443 |
+
margin-bottom: -1px;
|
444 |
+
overflow: hidden;
|
445 |
+
position: relative;
|
446 |
+
background-image: linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
|
447 |
+
background-image: -o-linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
|
448 |
+
background-image: -moz-linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
|
449 |
+
background-image: -webkit-linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
|
450 |
+
background-image: -ms-linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
|
451 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.09, rgb(230,230,230)), color-stop(0.55, rgb(238,238,238)) );
|
452 |
+
}
|
453 |
+
.tab_widget ul.wps_tabs li:first-child { border-left: 1px solid #DDD }
|
454 |
+
.tab_widget ul.wps_tabs li a {
|
455 |
+
text-decoration: none;
|
456 |
+
color: #888!important;
|
457 |
+
font-size: 12px;
|
458 |
+
display: block;
|
459 |
+
padding: 0 10px;
|
460 |
+
outline: none;
|
461 |
+
font-weight: bold;
|
462 |
+
text-shadow: 1px 1px 1px #FFF;
|
463 |
+
border: none;
|
464 |
+
border-left: 1px solid #F9F9F9;
|
465 |
+
}
|
466 |
+
.tab_widget ul.wps_tabs li:first-child a { border-left: none }
|
467 |
+
.tab_widget ul.wps_tabs li a:hover { background: none }
|
468 |
+
.tab_widget ul.wps_tabs li.active, .tab_widget ul.wps_tabs li.active a:hover {
|
469 |
+
background: #FFF;
|
470 |
+
border-bottom: 1px solid #FFF;
|
471 |
+
}
|
472 |
+
.tab_widget ul.wps_tabs li.active { border-top: 1px solid #DDD }
|
473 |
+
.tab_widget ul.wps_tabs li.active a { color: #777 }
|
474 |
+
.tab_widget .tab_container {
|
475 |
+
display: block;
|
476 |
+
border-top: none;
|
477 |
+
overflow: hidden;
|
478 |
+
position: relative;
|
479 |
+
clear: both;
|
480 |
+
background: #FFF;
|
481 |
+
border: 1px solid #DDD;
|
482 |
+
border-top: none;
|
483 |
+
}
|
484 |
+
.tab_widget .tab_content {
|
485 |
+
display: block;
|
486 |
+
position: relative;
|
487 |
+
padding: 15px;
|
488 |
+
}
|
489 |
+
/*-[ Toggle ]-----------------------*/
|
490 |
+
.toggle {
|
491 |
+
display: block;
|
492 |
+
position: relative;
|
493 |
+
margin: 0 0 20px 0;
|
494 |
+
}
|
495 |
+
.toggle .wps_togglet, .toggle .toggleta {
|
496 |
+
display: block;
|
497 |
+
position: relative;
|
498 |
+
height: 36px;
|
499 |
+
padding: 0 12px;
|
500 |
+
background: #EEE;
|
501 |
+
border: 1px solid #DDD;
|
502 |
+
cursor: pointer;
|
503 |
+
margin: 0;
|
504 |
+
}
|
505 |
+
.toggle .wps_togglet span, .toggle .toggleta span {
|
506 |
+
display: block;
|
507 |
+
height: 36px;
|
508 |
+
line-height: 36px;
|
509 |
+
color: #888;
|
510 |
+
text-shadow: 1px 1px 1px #FFF;
|
511 |
+
padding-left: 20px;
|
512 |
+
background: url("../images/toggle-down.png") no-repeat left;
|
513 |
+
}
|
514 |
+
.toggle .toggleta span { background: url("../images/toggle-up.png") no-repeat left }
|
515 |
+
.toggle .togglec {
|
516 |
+
display: block;
|
517 |
+
position: relative;
|
518 |
+
padding: 15px;
|
519 |
+
background: #FFF;
|
520 |
+
border: 1px solid #DDD;
|
521 |
+
border-top: none;
|
522 |
+
}
|
523 |
+
/*-[ Dividers ]--------------------------------*/
|
524 |
+
.divider {
|
525 |
+
clear: both;
|
526 |
+
display: block;
|
527 |
+
padding-top: 20px;
|
528 |
+
width: 100%;
|
529 |
+
margin-bottom: 10px;
|
530 |
+
text-align: right;
|
531 |
+
padding-bottom: 5px;
|
532 |
+
border-bottom: 5px solid #EEE;
|
533 |
+
}
|
534 |
+
.top-of-page {
|
535 |
+
margin-bottom: 10px;
|
536 |
+
text-align: right;
|
537 |
+
padding-bottom: 5px;
|
538 |
+
border-bottom: 5px solid #EEE;
|
539 |
+
}
|
images/code.png
ADDED
Binary file
|
images/cross.png
ADDED
Binary file
|
images/speaker.png
ADDED
Binary file
|
images/thumb.png
ADDED
Binary file
|
images/tick.png
ADDED
Binary file
|
images/toggle-down.png
ADDED
Binary file
|
images/toggle-up.png
ADDED
Binary file
|
js/wp-shortcode.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){
|
2 |
+
// Toggles
|
3 |
+
if ($('.wp_shortcodes_toggle').length) {
|
4 |
+
$(".togglec").hide();
|
5 |
+
$(".wps_togglet").click(function(){
|
6 |
+
$(this).toggleClass("toggleta").next(".togglec").slideToggle("normal");
|
7 |
+
});
|
8 |
+
}
|
9 |
+
|
10 |
+
// Tabs
|
11 |
+
if ($('.wp_shortcodes_tabs').length) {
|
12 |
+
$('.wp_shortcodes_tabs').each(function() {
|
13 |
+
var $this = $(this);
|
14 |
+
$this.find('.tab_content').slice(1).hide();
|
15 |
+
$this.find('ul.wps_tabs li:first').addClass('active');
|
16 |
+
$this.find('ul.wps_tabs li a').click(function(e) {
|
17 |
+
e.preventDefault();
|
18 |
+
var $this_a = $(this);
|
19 |
+
var $tab = $this.find('#'+$this_a.data('tab'));
|
20 |
+
if (! $tab.is(':visible')) {
|
21 |
+
$this.find('.tab_content').hide();
|
22 |
+
$this_a.parent().addClass('active').siblings().removeClass('active');
|
23 |
+
$tab.fadeIn(600);
|
24 |
+
}
|
25 |
+
});
|
26 |
+
});
|
27 |
+
}
|
28 |
+
});
|
languages/default.mo
ADDED
Binary file
|
languages/default.po
ADDED
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP Shortcode\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2014-04-17 10:16+0100\n"
|
6 |
+
"PO-Revision-Date: 2014-04-17 10:16+0100\n"
|
7 |
+
"Last-Translator: BalazsP <ppbb@freemail.hu>\n"
|
8 |
+
"Language-Team: MyThemeShop\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
13 |
+
"X-Poedit-Basepath: C:\\wamp\\www\\wpbeta\\wp-content\\plugins\\wp-shortcode\\languages\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-Country: UNITED STATES\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../wp-shortcode.php:367
|
19 |
+
msgid "Toggle Title"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: ../wp-shortcode.php:383
|
23 |
+
msgid "Back to Top"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: ../tinymce/editor_plugin.php:6
|
27 |
+
msgid "You are not allowed to be here"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: ../tinymce/editor_plugin.php:31
|
31 |
+
msgid "Select Shortcode"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: ../tinymce/editor_plugin.php:68
|
35 |
+
msgid "Cancel"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: ../tinymce/editor_plugin.php:72
|
39 |
+
msgid "Insert"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../tinymce/shortcodes.php:10
|
43 |
+
msgid "Brown Button"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: ../tinymce/shortcodes.php:11
|
47 |
+
#: ../tinymce/shortcodes.php:22
|
48 |
+
#: ../tinymce/shortcodes.php:33
|
49 |
+
#: ../tinymce/shortcodes.php:44
|
50 |
+
#: ../tinymce/shortcodes.php:55
|
51 |
+
#: ../tinymce/shortcodes.php:66
|
52 |
+
msgid "Button text"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../tinymce/shortcodes.php:12
|
56 |
+
msgid "Inserts a brown button. Set target to <strong>_blank</strong> to open link in a new window."
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: ../tinymce/shortcodes.php:21
|
60 |
+
msgid "Blue Button"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: ../tinymce/shortcodes.php:23
|
64 |
+
msgid "Inserts a blue button. Set target to <strong>_blank</strong> to open link in a new window."
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../tinymce/shortcodes.php:32
|
68 |
+
msgid "Green Button"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../tinymce/shortcodes.php:34
|
72 |
+
msgid "Inserts a green button. Set target to <strong>_blank</strong> to open link in a new window."
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../tinymce/shortcodes.php:43
|
76 |
+
msgid "Yellow Button"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: ../tinymce/shortcodes.php:45
|
80 |
+
msgid "Inserts a yellow button. Set target to <strong>_blank</strong> to open link in a new window."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: ../tinymce/shortcodes.php:54
|
84 |
+
msgid "Red Button"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: ../tinymce/shortcodes.php:56
|
88 |
+
msgid "Inserts a red button. Set target to <strong>_blank</strong> to open link in a new window."
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: ../tinymce/shortcodes.php:65
|
92 |
+
msgid "White Button"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: ../tinymce/shortcodes.php:67
|
96 |
+
msgid "Inserts a white button. Set target to <strong>_blank</strong> to open link in a new window."
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: ../tinymce/shortcodes.php:72
|
100 |
+
msgid "Alert Note"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: ../tinymce/shortcodes.php:73
|
104 |
+
msgid "Note text"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: ../tinymce/shortcodes.php:74
|
108 |
+
msgid "Display a note."
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../tinymce/shortcodes.php:79
|
112 |
+
msgid "Alert Announce"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: ../tinymce/shortcodes.php:80
|
116 |
+
msgid "Announce text"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: ../tinymce/shortcodes.php:81
|
120 |
+
msgid "Display an announcement."
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: ../tinymce/shortcodes.php:86
|
124 |
+
msgid "Alert Success"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: ../tinymce/shortcodes.php:87
|
128 |
+
msgid "Success text"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: ../tinymce/shortcodes.php:88
|
132 |
+
msgid "Display a success message."
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: ../tinymce/shortcodes.php:93
|
136 |
+
msgid "Alert Warning"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: ../tinymce/shortcodes.php:94
|
140 |
+
msgid "Warning text"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: ../tinymce/shortcodes.php:95
|
144 |
+
msgid "Display warning or error message."
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: ../tinymce/shortcodes.php:105
|
148 |
+
msgid "YouTube Video"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: ../tinymce/shortcodes.php:107
|
152 |
+
msgid "Embed a Youtube Video"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: ../tinymce/shortcodes.php:117
|
156 |
+
msgid "Vimeo Video"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: ../tinymce/shortcodes.php:119
|
160 |
+
msgid "Embed a Vimeo Video."
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: ../tinymce/shortcodes.php:129
|
164 |
+
msgid "Google Map"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: ../tinymce/shortcodes.php:131
|
168 |
+
msgid "Embed a Google Map. Insert address or GPS location."
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: ../tinymce/shortcodes.php:138
|
172 |
+
msgid "Toggle"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: ../tinymce/shortcodes.php:139
|
176 |
+
msgid "Insert Content Here"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: ../tinymce/shortcodes.php:141
|
180 |
+
msgid "Content will be shown after clicking on the toggle title."
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: ../tinymce/shortcodes.php:146
|
184 |
+
msgid "Tabs"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: ../tinymce/shortcodes.php:147
|
188 |
+
msgid ""
|
189 |
+
"[tab title="Tab 1 Title"]Insert tab 1 content here[/tab]\n"
|
190 |
+
"[tab title="Tab 2 Title"]Insert tab 2 content here[/tab]\n"
|
191 |
+
"[tab title="Tab 3 Title"]Insert tab 3 content here[/tab]"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: ../tinymce/shortcodes.php:149
|
195 |
+
msgid "Display content in tabbed form."
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: ../tinymce/shortcodes.php:155
|
199 |
+
msgid "Simple horizontal divider."
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: ../tinymce/shortcodes.php:161
|
203 |
+
msgid "Divider with an anchor link to top of page."
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: ../tinymce/shortcodes.php:166
|
207 |
+
msgid "Clear"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: ../tinymce/shortcodes.php:168
|
211 |
+
msgid "Clear shortcode can be used to clear an element of its neighbors, no floating elements are allowed on the left or the right side."
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: ../tinymce/shortcodes.php:176
|
215 |
+
msgid "One Third"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: ../tinymce/shortcodes.php:177
|
219 |
+
#: ../tinymce/shortcodes.php:185
|
220 |
+
#: ../tinymce/shortcodes.php:193
|
221 |
+
#: ../tinymce/shortcodes.php:201
|
222 |
+
#: ../tinymce/shortcodes.php:209
|
223 |
+
#: ../tinymce/shortcodes.php:217
|
224 |
+
#: ../tinymce/shortcodes.php:225
|
225 |
+
#: ../tinymce/shortcodes.php:233
|
226 |
+
#: ../tinymce/shortcodes.php:241
|
227 |
+
#: ../tinymce/shortcodes.php:249
|
228 |
+
#: ../tinymce/shortcodes.php:257
|
229 |
+
#: ../tinymce/shortcodes.php:265
|
230 |
+
#: ../tinymce/shortcodes.php:273
|
231 |
+
#: ../tinymce/shortcodes.php:281
|
232 |
+
#: ../tinymce/shortcodes.php:289
|
233 |
+
#: ../tinymce/shortcodes.php:297
|
234 |
+
#: ../tinymce/shortcodes.php:305
|
235 |
+
#: ../tinymce/shortcodes.php:313
|
236 |
+
#: ../tinymce/shortcodes.php:321
|
237 |
+
#: ../tinymce/shortcodes.php:329
|
238 |
+
#: ../tinymce/shortcodes.php:337
|
239 |
+
#: ../tinymce/shortcodes.php:345
|
240 |
+
msgid "Column content"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: ../tinymce/shortcodes.php:179
|
244 |
+
#: ../tinymce/shortcodes.php:187
|
245 |
+
#: ../tinymce/shortcodes.php:195
|
246 |
+
#: ../tinymce/shortcodes.php:203
|
247 |
+
#: ../tinymce/shortcodes.php:211
|
248 |
+
#: ../tinymce/shortcodes.php:219
|
249 |
+
#: ../tinymce/shortcodes.php:227
|
250 |
+
#: ../tinymce/shortcodes.php:235
|
251 |
+
#: ../tinymce/shortcodes.php:243
|
252 |
+
#: ../tinymce/shortcodes.php:251
|
253 |
+
#: ../tinymce/shortcodes.php:259
|
254 |
+
#: ../tinymce/shortcodes.php:267
|
255 |
+
#: ../tinymce/shortcodes.php:275
|
256 |
+
#: ../tinymce/shortcodes.php:283
|
257 |
+
#: ../tinymce/shortcodes.php:291
|
258 |
+
#: ../tinymce/shortcodes.php:299
|
259 |
+
#: ../tinymce/shortcodes.php:307
|
260 |
+
#: ../tinymce/shortcodes.php:315
|
261 |
+
#: ../tinymce/shortcodes.php:323
|
262 |
+
#: ../tinymce/shortcodes.php:331
|
263 |
+
#: ../tinymce/shortcodes.php:339
|
264 |
+
#: ../tinymce/shortcodes.php:347
|
265 |
+
msgid "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: ../tinymce/shortcodes.php:184
|
269 |
+
msgid "One Third (Last)"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: ../tinymce/shortcodes.php:192
|
273 |
+
msgid "Two Third"
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: ../tinymce/shortcodes.php:200
|
277 |
+
msgid "Two Third (Last)"
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: ../tinymce/shortcodes.php:208
|
281 |
+
msgid "One Half"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: ../tinymce/shortcodes.php:216
|
285 |
+
msgid "One Half (Last)"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: ../tinymce/shortcodes.php:224
|
289 |
+
msgid "One Fourth"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: ../tinymce/shortcodes.php:232
|
293 |
+
msgid "One Fourth (Last)"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: ../tinymce/shortcodes.php:240
|
297 |
+
msgid "Three Fourth"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: ../tinymce/shortcodes.php:248
|
301 |
+
msgid "Three Fourth (Last)"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
+
#: ../tinymce/shortcodes.php:256
|
305 |
+
msgid "One Fifth"
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: ../tinymce/shortcodes.php:264
|
309 |
+
msgid "One Fifth (Last)"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: ../tinymce/shortcodes.php:272
|
313 |
+
msgid "Two Fifth"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: ../tinymce/shortcodes.php:280
|
317 |
+
msgid "Two Fifth (Last)"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: ../tinymce/shortcodes.php:288
|
321 |
+
msgid "Three Fifth"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: ../tinymce/shortcodes.php:296
|
325 |
+
msgid "Three Fifth (Last)"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: ../tinymce/shortcodes.php:304
|
329 |
+
msgid "Four Fifth"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: ../tinymce/shortcodes.php:312
|
333 |
+
msgid "Four Fifth (Last)"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: ../tinymce/shortcodes.php:320
|
337 |
+
msgid "One Sixth"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: ../tinymce/shortcodes.php:328
|
341 |
+
msgid "One Sixth (Last)"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: ../tinymce/shortcodes.php:336
|
345 |
+
msgid "Five Sixth"
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: ../tinymce/shortcodes.php:344
|
349 |
+
msgid "Five Sixth (Last)"
|
350 |
+
msgstr ""
|
351 |
+
|
readme.txt
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WP Shortcode by MyThemeShop ===
|
2 |
+
Contributors: mythemeshop
|
3 |
+
Creator's website link: http://mythemeshop.com/
|
4 |
+
Tags: shortcodes, shortcode, shortcodes list, toggle shortcode, buttons, google map shortcode, youtube shortcode, viemo shortcode, alert shortcode, notification shortcode, column shortcodes
|
5 |
+
Requires at least: 3.0.1
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 1.2
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
WP Shortcode is a premium WP plugin for free, that provides easy to use over 24 shortocdes. You can easily add buttons, alerts, videos and more.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
Add sexy-buttons, spoiler warnings, column layouts and much more to WordPress. WP Shortcode makes it happen with a click of a button. Until now, this premium plugin was available to premium members of <a href="http://mythemeshop.com/">MyThemeShop</a>, but now everyone can use this premium plugin.
|
16 |
+
|
17 |
+
Why use WP Shortcode plugin? Tired of using a theme with built-in shortcodes, switching themes and then losing all your awesome styles? WP Shortcode offers over 24 useful shortcodes, so you'll never lose anything when changing your theme. Now you can add buttons, highlights, boxes, toggles, tabs, pricing tables, among other awesomeness, and take them with you no matter what theme you decide to use.
|
18 |
+
|
19 |
+
We at MyThemeShop realize there are already some free shortcode plugins out, but they either only include a very few amount of shortcodes, they are way too complex, not well-coded, not styled to our liking or they weren’t free. We wanted to create something that was 100% GPL so you can use it and abuse it on all of your websites and client projects – and of course that’s very easy to use and minimally styled, so it can fit most sites right out of the box or be easily customized.
|
20 |
+
|
21 |
+
To see a full list of options available with this powerful plugin, try this page: <a href="http://demo.mythemeshop.com/spike/shortcodes-examples/">http://demo.mythemeshop.com/spike/shortcodes-examples/</a>
|
22 |
+
|
23 |
+
= Shortcodes Included =
|
24 |
+
Buttons, Videos, Alerts, Google Maps, Toggle, Tabs, dividers, Columns And much more! Easily add nice looking elements to your WordPress website without any knowledge of coding!
|
25 |
+
|
26 |
+
== Installation ==
|
27 |
+
|
28 |
+
This section describes how to install the plugin and get it working.
|
29 |
+
|
30 |
+
1. Upload the `wp-shortcode` folder to the to the `/wp-content/plugins/` directory
|
31 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
32 |
+
3. You can see '+' button on post editor, using this button, you can add shortcodes in your posts.
|
33 |
+
|
34 |
+
== Frequently Asked Questions ==
|
35 |
+
|
36 |
+
= Shortcodes + button is not working =
|
37 |
+
|
38 |
+
Please disable all plugins and check if shortcode plugin is working properly. Then you can enable all plugins one by one to find out which plugin is conflicting with WP Shortcode plugin.
|
39 |
+
|
40 |
+
== Screenshots ==
|
41 |
+
|
42 |
+
1. Single Shortcode Configuration
|
43 |
+
2. List of all plugins.
|
44 |
+
3. Alerts and Buttons
|
45 |
+
4. Tabs and Toggles
|
46 |
+
5. Videos and Dividers
|
47 |
+
6. Columns Shortcodes
|
48 |
+
7. Google Maps Shortcode
|
49 |
+
|
50 |
+
== Changelog ==
|
51 |
+
|
52 |
+
= 1.2 =
|
53 |
+
* Made compatible with (with TinyMCE 3 & 4).
|
54 |
+
* Made translation-ready
|
55 |
+
* Added "centre" position for buttons.
|
56 |
+
|
57 |
+
= 1.1 =
|
58 |
+
* Fixed small issue in button shortcode CSS.
|
59 |
+
|
60 |
+
= 1.0 =
|
61 |
+
* Official plugin release.
|
tinymce/editor_plugin.css
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#mnmshortcode_tag {
|
2 |
+
width: 200px;
|
3 |
+
}
|
4 |
+
#mnmshortcode_panel {
|
5 |
+
margin-bottom: 8px;
|
6 |
+
}
|
7 |
+
#mnmshortcode_panel table {
|
8 |
+
width: 100%;
|
9 |
+
font-size: 12px;
|
10 |
+
}
|
11 |
+
.mnmshortcode_description {
|
12 |
+
color: #666;
|
13 |
+
font-size: 12px;
|
14 |
+
}
|
15 |
+
.mnmshortcode_att_name {
|
16 |
+
text-transform: capitalize;
|
17 |
+
}
|
18 |
+
#mnmshortcode_panel input, #mnmshortcode_panel select, #mnmshortcode_panel textarea {
|
19 |
+
width: 100%;
|
20 |
+
padding: 4px 4px;
|
21 |
+
font-size: 12px;
|
22 |
+
font-family: 'Open Sans', sans-serif;
|
23 |
+
}
|
24 |
+
#mnmshortcode_panel textarea {
|
25 |
+
height: 120px;
|
26 |
+
}
|
tinymce/editor_plugin.js
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
// Load plugin specific language pack
|
3 |
+
tinymce.PluginManager.requireLangPack('wpspanel');
|
4 |
+
tinymce.create('tinymce.plugins.wpspanel', {
|
5 |
+
/**
|
6 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
7 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
8 |
+
* of the editor instance to intercept that event.
|
9 |
+
*
|
10 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
11 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
12 |
+
*/
|
13 |
+
init : function(ed, url) {
|
14 |
+
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
15 |
+
ed.addCommand('mcewpspanel', function() {
|
16 |
+
ed.windowManager.open({
|
17 |
+
file : url + '/editor_plugin.php',
|
18 |
+
inline : 1,
|
19 |
+
width : 450 + ed.getLang('wpspanel.delta_width', 0),
|
20 |
+
height : 80 + ed.getLang('wpspanel.delta_height', 0)
|
21 |
+
}, {
|
22 |
+
plugin_url : url, // Plugin absolute URL
|
23 |
+
some_custom_arg : 'custom arg' // Custom argument
|
24 |
+
});
|
25 |
+
});
|
26 |
+
// Resize function
|
27 |
+
ed.addCommand( 'mcewpspanel_resize', function( ui, v ) {
|
28 |
+
if (ed.windowManager.params === undefined) {
|
29 |
+
// TinyMCE 4
|
30 |
+
var windowID = ed.windowManager.windows[0]._id;
|
31 |
+
var elem = window.top.document.getElementById(windowID+'-body');
|
32 |
+
jQuery(elem).height(v.height + 52);
|
33 |
+
} else {
|
34 |
+
// TinyMCE 3
|
35 |
+
ed.windowManager.params.mce_height = v.height + 52;
|
36 |
+
}
|
37 |
+
|
38 |
+
} );
|
39 |
+
// Register example button
|
40 |
+
ed.addButton('wpspanel', {
|
41 |
+
title : 'Add Custom Shortcode',
|
42 |
+
cmd : 'mcewpspanel',
|
43 |
+
image : url + '/shortcode.png'
|
44 |
+
});
|
45 |
+
|
46 |
+
// Add a node change handler, selects the button in the UI when a image is selected
|
47 |
+
ed.onNodeChange.add(function(ed, cm, n) {
|
48 |
+
cm.setActive('wpspanel', n.nodeName == 'IMG');
|
49 |
+
});
|
50 |
+
|
51 |
+
},
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Creates control instances based in the incomming name. This method is normally not
|
55 |
+
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
|
56 |
+
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
|
57 |
+
* method can be used to create those.
|
58 |
+
*
|
59 |
+
* @param {String} n Name of the control to create.
|
60 |
+
* @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
|
61 |
+
* @return {tinymce.ui.Control} New control instance or null if no control was created.
|
62 |
+
*/
|
63 |
+
createControl : function(n, cm) {
|
64 |
+
return null;
|
65 |
+
},
|
66 |
+
|
67 |
+
getInfo : function() {
|
68 |
+
return {
|
69 |
+
longname : 'WP Shortcode',
|
70 |
+
author : 'MyThemeShop',
|
71 |
+
authorurl : 'http://mythemeshop.com',
|
72 |
+
infourl : 'http://mythemeshop.com/plugins/wp-shortcode',
|
73 |
+
version : '1.1'
|
74 |
+
};
|
75 |
+
}
|
76 |
+
});
|
77 |
+
|
78 |
+
// Register plugin
|
79 |
+
tinymce.PluginManager.add('wpspanel', tinymce.plugins.wpspanel);
|
80 |
+
})();
|
tinymce/editor_plugin.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// look up for the path
|
3 |
+
require_once('mnm_config.php');
|
4 |
+
// check for rights
|
5 |
+
if ( !current_user_can('edit_pages') && !current_user_can('edit_posts') )
|
6 |
+
wp_die(__("You are not allowed to be here", "wpshortcode"));
|
7 |
+
global $wpdb;
|
8 |
+
?>
|
9 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
10 |
+
<head>
|
11 |
+
<title>Shortcode Panel</title>
|
12 |
+
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
13 |
+
<script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
|
14 |
+
<script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
|
15 |
+
<script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
|
16 |
+
|
17 |
+
<script language="javascript" type="text/javascript" src="<?php echo includes_url(); ?>js/jquery/jquery.js"></script>
|
18 |
+
<?php include('shortcodes.php'); ?>
|
19 |
+
<script language="javascript" type="text/javascript" src="<?php echo plugin_dir_url(__FILE__); ?>tinymce.js"></script>
|
20 |
+
<base target="_self" />
|
21 |
+
<link rel="stylesheet" type="text/css" href="<?php echo plugin_dir_url(__FILE__); ?>editor_plugin.css" media="all" />
|
22 |
+
</head>
|
23 |
+
<body id="link">
|
24 |
+
<!-- <form onsubmit="insertLink();return false;" action="#"> -->
|
25 |
+
<form name="mnm_tabs" action="#" id="mnmshortcode_form">
|
26 |
+
<div>
|
27 |
+
<!-- gallery panel -->
|
28 |
+
<div id="mnmshortcode_panel" class="panel">
|
29 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
30 |
+
<tr>
|
31 |
+
<td><label for="mnmshortcode_tag"><?php _e("Select Shortcode", 'wpshortcode'); ?></label></td>
|
32 |
+
<td><select id="mnmshortcode_tag" name="mnmshortcode_tag">
|
33 |
+
<option value="0">Select Shortcode</option>
|
34 |
+
<?php
|
35 |
+
if(is_array($shortcode_tags))
|
36 |
+
{
|
37 |
+
$i=1;
|
38 |
+
|
39 |
+
foreach ($shortcode_tags as $mnm_shortcodekey => $short_code_value)
|
40 |
+
{
|
41 |
+
if( stristr($short_code_value, 'mts_') )
|
42 |
+
{
|
43 |
+
$mnm_shortcode_name = str_replace('mts_', '' ,$short_code_value);
|
44 |
+
$mnm_shortcode_names = str_replace('_', ' ' ,$mnm_shortcode_name);
|
45 |
+
$mnm_shortcodenames = ucwords($mnm_shortcode_names);
|
46 |
+
$shortcode_label = (empty($shortcodes[$mnm_shortcodekey]['label']) ? $mnm_shortcodenames : $shortcodes[$mnm_shortcodekey]['label']);
|
47 |
+
echo '<option value="' . $mnm_shortcodekey . '" >' . $shortcode_label.'</option>' . "\n";
|
48 |
+
echo '</optgroup>';
|
49 |
+
|
50 |
+
$i++;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
?>
|
55 |
+
</select></td>
|
56 |
+
</tr>
|
57 |
+
|
58 |
+
</table>
|
59 |
+
</div>
|
60 |
+
|
61 |
+
</div>
|
62 |
+
|
63 |
+
|
64 |
+
</div>
|
65 |
+
|
66 |
+
<div class="mceActionPanel">
|
67 |
+
<div style="float: left">
|
68 |
+
<input type="button" id="cancel" name="cancel" value="<?php _e('Cancel', 'wpshortcode'); ?>" onClick="tinyMCEPopup.close();" />
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div style="float: right">
|
72 |
+
<input type="submit" id="insert" name="insert" value="<?php _e('Insert', 'wpshortcode'); ?>" onClick="mnmshortcodesubmit();" />
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</form>
|
76 |
+
</body>
|
77 |
+
</html>
|
tinymce/langs.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/javascript">
|
2 |
+
tinyMCE.addI18n({en:{
|
3 |
+
systempanel:{
|
4 |
+
desc : 'System shortcodes'
|
5 |
+
}}});
|
6 |
+
</script>
|
tinymce/mnm_config.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$wp_include = "../wp-load.php";
|
3 |
+
$i = 0;
|
4 |
+
while (!file_exists($wp_include) && $i++ < 10) {
|
5 |
+
$wp_include = "../$wp_include";
|
6 |
+
}
|
7 |
+
|
8 |
+
// load WordPress
|
9 |
+
require($wp_include);
|
tinymce/shortcode.png
ADDED
Binary file
|
tinymce/shortcodes.php
ADDED
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$shortcodes = array(
|
3 |
+
"button-brown" => array(
|
4 |
+
"self-closing" => false,
|
5 |
+
"atts" => array(
|
6 |
+
"url" => "#",
|
7 |
+
"target" => "_self",
|
8 |
+
"position" => "left"
|
9 |
+
),
|
10 |
+
"label" => __("Brown Button", "wpshortcode"),
|
11 |
+
"content" => __("Button text", "wpshortcode"),
|
12 |
+
"description" => __("Inserts a brown button. Set target to <strong>_blank</strong> to open link in a new window.", "wpshortcode")
|
13 |
+
),
|
14 |
+
"button-blue" => array(
|
15 |
+
"self-closing" => false,
|
16 |
+
"atts" => array(
|
17 |
+
"url" => "#",
|
18 |
+
"target" => "_self",
|
19 |
+
"position" => "left"
|
20 |
+
),
|
21 |
+
"label" => __("Blue Button", "wpshortcode"),
|
22 |
+
"content" => __("Button text", "wpshortcode") ,
|
23 |
+
"description" => __("Inserts a blue button. Set target to <strong>_blank</strong> to open link in a new window.", "wpshortcode")
|
24 |
+
),
|
25 |
+
"button-green" => array(
|
26 |
+
"self-closing" => false,
|
27 |
+
"atts" => array(
|
28 |
+
"url" => "#",
|
29 |
+
"target" => "_self",
|
30 |
+
"position" => "left"
|
31 |
+
),
|
32 |
+
"label" => __("Green Button", "wpshortcode"),
|
33 |
+
"content" => __("Button text", "wpshortcode") ,
|
34 |
+
"description" => __("Inserts a green button. Set target to <strong>_blank</strong> to open link in a new window.", "wpshortcode")
|
35 |
+
),
|
36 |
+
"button-yellow" => array(
|
37 |
+
"self-closing" => false,
|
38 |
+
"atts" => array(
|
39 |
+
"url" => "#",
|
40 |
+
"target" => "_self",
|
41 |
+
"position" => "left"
|
42 |
+
),
|
43 |
+
"label" => __("Yellow Button", "wpshortcode"),
|
44 |
+
"content" => __("Button text", "wpshortcode") ,
|
45 |
+
"description" => __("Inserts a yellow button. Set target to <strong>_blank</strong> to open link in a new window.", "wpshortcode")
|
46 |
+
),
|
47 |
+
"button-red" => array(
|
48 |
+
"self-closing" => false,
|
49 |
+
"atts" => array(
|
50 |
+
"url" => "#",
|
51 |
+
"target" => "_self",
|
52 |
+
"position" => "left"
|
53 |
+
),
|
54 |
+
"label" => __("Red Button", "wpshortcode"),
|
55 |
+
"content" => __("Button text", "wpshortcode") ,
|
56 |
+
"description" => __("Inserts a red button. Set target to <strong>_blank</strong> to open link in a new window.", "wpshortcode")
|
57 |
+
),
|
58 |
+
"button-white" => array(
|
59 |
+
"self-closing" => false,
|
60 |
+
"atts" => array(
|
61 |
+
"url" => "#",
|
62 |
+
"target" => "_self",
|
63 |
+
"position" => "left"
|
64 |
+
),
|
65 |
+
"label" => __("White Button", "wpshortcode"),
|
66 |
+
"content" => __("Button text", "wpshortcode") ,
|
67 |
+
"description" => __("Inserts a white button. Set target to <strong>_blank</strong> to open link in a new window.", "wpshortcode")
|
68 |
+
),
|
69 |
+
"alert-note" => array(
|
70 |
+
"self-closing" => false,
|
71 |
+
"atts" => array(),
|
72 |
+
"label" => __("Alert Note", "wpshortcode"),
|
73 |
+
"content" => __("Note text", "wpshortcode"),
|
74 |
+
"description" => __("Display a note.", "wpshortcode")
|
75 |
+
),
|
76 |
+
"alert-announce" => array(
|
77 |
+
"self-closing" => false,
|
78 |
+
"atts" => array(),
|
79 |
+
"label" => __("Alert Announce", "wpshortcode"),
|
80 |
+
"content" => __("Announce text", "wpshortcode"),
|
81 |
+
"description" => __("Display an announcement.", "wpshortcode")
|
82 |
+
),
|
83 |
+
"alert-success" => array(
|
84 |
+
"self-closing" => false,
|
85 |
+
"atts" => array(),
|
86 |
+
"label" => __("Alert Success", "wpshortcode"),
|
87 |
+
"content" => __("Success text", "wpshortcode"),
|
88 |
+
"description" => __("Display a success message.", "wpshortcode")
|
89 |
+
),
|
90 |
+
"alert-warning" => array(
|
91 |
+
"self-closing" => false,
|
92 |
+
"atts" => array(),
|
93 |
+
"label" => __("Alert Warning", "wpshortcode"),
|
94 |
+
"content" => __("Warning text", "wpshortcode"),
|
95 |
+
"description" => __("Display warning or error message.", "wpshortcode")
|
96 |
+
),
|
97 |
+
"youtube" => array(
|
98 |
+
"self-closing" => true,
|
99 |
+
"atts" => array(
|
100 |
+
"id" => "#",
|
101 |
+
"width" => "600",
|
102 |
+
"height" => "340",
|
103 |
+
"position" => "left"
|
104 |
+
),
|
105 |
+
"label" => __("YouTube Video", "wpshortcode"),
|
106 |
+
"content" => "",
|
107 |
+
"description" => __("Embed a Youtube Video", "wpshortcode")
|
108 |
+
),
|
109 |
+
"vimeo" => array(
|
110 |
+
"self-closing" => true,
|
111 |
+
"atts" => array(
|
112 |
+
"id" => "#",
|
113 |
+
"width" => "600",
|
114 |
+
"height" => "340",
|
115 |
+
"position" => "left"
|
116 |
+
),
|
117 |
+
"label" => __("Vimeo Video", "wpshortcode"),
|
118 |
+
"content" => "",
|
119 |
+
"description" => __("Embed a Vimeo Video.", "wpshortcode")
|
120 |
+
),
|
121 |
+
"googlemap" => array(
|
122 |
+
"self-closing" => true,
|
123 |
+
"atts" => array(
|
124 |
+
"address" => "Libertyville, Illinois, USA",
|
125 |
+
"width" => "600",
|
126 |
+
"height" => "340",
|
127 |
+
"position" => "left"
|
128 |
+
),
|
129 |
+
"label" => __("Google Map", "wpshortcode"),
|
130 |
+
"content" => "",
|
131 |
+
"description" => __("Embed a Google Map. Insert address or GPS location.", "wpshortcode")
|
132 |
+
),
|
133 |
+
"toggle" => array(
|
134 |
+
"self-closing" => false,
|
135 |
+
"atts" => array(
|
136 |
+
"title" => "Toggle Title"
|
137 |
+
),
|
138 |
+
"label" => __("Toggle", "wpshortcode"),
|
139 |
+
"content" => __("Insert Content Here", "wpshortcode"),
|
140 |
+
"content_field" => "textarea",
|
141 |
+
"description" => __("Content will be shown after clicking on the toggle title.", "wpshortcode")
|
142 |
+
),
|
143 |
+
"tabs" => array(
|
144 |
+
"self-closing" => false,
|
145 |
+
"atts" => array(),
|
146 |
+
"label" => __("Tabs", "wpshortcode"),
|
147 |
+
"content" => __("[tab title="Tab 1 Title"]Insert tab 1 content here[/tab]\n[tab title="Tab 2 Title"]Insert tab 2 content here[/tab]\n[tab title="Tab 3 Title"]Insert tab 3 content here[/tab]", "wpshortcode"),
|
148 |
+
"content_field" => "textarea",
|
149 |
+
"description" => __("Display content in tabbed form.", "wpshortcode")
|
150 |
+
),
|
151 |
+
"divider" => array(
|
152 |
+
"self-closing" => true,
|
153 |
+
"atts" => array(),
|
154 |
+
"content" => "Divider",
|
155 |
+
"description" => __("Simple horizontal divider.", "wpshortcode")
|
156 |
+
),
|
157 |
+
"divider_top" => array(
|
158 |
+
"self-closing" => true,
|
159 |
+
"atts" => array(),
|
160 |
+
"content" => "Divider with link",
|
161 |
+
"description" => __("Divider with an anchor link to top of page.", "wpshortcode")
|
162 |
+
),
|
163 |
+
"clear" => array(
|
164 |
+
"self-closing" => true,
|
165 |
+
"atts" => array(),
|
166 |
+
"label" => __("Clear", "wpshortcode"),
|
167 |
+
"content" => "",
|
168 |
+
"description" => __("Clear shortcode can be used to clear an element of its neighbors, no floating elements are allowed on the left or the right side.", "wpshortcode")
|
169 |
+
),
|
170 |
+
|
171 |
+
// Column Shortcodes
|
172 |
+
|
173 |
+
"one_third" => array(
|
174 |
+
"self-closing" => false,
|
175 |
+
"atts" => array(),
|
176 |
+
"label" => __("One Third", "wpshortcode"),
|
177 |
+
"content" => __("Column content", "wpshortcode"),
|
178 |
+
"content_field" => "textarea",
|
179 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
180 |
+
),
|
181 |
+
"one_third_last" => array(
|
182 |
+
"self-closing" => false,
|
183 |
+
"atts" => array(),
|
184 |
+
"label" => __("One Third (Last)", "wpshortcode"),
|
185 |
+
"content" => __("Column content", "wpshortcode"),
|
186 |
+
"content_field" => "textarea",
|
187 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
188 |
+
),
|
189 |
+
"two_third" => array(
|
190 |
+
"self-closing" => false,
|
191 |
+
"atts" => array(),
|
192 |
+
"label" => __("Two Third", "wpshortcode"),
|
193 |
+
"content" => __("Column content", "wpshortcode"),
|
194 |
+
"content_field" => "textarea",
|
195 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
196 |
+
),
|
197 |
+
"two_third_last" => array(
|
198 |
+
"self-closing" => false,
|
199 |
+
"atts" => array(),
|
200 |
+
"label" => __("Two Third (Last)", "wpshortcode"),
|
201 |
+
"content" => __("Column content", "wpshortcode"),
|
202 |
+
"content_field" => "textarea",
|
203 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
204 |
+
),
|
205 |
+
"one_half" => array(
|
206 |
+
"self-closing" => false,
|
207 |
+
"atts" => array(),
|
208 |
+
"label" => __("One Half", "wpshortcode"),
|
209 |
+
"content" => __("Column content", "wpshortcode"),
|
210 |
+
"content_field" => "textarea",
|
211 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
212 |
+
),
|
213 |
+
"one_half_last" => array(
|
214 |
+
"self-closing" => false,
|
215 |
+
"atts" => array(),
|
216 |
+
"label" => __("One Half (Last)", "wpshortcode"),
|
217 |
+
"content" => __("Column content", "wpshortcode"),
|
218 |
+
"content_field" => "textarea",
|
219 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
220 |
+
),
|
221 |
+
"one_fourth" => array(
|
222 |
+
"self-closing" => false,
|
223 |
+
"atts" => array(),
|
224 |
+
"label" => __("One Fourth", "wpshortcode"),
|
225 |
+
"content" => __("Column content", "wpshortcode"),
|
226 |
+
"content_field" => "textarea",
|
227 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
228 |
+
),
|
229 |
+
"one_fourth_last" => array(
|
230 |
+
"self-closing" => false,
|
231 |
+
"atts" => array(),
|
232 |
+
"label" => __("One Fourth (Last)", "wpshortcode"),
|
233 |
+
"content" => __("Column content", "wpshortcode"),
|
234 |
+
"content_field" => "textarea",
|
235 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
236 |
+
),
|
237 |
+
"three_fourth" => array(
|
238 |
+
"self-closing" => false,
|
239 |
+
"atts" => array(),
|
240 |
+
"label" => __("Three Fourth", "wpshortcode"),
|
241 |
+
"content" => __("Column content", "wpshortcode"),
|
242 |
+
"content_field" => "textarea",
|
243 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
244 |
+
),
|
245 |
+
"three_fourth_last" => array(
|
246 |
+
"self-closing" => false,
|
247 |
+
"atts" => array(),
|
248 |
+
"label" => __("Three Fourth (Last)", "wpshortcode"),
|
249 |
+
"content" => __("Column content", "wpshortcode"),
|
250 |
+
"content_field" => "textarea",
|
251 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
252 |
+
),
|
253 |
+
"one_fifth" => array(
|
254 |
+
"self-closing" => false,
|
255 |
+
"atts" => array(),
|
256 |
+
"label" => __("One Fifth", "wpshortcode"),
|
257 |
+
"content" => __("Column content", "wpshortcode"),
|
258 |
+
"content_field" => "textarea",
|
259 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
260 |
+
),
|
261 |
+
"one_fifth_last" => array(
|
262 |
+
"self-closing" => false,
|
263 |
+
"atts" => array(),
|
264 |
+
"label" => __("One Fifth (Last)", "wpshortcode"),
|
265 |
+
"content" => __("Column content", "wpshortcode"),
|
266 |
+
"content_field" => "textarea",
|
267 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
268 |
+
),
|
269 |
+
"two_fifth" => array(
|
270 |
+
"self-closing" => false,
|
271 |
+
"atts" => array(),
|
272 |
+
"label" => __("Two Fifth", "wpshortcode"),
|
273 |
+
"content" => __("Column content", "wpshortcode"),
|
274 |
+
"content_field" => "textarea",
|
275 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
276 |
+
),
|
277 |
+
"two_fifth_last" => array(
|
278 |
+
"self-closing" => false,
|
279 |
+
"atts" => array(),
|
280 |
+
"label" => __("Two Fifth (Last)", "wpshortcode"),
|
281 |
+
"content" => __("Column content", "wpshortcode"),
|
282 |
+
"content_field" => "textarea",
|
283 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
284 |
+
),
|
285 |
+
"three_fifth" => array(
|
286 |
+
"self-closing" => false,
|
287 |
+
"atts" => array(),
|
288 |
+
"label" => __("Three Fifth", "wpshortcode"),
|
289 |
+
"content" => __("Column content", "wpshortcode"),
|
290 |
+
"content_field" => "textarea",
|
291 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
292 |
+
),
|
293 |
+
"three_fifth_last" => array(
|
294 |
+
"self-closing" => false,
|
295 |
+
"atts" => array(),
|
296 |
+
"label" => __("Three Fifth (Last)", "wpshortcode"),
|
297 |
+
"content" => __("Column content", "wpshortcode"),
|
298 |
+
"content_field" => "textarea",
|
299 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
300 |
+
),
|
301 |
+
"four_fifth" => array(
|
302 |
+
"self-closing" => false,
|
303 |
+
"atts" => array(),
|
304 |
+
"label" => __("Four Fifth", "wpshortcode"),
|
305 |
+
"content" => __("Column content", "wpshortcode"),
|
306 |
+
"content_field" => "textarea",
|
307 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
308 |
+
),
|
309 |
+
"four_fifth_last" => array(
|
310 |
+
"self-closing" => false,
|
311 |
+
"atts" => array(),
|
312 |
+
"label" => __("Four Fifth (Last)", "wpshortcode"),
|
313 |
+
"content" => __("Column content", "wpshortcode"),
|
314 |
+
"content_field" => "textarea",
|
315 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
316 |
+
),
|
317 |
+
"one_sixth" => array(
|
318 |
+
"self-closing" => false,
|
319 |
+
"atts" => array(),
|
320 |
+
"label" => __("One Sixth", "wpshortcode"),
|
321 |
+
"content" => __("Column content", "wpshortcode"),
|
322 |
+
"content_field" => "textarea",
|
323 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
324 |
+
),
|
325 |
+
"one_sixth_last" => array(
|
326 |
+
"self-closing" => false,
|
327 |
+
"atts" => array(),
|
328 |
+
"label" => __("One Sixth (Last)", "wpshortcode"),
|
329 |
+
"content" => __("Column content", "wpshortcode"),
|
330 |
+
"content_field" => "textarea",
|
331 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
332 |
+
),
|
333 |
+
"five_sixth" => array(
|
334 |
+
"self-closing" => false,
|
335 |
+
"atts" => array(),
|
336 |
+
"label" => __("Five Sixth", "wpshortcode"),
|
337 |
+
"content" => __("Column content", "wpshortcode"),
|
338 |
+
"content_field" => "textarea",
|
339 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
340 |
+
),
|
341 |
+
"five_sixth_last" => array(
|
342 |
+
"self-closing" => false,
|
343 |
+
"atts" => array(),
|
344 |
+
"label" => __("Five Sixth (Last)", "wpshortcode"),
|
345 |
+
"content" => __("Column content", "wpshortcode"),
|
346 |
+
"content_field" => "textarea",
|
347 |
+
"description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
|
348 |
+
)
|
349 |
+
);
|
350 |
+
echo "<script type=\"text/javascript\">var shortcodes = ".json_encode($shortcodes).";</script>";
|
351 |
+
?>
|
tinymce/tinymce.js
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function mnmshortcodesubmit() {
|
2 |
+
var tagtext;
|
3 |
+
var mnm_shortcodeid = document.getElementById('mnmshortcode_tag').value;
|
4 |
+
if (mnm_shortcodeid == 0) {
|
5 |
+
tinyMCEPopup.close();
|
6 |
+
return;
|
7 |
+
}
|
8 |
+
if (typeof shortcodes[mnm_shortcodeid] != 'undefined') {
|
9 |
+
tagtext = "["+mnm_shortcodeid + ' ';
|
10 |
+
jQuery.each(shortcodes[mnm_shortcodeid]['atts'], function(index, item) {
|
11 |
+
tagtext += index + '="' + jQuery('#shortcode_att_'+index).val() + '" ';
|
12 |
+
});
|
13 |
+
|
14 |
+
tagtext = tagtext.trim() + "]";
|
15 |
+
if (!shortcodes[mnm_shortcodeid]['self-closing']) {
|
16 |
+
tagtext += jQuery('#shortcode_content').val() + "[/" + mnm_shortcodeid + "]";
|
17 |
+
}
|
18 |
+
} else {
|
19 |
+
tagtext="["+mnm_shortcodeid + "]Insert your content here[/" + mnm_shortcodeid + "]";
|
20 |
+
}
|
21 |
+
|
22 |
+
if(window.tinyMCE) {
|
23 |
+
if (window.tinyMCE.execInstanceCommand === undefined) {
|
24 |
+
// tinyMCE 4
|
25 |
+
tinyMCEPopup.editor.insertContent(tagtext);
|
26 |
+
} else {
|
27 |
+
// tinyMCE 3
|
28 |
+
window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tagtext);
|
29 |
+
}
|
30 |
+
tinyMCEPopup.editor.execCommand('mceRepaint');
|
31 |
+
tinyMCEPopup.close();
|
32 |
+
}
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
// document ready
|
37 |
+
jQuery(function($) {
|
38 |
+
$('#mnmshortcode_panel').append('<table id="mnmshortcode_atts" border="0" cellpadding="4" cellspacing="0"></table>');
|
39 |
+
tinyMCEPopup.resizeToInnerSize();
|
40 |
+
$('#mnmshortcode_tag').change(function() {
|
41 |
+
var mnm_shortcodeid = $(this).val();
|
42 |
+
var $atts_table = $('#mnmshortcode_atts');
|
43 |
+
$atts_table.empty();
|
44 |
+
// build form
|
45 |
+
if (typeof shortcodes[mnm_shortcodeid] != 'undefined') {
|
46 |
+
var html = '';
|
47 |
+
|
48 |
+
if (shortcodes[mnm_shortcodeid]['description']) {
|
49 |
+
html += '<tr><td class="mnmshortcode_description" colspan="2">'+shortcodes[mnm_shortcodeid]['description']+'</td></tr>';
|
50 |
+
}
|
51 |
+
$.each(shortcodes[mnm_shortcodeid]['atts'], function(index, item) {
|
52 |
+
html += '<tr class="mnmshortcode_att_name"><td>'+index+'</td><td><input type="text" name="shortcode_att_'+index+'" id="shortcode_att_'+index+'" value="'+item+'" /></td></tr>';
|
53 |
+
});
|
54 |
+
|
55 |
+
if (!shortcodes[mnm_shortcodeid]['self-closing']) {
|
56 |
+
if (shortcodes[mnm_shortcodeid]['content_field'] == undefined) {
|
57 |
+
shortcodes[mnm_shortcodeid]['content_field'] = 'input';
|
58 |
+
}
|
59 |
+
switch (shortcodes[mnm_shortcodeid]['content_field']) {
|
60 |
+
case 'input':
|
61 |
+
html += '<tr class="mnmshortcode_content"><td>Content</td><td><input type="text" name="shortcode_content" id="shortcode_content" value="'+shortcodes[mnm_shortcodeid]['content']+'" /></td></tr>';
|
62 |
+
break;
|
63 |
+
|
64 |
+
case 'textarea':
|
65 |
+
html += '<tr class="mnmshortcode_content"><td>Content</td><td><textarea name="shortcode_content" id="shortcode_content">'+shortcodes[mnm_shortcodeid]['content']+'</textarea></td></tr>';
|
66 |
+
break;
|
67 |
+
|
68 |
+
default:
|
69 |
+
html += '<tr class="mnmshortcode_content"><td>Content</td><td><input type="text" name="shortcode_content" id="shortcode_content" value="'+shortcodes[mnm_shortcodeid]['content']+'" /></td></tr>';
|
70 |
+
break;
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
74 |
+
$atts_table.append(html);
|
75 |
+
$('.mnmshortcode_att_name input, .mnmshortcode_content input').each(function() {
|
76 |
+
var $this = $(this);
|
77 |
+
$this.data('defaultVal', $this.val())
|
78 |
+
.css('color', '#777777')
|
79 |
+
.focus(function() {
|
80 |
+
if ($this.val() == $this.data('defaultVal')) {
|
81 |
+
$this.val('').css('color', '#000000');
|
82 |
+
}
|
83 |
+
});
|
84 |
+
});
|
85 |
+
}
|
86 |
+
tinyMCEPopup.execCommand( 'mcewpspanel_resize', false, { height : $('#mnmshortcode_form').height() } );
|
87 |
+
tinyMCEPopup.resizeToInnerSize();
|
88 |
+
});
|
89 |
+
|
90 |
+
// Resize onLoad
|
91 |
+
tinyMCEPopup.execCommand( 'mcewpspanel_resize', false, { height : 50 } );
|
92 |
+
tinyMCEPopup.resizeToInnerSize();
|
93 |
+
});
|
tinymce/tinymce.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class add_wpshortcodes_button {
|
3 |
+
var $pluginname = 'wpspanel';
|
4 |
+
var $path = '';
|
5 |
+
var $internalVersion = 100;
|
6 |
+
|
7 |
+
function __construct()
|
8 |
+
{
|
9 |
+
|
10 |
+
// Set path to editor_plugin.js
|
11 |
+
$this->path = plugin_dir_url(__FILE__);
|
12 |
+
|
13 |
+
// Modify the version when tinyMCE plugins are changed.
|
14 |
+
add_filter('tiny_mce_version', array (&$this, 'change_tinymce_version') );
|
15 |
+
|
16 |
+
// init process for button control
|
17 |
+
add_action('init', array (&$this, 'addbuttons') );
|
18 |
+
}
|
19 |
+
|
20 |
+
function addbuttons()
|
21 |
+
{
|
22 |
+
global $page_handle;
|
23 |
+
|
24 |
+
if ( !current_user_can('edit_posts') && !current_user_can('edit_pages') )
|
25 |
+
return;
|
26 |
+
|
27 |
+
// Add only in Rich Editor mode
|
28 |
+
if ( get_user_option('rich_editing') == 'true')
|
29 |
+
{
|
30 |
+
add_filter("mce_external_plugins", array (&$this, 'add_tinymce_plugin' ), 5);
|
31 |
+
add_filter('mce_buttons', array (&$this, 'register_button' ), 5);
|
32 |
+
add_filter('mce_external_languages', array (&$this, 'add_tinymce_langs_path'));
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
function register_button($buttons)
|
37 |
+
{
|
38 |
+
array_push($buttons, 'separator', $this->pluginname );
|
39 |
+
return $buttons;
|
40 |
+
}
|
41 |
+
|
42 |
+
function add_tinymce_plugin($plugin_array)
|
43 |
+
{
|
44 |
+
global $page_handle;
|
45 |
+
global $post_id;
|
46 |
+
|
47 |
+
if(isset($_GET['post'])) {
|
48 |
+
$post_id = $_GET['post'];
|
49 |
+
}
|
50 |
+
$post = get_post($post_id);
|
51 |
+
$post_type = $post->post_type;
|
52 |
+
|
53 |
+
$plugin_array[$this->pluginname] = $this->path . 'editor_plugin.js';
|
54 |
+
|
55 |
+
return $plugin_array;
|
56 |
+
}
|
57 |
+
|
58 |
+
function add_tinymce_langs_path($plugin_array)
|
59 |
+
{
|
60 |
+
// Load the TinyMCE language file
|
61 |
+
$plugin_array[$this->pluginname] = plugin_dir_url('tinymce/langs.php');
|
62 |
+
return $plugin_array;
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
/**
|
67 |
+
* add_nextgen_button::change_tinymce_version()
|
68 |
+
* A different version will rebuild the cache
|
69 |
+
*
|
70 |
+
* @return $versio
|
71 |
+
*/
|
72 |
+
function change_tinymce_version($version)
|
73 |
+
{
|
74 |
+
$version = $version + $this->internalVersion;
|
75 |
+
return $version;
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
// Call it after theme setup
|
81 |
+
function mts_wpshortcodes_tinymce() {
|
82 |
+
$tinymce_button = new add_wpshortcodes_button();
|
83 |
+
}
|
84 |
+
add_action( 'after_setup_theme', 'mts_wpshortcodes_tinymce' );
|
85 |
+
?>
|
wp-shortcode.php
ADDED
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WP Shortcode by MyThemeShop
|
4 |
+
Plugin URI: http://mythemeshop.com/
|
5 |
+
Description: With the vast array of shortcodes, you can quickly and easily build content for your posts and pages and turbocharge your blogging experience.
|
6 |
+
Author: MyThemeShop
|
7 |
+
Version: 1.2
|
8 |
+
Author URI: http://mythemeshop.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
function mts_wpshortcodes_scripts() {
|
12 |
+
|
13 |
+
wp_register_style('mts_wpshortcodes', plugins_url('css/wp-shortcode.css', __FILE__));
|
14 |
+
wp_enqueue_style('mts_wpshortcodes');
|
15 |
+
|
16 |
+
wp_register_script('mts_wpshortcodes', plugins_url('js/wp-shortcode.js', __FILE__), array('jquery'));
|
17 |
+
wp_enqueue_script('mts_wpshortcodes');
|
18 |
+
}
|
19 |
+
add_action('wp_enqueue_scripts', 'mts_wpshortcodes_scripts', 99);
|
20 |
+
|
21 |
+
function mts_wpshortcodes_load_textdomain() {
|
22 |
+
load_plugin_textdomain( 'wpshortcode', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
23 |
+
}
|
24 |
+
add_action( 'plugins_loaded', 'mts_wpshortcodes_load_textdomain' );
|
25 |
+
|
26 |
+
// hide built-in shortcodes button for MTS themes
|
27 |
+
add_action('admin_head', 'mts_wpshortcodes_theme_compatibility');
|
28 |
+
|
29 |
+
function mts_wpshortcodes_theme_compatibility() {
|
30 |
+
echo '<style type="text/css">#content_mnmpanel {display: none;}</style>';
|
31 |
+
}
|
32 |
+
|
33 |
+
include('tinymce/tinymce.php');
|
34 |
+
|
35 |
+
// override theme shortcodes
|
36 |
+
add_action( 'after_setup_theme', 'mts_wpshortcodes_add' );
|
37 |
+
|
38 |
+
function mts_wpshortcodes_add() {
|
39 |
+
remove_shortcode('button-brown'); add_shortcode('button-brown', 'mts_button_brown');
|
40 |
+
remove_shortcode('button-blue'); add_shortcode('button-blue', 'mts_button_blue');
|
41 |
+
remove_shortcode('button-green'); add_shortcode('button-green', 'mts_button_green');
|
42 |
+
remove_shortcode('button-red'); add_shortcode('button-red', 'mts_button_red');
|
43 |
+
remove_shortcode('button-white'); add_shortcode('button-white', 'mts_button_white');
|
44 |
+
remove_shortcode('button-yellow'); add_shortcode('button-yellow', 'mts_button_yellow');
|
45 |
+
remove_shortcode('alert-note'); add_shortcode('alert-note', 'mts_alert_note');
|
46 |
+
remove_shortcode('alert-announce'); add_shortcode('alert-announce', 'mts_alert_announce');
|
47 |
+
remove_shortcode('alert-success'); add_shortcode('alert-success', 'mts_alert_success');
|
48 |
+
remove_shortcode('alert-warning'); add_shortcode('alert-warning', 'mts_alert_warning');
|
49 |
+
remove_shortcode('one_third'); add_shortcode('one_third', 'mts_one_third');
|
50 |
+
remove_shortcode('one_third_last'); add_shortcode('one_third_last', 'mts_one_third_last');
|
51 |
+
remove_shortcode('two_third'); add_shortcode('two_third', 'mts_two_third');
|
52 |
+
remove_shortcode('two_third_last'); add_shortcode('two_third_last', 'mts_two_third_last');
|
53 |
+
remove_shortcode('one_half'); add_shortcode('one_half', 'mts_one_half');
|
54 |
+
remove_shortcode('one_half_last'); add_shortcode('one_half_last', 'mts_one_half_last');
|
55 |
+
remove_shortcode('one_fourth'); add_shortcode('one_fourth', 'mts_one_fourth');
|
56 |
+
remove_shortcode('one_fourth_last'); add_shortcode('one_fourth_last', 'mts_one_fourth_last');
|
57 |
+
remove_shortcode('three_fourth'); add_shortcode('three_fourth', 'mts_three_fourth');
|
58 |
+
remove_shortcode('three_fourth_last'); add_shortcode('three_fourth_last', 'mts_three_fourth_last');
|
59 |
+
remove_shortcode('one_fifth'); add_shortcode('one_fifth', 'mts_one_fifth');
|
60 |
+
remove_shortcode('one_fifth_last'); add_shortcode('one_fifth_last', 'mts_one_fifth_last');
|
61 |
+
remove_shortcode('two_fifth'); add_shortcode('two_fifth', 'mts_two_fifth');
|
62 |
+
remove_shortcode('two_fifth_last'); add_shortcode('two_fifth_last', 'mts_two_fifth_last');
|
63 |
+
remove_shortcode('three_fifth'); add_shortcode('three_fifth', 'mts_three_fifth');
|
64 |
+
remove_shortcode('three_fifth_last'); add_shortcode('three_fifth_last', 'mts_three_fifth_last');
|
65 |
+
remove_shortcode('four_fifth'); add_shortcode('four_fifth', 'mts_four_fifth');
|
66 |
+
remove_shortcode('four_fifth_last'); add_shortcode('four_fifth_last', 'mts_four_fifth_last');
|
67 |
+
remove_shortcode('one_sixth'); add_shortcode('one_sixth', 'mts_one_sixth');
|
68 |
+
remove_shortcode('one_sixth_last'); add_shortcode('one_sixth_last', 'mts_one_sixth_last');
|
69 |
+
remove_shortcode('five_sixth'); add_shortcode('five_sixth', 'mts_five_sixth');
|
70 |
+
remove_shortcode('five_sixth_last'); add_shortcode('five_sixth_last', 'mts_five_sixth_last');
|
71 |
+
remove_shortcode('youtube'); add_shortcode('youtube', 'mts_youtube_video');
|
72 |
+
remove_shortcode('vimeo'); add_shortcode('vimeo', 'mts_vimeo_video');
|
73 |
+
remove_shortcode('googlemap'); add_shortcode('googlemap', 'mts_googleMaps');
|
74 |
+
remove_shortcode('tabs'); add_shortcode('tabs', 'mts_tabs');
|
75 |
+
remove_shortcode('toggle'); add_shortcode('toggle', 'mts_toggle');
|
76 |
+
remove_shortcode('divider'); add_shortcode('divider', 'mts_divider');
|
77 |
+
remove_shortcode('divider_top'); add_shortcode('divider_top', 'mts_divider_top');
|
78 |
+
remove_shortcode('clear'); add_shortcode('clear', 'mts_clear');
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
/*-----------------------------------------------------------------------------------*/
|
83 |
+
/* Buttons Shortcodes
|
84 |
+
/*-----------------------------------------------------------------------------------*/
|
85 |
+
|
86 |
+
function mts_button_brown( $atts, $content = null ) {
|
87 |
+
extract(shortcode_atts(array(
|
88 |
+
'url' => '#',
|
89 |
+
'target' => '_self',
|
90 |
+
'position' => 'left'
|
91 |
+
), $atts));
|
92 |
+
$out = "<a href=\"" .$url. "\" target=\"" .$target. "\" class=\"buttons btn_brown " .$position. "\"><span class=\"left\">".do_shortcode($content)."</span></a>";
|
93 |
+
if ($position == 'center') {
|
94 |
+
$out = '<div class="button-center">'.$out.'</div>';
|
95 |
+
}
|
96 |
+
return $out;
|
97 |
+
}
|
98 |
+
|
99 |
+
function mts_button_blue( $atts, $content = null ) {
|
100 |
+
extract(shortcode_atts(array(
|
101 |
+
'url' => '#',
|
102 |
+
'target' => '_self',
|
103 |
+
'position' => 'left'
|
104 |
+
), $atts));
|
105 |
+
$out = "<a href=\"" .$url. "\" target=\"" .$target. "\" class=\"buttons btn_blue " .$position. "\"><span class=\"left\">".do_shortcode($content)."</span></a>";
|
106 |
+
if ($position == 'center') {
|
107 |
+
$out = '<div class="button-center">'.$out.'</div>';
|
108 |
+
}
|
109 |
+
return $out;
|
110 |
+
}
|
111 |
+
|
112 |
+
function mts_button_green( $atts, $content = null ) {
|
113 |
+
extract(shortcode_atts(array(
|
114 |
+
'url' => '#',
|
115 |
+
'target' => '_self',
|
116 |
+
'position' => 'left'
|
117 |
+
), $atts));
|
118 |
+
$out = "<a href=\"" .$url. "\" target=\"" .$target. "\" class=\"buttons btn_green " .$position. "\"><span class=\"left\">".do_shortcode($content)."</span></a>";
|
119 |
+
if ($position == 'center') {
|
120 |
+
$out = '<div class="button-center">'.$out.'</div>';
|
121 |
+
}
|
122 |
+
return $out;
|
123 |
+
}
|
124 |
+
|
125 |
+
function mts_button_red( $atts, $content = null ) {
|
126 |
+
extract(shortcode_atts(array(
|
127 |
+
'url' => '#',
|
128 |
+
'target' => '_self',
|
129 |
+
'position' => 'left'
|
130 |
+
), $atts));
|
131 |
+
$out = "<a href=\"" .$url. "\" target=\"" .$target. "\" class=\"buttons btn_red " .$position. "\"><span class=\"left\">".do_shortcode($content)."</span></a>";
|
132 |
+
if ($position == 'center') {
|
133 |
+
$out = '<div class="button-center">'.$out.'</div>';
|
134 |
+
}
|
135 |
+
return $out;
|
136 |
+
}
|
137 |
+
|
138 |
+
function mts_button_white( $atts, $content = null ) {
|
139 |
+
extract(shortcode_atts(array(
|
140 |
+
'url' => '#',
|
141 |
+
'target' => '_self',
|
142 |
+
'position' => 'left'
|
143 |
+
), $atts));
|
144 |
+
$out = "<a href=\"" .$url. "\" target=\"" .$target. "\" class=\"buttons btn_white " .$position. "\"><span class=\"left\">".do_shortcode($content)."</span></a>";
|
145 |
+
if ($position == 'center') {
|
146 |
+
$out = '<div class="button-center">'.$out.'</div>';
|
147 |
+
}
|
148 |
+
return $out;
|
149 |
+
}
|
150 |
+
|
151 |
+
function mts_button_yellow( $atts, $content = null ) {
|
152 |
+
extract(shortcode_atts(array(
|
153 |
+
'url' => '#',
|
154 |
+
'target' => '_self',
|
155 |
+
'position' => 'left'
|
156 |
+
), $atts));
|
157 |
+
$out = "<a href=\"" .$url. "\" target=\"" .$target. "\" class=\"buttons btn_yellow " .$position. "\"><span class=\"left\">".do_shortcode($content)."</span></a>";
|
158 |
+
if ($position == 'center') {
|
159 |
+
$out = '<div class="button-center">'.$out.'</div>';
|
160 |
+
}
|
161 |
+
return $out;
|
162 |
+
}
|
163 |
+
|
164 |
+
/*-----------------------------------------------------------------------------------*/
|
165 |
+
/* Alert Shortcodes
|
166 |
+
/*-----------------------------------------------------------------------------------*/
|
167 |
+
|
168 |
+
function mts_alert_note( $atts, $content = null ) {
|
169 |
+
extract(shortcode_atts(array(
|
170 |
+
'style' => 'note'
|
171 |
+
), $atts));
|
172 |
+
$out = "<div class=\"message_box note\"><p>".do_shortcode($content)."</p></div>";
|
173 |
+
return $out;
|
174 |
+
}
|
175 |
+
|
176 |
+
function mts_alert_announce( $atts, $content = null ) {
|
177 |
+
extract(shortcode_atts(array(
|
178 |
+
'style' => 'announce'
|
179 |
+
), $atts));
|
180 |
+
$out = "<div class=\"message_box announce\"><p>".do_shortcode($content)."</p></div>";
|
181 |
+
return $out;
|
182 |
+
}
|
183 |
+
|
184 |
+
function mts_alert_success( $atts, $content = null ) {
|
185 |
+
extract(shortcode_atts(array(
|
186 |
+
'style' => 'success'
|
187 |
+
), $atts));
|
188 |
+
$out = "<div class=\"message_box success\"><p>".do_shortcode($content)."</p></div>";
|
189 |
+
return $out;
|
190 |
+
}
|
191 |
+
|
192 |
+
function mts_alert_warning( $atts, $content = null ) {
|
193 |
+
extract(shortcode_atts(array(
|
194 |
+
'style' => 'warning'
|
195 |
+
), $atts));
|
196 |
+
$out = "<div class=\"message_box warning\"><p>".do_shortcode($content)."</p></div>";
|
197 |
+
return $out;
|
198 |
+
}
|
199 |
+
|
200 |
+
/*-----------------------------------------------------------------------------------*/
|
201 |
+
/* Column Shortcodes
|
202 |
+
/*-----------------------------------------------------------------------------------*/
|
203 |
+
|
204 |
+
function mts_one_third( $atts, $content = null ) {
|
205 |
+
return '<div class="one_third">' . do_shortcode($content) . '</div>';
|
206 |
+
}
|
207 |
+
|
208 |
+
function mts_one_third_last( $atts, $content = null ) {
|
209 |
+
return '<div class="one_third column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
210 |
+
}
|
211 |
+
|
212 |
+
function mts_two_third( $atts, $content = null ) {
|
213 |
+
return '<div class="two_third">' . do_shortcode($content) . '</div>';
|
214 |
+
}
|
215 |
+
|
216 |
+
function mts_two_third_last( $atts, $content = null ) {
|
217 |
+
return '<div class="two_third column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
218 |
+
}
|
219 |
+
|
220 |
+
function mts_one_half( $atts, $content = null ) {
|
221 |
+
return '<div class="one_half">' . do_shortcode($content) . '</div>';
|
222 |
+
}
|
223 |
+
|
224 |
+
function mts_one_half_last( $atts, $content = null ) {
|
225 |
+
return '<div class="one_half column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
226 |
+
}
|
227 |
+
|
228 |
+
function mts_one_fourth( $atts, $content = null ) {
|
229 |
+
return '<div class="one_fourth">' . do_shortcode($content) . '</div>';
|
230 |
+
}
|
231 |
+
|
232 |
+
function mts_one_fourth_last( $atts, $content = null ) {
|
233 |
+
return '<div class="one_fourth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
234 |
+
}
|
235 |
+
|
236 |
+
function mts_three_fourth( $atts, $content = null ) {
|
237 |
+
return '<div class="three_fourth">' . do_shortcode($content) . '</div>';
|
238 |
+
}
|
239 |
+
|
240 |
+
function mts_three_fourth_last( $atts, $content = null ) {
|
241 |
+
return '<div class="three_fourth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
242 |
+
}
|
243 |
+
|
244 |
+
function mts_one_fifth( $atts, $content = null ) {
|
245 |
+
return '<div class="one_fifth">' . do_shortcode($content) . '</div>';
|
246 |
+
}
|
247 |
+
|
248 |
+
function mts_one_fifth_last( $atts, $content = null ) {
|
249 |
+
return '<div class="one_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
250 |
+
}
|
251 |
+
|
252 |
+
function mts_two_fifth( $atts, $content = null ) {
|
253 |
+
return '<div class="two_fifth">' . do_shortcode($content) . '</div>';
|
254 |
+
}
|
255 |
+
|
256 |
+
function mts_two_fifth_last( $atts, $content = null ) {
|
257 |
+
return '<div class="two_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
258 |
+
}
|
259 |
+
|
260 |
+
function mts_three_fifth( $atts, $content = null ) {
|
261 |
+
return '<div class="three_fifth">' . do_shortcode($content) . '</div>';
|
262 |
+
}
|
263 |
+
|
264 |
+
function mts_three_fifth_last( $atts, $content = null ) {
|
265 |
+
return '<div class="three_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
266 |
+
}
|
267 |
+
|
268 |
+
function mts_four_fifth( $atts, $content = null ) {
|
269 |
+
return '<div class="four_fifth">' . do_shortcode($content) . '</div>';
|
270 |
+
}
|
271 |
+
|
272 |
+
function mts_four_fifth_last( $atts, $content = null ) {
|
273 |
+
return '<div class="four_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
274 |
+
}
|
275 |
+
|
276 |
+
function mts_one_sixth( $atts, $content = null ) {
|
277 |
+
return '<div class="one_sixth">' . do_shortcode($content) . '</div>';
|
278 |
+
}
|
279 |
+
|
280 |
+
function mts_one_sixth_last( $atts, $content = null ) {
|
281 |
+
return '<div class="one_sixth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
282 |
+
}
|
283 |
+
|
284 |
+
function mts_five_sixth( $atts, $content = null ) {
|
285 |
+
return '<div class="five_sixth">' . do_shortcode($content) . '</div>';
|
286 |
+
}
|
287 |
+
|
288 |
+
function mts_five_sixth_last( $atts, $content = null ) {
|
289 |
+
return '<div class="five_sixth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
|
290 |
+
}
|
291 |
+
|
292 |
+
/*-----------------------------------------------------------------------------------*/
|
293 |
+
/* Video Shortcodes
|
294 |
+
/*-----------------------------------------------------------------------------------*/
|
295 |
+
function mts_youtube_video( $atts, $content = null ) {
|
296 |
+
extract(shortcode_atts( array(
|
297 |
+
'id' => '',
|
298 |
+
'width' => '600',
|
299 |
+
'height' => '340',
|
300 |
+
'position' => 'left'
|
301 |
+
), $atts));
|
302 |
+
$out = "<div class=\"youtube-video " .$position . "\"><iframe width=\"" .$width . "\" height=\"" .$height ."\" src=\"http://www.youtube.com/embed/" . $id . "?rel=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
|
303 |
+
return $out;
|
304 |
+
}
|
305 |
+
|
306 |
+
function mts_vimeo_video( $atts, $content = null ) {
|
307 |
+
extract(shortcode_atts( array(
|
308 |
+
'id' => '',
|
309 |
+
'width' => '600',
|
310 |
+
'height' => '340',
|
311 |
+
'position' => 'left'
|
312 |
+
), $atts));
|
313 |
+
$out = "<div class=\"vimeo-video " .$position . "\"><iframe width=\"" .$width . "\" height=\"" .$height ."\" src=\"http://player.vimeo.com/video/" . $id . "?title=0&byline=0&portrait=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
|
314 |
+
return $out;
|
315 |
+
}
|
316 |
+
|
317 |
+
/*-----------------------------------------------------------------------------------*/
|
318 |
+
/* GoogleMaps Shortcode
|
319 |
+
/*-----------------------------------------------------------------------------------*/
|
320 |
+
function mts_googleMaps($atts, $content = null) {
|
321 |
+
extract(shortcode_atts(array(
|
322 |
+
'width' => '640',
|
323 |
+
'height' => '480',
|
324 |
+
'address' => '',
|
325 |
+
'src' => '', // for backwards compatibility
|
326 |
+
'position' => 'left'
|
327 |
+
), $atts));
|
328 |
+
if (!empty($src)) {
|
329 |
+
$out = "<div class=\"googlemaps " .$position . "\"><iframe width=\"".$width."\" height=\"".$height."\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"".$src."&output=embed\"></iframe></div>";
|
330 |
+
} else {
|
331 |
+
$out = "<div class=\"googlemaps " .$position . "\"><iframe width=\"".$width."\" height=\"".$height."\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"//maps.google.com/maps?q=".urlencode($address)."&output=embed\"></iframe></div>";
|
332 |
+
}
|
333 |
+
return $out;
|
334 |
+
}
|
335 |
+
|
336 |
+
/*-----------------------------------------------------------------------------------*/
|
337 |
+
/* Tabs
|
338 |
+
/*-----------------------------------------------------------------------------------*/
|
339 |
+
function mts_tabs( $atts, $content = null ) {
|
340 |
+
|
341 |
+
if (!preg_match_all("/(.?)\[(tab)\b(.*?)(?:(\/))?\](?:(.+?)\[\/tab\])?(.?)/s", $content, $matches)) {
|
342 |
+
return do_shortcode($content);
|
343 |
+
} else {
|
344 |
+
for($i = 0; $i < count($matches[0]); $i++) {
|
345 |
+
$matches[3][$i] = shortcode_parse_atts($matches[3][$i]);
|
346 |
+
$tabid[$i] = 'tab-'.$i.'-'.strtolower(sanitize_title($matches[3][$i]['title']));
|
347 |
+
}
|
348 |
+
$tabnav = '<ul class="wps_tabs">';
|
349 |
+
|
350 |
+
for($i = 0; $i < count($matches[0]); $i++) {
|
351 |
+
$tabnav .= '<li><a href="#" data-tab="'.$tabid[$i].'">' . $matches[3][$i]['title'] . '</a></li>';
|
352 |
+
}
|
353 |
+
$tabnav .= '</ul>';
|
354 |
+
|
355 |
+
$tabcontent = '<div class="tab_container">';
|
356 |
+
for($i = 0; $i < count($matches[0]); $i++) {
|
357 |
+
$tabcontent .= '<div id="'.$tabid[$i].'" class="tab_content clearfix">' . do_shortcode(trim($matches[5][$i])) . '</div>';
|
358 |
+
}
|
359 |
+
$tabcontent .= '</div>';
|
360 |
+
|
361 |
+
return '<div class="tab_widget wp_shortcodes_tabs">' . $tabnav . $tabcontent . '</div><div class="clear"></div>';
|
362 |
+
}
|
363 |
+
|
364 |
+
}
|
365 |
+
|
366 |
+
/*--------------------------------------------------------
|
367 |
+
Toggles
|
368 |
+
--------------------------------------------------------*/
|
369 |
+
|
370 |
+
function mts_toggle( $atts, $content = null ) {
|
371 |
+
extract(shortcode_atts(array(
|
372 |
+
'title' => __('Toggle Title', 'wpshortcode')
|
373 |
+
), $atts));
|
374 |
+
|
375 |
+
return '<div class="toggle clearfix wp_shortcodes_toggle"><div class="wps_togglet"><span>' . $title . '</span></div><div class="togglec clearfix">' . do_shortcode(trim($content)) . '</div></div><div class="clear"></div>';
|
376 |
+
}
|
377 |
+
|
378 |
+
/*-----------------------------------------------------------------------------------*/
|
379 |
+
/* Divider
|
380 |
+
/*-----------------------------------------------------------------------------------*/
|
381 |
+
// simple divider
|
382 |
+
function mts_divider( $atts ) {
|
383 |
+
return '<div class="divider"></div>';
|
384 |
+
}
|
385 |
+
|
386 |
+
// Divider with an anchor link to top of page.
|
387 |
+
function mts_divider_top( $atts ) {
|
388 |
+
return '<div class="top-of-page"><a href="#top">'.__('Back to Top', 'wpshortcode').'</a></div>';
|
389 |
+
}
|
390 |
+
|
391 |
+
// Used to clear an element of its neighbors, no floating elements are allowed on the left or the right side.
|
392 |
+
function mts_clear( $atts ) {
|
393 |
+
return '<div class="clear"></div>';
|
394 |
+
}
|
395 |
+
|
396 |
+
?>
|