WP Shortcode by MyThemeShop - Version 1.4.16

Version Description

  • Code Improvements.
Download this release

Release Info

Developer MyThemeShop
Plugin Icon 128x128 WP Shortcode by MyThemeShop
Version 1.4.16
Comparing to
See all releases

Code changes from version 1.4.15 to 1.4.16

css/tipsy.css CHANGED
@@ -1,20 +1,20 @@
1
- .tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }
2
- .tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
3
- /* Rounded corners */
4
- .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
5
- /* Uncomment for shadow */
6
- /*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }_NO__DOTCOMMA__AFTER__*/
7
- .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
8
- /* Rules to colour arrows */
9
- .tipsy-arrow-n { border-bottom-color: #000 }
10
- .tipsy-arrow-s { border-top-color: #000 }
11
- .tipsy-arrow-e { border-left-color: #000 }
12
- .tipsy-arrow-w { border-right-color: #000 }
13
- .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
14
- .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
15
- .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
16
- .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
17
- .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
18
- .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
19
- .tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
20
  .tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
1
+ .tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }
2
+ .tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
3
+ /* Rounded corners */
4
+ .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
5
+ /* Uncomment for shadow */
6
+ /*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }_NO__DOTCOMMA__AFTER__*/
7
+ .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
8
+ /* Rules to colour arrows */
9
+ .tipsy-arrow-n { border-bottom-color: #000 }
10
+ .tipsy-arrow-s { border-top-color: #000 }
11
+ .tipsy-arrow-e { border-left-color: #000 }
12
+ .tipsy-arrow-w { border-right-color: #000 }
13
+ .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
14
+ .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
15
+ .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
16
+ .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
17
+ .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
18
+ .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
19
+ .tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
20
  .tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
css/wp-shortcode.css CHANGED
@@ -1,293 +1,78 @@
1
- /*-----------------------------------------------
2
- /* Plugin: WP Shortcode
3
- /* Author: MyThemeShop
4
- /* Version: 1.4
5
- /*---------------------------------------------*/
6
- /*-[ Notifications ]---------------------------*/
7
- .message_box {
8
- margin: 15px 0;
9
- padding: 1em 1em;
10
- }
11
- .message_box p { margin-bottom: 0 }
12
- pre {
13
- overflow: auto;
14
- padding: 15px;
15
- margin: 15px 0;
16
- position: relative;
17
- background: #777;
18
- font-family: monospace;
19
- color: #FFF;
20
- box-sizing: border-box;
21
- }
22
- .note {
23
- background: #FAF3D4;
24
- color: #A6A377;
25
- }
26
- .announce {
27
- background: #d0e6f0;
28
- color: #7190a2;
29
- }
30
- .success {
31
- border: 1px solid #DEF1BF;
32
- background: #D8EBCE;
33
- color: #748F5D;
34
- }
35
- .warning {
36
- border: 1px solid #FFDBDB;
37
- background: #FDE2E2;
38
- color: #AC888A;
39
- }
40
- /*-[ Buttons ]---------------------------------*/
41
- .buttons {
42
- font-size: 12px;
43
- text-decoration: none;
44
- border-radius: 5px;
45
- -webkit-border-radius: 5px;
46
- -moz-border-radius: 5px;
47
- margin: 0 15px 15px 0;
48
- padding: 12px 10px;
49
- overflow: hidden;
50
- display: inline-block;
51
- width: auto;
52
- }
53
- .buttons span {
54
- float: none;
55
- overflow: hidden;
56
- }
57
- a.buttons {
58
- color: #fff!important;
59
- text-decoration: none;
60
- padding: 10px 20px;
61
- border-radius: 3px;
62
- border: 1px solid rgba(0, 0, 0, 0.1);
63
- text-transform: uppercase;
64
- font-weight: bold;
65
- }
66
- a.buttons.left {
67
- margin-right: 15px;
68
- margin-bottom: 15px;
69
- float: left;
70
- }
71
- a.buttons.right {
72
- margin-left: 15px;
73
- margin-bottom: 15px;
74
- margin-right: 0;
75
- float: right;
76
- }
77
- div.button-center {
78
- width: 100%;
79
- text-align: center;
80
- }
81
- a.buttons.center {
82
- clear: both;
83
- display: inline-block;
84
- float: none;
85
- width: auto;
86
- }
87
- a.btn_white { color: #4F4F4F!important }
88
- .btn_brown {
89
- background-color: #C5703F;
90
- color: white;
91
- }
92
- .btn_brown:hover {
93
- background-color: #D1B593;
94
- color: white!important;
95
- }
96
- .btn_blue {
97
- background-color: #A5B8DA;
98
- color: white;
99
- }
100
- .btn_blue:hover {
101
- background-color: #9badcc;
102
- color: white!important;
103
- }
104
- .btn_green {
105
- background-color: #6CB24C;
106
- color: white;
107
- }
108
- .btn_green:hover {
109
- background-color: #5F9D43;
110
- color: white!important;
111
- }
112
- .btn_yellow {
113
- background-color: #FFDA6B;
114
- color: #fff;
115
- }
116
- .btn_yellow:hover {
117
- background-color: #FFD351;
118
- color: #fff!important;
119
- }
120
- .btn_red {
121
- background-color: #E83030;
122
- color: white;
123
- }
124
- .btn_red:hover {
125
- background-color: #E63131;
126
- color: white!important;
127
- }
128
- .btn_white {
129
- background-color: #F7F7F7;
130
- color: #4F4F4F;
131
- }
132
- .btn_white:hover {
133
- background-color: #F4F4F4;
134
- color: #4F4F4F!important;
135
- }
136
- .btn_white:active {
137
- border: 1px solid #C1C1C1;
138
- box-shadow: inset 0 0 8px 2px #C1C1C1;
139
- }
140
- /*-[ Video Shortcode ]-------------------------*/
141
- .textwidget .youtube-video, .textwidget .vimeo-video, .textwidget .googlemaps { margin: 0 }
142
- .youtube-video, .vimeo-video {
143
- margin: 10px 0 10px 0;
144
- width: 100%;
145
- }
146
- /*-[ Google Maps ]-----------------------------*/
147
- .googlemaps { margin: 5px 15px 10px 0 }
148
- /*-[ Columns ]---------------------------------*/
149
- .one_half { width: 48% }
150
- .one_third { width: 30.66% }
151
- .two_third { width: 65.33% }
152
- .one_fourth { width: 22% }
153
- .three_fourth { width: 74% }
154
- .one_fifth { width: 16.8% }
155
- .two_fifth { width: 37.6% }
156
- .three_fifth { width: 58.4% }
157
- .four_fifth { width: 67.2% }
158
- .one_sixth { width: 13.33% }
159
- .five_sixth { width: 82.67% }
160
- .one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth, .three_fifth, .four_fifth, .one_sixth, .five_sixth {
161
- position: relative;
162
- margin-right: 4%;
163
- margin-bottom: 15px;
164
- float: left;
165
- }
166
- .column-last {
167
- margin-right: 0!important;
168
- clear: right;
169
- }
170
- /*-[ Tabs ]------------------------------------*/
171
- .tab_widget {
172
- display: block;
173
- position: relative;
174
- margin: 0 0 20px 0;
175
- }
176
- .tab_widget ul.wps_tabs {
177
- display: block;
178
- position: relative;
179
- list-style: none;
180
- height: 40px;
181
- border-bottom: 1px solid #DDD;
182
- margin: 0;
183
- padding: 0;
184
- }
185
- .tab_widget ul.wps_tabs li {
186
- float: left;
187
- margin: 0;
188
- padding: 0;
189
- height: 39px;
190
- line-height: 39px;
191
- border: 1px solid #DDD;
192
- border-left: none;
193
- margin-bottom: -1px;
194
- overflow: hidden;
195
- position: relative;
196
- background-image: linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
197
- background-image: -ms-linear-gradient(bottom, rgb(230,230,230) 9%, rgb(238,238,238) 55%);
198
- 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)) );
199
- }
200
- .tab_widget ul.wps_tabs li:first-child { border-left: 1px solid #DDD }
201
- .tab_widget ul.wps_tabs li a {
202
- text-decoration: none;
203
- color: #888!important;
204
- font-size: 12px;
205
- display: block;
206
- padding: 0 10px;
207
- outline: none;
208
- font-weight: bold;
209
- text-shadow: 1px 1px 1px #FFF;
210
- border: none;
211
- border-left: 1px solid #F9F9F9;
212
- }
213
- .tab_widget ul.wps_tabs li:first-child a { border-left: none }
214
- .tab_widget ul.wps_tabs li a:hover { background: none }
215
- .tab_widget ul.wps_tabs li.active, .tab_widget ul.wps_tabs li.active a:hover {
216
- background: #FFF;
217
- border-bottom: 1px solid #FFF;
218
- }
219
- .tab_widget ul.wps_tabs li.active { border-top: 1px solid #DDD }
220
- .tab_widget ul.wps_tabs li.active a { color: #777 }
221
- .tab_widget .tab_container {
222
- display: block;
223
- border-top: none;
224
- overflow: hidden;
225
- position: relative;
226
- clear: both;
227
- background: #FFF;
228
- border: 1px solid #DDD;
229
- border-top: none;
230
- }
231
- .tab_widget .tab_content {
232
- display: block;
233
- position: relative;
234
- padding: 15px;
235
- }
236
- /*-[ Toggle ]-----------------------*/
237
- .toggle {
238
- display: block;
239
- position: relative;
240
- margin: 0 0 20px 0;
241
- }
242
- .toggle .wps_togglet, .toggle .toggleta {
243
- display: block;
244
- position: relative;
245
- min-height: 36px;
246
- padding: 0 12px;
247
- background: #EEE;
248
- border: 1px solid #DDD;
249
- cursor: pointer;
250
- margin: 0;
251
- }
252
- .toggle .wps_togglet span, .toggle .toggleta span {
253
- display: block;
254
- min-height: 36px;
255
- line-height: 36px;
256
- color: #888;
257
- text-shadow: 1px 1px 1px #FFF;
258
- padding-left: 20px;
259
- background: url("../images/toggle-down.png") no-repeat left;
260
- }
261
- .toggle .toggleta span { background: url("../images/toggle-up.png") no-repeat left }
262
- .toggle .togglec {
263
- display: block;
264
- position: relative;
265
- padding: 15px;
266
- background: #FFF;
267
- border: 1px solid #DDD;
268
- border-top: none;
269
- }
270
- /*-[ Dividers ]--------------------------------*/
271
- .divider {
272
- clear: both;
273
- display: block;
274
- padding-top: 20px;
275
- width: 100%;
276
- margin-bottom: 10px;
277
- text-align: right;
278
- padding-bottom: 5px;
279
- border-bottom: 5px solid #EEE;
280
- }
281
- .top-of-page {
282
- margin-bottom: 10px;
283
- text-align: right;
284
- padding-bottom: 5px;
285
- border-bottom: 5px solid #EEE;
286
- }
287
-
288
- @media screen and (max-width: 480px) {
289
- .one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth, .three_fifth, .four_fifth, .one_sixth, .five_sixth {
290
- width: 100%;
291
- margin-right: 0;
292
- }
293
- }
1
+ /**
2
+ * Plugin: WP Shortcode
3
+ * Author: MyThemeShop
4
+ */
5
+ /*-[ Notifications ]---------------------------*/
6
+ .message_box{margin:15px 0;padding:1em 1em;}
7
+ .message_box p{margin-bottom:0}
8
+ pre{overflow:auto;padding:15px;margin:15px 0;position:relative;background:#777;font-family:monospace;color:#FFF;box-sizing:border-box;}
9
+ .note{background:#FAF3D4;color:#A6A377;}
10
+ .announce{background:#d0e6f0;color:#7190a2;}
11
+ .success{border:1px solid #DEF1BF;background:#D8EBCE;color:#748F5D;}
12
+ .warning{border:1px solid #FFDBDB;background:#FDE2E2;color:#AC888A;}
13
+ /*-[ Buttons ]---------------------------------*/
14
+ .buttons{font-size:12px;text-decoration:none;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;margin:0 15px 15px 0;padding:12px 10px;overflow:hidden;display:inline-block;width:auto;}
15
+ .buttons span{float:none;overflow:hidden;}
16
+ a.buttons{color:#fff !important;text-decoration:none;padding:10px 20px;border-radius:3px;border:1px solid rgba(0, 0, 0, 0.1);text-transform:uppercase;font-weight:bold;}
17
+ a.buttons.left{margin-right:15px;margin-bottom:15px;float:left;}
18
+ a.buttons.right{margin-left:15px;margin-bottom:15px;margin-right:0;float:right;}
19
+ div.button-center{width:100%;text-align:center;}
20
+ a.buttons.center{clear:both;display:inline-block;float:none;width:auto;}
21
+ a.btn_white{color:#4F4F4F !important}
22
+ .btn_brown{background-color:#C5703F;color:white;}
23
+ .btn_brown:hover{background-color:#D1B593;color:white !important;}
24
+ .btn_blue{background-color:#A5B8DA;color:white;}
25
+ .btn_blue:hover{background-color:#9badcc;color:white !important;}
26
+ .btn_green{background-color:#6CB24C;color:white;}
27
+ .btn_green:hover{background-color:#5F9D43;color:white !important;}
28
+ .btn_yellow{background-color:#FFDA6B;color:#fff;}
29
+ .btn_yellow:hover{background-color:#FFD351;color:#fff !important;}
30
+ .btn_red{background-color:#E83030;color:white;}
31
+ .btn_red:hover{background-color:#E63131;color:white !important;}
32
+ .btn_white{background-color:#F7F7F7;color:#4F4F4F;}
33
+ .btn_white:hover{background-color:#F4F4F4;color:#4F4F4F !important;}
34
+ .btn_white:active{border:1px solid #C1C1C1;box-shadow:inset 0 0 8px 2px #C1C1C1;}
35
+ /*-[ Video Shortcode ]-------------------------*/
36
+ .textwidget .youtube-video, .textwidget .vimeo-video, .textwidget .googlemaps{margin:0}
37
+ .youtube-video, .vimeo-video{margin:10px 0 10px 0;width:100%;}
38
+ /*-[ Google Maps ]-----------------------------*/
39
+ .googlemaps{margin:5px 15px 10px 0}
40
+ /*-[ Columns ]---------------------------------*/
41
+ .one_half{width:48%}
42
+ .one_third{width:30.66%}
43
+ .two_third{width:65.33%}
44
+ .one_fourth{width:22%}
45
+ .three_fourth{width:74%}
46
+ .one_fifth{width:16.8%}
47
+ .two_fifth{width:37.6%}
48
+ .three_fifth{width:58.4%}
49
+ .four_fifth{width:67.2%}
50
+ .one_sixth{width:13.33%}
51
+ .five_sixth{width:82.67%}
52
+ .one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth, .three_fifth, .four_fifth, .one_sixth, .five_sixth{position:relative;margin-right:4%;margin-bottom:15px;float:left;}
53
+ .column-last{margin-right:0 !important;clear:right;}
54
+ /*-[ Tabs ]------------------------------------*/
55
+ .tab_widget{display:block;position:relative;margin:0 0 20px 0;}
56
+ .tab_widget ul.wps_tabs{display:block;position:relative;list-style:none;height:40px;border-bottom:1px solid #DDD;margin:0;padding:0;}
57
+ .tab_widget ul.wps_tabs li{float:left;margin:0;padding:0;height:39px;line-height:39px;border:1px solid #DDD;border-left:none;margin-bottom:-1px;overflow:hidden;position:relative;background-image:linear-gradient(bottom, rgb(230, 230, 230) 9%, rgb(238, 238, 238) 55%);background-image:-ms-linear-gradient(bottom, rgb(230, 230, 230) 9%, rgb(238, 238, 238) 55%);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)));}
58
+ .tab_widget ul.wps_tabs li:first-child{border-left:1px solid #DDD}
59
+ .tab_widget ul.wps_tabs li a{text-decoration:none;color:#888 !important;font-size:12px;display:block;padding:0 10px;outline:none;font-weight:bold;text-shadow:1px 1px 1px #FFF;border:none;border-left:1px solid #F9F9F9;}
60
+ .tab_widget ul.wps_tabs li:first-child a{border-left:none}
61
+ .tab_widget ul.wps_tabs li a:hover{background:none}
62
+ .tab_widget ul.wps_tabs li.active, .tab_widget ul.wps_tabs li.active a:hover{background:#FFF;border-bottom:1px solid #FFF;}
63
+ .tab_widget ul.wps_tabs li.active{border-top:1px solid #DDD}
64
+ .tab_widget ul.wps_tabs li.active a{color:#777}
65
+ .tab_widget .tab_container{display:block;border-top:none;overflow:hidden;position:relative;clear:both;background:#FFF;border:1px solid #DDD;border-top:none;}
66
+ .tab_widget .tab_content{display:block;position:relative;padding:15px;}
67
+ /*-[ Toggle ]-----------------------*/
68
+ .toggle{display:block;position:relative;margin:0 0 20px 0;}
69
+ .toggle .wps_togglet, .toggle .toggleta{display:block;position:relative;min-height:36px;padding:0 12px;background:#EEE;border:1px solid #DDD;cursor:pointer;margin:0;}
70
+ .toggle .wps_togglet span, .toggle .toggleta span{display:block;min-height:36px;line-height:36px;color:#888;text-shadow:1px 1px 1px #FFF;padding-left:20px;background:url("../images/toggle-down.png") no-repeat left;}
71
+ .toggle .toggleta span{background:url("../images/toggle-up.png") no-repeat left}
72
+ .toggle .togglec{display:block;position:relative;padding:15px;background:#FFF;border:1px solid #DDD;border-top:none;}
73
+ /*-[ Dividers ]--------------------------------*/
74
+ .divider{clear:both;display:block;padding-top:20px;width:100%;margin-bottom:10px;text-align:right;padding-bottom:5px;border-bottom:5px solid #EEE;}
75
+ .top-of-page{margin-bottom:10px;text-align:right;padding-bottom:5px;border-bottom:5px solid #EEE;}
76
+ @media screen and (max-width:480px){
77
+ .one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth, .three_fifth, .four_fifth, .one_sixth, .five_sixth{width:100%;margin-right:0;}
78
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/admin.js CHANGED
@@ -1,13 +1,13 @@
1
- jQuery(document).on('click', '.mts-notice-dismiss', function(e){
2
- e.preventDefault();
3
- jQuery(this).parent().remove();
4
- jQuery.ajax({
5
- type: "POST",
6
- url: ajaxurl,
7
- data: {
8
- action: 'mts_dismiss_plugin_notice',
9
- dismiss: jQuery(this).data('ignore')
10
- }
11
- });
12
- return false;
13
  });
1
+ jQuery(document).on('click', '.mts-notice-dismiss', function(e){
2
+ e.preventDefault();
3
+ jQuery(this).parent().remove();
4
+ jQuery.ajax({
5
+ type: "POST",
6
+ url: ajaxurl,
7
+ data: {
8
+ action: 'mts_dismiss_plugin_notice',
9
+ dismiss: jQuery(this).data('ignore')
10
+ }
11
+ });
12
+ return false;
13
  });
js/jquery.tipsy.js CHANGED
@@ -1,258 +1,258 @@
1
- // tipsy, facebook style tooltips for jquery
2
- // version 1.0.0a
3
- // (c) 2008-2010 jason frame [jason@onehackoranother.com]
4
- // released under the MIT license
5
-
6
- (function($) {
7
-
8
- function maybeCall(thing, ctx) {
9
- return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
10
- };
11
-
12
- function isElementInDOM(ele) {
13
- while (ele = ele.parentNode) {
14
- if (ele == document) return true;
15
- }
16
- return false;
17
- };
18
-
19
- function Tipsy(element, options) {
20
- this.$element = $(element);
21
- this.options = options;
22
- this.enabled = true;
23
- this.fixTitle();
24
- };
25
-
26
- Tipsy.prototype = {
27
- show: function() {
28
- var title = this.getTitle();
29
- if (title && this.enabled) {
30
- var $tip = this.tip();
31
-
32
- $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
33
- $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
34
- $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
35
-
36
- var pos = $.extend({}, this.$element.offset(), {
37
- width: this.$element[0].offsetWidth,
38
- height: this.$element[0].offsetHeight
39
- });
40
-
41
- var actualWidth = $tip[0].offsetWidth,
42
- actualHeight = $tip[0].offsetHeight,
43
- gravity = maybeCall(this.options.gravity, this.$element[0]);
44
-
45
- var tp;
46
- switch (gravity.charAt(0)) {
47
- case 'n':
48
- tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
49
- break;
50
- case 's':
51
- tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
52
- break;
53
- case 'e':
54
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
55
- break;
56
- case 'w':
57
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
58
- break;
59
- }
60
-
61
- if (gravity.length == 2) {
62
- if (gravity.charAt(1) == 'w') {
63
- tp.left = pos.left + pos.width / 2 - 15;
64
- } else {
65
- tp.left = pos.left + pos.width / 2 - actualWidth + 15;
66
- }
67
- }
68
-
69
- $tip.css(tp).addClass('tipsy-' + gravity);
70
- $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
71
- if (this.options.className) {
72
- $tip.addClass(maybeCall(this.options.className, this.$element[0]));
73
- }
74
-
75
- if (this.options.fade) {
76
- $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
77
- } else {
78
- $tip.css({visibility: 'visible', opacity: this.options.opacity});
79
- }
80
- }
81
- },
82
-
83
- hide: function() {
84
- if (this.options.fade) {
85
- this.tip().stop().fadeOut(function() { $(this).remove(); });
86
- } else {
87
- this.tip().remove();
88
- }
89
- },
90
-
91
- fixTitle: function() {
92
- var $e = this.$element;
93
- if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {
94
- $e.attr('original-title', $e.attr('title') || '').removeAttr('title');
95
- }
96
- },
97
-
98
- getTitle: function() {
99
- var title, $e = this.$element, o = this.options;
100
- this.fixTitle();
101
- var title, o = this.options;
102
- if (typeof o.title == 'string') {
103
- title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
104
- } else if (typeof o.title == 'function') {
105
- title = o.title.call($e[0]);
106
- }
107
- title = ('' + title).replace(/(^\s*|\s*$)/, "");
108
- return title || o.fallback;
109
- },
110
-
111
- tip: function() {
112
- if (!this.$tip) {
113
- this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
114
- this.$tip.data('tipsy-pointee', this.$element[0]);
115
- }
116
- return this.$tip;
117
- },
118
-
119
- validate: function() {
120
- if (!this.$element[0].parentNode) {
121
- this.hide();
122
- this.$element = null;
123
- this.options = null;
124
- }
125
- },
126
-
127
- enable: function() { this.enabled = true; },
128
- disable: function() { this.enabled = false; },
129
- toggleEnabled: function() { this.enabled = !this.enabled; }
130
- };
131
-
132
- $.fn.tipsy = function(options) {
133
-
134
- if (options === true) {
135
- return this.data('tipsy');
136
- } else if (typeof options == 'string') {
137
- var tipsy = this.data('tipsy');
138
- if (tipsy) tipsy[options]();
139
- return this;
140
- }
141
-
142
- options = $.extend({}, $.fn.tipsy.defaults, options);
143
-
144
- function get(ele) {
145
- var tipsy = $.data(ele, 'tipsy');
146
- if (!tipsy) {
147
- tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
148
- $.data(ele, 'tipsy', tipsy);
149
- }
150
- return tipsy;
151
- }
152
-
153
- function enter() {
154
- var tipsy = get(this);
155
- tipsy.hoverState = 'in';
156
- if (options.delayIn == 0) {
157
- tipsy.show();
158
- } else {
159
- tipsy.fixTitle();
160
- setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
161
- }
162
- };
163
-
164
- function leave() {
165
- var tipsy = get(this);
166
- tipsy.hoverState = 'out';
167
- if (options.delayOut == 0) {
168
- tipsy.hide();
169
- } else {
170
- setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
171
- }
172
- };
173
-
174
- if (!options.live) this.each(function() { get(this); });
175
-
176
- if (options.trigger != 'manual') {
177
- var binder = options.live ? 'live' : 'bind',
178
- eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
179
- eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
180
- this[binder](eventIn, enter)[binder](eventOut, leave);
181
- }
182
-
183
- return this;
184
-
185
- };
186
-
187
- $.fn.tipsy.defaults = {
188
- className: null,
189
- delayIn: 0,
190
- delayOut: 0,
191
- fade: false,
192
- fallback: '',
193
- gravity: 'n',
194
- html: false,
195
- live: false,
196
- offset: 0,
197
- opacity: 0.8,
198
- title: 'title',
199
- trigger: 'hover'
200
- };
201
-
202
- $.fn.tipsy.revalidate = function() {
203
- $('.tipsy').each(function() {
204
- var pointee = $.data(this, 'tipsy-pointee');
205
- if (!pointee || !isElementInDOM(pointee)) {
206
- $(this).remove();
207
- }
208
- });
209
- };
210
-
211
- // Overwrite this method to provide options on a per-element basis.
212
- // For example, you could store the gravity in a 'tipsy-gravity' attribute:
213
- // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
214
- // (remember - do not modify 'options' in place!)
215
- $.fn.tipsy.elementOptions = function(ele, options) {
216
- return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
217
- };
218
-
219
- $.fn.tipsy.autoNS = function() {
220
- return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
221
- };
222
-
223
- $.fn.tipsy.autoWE = function() {
224
- return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
225
- };
226
-
227
- /**
228
- * yields a closure of the supplied parameters, producing a function that takes
229
- * no arguments and is suitable for use as an autogravity function like so:
230
- *
231
- * @param margin (int) - distance from the viewable region edge that an
232
- * element should be before setting its tooltip's gravity to be away
233
- * from that edge.
234
- * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
235
- * if there are no viewable region edges effecting the tooltip's
236
- * gravity. It will try to vary from this minimally, for example,
237
- * if 'sw' is preferred and an element is near the right viewable
238
- * region edge, but not the top edge, it will set the gravity for
239
- * that element's tooltip to be 'se', preserving the southern
240
- * component.
241
- */
242
- $.fn.tipsy.autoBounds = function(margin, prefer) {
243
- return function() {
244
- var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
245
- boundTop = $(document).scrollTop() + margin,
246
- boundLeft = $(document).scrollLeft() + margin,
247
- $this = $(this);
248
-
249
- if ($this.offset().top < boundTop) dir.ns = 'n';
250
- if ($this.offset().left < boundLeft) dir.ew = 'w';
251
- if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';
252
- if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';
253
-
254
- return dir.ns + (dir.ew ? dir.ew : '');
255
- }
256
- };
257
-
258
- })(jQuery);
1
+ // tipsy, facebook style tooltips for jquery
2
+ // version 1.0.0a
3
+ // (c) 2008-2010 jason frame [jason@onehackoranother.com]
4
+ // released under the MIT license
5
+
6
+ (function($) {
7
+
8
+ function maybeCall(thing, ctx) {
9
+ return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
10
+ };
11
+
12
+ function isElementInDOM(ele) {
13
+ while (ele = ele.parentNode) {
14
+ if (ele == document) return true;
15
+ }
16
+ return false;
17
+ };
18
+
19
+ function Tipsy(element, options) {
20
+ this.$element = $(element);
21
+ this.options = options;
22
+ this.enabled = true;
23
+ this.fixTitle();
24
+ };
25
+
26
+ Tipsy.prototype = {
27
+ show: function() {
28
+ var title = this.getTitle();
29
+ if (title && this.enabled) {
30
+ var $tip = this.tip();
31
+
32
+ $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
33
+ $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
34
+ $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
35
+
36
+ var pos = $.extend({}, this.$element.offset(), {
37
+ width: this.$element[0].offsetWidth,
38
+ height: this.$element[0].offsetHeight
39
+ });
40
+
41
+ var actualWidth = $tip[0].offsetWidth,
42
+ actualHeight = $tip[0].offsetHeight,
43
+ gravity = maybeCall(this.options.gravity, this.$element[0]);
44
+
45
+ var tp;
46
+ switch (gravity.charAt(0)) {
47
+ case 'n':
48
+ tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
49
+ break;
50
+ case 's':
51
+ tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
52
+ break;
53
+ case 'e':
54
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
55
+ break;
56
+ case 'w':
57
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
58
+ break;
59
+ }
60
+
61
+ if (gravity.length == 2) {
62
+ if (gravity.charAt(1) == 'w') {
63
+ tp.left = pos.left + pos.width / 2 - 15;
64
+ } else {
65
+ tp.left = pos.left + pos.width / 2 - actualWidth + 15;
66
+ }
67
+ }
68
+
69
+ $tip.css(tp).addClass('tipsy-' + gravity);
70
+ $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
71
+ if (this.options.className) {
72
+ $tip.addClass(maybeCall(this.options.className, this.$element[0]));
73
+ }
74
+
75
+ if (this.options.fade) {
76
+ $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
77
+ } else {
78
+ $tip.css({visibility: 'visible', opacity: this.options.opacity});
79
+ }
80
+ }
81
+ },
82
+
83
+ hide: function() {
84
+ if (this.options.fade) {
85
+ this.tip().stop().fadeOut(function() { $(this).remove(); });
86
+ } else {
87
+ this.tip().remove();
88
+ }
89
+ },
90
+
91
+ fixTitle: function() {
92
+ var $e = this.$element;
93
+ if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {
94
+ $e.attr('original-title', $e.attr('title') || '').removeAttr('title');
95
+ }
96
+ },
97
+
98
+ getTitle: function() {
99
+ var title, $e = this.$element, o = this.options;
100
+ this.fixTitle();
101
+ var title, o = this.options;
102
+ if (typeof o.title == 'string') {
103
+ title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
104
+ } else if (typeof o.title == 'function') {
105
+ title = o.title.call($e[0]);
106
+ }
107
+ title = ('' + title).replace(/(^\s*|\s*$)/, "");
108
+ return title || o.fallback;
109
+ },
110
+
111
+ tip: function() {
112
+ if (!this.$tip) {
113
+ this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
114
+ this.$tip.data('tipsy-pointee', this.$element[0]);
115
+ }
116
+ return this.$tip;
117
+ },
118
+
119
+ validate: function() {
120
+ if (!this.$element[0].parentNode) {
121
+ this.hide();
122
+ this.$element = null;
123
+ this.options = null;
124
+ }
125
+ },
126
+
127
+ enable: function() { this.enabled = true; },
128
+ disable: function() { this.enabled = false; },
129
+ toggleEnabled: function() { this.enabled = !this.enabled; }
130
+ };
131
+
132
+ $.fn.tipsy = function(options) {
133
+
134
+ if (options === true) {
135
+ return this.data('tipsy');
136
+ } else if (typeof options == 'string') {
137
+ var tipsy = this.data('tipsy');
138
+ if (tipsy) tipsy[options]();
139
+ return this;
140
+ }
141
+
142
+ options = $.extend({}, $.fn.tipsy.defaults, options);
143
+
144
+ function get(ele) {
145
+ var tipsy = $.data(ele, 'tipsy');
146
+ if (!tipsy) {
147
+ tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
148
+ $.data(ele, 'tipsy', tipsy);
149
+ }
150
+ return tipsy;
151
+ }
152
+
153
+ function enter() {
154
+ var tipsy = get(this);
155
+ tipsy.hoverState = 'in';
156
+ if (options.delayIn == 0) {
157
+ tipsy.show();
158
+ } else {
159
+ tipsy.fixTitle();
160
+ setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
161
+ }
162
+ };
163
+
164
+ function leave() {
165
+ var tipsy = get(this);
166
+ tipsy.hoverState = 'out';
167
+ if (options.delayOut == 0) {
168
+ tipsy.hide();
169
+ } else {
170
+ setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
171
+ }
172
+ };
173
+
174
+ if (!options.live) this.each(function() { get(this); });
175
+
176
+ if (options.trigger != 'manual') {
177
+ var binder = options.live ? 'live' : 'bind',
178
+ eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
179
+ eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
180
+ this[binder](eventIn, enter)[binder](eventOut, leave);
181
+ }
182
+
183
+ return this;
184
+
185
+ };
186
+
187
+ $.fn.tipsy.defaults = {
188
+ className: null,
189
+ delayIn: 0,
190
+ delayOut: 0,
191
+ fade: false,
192
+ fallback: '',
193
+ gravity: 'n',
194
+ html: false,
195
+ live: false,
196
+ offset: 0,
197
+ opacity: 0.8,
198
+ title: 'title',
199
+ trigger: 'hover'
200
+ };
201
+
202
+ $.fn.tipsy.revalidate = function() {
203
+ $('.tipsy').each(function() {
204
+ var pointee = $.data(this, 'tipsy-pointee');
205
+ if (!pointee || !isElementInDOM(pointee)) {
206
+ $(this).remove();
207
+ }
208
+ });
209
+ };
210
+
211
+ // Overwrite this method to provide options on a per-element basis.
212
+ // For example, you could store the gravity in a 'tipsy-gravity' attribute:
213
+ // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
214
+ // (remember - do not modify 'options' in place!)
215
+ $.fn.tipsy.elementOptions = function(ele, options) {
216
+ return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
217
+ };
218
+
219
+ $.fn.tipsy.autoNS = function() {
220
+ return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
221
+ };
222
+
223
+ $.fn.tipsy.autoWE = function() {
224
+ return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
225
+ };
226
+
227
+ /**
228
+ * yields a closure of the supplied parameters, producing a function that takes
229
+ * no arguments and is suitable for use as an autogravity function like so:
230
+ *
231
+ * @param margin (int) - distance from the viewable region edge that an
232
+ * element should be before setting its tooltip's gravity to be away
233
+ * from that edge.
234
+ * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
235
+ * if there are no viewable region edges effecting the tooltip's
236
+ * gravity. It will try to vary from this minimally, for example,
237
+ * if 'sw' is preferred and an element is near the right viewable
238
+ * region edge, but not the top edge, it will set the gravity for
239
+ * that element's tooltip to be 'se', preserving the southern
240
+ * component.
241
+ */
242
+ $.fn.tipsy.autoBounds = function(margin, prefer) {
243
+ return function() {
244
+ var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
245
+ boundTop = $(document).scrollTop() + margin,
246
+ boundLeft = $(document).scrollLeft() + margin,
247
+ $this = $(this);
248
+
249
+ if ($this.offset().top < boundTop) dir.ns = 'n';
250
+ if ($this.offset().left < boundLeft) dir.ew = 'w';
251
+ if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';
252
+ if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';
253
+
254
+ return dir.ns + (dir.ew ? dir.ew : '');
255
+ }
256
+ };
257
+
258
+ })(jQuery);
js/wp-shortcode.js CHANGED
@@ -1,38 +1,37 @@
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
-
29
- if ($('.wp_shortcodes_tooltip').length) {
30
- $('.wp_shortcodes_tooltip').each(function(index, el) {
31
- var $this = $(this),
32
- ttgravity = $this.data('gravity'),
33
- ttfade = Boolean($this.data('fade'));
34
- $this.tipsy({gravity: ttgravity, fade: ttfade});
35
- });
36
- }
37
-
38
- });
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
+
29
+ if ($('.wp_shortcodes_tooltip').length) {
30
+ $('.wp_shortcodes_tooltip').each(function(index, el) {
31
+ var $this = $(this),
32
+ ttgravity = $this.data('gravity'),
33
+ ttfade = Boolean($this.data('fade'));
34
+ $this.tipsy({gravity: ttgravity, fade: ttfade});
35
+ });
36
+ }
37
+ });
 
languages/default.po CHANGED
@@ -1,377 +1,377 @@
1
- # Copyright (C) 2017 WP Shortcode by MyThemeShop
2
- # This file is distributed under the same license as the WP Shortcode by MyThemeShop package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: WP Shortcode by MyThemeShop 1.4.3\n"
6
- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-shortcode\n"
7
- "POT-Creation-Date: 2017-02-07 15:55:48+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
-
15
- #: tinymce/editor_plugin.php:6
16
- msgid "You are not allowed to be here"
17
- msgstr ""
18
-
19
- #: tinymce/editor_plugin.php:31
20
- msgid "Select Shortcode"
21
- msgstr ""
22
-
23
- #: tinymce/editor_plugin.php:68
24
- msgid "Cancel"
25
- msgstr ""
26
-
27
- #: tinymce/editor_plugin.php:72
28
- msgid "Insert"
29
- msgstr ""
30
-
31
- #: tinymce/shortcodes.php:10
32
- msgid "Brown Button"
33
- msgstr ""
34
-
35
- #: tinymce/shortcodes.php:11 tinymce/shortcodes.php:22
36
- #: tinymce/shortcodes.php:33 tinymce/shortcodes.php:44
37
- #: tinymce/shortcodes.php:55 tinymce/shortcodes.php:66
38
- msgid "Button text"
39
- msgstr ""
40
-
41
- #: tinymce/shortcodes.php:12
42
- msgid ""
43
- "Inserts a brown button. Set target to <strong>_blank</strong> to open link "
44
- "in a new window."
45
- msgstr ""
46
-
47
- #: tinymce/shortcodes.php:21
48
- msgid "Blue Button"
49
- msgstr ""
50
-
51
- #: tinymce/shortcodes.php:23
52
- msgid ""
53
- "Inserts a blue button. Set target to <strong>_blank</strong> to open link in "
54
- "a new window."
55
- msgstr ""
56
-
57
- #: tinymce/shortcodes.php:32
58
- msgid "Green Button"
59
- msgstr ""
60
-
61
- #: tinymce/shortcodes.php:34
62
- msgid ""
63
- "Inserts a green button. Set target to <strong>_blank</strong> to open link "
64
- "in a new window."
65
- msgstr ""
66
-
67
- #: tinymce/shortcodes.php:43
68
- msgid "Yellow Button"
69
- msgstr ""
70
-
71
- #: tinymce/shortcodes.php:45
72
- msgid ""
73
- "Inserts a yellow button. Set target to <strong>_blank</strong> to open link "
74
- "in a new window."
75
- msgstr ""
76
-
77
- #: tinymce/shortcodes.php:54
78
- msgid "Red Button"
79
- msgstr ""
80
-
81
- #: tinymce/shortcodes.php:56
82
- msgid ""
83
- "Inserts a red button. Set target to <strong>_blank</strong> to open link in "
84
- "a new window."
85
- msgstr ""
86
-
87
- #: tinymce/shortcodes.php:65
88
- msgid "White Button"
89
- msgstr ""
90
-
91
- #: tinymce/shortcodes.php:67
92
- msgid ""
93
- "Inserts a white button. Set target to <strong>_blank</strong> to open link "
94
- "in a new window."
95
- msgstr ""
96
-
97
- #: tinymce/shortcodes.php:72
98
- msgid "Alert Note"
99
- msgstr ""
100
-
101
- #: tinymce/shortcodes.php:73
102
- msgid "Note text"
103
- msgstr ""
104
-
105
- #: tinymce/shortcodes.php:74
106
- msgid "Display a note."
107
- msgstr ""
108
-
109
- #: tinymce/shortcodes.php:79
110
- msgid "Alert Announce"
111
- msgstr ""
112
-
113
- #: tinymce/shortcodes.php:80
114
- msgid "Announce text"
115
- msgstr ""
116
-
117
- #: tinymce/shortcodes.php:81
118
- msgid "Display an announcement."
119
- msgstr ""
120
-
121
- #: tinymce/shortcodes.php:86
122
- msgid "Alert Success"
123
- msgstr ""
124
-
125
- #: tinymce/shortcodes.php:87
126
- msgid "Success text"
127
- msgstr ""
128
-
129
- #: tinymce/shortcodes.php:88
130
- msgid "Display a success message."
131
- msgstr ""
132
-
133
- #: tinymce/shortcodes.php:93
134
- msgid "Alert Warning"
135
- msgstr ""
136
-
137
- #: tinymce/shortcodes.php:94
138
- msgid "Warning text"
139
- msgstr ""
140
-
141
- #: tinymce/shortcodes.php:95
142
- msgid "Display warning or error message."
143
- msgstr ""
144
-
145
- #: tinymce/shortcodes.php:105
146
- msgid "YouTube Video"
147
- msgstr ""
148
-
149
- #: tinymce/shortcodes.php:107
150
- msgid "Embed a Youtube Video"
151
- msgstr ""
152
-
153
- #: tinymce/shortcodes.php:117
154
- msgid "Vimeo Video"
155
- msgstr ""
156
-
157
- #: tinymce/shortcodes.php:119
158
- msgid "Embed a Vimeo Video."
159
- msgstr ""
160
-
161
- #: tinymce/shortcodes.php:129
162
- msgid "Google Map"
163
- msgstr ""
164
-
165
- #: tinymce/shortcodes.php:131
166
- msgid "Embed a Google Map. Insert address or GPS location."
167
- msgstr ""
168
-
169
- #: tinymce/shortcodes.php:138
170
- msgid "Toggle"
171
- msgstr ""
172
-
173
- #: tinymce/shortcodes.php:139
174
- msgid "Insert Content Here"
175
- msgstr ""
176
-
177
- #: tinymce/shortcodes.php:141
178
- msgid "Content will be shown after clicking on the toggle title."
179
- msgstr ""
180
-
181
- #: tinymce/shortcodes.php:146
182
- msgid "Tabs"
183
- msgstr ""
184
-
185
- #: tinymce/shortcodes.php:147
186
- msgid ""
187
- "[tab title=&quot;Tab 1 Title&quot;]Insert tab 1 content here[/tab]\n"
188
- "[tab title=&quot;Tab 2 Title&quot;]Insert tab 2 content here[/tab]\n"
189
- "[tab title=&quot;Tab 3 Title&quot;]Insert tab 3 content here[/tab]"
190
- msgstr ""
191
-
192
- #: tinymce/shortcodes.php:149
193
- msgid "Display content in tabbed form."
194
- msgstr ""
195
-
196
- #: tinymce/shortcodes.php:155
197
- msgid "Simple horizontal divider."
198
- msgstr ""
199
-
200
- #: tinymce/shortcodes.php:161
201
- msgid "Divider with an anchor link to top of page."
202
- msgstr ""
203
-
204
- #: tinymce/shortcodes.php:166
205
- msgid "Clear"
206
- msgstr ""
207
-
208
- #: tinymce/shortcodes.php:168
209
- msgid ""
210
- "Clear shortcode can be used to clear an element of its neighbors, no "
211
- "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 tinymce/shortcodes.php:185
219
- #: tinymce/shortcodes.php:193 tinymce/shortcodes.php:201
220
- #: tinymce/shortcodes.php:209 tinymce/shortcodes.php:217
221
- #: tinymce/shortcodes.php:225 tinymce/shortcodes.php:233
222
- #: tinymce/shortcodes.php:241 tinymce/shortcodes.php:249
223
- #: tinymce/shortcodes.php:257 tinymce/shortcodes.php:265
224
- #: tinymce/shortcodes.php:273 tinymce/shortcodes.php:281
225
- #: tinymce/shortcodes.php:289 tinymce/shortcodes.php:297
226
- #: tinymce/shortcodes.php:305 tinymce/shortcodes.php:313
227
- #: tinymce/shortcodes.php:321 tinymce/shortcodes.php:329
228
- #: tinymce/shortcodes.php:337 tinymce/shortcodes.php:345
229
- msgid "Column content"
230
- msgstr ""
231
-
232
- #: tinymce/shortcodes.php:179 tinymce/shortcodes.php:187
233
- #: tinymce/shortcodes.php:195 tinymce/shortcodes.php:203
234
- #: tinymce/shortcodes.php:211 tinymce/shortcodes.php:219
235
- #: tinymce/shortcodes.php:227 tinymce/shortcodes.php:235
236
- #: tinymce/shortcodes.php:243 tinymce/shortcodes.php:251
237
- #: tinymce/shortcodes.php:259 tinymce/shortcodes.php:267
238
- #: tinymce/shortcodes.php:275 tinymce/shortcodes.php:283
239
- #: tinymce/shortcodes.php:291 tinymce/shortcodes.php:299
240
- #: tinymce/shortcodes.php:307 tinymce/shortcodes.php:315
241
- #: tinymce/shortcodes.php:323 tinymce/shortcodes.php:331
242
- #: tinymce/shortcodes.php:339 tinymce/shortcodes.php:347
243
- msgid ""
244
- "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. "
245
- "<br /><strong>One Third + One Third + One Third (Last)</strong>"
246
- msgstr ""
247
-
248
- #: tinymce/shortcodes.php:184
249
- msgid "One Third (Last)"
250
- msgstr ""
251
-
252
- #: tinymce/shortcodes.php:192
253
- msgid "Two Third"
254
- msgstr ""
255
-
256
- #: tinymce/shortcodes.php:200
257
- msgid "Two Third (Last)"
258
- msgstr ""
259
-
260
- #: tinymce/shortcodes.php:208
261
- msgid "One Half"
262
- msgstr ""
263
-
264
- #: tinymce/shortcodes.php:216
265
- msgid "One Half (Last)"
266
- msgstr ""
267
-
268
- #: tinymce/shortcodes.php:224
269
- msgid "One Fourth"
270
- msgstr ""
271
-
272
- #: tinymce/shortcodes.php:232
273
- msgid "One Fourth (Last)"
274
- msgstr ""
275
-
276
- #: tinymce/shortcodes.php:240
277
- msgid "Three Fourth"
278
- msgstr ""
279
-
280
- #: tinymce/shortcodes.php:248
281
- msgid "Three Fourth (Last)"
282
- msgstr ""
283
-
284
- #: tinymce/shortcodes.php:256
285
- msgid "One Fifth"
286
- msgstr ""
287
-
288
- #: tinymce/shortcodes.php:264
289
- msgid "One Fifth (Last)"
290
- msgstr ""
291
-
292
- #: tinymce/shortcodes.php:272
293
- msgid "Two Fifth"
294
- msgstr ""
295
-
296
- #: tinymce/shortcodes.php:280
297
- msgid "Two Fifth (Last)"
298
- msgstr ""
299
-
300
- #: tinymce/shortcodes.php:288
301
- msgid "Three Fifth"
302
- msgstr ""
303
-
304
- #: tinymce/shortcodes.php:296
305
- msgid "Three Fifth (Last)"
306
- msgstr ""
307
-
308
- #: tinymce/shortcodes.php:304
309
- msgid "Four Fifth"
310
- msgstr ""
311
-
312
- #: tinymce/shortcodes.php:312
313
- msgid "Four Fifth (Last)"
314
- msgstr ""
315
-
316
- #: tinymce/shortcodes.php:320
317
- msgid "One Sixth"
318
- msgstr ""
319
-
320
- #: tinymce/shortcodes.php:328
321
- msgid "One Sixth (Last)"
322
- msgstr ""
323
-
324
- #: tinymce/shortcodes.php:336
325
- msgid "Five Sixth"
326
- msgstr ""
327
-
328
- #: tinymce/shortcodes.php:344
329
- msgid "Five Sixth (Last)"
330
- msgstr ""
331
-
332
- #: tinymce/shortcodes.php:356
333
- msgid "Tooltip"
334
- msgstr ""
335
-
336
- #: tinymce/shortcodes.php:357
337
- msgid "Trigger text"
338
- msgstr ""
339
-
340
- #: tinymce/shortcodes.php:358
341
- msgid ""
342
- "Add a tooltip that appears on hover. Possible values for direction(Cardinal) "
343
- "of bubble: nw | n | ne | w | e | sw | s | se"
344
- msgstr ""
345
-
346
- #: wp-shortcode.php:358
347
- msgid "Untitled"
348
- msgstr ""
349
-
350
- #: wp-shortcode.php:392
351
- msgid "Toggle Title"
352
- msgstr ""
353
-
354
- #: wp-shortcode.php:408
355
- msgid "Back to Top"
356
- msgstr ""
357
-
358
- #. Plugin Name of the plugin/theme
359
- msgid "WP Shortcode by MyThemeShop"
360
- msgstr ""
361
-
362
- #. #-#-#-#-# default.po (WP Shortcode by MyThemeShop 1.4.3) #-#-#-#-#
363
- #. Plugin URI of the plugin/theme
364
- #. #-#-#-#-# default.po (WP Shortcode by MyThemeShop 1.4.3) #-#-#-#-#
365
- #. Author URI of the plugin/theme
366
- msgid "http://mythemeshop.com/"
367
- msgstr ""
368
-
369
- #. Description of the plugin/theme
370
- msgid ""
371
- "With the vast array of shortcodes, you can quickly and easily build content "
372
- "for your posts and pages and turbocharge your blogging experience."
373
- msgstr ""
374
-
375
- #. Author of the plugin/theme
376
- msgid "MyThemeShop"
377
- msgstr ""
1
+ # Copyright (C) 2017 WP Shortcode by MyThemeShop
2
+ # This file is distributed under the same license as the WP Shortcode by MyThemeShop package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: WP Shortcode by MyThemeShop 1.4.3\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-shortcode\n"
7
+ "POT-Creation-Date: 2017-02-07 15:55:48+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: tinymce/editor_plugin.php:6
16
+ msgid "You are not allowed to be here"
17
+ msgstr ""
18
+
19
+ #: tinymce/editor_plugin.php:31
20
+ msgid "Select Shortcode"
21
+ msgstr ""
22
+
23
+ #: tinymce/editor_plugin.php:68
24
+ msgid "Cancel"
25
+ msgstr ""
26
+
27
+ #: tinymce/editor_plugin.php:72
28
+ msgid "Insert"
29
+ msgstr ""
30
+
31
+ #: tinymce/shortcodes.php:10
32
+ msgid "Brown Button"
33
+ msgstr ""
34
+
35
+ #: tinymce/shortcodes.php:11 tinymce/shortcodes.php:22
36
+ #: tinymce/shortcodes.php:33 tinymce/shortcodes.php:44
37
+ #: tinymce/shortcodes.php:55 tinymce/shortcodes.php:66
38
+ msgid "Button text"
39
+ msgstr ""
40
+
41
+ #: tinymce/shortcodes.php:12
42
+ msgid ""
43
+ "Inserts a brown button. Set target to <strong>_blank</strong> to open link "
44
+ "in a new window."
45
+ msgstr ""
46
+
47
+ #: tinymce/shortcodes.php:21
48
+ msgid "Blue Button"
49
+ msgstr ""
50
+
51
+ #: tinymce/shortcodes.php:23
52
+ msgid ""
53
+ "Inserts a blue button. Set target to <strong>_blank</strong> to open link in "
54
+ "a new window."
55
+ msgstr ""
56
+
57
+ #: tinymce/shortcodes.php:32
58
+ msgid "Green Button"
59
+ msgstr ""
60
+
61
+ #: tinymce/shortcodes.php:34
62
+ msgid ""
63
+ "Inserts a green button. Set target to <strong>_blank</strong> to open link "
64
+ "in a new window."
65
+ msgstr ""
66
+
67
+ #: tinymce/shortcodes.php:43
68
+ msgid "Yellow Button"
69
+ msgstr ""
70
+
71
+ #: tinymce/shortcodes.php:45
72
+ msgid ""
73
+ "Inserts a yellow button. Set target to <strong>_blank</strong> to open link "
74
+ "in a new window."
75
+ msgstr ""
76
+
77
+ #: tinymce/shortcodes.php:54
78
+ msgid "Red Button"
79
+ msgstr ""
80
+
81
+ #: tinymce/shortcodes.php:56
82
+ msgid ""
83
+ "Inserts a red button. Set target to <strong>_blank</strong> to open link in "
84
+ "a new window."
85
+ msgstr ""
86
+
87
+ #: tinymce/shortcodes.php:65
88
+ msgid "White Button"
89
+ msgstr ""
90
+
91
+ #: tinymce/shortcodes.php:67
92
+ msgid ""
93
+ "Inserts a white button. Set target to <strong>_blank</strong> to open link "
94
+ "in a new window."
95
+ msgstr ""
96
+
97
+ #: tinymce/shortcodes.php:72
98
+ msgid "Alert Note"
99
+ msgstr ""
100
+
101
+ #: tinymce/shortcodes.php:73
102
+ msgid "Note text"
103
+ msgstr ""
104
+
105
+ #: tinymce/shortcodes.php:74
106
+ msgid "Display a note."
107
+ msgstr ""
108
+
109
+ #: tinymce/shortcodes.php:79
110
+ msgid "Alert Announce"
111
+ msgstr ""
112
+
113
+ #: tinymce/shortcodes.php:80
114
+ msgid "Announce text"
115
+ msgstr ""
116
+
117
+ #: tinymce/shortcodes.php:81
118
+ msgid "Display an announcement."
119
+ msgstr ""
120
+
121
+ #: tinymce/shortcodes.php:86
122
+ msgid "Alert Success"
123
+ msgstr ""
124
+
125
+ #: tinymce/shortcodes.php:87
126
+ msgid "Success text"
127
+ msgstr ""
128
+
129
+ #: tinymce/shortcodes.php:88
130
+ msgid "Display a success message."
131
+ msgstr ""
132
+
133
+ #: tinymce/shortcodes.php:93
134
+ msgid "Alert Warning"
135
+ msgstr ""
136
+
137
+ #: tinymce/shortcodes.php:94
138
+ msgid "Warning text"
139
+ msgstr ""
140
+
141
+ #: tinymce/shortcodes.php:95
142
+ msgid "Display warning or error message."
143
+ msgstr ""
144
+
145
+ #: tinymce/shortcodes.php:105
146
+ msgid "YouTube Video"
147
+ msgstr ""
148
+
149
+ #: tinymce/shortcodes.php:107
150
+ msgid "Embed a Youtube Video"
151
+ msgstr ""
152
+
153
+ #: tinymce/shortcodes.php:117
154
+ msgid "Vimeo Video"
155
+ msgstr ""
156
+
157
+ #: tinymce/shortcodes.php:119
158
+ msgid "Embed a Vimeo Video."
159
+ msgstr ""
160
+
161
+ #: tinymce/shortcodes.php:129
162
+ msgid "Google Map"
163
+ msgstr ""
164
+
165
+ #: tinymce/shortcodes.php:131
166
+ msgid "Embed a Google Map. Insert address or GPS location."
167
+ msgstr ""
168
+
169
+ #: tinymce/shortcodes.php:138
170
+ msgid "Toggle"
171
+ msgstr ""
172
+
173
+ #: tinymce/shortcodes.php:139
174
+ msgid "Insert Content Here"
175
+ msgstr ""
176
+
177
+ #: tinymce/shortcodes.php:141
178
+ msgid "Content will be shown after clicking on the toggle title."
179
+ msgstr ""
180
+
181
+ #: tinymce/shortcodes.php:146
182
+ msgid "Tabs"
183
+ msgstr ""
184
+
185
+ #: tinymce/shortcodes.php:147
186
+ msgid ""
187
+ "[tab title=&quot;Tab 1 Title&quot;]Insert tab 1 content here[/tab]\n"
188
+ "[tab title=&quot;Tab 2 Title&quot;]Insert tab 2 content here[/tab]\n"
189
+ "[tab title=&quot;Tab 3 Title&quot;]Insert tab 3 content here[/tab]"
190
+ msgstr ""
191
+
192
+ #: tinymce/shortcodes.php:149
193
+ msgid "Display content in tabbed form."
194
+ msgstr ""
195
+
196
+ #: tinymce/shortcodes.php:155
197
+ msgid "Simple horizontal divider."
198
+ msgstr ""
199
+
200
+ #: tinymce/shortcodes.php:161
201
+ msgid "Divider with an anchor link to top of page."
202
+ msgstr ""
203
+
204
+ #: tinymce/shortcodes.php:166
205
+ msgid "Clear"
206
+ msgstr ""
207
+
208
+ #: tinymce/shortcodes.php:168
209
+ msgid ""
210
+ "Clear shortcode can be used to clear an element of its neighbors, no "
211
+ "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 tinymce/shortcodes.php:185
219
+ #: tinymce/shortcodes.php:193 tinymce/shortcodes.php:201
220
+ #: tinymce/shortcodes.php:209 tinymce/shortcodes.php:217
221
+ #: tinymce/shortcodes.php:225 tinymce/shortcodes.php:233
222
+ #: tinymce/shortcodes.php:241 tinymce/shortcodes.php:249
223
+ #: tinymce/shortcodes.php:257 tinymce/shortcodes.php:265
224
+ #: tinymce/shortcodes.php:273 tinymce/shortcodes.php:281
225
+ #: tinymce/shortcodes.php:289 tinymce/shortcodes.php:297
226
+ #: tinymce/shortcodes.php:305 tinymce/shortcodes.php:313
227
+ #: tinymce/shortcodes.php:321 tinymce/shortcodes.php:329
228
+ #: tinymce/shortcodes.php:337 tinymce/shortcodes.php:345
229
+ msgid "Column content"
230
+ msgstr ""
231
+
232
+ #: tinymce/shortcodes.php:179 tinymce/shortcodes.php:187
233
+ #: tinymce/shortcodes.php:195 tinymce/shortcodes.php:203
234
+ #: tinymce/shortcodes.php:211 tinymce/shortcodes.php:219
235
+ #: tinymce/shortcodes.php:227 tinymce/shortcodes.php:235
236
+ #: tinymce/shortcodes.php:243 tinymce/shortcodes.php:251
237
+ #: tinymce/shortcodes.php:259 tinymce/shortcodes.php:267
238
+ #: tinymce/shortcodes.php:275 tinymce/shortcodes.php:283
239
+ #: tinymce/shortcodes.php:291 tinymce/shortcodes.php:299
240
+ #: tinymce/shortcodes.php:307 tinymce/shortcodes.php:315
241
+ #: tinymce/shortcodes.php:323 tinymce/shortcodes.php:331
242
+ #: tinymce/shortcodes.php:339 tinymce/shortcodes.php:347
243
+ msgid ""
244
+ "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. "
245
+ "<br /><strong>One Third + One Third + One Third (Last)</strong>"
246
+ msgstr ""
247
+
248
+ #: tinymce/shortcodes.php:184
249
+ msgid "One Third (Last)"
250
+ msgstr ""
251
+
252
+ #: tinymce/shortcodes.php:192
253
+ msgid "Two Third"
254
+ msgstr ""
255
+
256
+ #: tinymce/shortcodes.php:200
257
+ msgid "Two Third (Last)"
258
+ msgstr ""
259
+
260
+ #: tinymce/shortcodes.php:208
261
+ msgid "One Half"
262
+ msgstr ""
263
+
264
+ #: tinymce/shortcodes.php:216
265
+ msgid "One Half (Last)"
266
+ msgstr ""
267
+
268
+ #: tinymce/shortcodes.php:224
269
+ msgid "One Fourth"
270
+ msgstr ""
271
+
272
+ #: tinymce/shortcodes.php:232
273
+ msgid "One Fourth (Last)"
274
+ msgstr ""
275
+
276
+ #: tinymce/shortcodes.php:240
277
+ msgid "Three Fourth"
278
+ msgstr ""
279
+
280
+ #: tinymce/shortcodes.php:248
281
+ msgid "Three Fourth (Last)"
282
+ msgstr ""
283
+
284
+ #: tinymce/shortcodes.php:256
285
+ msgid "One Fifth"
286
+ msgstr ""
287
+
288
+ #: tinymce/shortcodes.php:264
289
+ msgid "One Fifth (Last)"
290
+ msgstr ""
291
+
292
+ #: tinymce/shortcodes.php:272
293
+ msgid "Two Fifth"
294
+ msgstr ""
295
+
296
+ #: tinymce/shortcodes.php:280
297
+ msgid "Two Fifth (Last)"
298
+ msgstr ""
299
+
300
+ #: tinymce/shortcodes.php:288
301
+ msgid "Three Fifth"
302
+ msgstr ""
303
+
304
+ #: tinymce/shortcodes.php:296
305
+ msgid "Three Fifth (Last)"
306
+ msgstr ""
307
+
308
+ #: tinymce/shortcodes.php:304
309
+ msgid "Four Fifth"
310
+ msgstr ""
311
+
312
+ #: tinymce/shortcodes.php:312
313
+ msgid "Four Fifth (Last)"
314
+ msgstr ""
315
+
316
+ #: tinymce/shortcodes.php:320
317
+ msgid "One Sixth"
318
+ msgstr ""
319
+
320
+ #: tinymce/shortcodes.php:328
321
+ msgid "One Sixth (Last)"
322
+ msgstr ""
323
+
324
+ #: tinymce/shortcodes.php:336
325
+ msgid "Five Sixth"
326
+ msgstr ""
327
+
328
+ #: tinymce/shortcodes.php:344
329
+ msgid "Five Sixth (Last)"
330
+ msgstr ""
331
+
332
+ #: tinymce/shortcodes.php:356
333
+ msgid "Tooltip"
334
+ msgstr ""
335
+
336
+ #: tinymce/shortcodes.php:357
337
+ msgid "Trigger text"
338
+ msgstr ""
339
+
340
+ #: tinymce/shortcodes.php:358
341
+ msgid ""
342
+ "Add a tooltip that appears on hover. Possible values for direction(Cardinal) "
343
+ "of bubble: nw | n | ne | w | e | sw | s | se"
344
+ msgstr ""
345
+
346
+ #: wp-shortcode.php:358
347
+ msgid "Untitled"
348
+ msgstr ""
349
+
350
+ #: wp-shortcode.php:392
351
+ msgid "Toggle Title"
352
+ msgstr ""
353
+
354
+ #: wp-shortcode.php:408
355
+ msgid "Back to Top"
356
+ msgstr ""
357
+
358
+ #. Plugin Name of the plugin/theme
359
+ msgid "WP Shortcode by MyThemeShop"
360
+ msgstr ""
361
+
362
+ #. #-#-#-#-# default.po (WP Shortcode by MyThemeShop 1.4.3) #-#-#-#-#
363
+ #. Plugin URI of the plugin/theme
364
+ #. #-#-#-#-# default.po (WP Shortcode by MyThemeShop 1.4.3) #-#-#-#-#
365
+ #. Author URI of the plugin/theme
366
+ msgid "http://mythemeshop.com/"
367
+ msgstr ""
368
+
369
+ #. Description of the plugin/theme
370
+ msgid ""
371
+ "With the vast array of shortcodes, you can quickly and easily build content "
372
+ "for your posts and pages and turbocharge your blogging experience."
373
+ msgstr ""
374
+
375
+ #. Author of the plugin/theme
376
+ msgid "MyThemeShop"
377
+ msgstr ""
readme.txt CHANGED
@@ -1,136 +1,139 @@
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, vimeo shortcode, alert shortcode, notification shortcode, column shortcodes
5
- Requires at least: 3.0.1
6
- Tested up to: 5.0.1
7
- Stable tag: 1.4.15
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 shortcodes. 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 realise 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
- = Support =
27
-
28
- All support for this plugin is provided through our forums. If you have not registered yet, you can do so here for **FREE** <br>
29
- <a href=“https://mythemeshop.com/#signup”>https://mythemeshop.com/#signup</a>
30
-
31
- If after checking our Free WordPress video tutorials here:<br>
32
- <a href=“https://mythemeshop.com/wordpress-101/”>https://mythemeshop.com/wordpress-101/</a><br>
33
- &<br>
34
- <a href=“https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/“>https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/</a><br>
35
- <br>
36
- you are still stuck, please feel free to open a new thread, and a member of our support team will be happy to help.<br>
37
-
38
- Support link:<br>
39
- <a href=“https://community.mythemeshop.com/forum/11-free-plugin-support/”>https://community.mythemeshop.com/forum/11-free-plugin-support/</a><br>
40
- <br>
41
-
42
- == Installation ==
43
-
44
- This section describes how to install the plugin and get it working.
45
-
46
- 1. Upload the `wp-shortcode` folder to the to the `/wp-content/plugins/` directory
47
- 2. Activate the plugin through the 'Plugins' menu in WordPress
48
- 3. You can see '+' button on post editor, using this button, you can add shortcodes in your posts.
49
-
50
- == Frequently Asked Questions ==
51
-
52
- = Shortcodes + button is not working =
53
-
54
- 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.
55
-
56
- == Screenshots ==
57
-
58
- 1. Single Shortcode Configuration
59
- 2. List of all plugins.
60
- 3. Alerts and Buttons
61
- 4. Tabs and Toggles
62
- 5. Videos and Dividers
63
- 6. Columns Shortcodes
64
- 7. Google Maps Shortcode
65
-
66
- == Changelog ==
67
-
68
- = 1.4.15 =
69
- * Made compatible with WP 5.0+.
70
-
71
- = 1.4.14 =
72
- * Updated admin notices
73
-
74
- = 1.4.13 =
75
- * Changed admin notices
76
-
77
- = 1.4.12 =
78
- * Fixed responsive column issue.
79
-
80
- = 1.4.11 =
81
- * Fixed broken pages.
82
-
83
- = 1.4.10 =
84
- * Enqueued required scripts only on the pages where the plugin's shortcodes are used.
85
-
86
- = 1.4.9 =
87
- * Fixed shortcodes filter
88
-
89
- = 1.4.8 =
90
- * Added filter to extend list of shortcodes
91
- * Minor fixes
92
-
93
- = 1.4.7 =
94
- * Removed unused code
95
-
96
- = 1.4.6 =
97
- * Fixed styling and escaping issues
98
-
99
- = 1.4.5 =
100
- * Fixed sanitize_html_class() functions
101
-
102
- = 1.4.4 =
103
- * Fixed XSS vulnerability (thanks to https://www.threatpress.com)
104
-
105
- = 1.4.3 =
106
- * Added shortcode attribute "rel" to buttons
107
- * Updated tabs shortcode to support more characters like emojis!
108
- * Fixed toggle shortcode styling bug on smaller screens
109
- * Fixed notices when no title is provided in tabs shortcode
110
-
111
- = 1.4.2 =
112
- * Changed text domain to 'wp-shortcode'
113
-
114
- = 1.4.1 =
115
- * Fixed embed video issue in half column
116
-
117
- = 1.4 =
118
- * Complete revamp of notification and button shortcode design.
119
- * Removed unnecessary images.
120
- * Optimized CSS code.
121
-
122
- = 1.3 =
123
- * Added Tooltip shortcode
124
- * Fixed tab titles issue
125
- * Made embed URLs protocol-relative
126
-
127
- = 1.2 =
128
- * Made compatible with (with TinyMCE 3 & 4).
129
- * Made translation-ready
130
- * Added "centre" position for buttons.
131
-
132
- = 1.1 =
133
- * Fixed small issue in button shortcode CSS.
134
-
135
- = 1.0 =
136
- * Official plugin release.
 
 
 
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, vimeo shortcode, alert shortcode, notification shortcode, column shortcodes
5
+ Requires at least: 4.5
6
+ Tested up to: 5.4
7
+ Stable tag: 1.4.16
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 shortcodes. 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 realise 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
+ = Support =
27
+
28
+ All support for this plugin is provided through our forums. If you have not registered yet, you can do so here for **FREE** <br>
29
+ <a href=“https://mythemeshop.com/#signup”>https://mythemeshop.com/#signup</a>
30
+
31
+ If after checking our Free WordPress video tutorials here:<br>
32
+ <a href=“https://mythemeshop.com/wordpress-101/”>https://mythemeshop.com/wordpress-101/</a><br>
33
+ &<br>
34
+ <a href=“https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/“>https://community.mythemeshop.com/tutorials/category/2-free-video-tutorials/</a><br>
35
+ <br>
36
+ you are still stuck, please feel free to open a new thread, and a member of our support team will be happy to help.<br>
37
+
38
+ Support link:<br>
39
+ <a href=“https://community.mythemeshop.com/forum/11-free-plugin-support/”>https://community.mythemeshop.com/forum/11-free-plugin-support/</a><br>
40
+ <br>
41
+
42
+ == Installation ==
43
+
44
+ This section describes how to install the plugin and get it working.
45
+
46
+ 1. Upload the `wp-shortcode` folder to the to the `/wp-content/plugins/` directory
47
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
48
+ 3. You can see '+' button on post editor, using this button, you can add shortcodes in your posts.
49
+
50
+ == Frequently Asked Questions ==
51
+
52
+ = Shortcodes + button is not working =
53
+
54
+ 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.
55
+
56
+ == Screenshots ==
57
+
58
+ 1. Single Shortcode Configuration
59
+ 2. List of all plugins.
60
+ 3. Alerts and Buttons
61
+ 4. Tabs and Toggles
62
+ 5. Videos and Dividers
63
+ 6. Columns Shortcodes
64
+ 7. Google Maps Shortcode
65
+
66
+ == Changelog ==
67
+
68
+ = 1.4.16 =
69
+ * Code Improvements.
70
+
71
+ = 1.4.15 =
72
+ * Made compatible with WP 5.0+.
73
+
74
+ = 1.4.14 =
75
+ * Updated admin notices
76
+
77
+ = 1.4.13 =
78
+ * Changed admin notices
79
+
80
+ = 1.4.12 =
81
+ * Fixed responsive column issue.
82
+
83
+ = 1.4.11 =
84
+ * Fixed broken pages.
85
+
86
+ = 1.4.10 =
87
+ * Enqueued required scripts only on the pages where the plugin's shortcodes are used.
88
+
89
+ = 1.4.9 =
90
+ * Fixed shortcodes filter
91
+
92
+ = 1.4.8 =
93
+ * Added filter to extend list of shortcodes
94
+ * Minor fixes
95
+
96
+ = 1.4.7 =
97
+ * Removed unused code
98
+
99
+ = 1.4.6 =
100
+ * Fixed styling and escaping issues
101
+
102
+ = 1.4.5 =
103
+ * Fixed sanitize_html_class() functions
104
+
105
+ = 1.4.4 =
106
+ * Fixed XSS vulnerability (thanks to https://www.threatpress.com)
107
+
108
+ = 1.4.3 =
109
+ * Added shortcode attribute "rel" to buttons
110
+ * Updated tabs shortcode to support more characters like emojis!
111
+ * Fixed toggle shortcode styling bug on smaller screens
112
+ * Fixed notices when no title is provided in tabs shortcode
113
+
114
+ = 1.4.2 =
115
+ * Changed text domain to 'wp-shortcode'
116
+
117
+ = 1.4.1 =
118
+ * Fixed embed video issue in half column
119
+
120
+ = 1.4 =
121
+ * Complete revamp of notification and button shortcode design.
122
+ * Removed unnecessary images.
123
+ * Optimized CSS code.
124
+
125
+ = 1.3 =
126
+ * Added Tooltip shortcode
127
+ * Fixed tab titles issue
128
+ * Made embed URLs protocol-relative
129
+
130
+ = 1.2 =
131
+ * Made compatible with (with TinyMCE 3 & 4).
132
+ * Made translation-ready
133
+ * Added "centre" position for buttons.
134
+
135
+ = 1.1 =
136
+ * Fixed small issue in button shortcode CSS.
137
+
138
+ = 1.0 =
139
+ * Official plugin release.
tinymce/editor_plugin.css CHANGED
@@ -1,8 +1,8 @@
1
- body#link { background: #fff; }
2
- #mnmshortcode_tag { width: 200px }
3
- #mnmshortcode_panel { margin-bottom: 8px }
4
- #mnmshortcode_panel table { width: 100%; font-size: 12px; }
5
- .mnmshortcode_description { color: #666; font-size: 12px; }
6
- .mnmshortcode_att_name { text-transform: capitalize }
7
- #mnmshortcode_panel input, #mnmshortcode_panel select, #mnmshortcode_panel textarea { width: 100%; padding: 4px 4px; font-size: 12px; font-family: 'Open Sans', sans-serif; }
8
  #mnmshortcode_panel textarea { height: 120px }
1
+ body#link { background: #fff; }
2
+ #mnmshortcode_tag { width: 200px }
3
+ #mnmshortcode_panel { margin-bottom: 8px }
4
+ #mnmshortcode_panel table { width: 100%; font-size: 12px; }
5
+ .mnmshortcode_description { color: #666; font-size: 12px; }
6
+ .mnmshortcode_att_name { text-transform: capitalize }
7
+ #mnmshortcode_panel input, #mnmshortcode_panel select, #mnmshortcode_panel textarea { width: 100%; padding: 4px 4px; font-size: 12px; font-family: 'Open Sans', sans-serif; }
8
  #mnmshortcode_panel textarea { height: 120px }
tinymce/editor_plugin.js CHANGED
@@ -1,78 +1,78 @@
1
- (function() {
2
- tinymce.create('tinymce.plugins.wpspanel', {
3
- /**
4
- * Initializes the plugin, this will be executed after the plugin has been created.
5
- * This call is done before the editor instance has finished it's initialization so use the onInit event
6
- * of the editor instance to intercept that event.
7
- *
8
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
9
- * @param {string} url Absolute URL to where the plugin is located.
10
- */
11
- init : function(ed, url) {
12
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
13
- ed.addCommand('mcewpspanel', function() {
14
- ed.windowManager.open({
15
- file : url + '/editor_plugin.php',
16
- inline : 1,
17
- width : 450 + ed.getLang('wpspanel.delta_width', 0),
18
- height : 80 + ed.getLang('wpspanel.delta_height', 0)
19
- }, {
20
- plugin_url : url, // Plugin absolute URL
21
- some_custom_arg : 'custom arg' // Custom argument
22
- });
23
- });
24
- // Resize function
25
- ed.addCommand( 'mcewpspanel_resize', function( ui, v ) {
26
- if (ed.windowManager.params === undefined) {
27
- // TinyMCE 4
28
- var windowID = ed.windowManager.windows[0]._id;
29
- var elem = window.top.document.getElementById(windowID+'-body');
30
- jQuery(elem).height(v.height + 52);
31
- } else {
32
- // TinyMCE 3
33
- ed.windowManager.params.mce_height = v.height + 52;
34
- }
35
-
36
- } );
37
- // Register example button
38
- ed.addButton('wpspanel', {
39
- title : 'Add Custom Shortcode',
40
- cmd : 'mcewpspanel',
41
- image : url + '/shortcode.png'
42
- });
43
-
44
- // Add a node change handler, selects the button in the UI when a image is selected
45
- ed.onNodeChange.add(function(ed, cm, n) {
46
- cm.setActive('wpspanel', n.nodeName == 'IMG');
47
- });
48
-
49
- },
50
-
51
- /**
52
- * Creates control instances based in the incomming name. This method is normally not
53
- * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
54
- * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
55
- * method can be used to create those.
56
- *
57
- * @param {String} n Name of the control to create.
58
- * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
59
- * @return {tinymce.ui.Control} New control instance or null if no control was created.
60
- */
61
- createControl : function(n, cm) {
62
- return null;
63
- },
64
-
65
- getInfo : function() {
66
- return {
67
- longname : 'WP Shortcode',
68
- author : 'MyThemeShop',
69
- authorurl : 'http://mythemeshop.com',
70
- infourl : 'http://mythemeshop.com/plugins/wp-shortcode',
71
- version : '1.4.2'
72
- };
73
- }
74
- });
75
-
76
- // Register plugin
77
- tinymce.PluginManager.add('wpspanel', tinymce.plugins.wpspanel);
78
  })();
1
+ (function() {
2
+ tinymce.create('tinymce.plugins.wpspanel', {
3
+ /**
4
+ * Initializes the plugin, this will be executed after the plugin has been created.
5
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
6
+ * of the editor instance to intercept that event.
7
+ *
8
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
9
+ * @param {string} url Absolute URL to where the plugin is located.
10
+ */
11
+ init : function(ed, url) {
12
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
13
+ ed.addCommand('mcewpspanel', function() {
14
+ ed.windowManager.open({
15
+ file : url + '/editor_plugin.php',
16
+ inline : 1,
17
+ width : 450 + ed.getLang('wpspanel.delta_width', 0),
18
+ height : 80 + ed.getLang('wpspanel.delta_height', 0)
19
+ }, {
20
+ plugin_url : url, // Plugin absolute URL
21
+ some_custom_arg : 'custom arg' // Custom argument
22
+ });
23
+ });
24
+ // Resize function
25
+ ed.addCommand( 'mcewpspanel_resize', function( ui, v ) {
26
+ if (ed.windowManager.params === undefined) {
27
+ // TinyMCE 4
28
+ var windowID = ed.windowManager.windows[0]._id;
29
+ var elem = window.top.document.getElementById(windowID+'-body');
30
+ jQuery(elem).height(v.height + 52);
31
+ } else {
32
+ // TinyMCE 3
33
+ ed.windowManager.params.mce_height = v.height + 52;
34
+ }
35
+
36
+ } );
37
+ // Register example button
38
+ ed.addButton('wpspanel', {
39
+ title : 'Add Custom Shortcode',
40
+ cmd : 'mcewpspanel',
41
+ image : url + '/shortcode.png'
42
+ });
43
+
44
+ // Add a node change handler, selects the button in the UI when a image is selected
45
+ ed.onNodeChange.add(function(ed, cm, n) {
46
+ cm.setActive('wpspanel', n.nodeName == 'IMG');
47
+ });
48
+
49
+ },
50
+
51
+ /**
52
+ * Creates control instances based in the incomming name. This method is normally not
53
+ * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
54
+ * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
55
+ * method can be used to create those.
56
+ *
57
+ * @param {String} n Name of the control to create.
58
+ * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
59
+ * @return {tinymce.ui.Control} New control instance or null if no control was created.
60
+ */
61
+ createControl : function(n, cm) {
62
+ return null;
63
+ },
64
+
65
+ getInfo : function() {
66
+ return {
67
+ longname : 'WP Shortcode',
68
+ author : 'MyThemeShop',
69
+ authorurl : 'http://mythemeshop.com',
70
+ infourl : 'http://mythemeshop.com/plugins/wp-shortcode',
71
+ version : '1.4.2'
72
+ };
73
+ }
74
+ });
75
+
76
+ // Register plugin
77
+ tinymce.PluginManager.add('wpspanel', tinymce.plugins.wpspanel);
78
  })();
tinymce/editor_plugin.php CHANGED
@@ -1,66 +1,66 @@
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", "wp-shortcode"));
7
- global $wpdb;
8
- ?>
9
- <html xmlns="http://www.w3.org/1999/xhtml">
10
- <head>
11
- <title><?php _e('Shortcode Panel', 'wp-shortcode'); ?></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", 'wp-shortcode'); ?></label></td>
32
- <td><select id="mnmshortcode_tag" name="mnmshortcode_tag">
33
- <option value="0"><?php _e('Select Shortcode', 'wp-shortcode'); ?></option>
34
- <?php
35
- if(is_array($shortcodes)) {
36
- $i = 1;
37
-
38
- foreach ( $shortcodes as $mnm_shortcodekey => $short_code_value ) {
39
- echo '<option value="' . $mnm_shortcodekey . '" >' . (isset($short_code_value['label']) ? $short_code_value['label'] : $mnm_shortcodekey).'</option>' . "\n";
40
- $i++;
41
- }
42
- }
43
- ?>
44
- </select></td>
45
- </tr>
46
-
47
- </table>
48
- </div>
49
-
50
- </div>
51
-
52
-
53
- </div>
54
-
55
- <div class="mceActionPanel">
56
- <div style="float: left">
57
- <input type="button" id="cancel" name="cancel" value="<?php _e('Cancel', 'wp-shortcode'); ?>" onClick="tinyMCEPopup.close();" />
58
- </div>
59
-
60
- <div style="float: right">
61
- <input type="submit" id="insert" name="insert" value="<?php _e('Insert', 'wp-shortcode'); ?>" onClick="mnmshortcodesubmit();" />
62
- </div>
63
- </div>
64
- </form>
65
- </body>
66
- </html>
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", "wp-shortcode"));
7
+ global $wpdb;
8
+ ?>
9
+ <html xmlns="http://www.w3.org/1999/xhtml">
10
+ <head>
11
+ <title><?php _e('Shortcode Panel', 'wp-shortcode'); ?></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", 'wp-shortcode'); ?></label></td>
32
+ <td><select id="mnmshortcode_tag" name="mnmshortcode_tag">
33
+ <option value="0"><?php _e('Select Shortcode', 'wp-shortcode'); ?></option>
34
+ <?php
35
+ if(is_array($shortcodes)) {
36
+ $i = 1;
37
+
38
+ foreach ( $shortcodes as $mnm_shortcodekey => $short_code_value ) {
39
+ echo '<option value="' . $mnm_shortcodekey . '" >' . (isset($short_code_value['label']) ? $short_code_value['label'] : $mnm_shortcodekey).'</option>' . "\n";
40
+ $i++;
41
+ }
42
+ }
43
+ ?>
44
+ </select></td>
45
+ </tr>
46
+
47
+ </table>
48
+ </div>
49
+
50
+ </div>
51
+
52
+
53
+ </div>
54
+
55
+ <div class="mceActionPanel">
56
+ <div style="float: left">
57
+ <input type="button" id="cancel" name="cancel" value="<?php _e('Cancel', 'wp-shortcode'); ?>" onClick="tinyMCEPopup.close();" />
58
+ </div>
59
+
60
+ <div style="float: right">
61
+ <input type="submit" id="insert" name="insert" value="<?php _e('Insert', 'wp-shortcode'); ?>" onClick="mnmshortcodesubmit();" />
62
+ </div>
63
+ </div>
64
+ </form>
65
+ </body>
66
+ </html>
tinymce/langs.php CHANGED
@@ -1,6 +1,6 @@
1
- <script type="text/javascript">
2
- tinyMCE.addI18n({en:{
3
- systempanel:{
4
- desc : 'System shortcodes'
5
- }}});
6
  </script>
1
+ <script type="text/javascript">
2
+ tinyMCE.addI18n({en:{
3
+ systempanel:{
4
+ desc : 'System shortcodes'
5
+ }}});
6
  </script>
tinymce/mnm_config.php CHANGED
@@ -1,9 +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);
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/shortcodes.php CHANGED
@@ -1,368 +1,368 @@
1
- <?php
2
-
3
- $shortcodes = array(
4
- "button-brown" => array(
5
- "self-closing" => false,
6
- "atts" => array(
7
- "url" => "#",
8
- "target" => "_self",
9
- "position" => "left"
10
- ),
11
- "label" => __("Brown Button", "wp-shortcode"),
12
- "content" => __("Button text", "wp-shortcode"),
13
- "description" => __("Inserts a brown button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode")
14
- ),
15
- "button-blue" => array(
16
- "self-closing" => false,
17
- "atts" => array(
18
- "url" => "#",
19
- "target" => "_self",
20
- "position" => "left"
21
- ),
22
- "label" => __("Blue Button", "wp-shortcode"),
23
- "content" => __("Button text", "wp-shortcode") ,
24
- "description" => __("Inserts a blue button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode")
25
- ),
26
- "button-green" => array(
27
- "self-closing" => false,
28
- "atts" => array(
29
- "url" => "#",
30
- "target" => "_self",
31
- "position" => "left"
32
- ),
33
- "label" => __("Green Button", "wp-shortcode"),
34
- "content" => __("Button text", "wp-shortcode") ,
35
- "description" => __("Inserts a green button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode")
36
- ),
37
- "button-yellow" => array(
38
- "self-closing" => false,
39
- "atts" => array(
40
- "url" => "#",
41
- "target" => "_self",
42
- "position" => "left"
43
- ),
44
- "label" => __("Yellow Button", "wp-shortcode"),
45
- "content" => __("Button text", "wp-shortcode") ,
46
- "description" => __("Inserts a yellow button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode")
47
- ),
48
- "button-red" => array(
49
- "self-closing" => false,
50
- "atts" => array(
51
- "url" => "#",
52
- "target" => "_self",
53
- "position" => "left"
54
- ),
55
- "label" => __("Red Button", "wp-shortcode"),
56
- "content" => __("Button text", "wp-shortcode") ,
57
- "description" => __("Inserts a red button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode")
58
- ),
59
- "button-white" => array(
60
- "self-closing" => false,
61
- "atts" => array(
62
- "url" => "#",
63
- "target" => "_self",
64
- "position" => "left"
65
- ),
66
- "label" => __("White Button", "wp-shortcode"),
67
- "content" => __("Button text", "wp-shortcode") ,
68
- "description" => __("Inserts a white button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode")
69
- ),
70
- "alert-note" => array(
71
- "self-closing" => false,
72
- "atts" => array(),
73
- "label" => __("Alert Note", "wp-shortcode"),
74
- "content" => __("Note text", "wp-shortcode"),
75
- "description" => __("Display a note.", "wp-shortcode")
76
- ),
77
- "alert-announce" => array(
78
- "self-closing" => false,
79
- "atts" => array(),
80
- "label" => __("Alert Announce", "wp-shortcode"),
81
- "content" => __("Announce text", "wp-shortcode"),
82
- "description" => __("Display an announcement.", "wp-shortcode")
83
- ),
84
- "alert-success" => array(
85
- "self-closing" => false,
86
- "atts" => array(),
87
- "label" => __("Alert Success", "wp-shortcode"),
88
- "content" => __("Success text", "wp-shortcode"),
89
- "description" => __("Display a success message.", "wp-shortcode")
90
- ),
91
- "alert-warning" => array(
92
- "self-closing" => false,
93
- "atts" => array(),
94
- "label" => __("Alert Warning", "wp-shortcode"),
95
- "content" => __("Warning text", "wp-shortcode"),
96
- "description" => __("Display warning or error message.", "wp-shortcode")
97
- ),
98
- "youtube" => array(
99
- "self-closing" => true,
100
- "atts" => array(
101
- "id" => "#",
102
- "width" => "600",
103
- "height" => "340",
104
- "position" => "left"
105
- ),
106
- "label" => __("YouTube Video", "wp-shortcode"),
107
- "content" => "",
108
- "description" => __("Embed a Youtube Video", "wp-shortcode")
109
- ),
110
- "vimeo" => array(
111
- "self-closing" => true,
112
- "atts" => array(
113
- "id" => "#",
114
- "width" => "600",
115
- "height" => "340",
116
- "position" => "left"
117
- ),
118
- "label" => __("Vimeo Video", "wp-shortcode"),
119
- "content" => "",
120
- "description" => __("Embed a Vimeo Video.", "wp-shortcode")
121
- ),
122
- "googlemap" => array(
123
- "self-closing" => true,
124
- "atts" => array(
125
- "address" => "Libertyville, Illinois, USA",
126
- "width" => "600",
127
- "height" => "340",
128
- "position" => "left"
129
- ),
130
- "label" => __("Google Map", "wp-shortcode"),
131
- "content" => "",
132
- "description" => __("Embed a Google Map. Insert address or GPS location.", "wp-shortcode")
133
- ),
134
- "toggle" => array(
135
- "self-closing" => false,
136
- "atts" => array(
137
- "title" => "Toggle Title"
138
- ),
139
- "label" => __("Toggle", "wp-shortcode"),
140
- "content" => __("Insert Content Here", "wp-shortcode"),
141
- "content_field" => "textarea",
142
- "description" => __("Content will be shown after clicking on the toggle title.", "wp-shortcode")
143
- ),
144
- "tabs" => array(
145
- "self-closing" => false,
146
- "atts" => array(),
147
- "label" => __("Tabs", "wp-shortcode"),
148
- "content" => __("[tab title=&quot;Tab 1 Title&quot;]Insert tab 1 content here[/tab]\n[tab title=&quot;Tab 2 Title&quot;]Insert tab 2 content here[/tab]\n[tab title=&quot;Tab 3 Title&quot;]Insert tab 3 content here[/tab]", "wp-shortcode"),
149
- "content_field" => "textarea",
150
- "description" => __("Display content in tabbed form.", "wp-shortcode")
151
- ),
152
- "divider" => array(
153
- "self-closing" => true,
154
- "atts" => array(),
155
- "label" => __("Divider", "wp-shortcode"),
156
- "content" => "Divider",
157
- "description" => __("Simple horizontal divider.", "wp-shortcode")
158
- ),
159
- "divider_top" => array(
160
- "self-closing" => true,
161
- "atts" => array(),
162
- "label" => __("Divider with link", "wp-shortcode"),
163
- "content" => "Divider with link",
164
- "description" => __("Divider with an anchor link to top of page.", "wp-shortcode")
165
- ),
166
- "clear" => array(
167
- "self-closing" => true,
168
- "atts" => array(),
169
- "label" => __("Clear", "wp-shortcode"),
170
- "content" => "",
171
- "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.", "wp-shortcode")
172
- ),
173
-
174
- // Column Shortcodes
175
-
176
- "one_third" => array(
177
- "self-closing" => false,
178
- "atts" => array(),
179
- "label" => __("One Third", "wp-shortcode"),
180
- "content" => __("Column content", "wp-shortcode"),
181
- "content_field" => "textarea",
182
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
183
- ),
184
- "one_third_last" => array(
185
- "self-closing" => false,
186
- "atts" => array(),
187
- "label" => __("One Third (Last)", "wp-shortcode"),
188
- "content" => __("Column content", "wp-shortcode"),
189
- "content_field" => "textarea",
190
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
191
- ),
192
- "two_third" => array(
193
- "self-closing" => false,
194
- "atts" => array(),
195
- "label" => __("Two Third", "wp-shortcode"),
196
- "content" => __("Column content", "wp-shortcode"),
197
- "content_field" => "textarea",
198
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
199
- ),
200
- "two_third_last" => array(
201
- "self-closing" => false,
202
- "atts" => array(),
203
- "label" => __("Two Third (Last)", "wp-shortcode"),
204
- "content" => __("Column content", "wp-shortcode"),
205
- "content_field" => "textarea",
206
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
207
- ),
208
- "one_half" => array(
209
- "self-closing" => false,
210
- "atts" => array(),
211
- "label" => __("One Half", "wp-shortcode"),
212
- "content" => __("Column content", "wp-shortcode"),
213
- "content_field" => "textarea",
214
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
215
- ),
216
- "one_half_last" => array(
217
- "self-closing" => false,
218
- "atts" => array(),
219
- "label" => __("One Half (Last)", "wp-shortcode"),
220
- "content" => __("Column content", "wp-shortcode"),
221
- "content_field" => "textarea",
222
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
223
- ),
224
- "one_fourth" => array(
225
- "self-closing" => false,
226
- "atts" => array(),
227
- "label" => __("One Fourth", "wp-shortcode"),
228
- "content" => __("Column content", "wp-shortcode"),
229
- "content_field" => "textarea",
230
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
231
- ),
232
- "one_fourth_last" => array(
233
- "self-closing" => false,
234
- "atts" => array(),
235
- "label" => __("One Fourth (Last)", "wp-shortcode"),
236
- "content" => __("Column content", "wp-shortcode"),
237
- "content_field" => "textarea",
238
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
239
- ),
240
- "three_fourth" => array(
241
- "self-closing" => false,
242
- "atts" => array(),
243
- "label" => __("Three Fourth", "wp-shortcode"),
244
- "content" => __("Column content", "wp-shortcode"),
245
- "content_field" => "textarea",
246
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
247
- ),
248
- "three_fourth_last" => array(
249
- "self-closing" => false,
250
- "atts" => array(),
251
- "label" => __("Three Fourth (Last)", "wp-shortcode"),
252
- "content" => __("Column content", "wp-shortcode"),
253
- "content_field" => "textarea",
254
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
255
- ),
256
- "one_fifth" => array(
257
- "self-closing" => false,
258
- "atts" => array(),
259
- "label" => __("One Fifth", "wp-shortcode"),
260
- "content" => __("Column content", "wp-shortcode"),
261
- "content_field" => "textarea",
262
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
263
- ),
264
- "one_fifth_last" => array(
265
- "self-closing" => false,
266
- "atts" => array(),
267
- "label" => __("One Fifth (Last)", "wp-shortcode"),
268
- "content" => __("Column content", "wp-shortcode"),
269
- "content_field" => "textarea",
270
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
271
- ),
272
- "two_fifth" => array(
273
- "self-closing" => false,
274
- "atts" => array(),
275
- "label" => __("Two Fifth", "wp-shortcode"),
276
- "content" => __("Column content", "wp-shortcode"),
277
- "content_field" => "textarea",
278
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
279
- ),
280
- "two_fifth_last" => array(
281
- "self-closing" => false,
282
- "atts" => array(),
283
- "label" => __("Two Fifth (Last)", "wp-shortcode"),
284
- "content" => __("Column content", "wp-shortcode"),
285
- "content_field" => "textarea",
286
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
287
- ),
288
- "three_fifth" => array(
289
- "self-closing" => false,
290
- "atts" => array(),
291
- "label" => __("Three Fifth", "wp-shortcode"),
292
- "content" => __("Column content", "wp-shortcode"),
293
- "content_field" => "textarea",
294
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
295
- ),
296
- "three_fifth_last" => array(
297
- "self-closing" => false,
298
- "atts" => array(),
299
- "label" => __("Three Fifth (Last)", "wp-shortcode"),
300
- "content" => __("Column content", "wp-shortcode"),
301
- "content_field" => "textarea",
302
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
303
- ),
304
- "four_fifth" => array(
305
- "self-closing" => false,
306
- "atts" => array(),
307
- "label" => __("Four Fifth", "wp-shortcode"),
308
- "content" => __("Column content", "wp-shortcode"),
309
- "content_field" => "textarea",
310
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
311
- ),
312
- "four_fifth_last" => array(
313
- "self-closing" => false,
314
- "atts" => array(),
315
- "label" => __("Four Fifth (Last)", "wp-shortcode"),
316
- "content" => __("Column content", "wp-shortcode"),
317
- "content_field" => "textarea",
318
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
319
- ),
320
- "one_sixth" => array(
321
- "self-closing" => false,
322
- "atts" => array(),
323
- "label" => __("One Sixth", "wp-shortcode"),
324
- "content" => __("Column content", "wp-shortcode"),
325
- "content_field" => "textarea",
326
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
327
- ),
328
- "one_sixth_last" => array(
329
- "self-closing" => false,
330
- "atts" => array(),
331
- "label" => __("One Sixth (Last)", "wp-shortcode"),
332
- "content" => __("Column content", "wp-shortcode"),
333
- "content_field" => "textarea",
334
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
335
- ),
336
- "five_sixth" => array(
337
- "self-closing" => false,
338
- "atts" => array(),
339
- "label" => __("Five Sixth", "wp-shortcode"),
340
- "content" => __("Column content", "wp-shortcode"),
341
- "content_field" => "textarea",
342
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
343
- ),
344
- "five_sixth_last" => array(
345
- "self-closing" => false,
346
- "atts" => array(),
347
- "label" => __("Five Sixth (Last)", "wp-shortcode"),
348
- "content" => __("Column content", "wp-shortcode"),
349
- "content_field" => "textarea",
350
- "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode")
351
- ),
352
- "tooltip" => array(
353
- "self-closing" => false,
354
- "atts" => array(
355
- "content" => "Tooltip content",
356
- "gravity" => "n",
357
- "fade" => "0"
358
- ),
359
- "label" => __("Tooltip", "wp-shortcode"),
360
- "content" => __("Trigger text", "wp-shortcode"),
361
- "description" => __("Add a tooltip that appears on hover. Possible values for direction(Cardinal) of bubble: nw | n | ne | w | e | sw | s | se", "wp-shortcode")
362
- )
363
- );
364
-
365
- $shortcodes = apply_filters( 'mts_wp_shortcode_list', $shortcodes );
366
- echo "<script type=\"text/javascript\">var shortcodes = ".json_encode( $shortcodes ).";</script>";
367
-
368
- ?>
1
+ <?php
2
+
3
+ $shortcodes = array(
4
+ "button-brown" => array(
5
+ "self-closing" => false,
6
+ "atts" => array(
7
+ "url" => "#",
8
+ "target" => "_self",
9
+ "position" => "left"
10
+ ),
11
+ "label" => __( "Brown Button", "wp-shortcode" ),
12
+ "content" => __( "Button text", "wp-shortcode" ),
13
+ "description" => __( "Inserts a brown button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode" )
14
+ ),
15
+ "button-blue" => array(
16
+ "self-closing" => false,
17
+ "atts" => array(
18
+ "url" => "#",
19
+ "target" => "_self",
20
+ "position" => "left"
21
+ ),
22
+ "label" => __( "Blue Button", "wp-shortcode" ),
23
+ "content" => __( "Button text", "wp-shortcode" ),
24
+ "description" => __( "Inserts a blue button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode" )
25
+ ),
26
+ "button-green" => array(
27
+ "self-closing" => false,
28
+ "atts" => array(
29
+ "url" => "#",
30
+ "target" => "_self",
31
+ "position" => "left"
32
+ ),
33
+ "label" => __( "Green Button", "wp-shortcode" ),
34
+ "content" => __( "Button text", "wp-shortcode" ),
35
+ "description" => __( "Inserts a green button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode" )
36
+ ),
37
+ "button-yellow" => array(
38
+ "self-closing" => false,
39
+ "atts" => array(
40
+ "url" => "#",
41
+ "target" => "_self",
42
+ "position" => "left"
43
+ ),
44
+ "label" => __( "Yellow Button", "wp-shortcode" ),
45
+ "content" => __( "Button text", "wp-shortcode" ),
46
+ "description" => __( "Inserts a yellow button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode" )
47
+ ),
48
+ "button-red" => array(
49
+ "self-closing" => false,
50
+ "atts" => array(
51
+ "url" => "#",
52
+ "target" => "_self",
53
+ "position" => "left"
54
+ ),
55
+ "label" => __( "Red Button", "wp-shortcode" ),
56
+ "content" => __( "Button text", "wp-shortcode" ),
57
+ "description" => __( "Inserts a red button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode" )
58
+ ),
59
+ "button-white" => array(
60
+ "self-closing" => false,
61
+ "atts" => array(
62
+ "url" => "#",
63
+ "target" => "_self",
64
+ "position" => "left"
65
+ ),
66
+ "label" => __( "White Button", "wp-shortcode" ),
67
+ "content" => __( "Button text", "wp-shortcode" ),
68
+ "description" => __( "Inserts a white button. Set target to <strong>_blank</strong> to open link in a new window.", "wp-shortcode" )
69
+ ),
70
+ "alert-note" => array(
71
+ "self-closing" => false,
72
+ "atts" => array(),
73
+ "label" => __( "Alert Note", "wp-shortcode" ),
74
+ "content" => __( "Note text", "wp-shortcode" ),
75
+ "description" => __( "Display a note.", "wp-shortcode" )
76
+ ),
77
+ "alert-announce" => array(
78
+ "self-closing" => false,
79
+ "atts" => array(),
80
+ "label" => __( "Alert Announce", "wp-shortcode" ),
81
+ "content" => __( "Announce text", "wp-shortcode" ),
82
+ "description" => __( "Display an announcement.", "wp-shortcode" )
83
+ ),
84
+ "alert-success" => array(
85
+ "self-closing" => false,
86
+ "atts" => array(),
87
+ "label" => __( "Alert Success", "wp-shortcode" ),
88
+ "content" => __( "Success text", "wp-shortcode" ),
89
+ "description" => __( "Display a success message.", "wp-shortcode" )
90
+ ),
91
+ "alert-warning" => array(
92
+ "self-closing" => false,
93
+ "atts" => array(),
94
+ "label" => __( "Alert Warning", "wp-shortcode" ),
95
+ "content" => __( "Warning text", "wp-shortcode" ),
96
+ "description" => __( "Display warning or error message.", "wp-shortcode" )
97
+ ),
98
+ "youtube" => array(
99
+ "self-closing" => true,
100
+ "atts" => array(
101
+ "id" => "#",
102
+ "width" => "600",
103
+ "height" => "340",
104
+ "position" => "left"
105
+ ),
106
+ "label" => __( "YouTube Video", "wp-shortcode" ),
107
+ "content" => "",
108
+ "description" => __( "Embed a Youtube Video", "wp-shortcode" )
109
+ ),
110
+ "vimeo" => array(
111
+ "self-closing" => true,
112
+ "atts" => array(
113
+ "id" => "#",
114
+ "width" => "600",
115
+ "height" => "340",
116
+ "position" => "left"
117
+ ),
118
+ "label" => __( "Vimeo Video", "wp-shortcode" ),
119
+ "content" => "",
120
+ "description" => __( "Embed a Vimeo Video.", "wp-shortcode" )
121
+ ),
122
+ "googlemap" => array(
123
+ "self-closing" => true,
124
+ "atts" => array(
125
+ "address" => "Libertyville, Illinois, USA",
126
+ "width" => "600",
127
+ "height" => "340",
128
+ "position" => "left"
129
+ ),
130
+ "label" => __( "Google Map", "wp-shortcode" ),
131
+ "content" => "",
132
+ "description" => __( "Embed a Google Map. Insert address or GPS location.", "wp-shortcode" )
133
+ ),
134
+ "toggle" => array(
135
+ "self-closing" => false,
136
+ "atts" => array(
137
+ "title" => "Toggle Title"
138
+ ),
139
+ "label" => __( "Toggle", "wp-shortcode" ),
140
+ "content" => __( "Insert Content Here", "wp-shortcode" ),
141
+ "content_field" => "textarea",
142
+ "description" => __( "Content will be shown after clicking on the toggle title.", "wp-shortcode" )
143
+ ),
144
+ "tabs" => array(
145
+ "self-closing" => false,
146
+ "atts" => array(),
147
+ "label" => __( "Tabs", "wp-shortcode" ),
148
+ "content" => __( "[tab title=&quot;Tab 1 Title&quot;]Insert tab 1 content here[/tab]\n[tab title=&quot;Tab 2 Title&quot;]Insert tab 2 content here[/tab]\n[tab title=&quot;Tab 3 Title&quot;]Insert tab 3 content here[/tab]", "wp-shortcode" ),
149
+ "content_field" => "textarea",
150
+ "description" => __( "Display content in tabbed form.", "wp-shortcode" )
151
+ ),
152
+ "divider" => array(
153
+ "self-closing" => true,
154
+ "atts" => array(),
155
+ "label" => __( "Divider", "wp-shortcode" ),
156
+ "content" => "Divider",
157
+ "description" => __( "Simple horizontal divider.", "wp-shortcode" )
158
+ ),
159
+ "divider_top" => array(
160
+ "self-closing" => true,
161
+ "atts" => array(),
162
+ "label" => __( "Divider with link", "wp-shortcode" ),
163
+ "content" => "Divider with link",
164
+ "description" => __( "Divider with an anchor link to top of page.", "wp-shortcode" )
165
+ ),
166
+ "clear" => array(
167
+ "self-closing" => true,
168
+ "atts" => array(),
169
+ "label" => __( "Clear", "wp-shortcode" ),
170
+ "content" => "",
171
+ "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.", "wp-shortcode" )
172
+ ),
173
+
174
+ // Column Shortcodes
175
+
176
+ "one_third" => array(
177
+ "self-closing" => false,
178
+ "atts" => array(),
179
+ "label" => __( "One Third", "wp-shortcode" ),
180
+ "content" => __( "Column content", "wp-shortcode" ),
181
+ "content_field" => "textarea",
182
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
183
+ ),
184
+ "one_third_last" => array(
185
+ "self-closing" => false,
186
+ "atts" => array(),
187
+ "label" => __( "One Third (Last)", "wp-shortcode" ),
188
+ "content" => __( "Column content", "wp-shortcode" ),
189
+ "content_field" => "textarea",
190
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
191
+ ),
192
+ "two_third" => array(
193
+ "self-closing" => false,
194
+ "atts" => array(),
195
+ "label" => __( "Two Third", "wp-shortcode" ),
196
+ "content" => __( "Column content", "wp-shortcode" ),
197
+ "content_field" => "textarea",
198
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
199
+ ),
200
+ "two_third_last" => array(
201
+ "self-closing" => false,
202
+ "atts" => array(),
203
+ "label" => __( "Two Third (Last)", "wp-shortcode" ),
204
+ "content" => __( "Column content", "wp-shortcode" ),
205
+ "content_field" => "textarea",
206
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
207
+ ),
208
+ "one_half" => array(
209
+ "self-closing" => false,
210
+ "atts" => array(),
211
+ "label" => __( "One Half", "wp-shortcode" ),
212
+ "content" => __( "Column content", "wp-shortcode" ),
213
+ "content_field" => "textarea",
214
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
215
+ ),
216
+ "one_half_last" => array(
217
+ "self-closing" => false,
218
+ "atts" => array(),
219
+ "label" => __( "One Half (Last)", "wp-shortcode" ),
220
+ "content" => __( "Column content", "wp-shortcode" ),
221
+ "content_field" => "textarea",
222
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
223
+ ),
224
+ "one_fourth" => array(
225
+ "self-closing" => false,
226
+ "atts" => array(),
227
+ "label" => __( "One Fourth", "wp-shortcode" ),
228
+ "content" => __( "Column content", "wp-shortcode" ),
229
+ "content_field" => "textarea",
230
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
231
+ ),
232
+ "one_fourth_last" => array(
233
+ "self-closing" => false,
234
+ "atts" => array(),
235
+ "label" => __( "One Fourth (Last)", "wp-shortcode" ),
236
+ "content" => __( "Column content", "wp-shortcode" ),
237
+ "content_field" => "textarea",
238
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
239
+ ),
240
+ "three_fourth" => array(
241
+ "self-closing" => false,
242
+ "atts" => array(),
243
+ "label" => __( "Three Fourth", "wp-shortcode" ),
244
+ "content" => __( "Column content", "wp-shortcode" ),
245
+ "content_field" => "textarea",
246
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
247
+ ),
248
+ "three_fourth_last" => array(
249
+ "self-closing" => false,
250
+ "atts" => array(),
251
+ "label" => __( "Three Fourth (Last)", "wp-shortcode" ),
252
+ "content" => __( "Column content", "wp-shortcode" ),
253
+ "content_field" => "textarea",
254
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
255
+ ),
256
+ "one_fifth" => array(
257
+ "self-closing" => false,
258
+ "atts" => array(),
259
+ "label" => __( "One Fifth", "wp-shortcode" ),
260
+ "content" => __( "Column content", "wp-shortcode" ),
261
+ "content_field" => "textarea",
262
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
263
+ ),
264
+ "one_fifth_last" => array(
265
+ "self-closing" => false,
266
+ "atts" => array(),
267
+ "label" => __( "One Fifth (Last)", "wp-shortcode" ),
268
+ "content" => __( "Column content", "wp-shortcode" ),
269
+ "content_field" => "textarea",
270
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
271
+ ),
272
+ "two_fifth" => array(
273
+ "self-closing" => false,
274
+ "atts" => array(),
275
+ "label" => __( "Two Fifth", "wp-shortcode" ),
276
+ "content" => __( "Column content", "wp-shortcode" ),
277
+ "content_field" => "textarea",
278
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
279
+ ),
280
+ "two_fifth_last" => array(
281
+ "self-closing" => false,
282
+ "atts" => array(),
283
+ "label" => __( "Two Fifth (Last)", "wp-shortcode" ),
284
+ "content" => __( "Column content", "wp-shortcode" ),
285
+ "content_field" => "textarea",
286
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
287
+ ),
288
+ "three_fifth" => array(
289
+ "self-closing" => false,
290
+ "atts" => array(),
291
+ "label" => __( "Three Fifth", "wp-shortcode" ),
292
+ "content" => __( "Column content", "wp-shortcode" ),
293
+ "content_field" => "textarea",
294
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
295
+ ),
296
+ "three_fifth_last" => array(
297
+ "self-closing" => false,
298
+ "atts" => array(),
299
+ "label" => __( "Three Fifth (Last)", "wp-shortcode" ),
300
+ "content" => __( "Column content", "wp-shortcode" ),
301
+ "content_field" => "textarea",
302
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
303
+ ),
304
+ "four_fifth" => array(
305
+ "self-closing" => false,
306
+ "atts" => array(),
307
+ "label" => __( "Four Fifth", "wp-shortcode" ),
308
+ "content" => __( "Column content", "wp-shortcode" ),
309
+ "content_field" => "textarea",
310
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
311
+ ),
312
+ "four_fifth_last" => array(
313
+ "self-closing" => false,
314
+ "atts" => array(),
315
+ "label" => __( "Four Fifth (Last)", "wp-shortcode" ),
316
+ "content" => __( "Column content", "wp-shortcode" ),
317
+ "content_field" => "textarea",
318
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
319
+ ),
320
+ "one_sixth" => array(
321
+ "self-closing" => false,
322
+ "atts" => array(),
323
+ "label" => __( "One Sixth", "wp-shortcode" ),
324
+ "content" => __( "Column content", "wp-shortcode" ),
325
+ "content_field" => "textarea",
326
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
327
+ ),
328
+ "one_sixth_last" => array(
329
+ "self-closing" => false,
330
+ "atts" => array(),
331
+ "label" => __( "One Sixth (Last)", "wp-shortcode" ),
332
+ "content" => __( "Column content", "wp-shortcode" ),
333
+ "content_field" => "textarea",
334
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
335
+ ),
336
+ "five_sixth" => array(
337
+ "self-closing" => false,
338
+ "atts" => array(),
339
+ "label" => __( "Five Sixth", "wp-shortcode" ),
340
+ "content" => __( "Column content", "wp-shortcode" ),
341
+ "content_field" => "textarea",
342
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
343
+ ),
344
+ "five_sixth_last" => array(
345
+ "self-closing" => false,
346
+ "atts" => array(),
347
+ "label" => __( "Five Sixth (Last)", "wp-shortcode" ),
348
+ "content" => __( "Column content", "wp-shortcode" ),
349
+ "content_field" => "textarea",
350
+ "description" => __( "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wp-shortcode" )
351
+ ),
352
+ "tooltip" => array(
353
+ "self-closing" => false,
354
+ "atts" => array(
355
+ "content" => "Tooltip content",
356
+ "gravity" => "n",
357
+ "fade" => "0"
358
+ ),
359
+ "label" => __( "Tooltip", "wp-shortcode" ),
360
+ "content" => __( "Trigger text", "wp-shortcode" ),
361
+ "description" => __( "Add a tooltip that appears on hover. Possible values for direction(Cardinal) of bubble: nw | n | ne | w | e | sw | s | se", "wp-shortcode" )
362
+ )
363
+ );
364
+
365
+ $shortcodes = apply_filters( 'mts_wp_shortcode_list', $shortcodes );
366
+ echo "<script type=\"text/javascript\">var shortcodes = ".json_encode( $shortcodes ).";</script>";
367
+
368
+ ?>
tinymce/tinymce.js CHANGED
@@ -1,93 +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
- });
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 CHANGED
@@ -1,76 +1,76 @@
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
- $plugin_array[$this->pluginname] = $this->path . 'editor_plugin.js';
45
-
46
- return $plugin_array;
47
- }
48
-
49
- function add_tinymce_langs_path($plugin_array)
50
- {
51
- // Load the TinyMCE language file
52
- $plugin_array[$this->pluginname] = plugin_dir_url('tinymce/langs.php');
53
- return $plugin_array;
54
- }
55
-
56
-
57
- /**
58
- * add_nextgen_button::change_tinymce_version()
59
- * A different version will rebuild the cache
60
- *
61
- * @return $versio
62
- */
63
- function change_tinymce_version($version)
64
- {
65
- $version = $version + $this->internalVersion;
66
- return $version;
67
- }
68
-
69
- }
70
-
71
- // Call it after theme setup
72
- function mts_wpshortcodes_tinymce() {
73
- $tinymce_button = new add_wpshortcodes_button();
74
- }
75
- add_action( 'after_setup_theme', 'mts_wpshortcodes_tinymce' );
76
- ?>
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
+ $plugin_array[$this->pluginname] = $this->path . 'editor_plugin.js';
45
+
46
+ return $plugin_array;
47
+ }
48
+
49
+ function add_tinymce_langs_path($plugin_array)
50
+ {
51
+ // Load the TinyMCE language file
52
+ $plugin_array[$this->pluginname] = plugin_dir_url('tinymce/langs.php');
53
+ return $plugin_array;
54
+ }
55
+
56
+
57
+ /**
58
+ * add_nextgen_button::change_tinymce_version()
59
+ * A different version will rebuild the cache
60
+ *
61
+ * @return $versio
62
+ */
63
+ function change_tinymce_version($version)
64
+ {
65
+ $version = $version + $this->internalVersion;
66
+ return $version;
67
+ }
68
+
69
+ }
70
+
71
+ // Call it after theme setup
72
+ function mts_wpshortcodes_tinymce() {
73
+ $tinymce_button = new add_wpshortcodes_button();
74
+ }
75
+ add_action( 'after_setup_theme', 'mts_wpshortcodes_tinymce' );
76
+ ?>
wp-shortcode.php CHANGED
@@ -1,535 +1,927 @@
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.4.15
8
- Author URI: http://mythemeshop.com/
9
- */
10
-
11
- function mts_wpshortcodes_scripts() {
12
- wp_register_style('tipsy', plugins_url('css/tipsy.css', __FILE__));
13
- wp_register_style('mts_wpshortcodes', plugins_url('css/wp-shortcode.css', __FILE__));
14
- wp_register_script('tipsy', plugins_url('js/jquery.tipsy.js', __FILE__), array('jquery'));
15
- wp_register_script('mts_wpshortcodes', plugins_url('js/wp-shortcode.js', __FILE__), array('jquery'));
16
- }
17
- add_action('wp_enqueue_scripts', 'mts_wpshortcodes_scripts', 99);
18
-
19
- add_action('admin_enqueue_scripts', function(){
20
- wp_enqueue_script( 'mts_wpshortcodes_admin', plugins_url('js/admin.js', __FILE__), array('jquery') );
21
- });
22
-
23
- function mts_wps_enqueue_scripts($shortcode = '') {
24
-
25
- if($shortcode == 'tooltip') {
26
- wp_enqueue_style( 'tipsy' );
27
- wp_enqueue_script( 'tipsy' );
28
- }
29
- wp_enqueue_style('mts_wpshortcodes');
30
- if($shortcode == 'tooltip' || $shortcode == 'tabs' || $shortcode == 'toggle') {
31
- wp_enqueue_script('mts_wpshortcodes');
32
- }
33
- }
34
- add_action('wps_enqueue_style', 'mts_wps_enqueue_scripts', 10, 1);
35
-
36
- function mts_wpshortcodes_load_textdomain() {
37
- load_plugin_textdomain( 'wp-shortcode', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
38
- }
39
- add_action( 'plugins_loaded', 'mts_wpshortcodes_load_textdomain' );
40
-
41
- // hide built-in shortcodes button for MTS themes
42
- add_action('admin_head', 'mts_wpshortcodes_theme_compatibility');
43
-
44
- function mts_wpshortcodes_theme_compatibility() {
45
- echo '<style type="text/css">#content_mnmpanel {display: none;}</style>';
46
- }
47
-
48
- include('tinymce/tinymce.php');
49
-
50
- // override theme shortcodes
51
- add_action( 'after_setup_theme', 'mts_wpshortcodes_add' );
52
-
53
- function mts_wpshortcodes_add() {
54
- remove_shortcode('button-brown'); add_shortcode('button-brown', 'mts_button_brown');
55
- remove_shortcode('button-blue'); add_shortcode('button-blue', 'mts_button_blue');
56
- remove_shortcode('button-green'); add_shortcode('button-green', 'mts_button_green');
57
- remove_shortcode('button-red'); add_shortcode('button-red', 'mts_button_red');
58
- remove_shortcode('button-white'); add_shortcode('button-white', 'mts_button_white');
59
- remove_shortcode('button-yellow'); add_shortcode('button-yellow', 'mts_button_yellow');
60
- remove_shortcode('alert-note'); add_shortcode('alert-note', 'mts_alert_note');
61
- remove_shortcode('alert-announce'); add_shortcode('alert-announce', 'mts_alert_announce');
62
- remove_shortcode('alert-success'); add_shortcode('alert-success', 'mts_alert_success');
63
- remove_shortcode('alert-warning'); add_shortcode('alert-warning', 'mts_alert_warning');
64
- remove_shortcode('one_third'); add_shortcode('one_third', 'mts_one_third');
65
- remove_shortcode('one_third_last'); add_shortcode('one_third_last', 'mts_one_third_last');
66
- remove_shortcode('two_third'); add_shortcode('two_third', 'mts_two_third');
67
- remove_shortcode('two_third_last'); add_shortcode('two_third_last', 'mts_two_third_last');
68
- remove_shortcode('one_half'); add_shortcode('one_half', 'mts_one_half');
69
- remove_shortcode('one_half_last'); add_shortcode('one_half_last', 'mts_one_half_last');
70
- remove_shortcode('one_fourth'); add_shortcode('one_fourth', 'mts_one_fourth');
71
- remove_shortcode('one_fourth_last'); add_shortcode('one_fourth_last', 'mts_one_fourth_last');
72
- remove_shortcode('three_fourth'); add_shortcode('three_fourth', 'mts_three_fourth');
73
- remove_shortcode('three_fourth_last'); add_shortcode('three_fourth_last', 'mts_three_fourth_last');
74
- remove_shortcode('one_fifth'); add_shortcode('one_fifth', 'mts_one_fifth');
75
- remove_shortcode('one_fifth_last'); add_shortcode('one_fifth_last', 'mts_one_fifth_last');
76
- remove_shortcode('two_fifth'); add_shortcode('two_fifth', 'mts_two_fifth');
77
- remove_shortcode('two_fifth_last'); add_shortcode('two_fifth_last', 'mts_two_fifth_last');
78
- remove_shortcode('three_fifth'); add_shortcode('three_fifth', 'mts_three_fifth');
79
- remove_shortcode('three_fifth_last'); add_shortcode('three_fifth_last', 'mts_three_fifth_last');
80
- remove_shortcode('four_fifth'); add_shortcode('four_fifth', 'mts_four_fifth');
81
- remove_shortcode('four_fifth_last'); add_shortcode('four_fifth_last', 'mts_four_fifth_last');
82
- remove_shortcode('one_sixth'); add_shortcode('one_sixth', 'mts_one_sixth');
83
- remove_shortcode('one_sixth_last'); add_shortcode('one_sixth_last', 'mts_one_sixth_last');
84
- remove_shortcode('five_sixth'); add_shortcode('five_sixth', 'mts_five_sixth');
85
- remove_shortcode('five_sixth_last'); add_shortcode('five_sixth_last', 'mts_five_sixth_last');
86
- remove_shortcode('youtube'); add_shortcode('youtube', 'mts_youtube_video');
87
- remove_shortcode('vimeo'); add_shortcode('vimeo', 'mts_vimeo_video');
88
- remove_shortcode('googlemap'); add_shortcode('googlemap', 'mts_googleMaps');
89
- remove_shortcode('tabs'); add_shortcode('tabs', 'mts_tabs');
90
- remove_shortcode('toggle'); add_shortcode('toggle', 'mts_toggle');
91
- remove_shortcode('divider'); add_shortcode('divider', 'mts_divider');
92
- remove_shortcode('divider_top'); add_shortcode('divider_top', 'mts_divider_top');
93
- remove_shortcode('clear'); add_shortcode('clear', 'mts_clear');
94
- add_shortcode('tooltip', 'mts_tooltip');
95
- }
96
-
97
-
98
- /*-----------------------------------------------------------------------------------*/
99
- /* Buttons Shortcodes
100
- /*-----------------------------------------------------------------------------------*/
101
-
102
- function mts_button_brown( $atts, $content = null ) {
103
- extract(shortcode_atts(array(
104
- 'url' => '#',
105
- 'target' => '_self',
106
- 'position' => 'left',
107
- 'rel' => '',
108
- ), $atts));
109
- $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_brown " .sanitize_html_class( $position ). "\"" .($rel? " rel=\"" . esc_attr( $rel ) . "\"" : "")."><span class=\"left\">".do_shortcode($content)."</span></a>";
110
- if ($position == 'center') {
111
- $out = '<div class="button-center">'.$out.'</div>';
112
- }
113
- do_action('wps_enqueue_style');
114
- return $out;
115
- }
116
-
117
- function mts_button_blue( $atts, $content = null ) {
118
- extract(shortcode_atts(array(
119
- 'url' => '#',
120
- 'target' => '_self',
121
- 'position' => 'left',
122
- 'rel' => '',
123
- ), $atts));
124
- $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_blue " .sanitize_html_class( $position ). "\"" .($rel? " rel=\"" . esc_attr( $rel ) . "\"" : "")."><span class=\"left\">".do_shortcode($content)."</span></a>";
125
- if ($position == 'center') {
126
- $out = '<div class="button-center">'.$out.'</div>';
127
- }
128
-
129
- do_action('wps_enqueue_style');
130
- return $out;
131
- }
132
-
133
- function mts_button_green( $atts, $content = null ) {
134
- extract(shortcode_atts(array(
135
- 'url' => '#',
136
- 'target' => '_self',
137
- 'position' => 'left',
138
- 'rel' => '',
139
- ), $atts));
140
- $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_green " .sanitize_html_class( $position ). "\"" .($rel? " rel=\"" . esc_attr( $rel ) . "\"" : "")."><span class=\"left\">".do_shortcode($content)."</span></a>";
141
- if ($position == 'center') {
142
- $out = '<div class="button-center">'.$out.'</div>';
143
- }
144
-
145
- do_action('wps_enqueue_style');
146
- return $out;
147
- }
148
-
149
- function mts_button_red( $atts, $content = null ) {
150
- extract(shortcode_atts(array(
151
- 'url' => '#',
152
- 'target' => '_self',
153
- 'position' => 'left',
154
- 'rel' => '',
155
- ), $atts));
156
- $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_red " .sanitize_html_class( $position ). "\"" .($rel? " rel=\"" . esc_attr( $rel ) . "\"" : "")."><span class=\"left\">".do_shortcode($content)."</span></a>";
157
- if ($position == 'center') {
158
- $out = '<div class="button-center">'.$out.'</div>';
159
- }
160
-
161
- do_action('wps_enqueue_style');
162
- return $out;
163
- }
164
-
165
- function mts_button_white( $atts, $content = null ) {
166
- extract(shortcode_atts(array(
167
- 'url' => '#',
168
- 'target' => '_self',
169
- 'position' => 'left',
170
- 'rel' => '',
171
- ), $atts));
172
- $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_white " .sanitize_html_class( $position ). "\"" .($rel? " rel=\"" . esc_attr( $rel ) . "\"" : "")."><span class=\"left\">".do_shortcode($content)."</span></a>";
173
- if ($position == 'center') {
174
- $out = '<div class="button-center">'.$out.'</div>';
175
- }
176
-
177
- do_action('wps_enqueue_style');
178
- return $out;
179
- }
180
-
181
- function mts_button_yellow( $atts, $content = null ) {
182
- extract(shortcode_atts(array(
183
- 'url' => '#',
184
- 'target' => '_self',
185
- 'position' => 'left',
186
- 'rel' => '',
187
- ), $atts));
188
- $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_yellow " .sanitize_html_class( $position ). "\"" .($rel? " rel=\"" . esc_attr( $rel ) . "\"" : "")."><span class=\"left\">".do_shortcode($content)."</span></a>";
189
- if ($position == 'center') {
190
- $out = '<div class="button-center">'.$out.'</div>';
191
- }
192
-
193
- do_action('wps_enqueue_style');
194
- return $out;
195
- }
196
-
197
- /*-----------------------------------------------------------------------------------*/
198
- /* Alert Shortcodes
199
- /*-----------------------------------------------------------------------------------*/
200
-
201
- function mts_alert_note( $atts, $content = null ) {
202
- extract(shortcode_atts(array(
203
- 'style' => 'note'
204
- ), $atts));
205
- $out = "<div class=\"message_box note\"><p>".do_shortcode($content)."</p></div>";
206
-
207
- do_action('wps_enqueue_style');
208
- return $out;
209
- }
210
-
211
- function mts_alert_announce( $atts, $content = null ) {
212
- extract(shortcode_atts(array(
213
- 'style' => 'announce'
214
- ), $atts));
215
- $out = "<div class=\"message_box announce\"><p>".do_shortcode($content)."</p></div>";
216
-
217
- do_action('wps_enqueue_style');
218
- return $out;
219
- }
220
-
221
- function mts_alert_success( $atts, $content = null ) {
222
- extract(shortcode_atts(array(
223
- 'style' => 'success'
224
- ), $atts));
225
- $out = "<div class=\"message_box success\"><p>".do_shortcode($content)."</p></div>";
226
-
227
- do_action('wps_enqueue_style');
228
- return $out;
229
- }
230
-
231
- function mts_alert_warning( $atts, $content = null ) {
232
- extract(shortcode_atts(array(
233
- 'style' => 'warning'
234
- ), $atts));
235
- $out = "<div class=\"message_box warning\"><p>".do_shortcode($content)."</p></div>";
236
-
237
- do_action('wps_enqueue_style');
238
- return $out;
239
- }
240
-
241
- /*-----------------------------------------------------------------------------------*/
242
- /* Column Shortcodes
243
- /*-----------------------------------------------------------------------------------*/
244
-
245
- function mts_one_third( $atts, $content = null ) {
246
- do_action('wps_enqueue_style');
247
- return '<div class="one_third">' . do_shortcode($content) . '</div>';
248
- }
249
-
250
- function mts_one_third_last( $atts, $content = null ) {
251
- do_action('wps_enqueue_style');
252
- return '<div class="one_third column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
253
- }
254
-
255
- function mts_two_third( $atts, $content = null ) {
256
- do_action('wps_enqueue_style');
257
- return '<div class="two_third">' . do_shortcode($content) . '</div>';
258
- }
259
-
260
- function mts_two_third_last( $atts, $content = null ) {
261
- do_action('wps_enqueue_style');
262
- return '<div class="two_third column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
263
- }
264
-
265
- function mts_one_half( $atts, $content = null ) {
266
- do_action('wps_enqueue_style');
267
- return '<div class="one_half">' . do_shortcode($content) . '</div>';
268
- }
269
-
270
- function mts_one_half_last( $atts, $content = null ) {
271
- do_action('wps_enqueue_style');
272
- return '<div class="one_half column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
273
- }
274
-
275
- function mts_one_fourth( $atts, $content = null ) {
276
- do_action('wps_enqueue_style');
277
- return '<div class="one_fourth">' . do_shortcode($content) . '</div>';
278
- }
279
-
280
- function mts_one_fourth_last( $atts, $content = null ) {
281
- do_action('wps_enqueue_style');
282
- return '<div class="one_fourth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
283
- }
284
-
285
- function mts_three_fourth( $atts, $content = null ) {
286
- do_action('wps_enqueue_style');
287
- return '<div class="three_fourth">' . do_shortcode($content) . '</div>';
288
- }
289
-
290
- function mts_three_fourth_last( $atts, $content = null ) {
291
- do_action('wps_enqueue_style');
292
- return '<div class="three_fourth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
293
- }
294
-
295
- function mts_one_fifth( $atts, $content = null ) {
296
- do_action('wps_enqueue_style');
297
- return '<div class="one_fifth">' . do_shortcode($content) . '</div>';
298
- }
299
-
300
- function mts_one_fifth_last( $atts, $content = null ) {
301
- do_action('wps_enqueue_style');
302
- return '<div class="one_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
303
- }
304
-
305
- function mts_two_fifth( $atts, $content = null ) {
306
- do_action('wps_enqueue_style');
307
- return '<div class="two_fifth">' . do_shortcode($content) . '</div>';
308
- }
309
-
310
- function mts_two_fifth_last( $atts, $content = null ) {
311
- do_action('wps_enqueue_style');
312
- return '<div class="two_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
313
- }
314
-
315
- function mts_three_fifth( $atts, $content = null ) {
316
- do_action('wps_enqueue_style');
317
- return '<div class="three_fifth">' . do_shortcode($content) . '</div>';
318
- }
319
-
320
- function mts_three_fifth_last( $atts, $content = null ) {
321
- do_action('wps_enqueue_style');
322
- return '<div class="three_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
323
- }
324
-
325
- function mts_four_fifth( $atts, $content = null ) {
326
- do_action('wps_enqueue_style');
327
- return '<div class="four_fifth">' . do_shortcode($content) . '</div>';
328
- }
329
-
330
- function mts_four_fifth_last( $atts, $content = null ) {
331
- do_action('wps_enqueue_style');
332
- return '<div class="four_fifth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
333
- }
334
-
335
- function mts_one_sixth( $atts, $content = null ) {
336
- do_action('wps_enqueue_style');
337
- return '<div class="one_sixth">' . do_shortcode($content) . '</div>';
338
- }
339
-
340
- function mts_one_sixth_last( $atts, $content = null ) {
341
- do_action('wps_enqueue_style');
342
- return '<div class="one_sixth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
343
- }
344
-
345
- function mts_five_sixth( $atts, $content = null ) {
346
- do_action('wps_enqueue_style');
347
- return '<div class="five_sixth">' . do_shortcode($content) . '</div>';
348
- }
349
-
350
- function mts_five_sixth_last( $atts, $content = null ) {
351
- do_action('wps_enqueue_style');
352
- return '<div class="five_sixth column-last">' . do_shortcode($content) . '</div><div class="clear"></div>';
353
- }
354
-
355
- /*-----------------------------------------------------------------------------------*/
356
- /* Video Shortcodes
357
- /*-----------------------------------------------------------------------------------*/
358
- function mts_youtube_video( $atts, $content = null ) {
359
- extract(shortcode_atts( array(
360
- 'id' => '',
361
- 'width' => '600',
362
- 'height' => '340',
363
- 'position' => 'left'
364
- ), $atts));
365
- $out = "<div class=\"youtube-video " .sanitize_html_class( $position ) . "\"><iframe width=\"" .esc_attr( $width ) . "\" height=\"" .esc_attr( $height ) ."\" src=\"//www.youtube.com/embed/" . esc_attr( $id ) . "?rel=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
366
- do_action('wps_enqueue_style');
367
- return $out;
368
- }
369
-
370
- function mts_vimeo_video( $atts, $content = null ) {
371
- extract(shortcode_atts( array(
372
- 'id' => '',
373
- 'width' => '600',
374
- 'height' => '340',
375
- 'position' => 'left'
376
- ), $atts));
377
- $out = "<div class=\"vimeo-video " . sanitize_html_class( $position ) . "\"><iframe width=\"" .esc_attr( $width ) . "\" height=\"" .esc_attr( $height ) ."\" src=\"//player.vimeo.com/video/" . esc_attr( $id ) . "?title=0&amp;byline=0&amp;portrait=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
378
- do_action('wps_enqueue_style');
379
- return $out;
380
- }
381
-
382
- /*-----------------------------------------------------------------------------------*/
383
- /* GoogleMaps Shortcode
384
- /*-----------------------------------------------------------------------------------*/
385
- function mts_googleMaps($atts, $content = null) {
386
- extract(shortcode_atts(array(
387
- 'width' => '640',
388
- 'height' => '480',
389
- 'address' => '',
390
- 'src' => '', // for backwards compatibility
391
- 'position' => 'left'
392
- ), $atts));
393
- if (!empty($src)) {
394
- $out = "<div class=\"googlemaps " .sanitize_html_class( $position ) . "\"><iframe width=\"".esc_attr( $width )."\" height=\"".esc_attr( $height )."\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"".esc_url( $src )."&output=embed\"></iframe></div>";
395
- } else {
396
- $out = "<div class=\"googlemaps " .sanitize_html_class( $position ) . "\"><iframe width=\"".esc_attr( $width )."\" height=\"".esc_attr( $height )."\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"//maps.google.com/maps?q=".urlencode( $address )."&output=embed\"></iframe></div>";
397
- }
398
- do_action('wps_enqueue_style');
399
- return $out;
400
- }
401
-
402
- /*-----------------------------------------------------------------------------------*/
403
- /* Tabs
404
- /*-----------------------------------------------------------------------------------*/
405
- function mts_tabs( $atts, $content = null ) {
406
-
407
- if (!preg_match_all("/(.?)\[(tab)\b(.*?)(?:(\/))?\](?:(.+?)\[\/tab\])?(.?)/s", $content, $matches)) {
408
- return do_shortcode($content);
409
- } else {
410
- for($i = 0; $i < count($matches[0]); $i++) {
411
- $matches[3][$i] = shortcode_atts(
412
- array('title' => __('Untitled', 'wp-shortcode')),
413
- shortcode_parse_atts($matches[3][$i])
414
- );
415
- $tabid[$i] = 'tab-'.$i.'-'.str_replace('%','',strtolower(sanitize_title($matches[3][$i]['title'])));
416
- }
417
- $tabnav = '<ul class="wps_tabs">';
418
-
419
- for($i = 0; $i < count($matches[0]); $i++) {
420
- $tabnav .= '<li><a href="#" data-tab="'.$tabid[$i].'">' . $matches[3][$i]['title'] . '</a></li>';
421
- }
422
- $tabnav .= '</ul>';
423
-
424
- $tabcontent = '<div class="tab_container">';
425
- for($i = 0; $i < count($matches[0]); $i++) {
426
- $tabcontent .= '<div id="'.$tabid[$i].'" class="tab_content clearfix">' . do_shortcode(trim($matches[5][$i])) . '</div>';
427
- }
428
- $tabcontent .= '</div>';
429
-
430
- do_action('wps_enqueue_style', 'tabs');
431
- return '<div class="tab_widget wp_shortcodes_tabs">' . $tabnav . $tabcontent . '</div><div class="clear"></div>';
432
- }
433
-
434
- }
435
- add_filter( 'no_texturize_shortcodes', 'no_texturize_tabs' );
436
- function no_texturize_tabs($shortcodes){
437
- $shortcodes[] = 'tabs';
438
- return $shortcodes;
439
- }
440
-
441
- /*--------------------------------------------------------
442
- Toggles
443
- --------------------------------------------------------*/
444
-
445
- function mts_toggle( $atts, $content = null ) {
446
- extract(shortcode_atts(array(
447
- 'title' => __('Toggle Title', 'wp-shortcode')
448
- ), $atts));
449
- do_action('wps_enqueue_style', 'toggle');
450
- return '<div class="toggle clearfix wp_shortcodes_toggle"><div class="wps_togglet"><span>' . wp_kses_post( $title ) . '</span></div><div class="togglec clearfix">' . do_shortcode(trim($content)) . '</div></div><div class="clear"></div>';
451
- }
452
-
453
- /*-----------------------------------------------------------------------------------*/
454
- /* Divider
455
- /*-----------------------------------------------------------------------------------*/
456
- // simple divider
457
- function mts_divider( $atts ) {
458
- do_action('wps_enqueue_style');
459
- return '<div class="divider"></div>';
460
- }
461
-
462
- // Divider with an anchor link to top of page.
463
- function mts_divider_top( $atts ) {
464
- do_action('wps_enqueue_style');
465
- return '<div class="top-of-page"><a href="#top">'.__('Back to Top', 'wp-shortcode').'</a></div>';
466
- }
467
-
468
- // Used to clear an element of its neighbors, no floating elements are allowed on the left or the right side.
469
- function mts_clear( $atts ) {
470
- do_action('wps_enqueue_style');
471
- return '<div class="clear"></div>';
472
- }
473
-
474
-
475
- /*-----------------------------------------------------------------------------------*/
476
- /* Tooltip
477
- /*-----------------------------------------------------------------------------------*/
478
-
479
- function mts_tooltip( $atts, $content ) {
480
- $atts = shortcode_atts(array(
481
- 'content' => '',
482
- 'gravity' => 'n',
483
- 'fade' => '0'
484
- ), $atts);
485
- do_action('wps_enqueue_style', 'tooltip');
486
- return '<span class="wp_shortcodes_tooltip" title="'.esc_attr( $atts['content'] ).'" data-gravity="'.esc_attr( $atts['gravity'] ).'" data-fade="'.esc_attr( $atts['fade'] ).'">'.$content.'</span>';
487
- }
488
-
489
- register_activation_hook( __FILE__, 'wp_shortcode_activation' );
490
-
491
- if(!function_exists('wp_shortcode_activation')) {
492
- function wp_shortcode_activation(){
493
- /* Loads activation functions */
494
- update_option('wp_shortcode_activated', time());
495
- }
496
- }
497
-
498
-
499
- /* Display a notice */
500
- add_action('admin_notices', 'wp_shortcode_admin_notice');
501
- function wp_shortcode_admin_notice() {
502
- global $current_user ;
503
- $user_id = $current_user->ID;
504
- /* Check that the user hasn't already clicked to ignore the message */
505
- /* Only show the notice 2 days after plugin activation */
506
- if ( ! get_user_meta($user_id, 'wp_shortcode_ignore_notice') && time() >= (get_option( 'wp_shortcode_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
507
- echo '<div class="updated notice-info wp-shortcode-notice" id="wpshortcode-notice" style="position:relative;">';
508
- printf(__('<p>Like WP Shortcode plugin? You will LOVE <a target="_blank" href="https://mythemeshop.com/plugins/wp-shortcode-pro/?utm_source=WP+Shortcode&utm_medium=Notification+Link&utm_content=WP+Shortcode+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Shortcode Pro!</strong></a></p><a class="notice-dismiss mts-notice-dismiss" data-ignore="0" href="%1$s"></a>', 'wp-shortcode'), '?wp_shortcode_admin_notice_ignore=0');
509
- echo "</div>";
510
- }
511
- /* Other notice appears right after activating */
512
- /* And it gets hidden after showing 3 times */
513
- if ( ! get_user_meta($user_id, 'wp_shortcode_ignore_notice_2') && get_option('wp_shortcode_notice_views', 0) < 3 && get_option( 'wp_shortcode_activated', 0 ) ) {
514
- $views = get_option('wp_shortcode_notice_views', 0);
515
- update_option( 'wp_shortcode_notice_views', ($views + 1) );
516
- echo '<div class="updated notice-info wp-shortcode-notice" id="wpshortcode-notice2" style="position:relative;">';
517
- echo '<p>';
518
- _e('Thank you for trying WP Shortcode. We hope you will like it.', 'wp-shortcode');
519
- echo '</p><a class="notice-dismiss mts-notice-dismiss" data-ignore="1" href="?wp_shortcode_admin_notice_ignore=0"></a>';
520
- echo "</div>";
521
- }
522
- }
523
-
524
- add_action('wp_ajax_mts_dismiss_plugin_notice', function(){
525
- global $current_user;
526
- $user_id = $current_user->ID;
527
- /* If user clicks to ignore the notice, add that to their user meta */
528
- if ( isset($_POST['dismiss']) ) {
529
- if ( '0' == $_POST['dismiss'] ) {
530
- add_user_meta($user_id, 'wp_shortcode_ignore_notice', '1', true);
531
- } elseif ( '1' == $_POST['dismiss'] ) {
532
- add_user_meta($user_id, 'wp_shortcode_ignore_notice_2', '1', true);
533
- }
534
- }
535
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.4.16
8
+ * Author URI: http://mythemeshop.com/
9
+ * MTS Product Type: Free
10
+ *
11
+ * @package WP_Shortcode
12
+ */
13
+
14
+ // If this file is called directly, abort.
15
+ if ( ! defined( 'WPINC' ) ) {
16
+ die;
17
+ }
18
+
19
+ define( 'WS_VERSION', '1.4.16' );
20
+
21
+ add_action( 'wp_enqueue_scripts', 'mts_wpshortcodes_scripts', 99 );
22
+ /**
23
+ * Register Plugin Scritps.
24
+ */
25
+ function mts_wpshortcodes_scripts() {
26
+ wp_register_style( 'tipsy', plugins_url( 'css/tipsy.css', __FILE__ ), null, WS_VERSION );
27
+ wp_register_style( 'mts_wpshortcodes', plugins_url( 'css/wp-shortcode.css', __FILE__ ), null, WS_VERSION );
28
+ wp_register_script( 'tipsy', plugins_url( 'js/jquery.tipsy.js', __FILE__ ), null, array( 'jquery' ), WS_VERSION );
29
+ wp_register_script( 'mts_wpshortcodes', plugins_url( 'js/wp-shortcode.js', __FILE__ ), null, array( 'jquery' ), null, WS_VERSION );
30
+ }
31
+
32
+ add_action(
33
+ 'admin_enqueue_scripts',
34
+ function() {
35
+ wp_enqueue_script( 'mts_wpshortcodes_admin', plugins_url( 'js/admin.js', __FILE__ ), null, array( 'jquery' ), WS_VERSION );
36
+ }
37
+ );
38
+
39
+ /**
40
+ * Enqueue Scripts.
41
+ *
42
+ * @param string $shortcode Shortcode.
43
+ */
44
+ function mts_wps_enqueue_scripts( $shortcode = '' ) {
45
+ if ( $shortcode == 'tooltip' ) {
46
+ wp_enqueue_style( 'tipsy' );
47
+ wp_enqueue_script( 'tipsy' );
48
+ }
49
+ wp_enqueue_style( 'mts_wpshortcodes' );
50
+ if ( $shortcode == 'tooltip' || $shortcode == 'tabs' || $shortcode == 'toggle' ) {
51
+ wp_enqueue_script( 'mts_wpshortcodes' );
52
+ }
53
+ }
54
+ add_action( 'wps_enqueue_style', 'mts_wps_enqueue_scripts', 10, 1 );
55
+
56
+ /**
57
+ * Load Textdomain.
58
+ */
59
+ function mts_wpshortcodes_load_textdomain() {
60
+ load_plugin_textdomain( 'wp-shortcode', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
61
+ }
62
+ add_action( 'plugins_loaded', 'mts_wpshortcodes_load_textdomain' );
63
+
64
+ // hide built-in shortcodes button for MTS themes.
65
+ add_action( 'admin_head', 'mts_wpshortcodes_theme_compatibility' );
66
+
67
+ /**
68
+ * Add theme compatibility.
69
+ */
70
+ function mts_wpshortcodes_theme_compatibility() {
71
+ echo '<style type="text/css">#content_mnmpanel {display: none;}</style>';
72
+ }
73
+
74
+ // Include TinyMCE.
75
+ require 'tinymce/tinymce.php';
76
+
77
+ // override theme shortcodes.
78
+ add_action( 'after_setup_theme', 'mts_wpshortcodes_add' );
79
+
80
+ /**
81
+ * Add Shortcodes.
82
+ */
83
+ function mts_wpshortcodes_add() {
84
+ remove_shortcode( 'button-brown' );
85
+ add_shortcode( 'button-brown', 'mts_button_brown' );
86
+ remove_shortcode( 'button-blue' );
87
+ add_shortcode( 'button-blue', 'mts_button_blue' );
88
+ remove_shortcode( 'button-green' );
89
+ add_shortcode( 'button-green', 'mts_button_green' );
90
+ remove_shortcode( 'button-red' );
91
+ add_shortcode( 'button-red', 'mts_button_red' );
92
+ remove_shortcode( 'button-white' );
93
+ add_shortcode( 'button-white', 'mts_button_white' );
94
+ remove_shortcode( 'button-yellow' );
95
+ add_shortcode( 'button-yellow', 'mts_button_yellow' );
96
+ remove_shortcode( 'alert-note' );
97
+ add_shortcode( 'alert-note', 'mts_alert_note' );
98
+ remove_shortcode( 'alert-announce' );
99
+ add_shortcode( 'alert-announce', 'mts_alert_announce' );
100
+ remove_shortcode( 'alert-success' );
101
+ add_shortcode( 'alert-success', 'mts_alert_success' );
102
+ remove_shortcode( 'alert-warning' );
103
+ add_shortcode( 'alert-warning', 'mts_alert_warning' );
104
+ remove_shortcode( 'one_third' );
105
+ add_shortcode( 'one_third', 'mts_one_third' );
106
+ remove_shortcode( 'one_third_last' );
107
+ add_shortcode( 'one_third_last', 'mts_one_third_last' );
108
+ remove_shortcode( 'two_third' );
109
+ add_shortcode( 'two_third', 'mts_two_third' );
110
+ remove_shortcode( 'two_third_last' );
111
+ add_shortcode( 'two_third_last', 'mts_two_third_last' );
112
+ remove_shortcode( 'one_half' );
113
+ add_shortcode( 'one_half', 'mts_one_half' );
114
+ remove_shortcode( 'one_half_last' );
115
+ add_shortcode( 'one_half_last', 'mts_one_half_last' );
116
+ remove_shortcode( 'one_fourth' );
117
+ add_shortcode( 'one_fourth', 'mts_one_fourth' );
118
+ remove_shortcode( 'one_fourth_last' );
119
+ add_shortcode( 'one_fourth_last', 'mts_one_fourth_last' );
120
+ remove_shortcode( 'three_fourth' );
121
+ add_shortcode( 'three_fourth', 'mts_three_fourth' );
122
+ remove_shortcode( 'three_fourth_last' );
123
+ add_shortcode( 'three_fourth_last', 'mts_three_fourth_last' );
124
+ remove_shortcode( 'one_fifth' );
125
+ add_shortcode( 'one_fifth', 'mts_one_fifth' );
126
+ remove_shortcode( 'one_fifth_last' );
127
+ add_shortcode( 'one_fifth_last', 'mts_one_fifth_last' );
128
+ remove_shortcode( 'two_fifth' );
129
+ add_shortcode( 'two_fifth', 'mts_two_fifth' );
130
+ remove_shortcode( 'two_fifth_last' );
131
+ add_shortcode( 'two_fifth_last', 'mts_two_fifth_last' );
132
+ remove_shortcode( 'three_fifth' );
133
+ add_shortcode( 'three_fifth', 'mts_three_fifth' );
134
+ remove_shortcode( 'three_fifth_last' );
135
+ add_shortcode( 'three_fifth_last', 'mts_three_fifth_last' );
136
+ remove_shortcode( 'four_fifth' );
137
+ add_shortcode( 'four_fifth', 'mts_four_fifth' );
138
+ remove_shortcode( 'four_fifth_last' );
139
+ add_shortcode( 'four_fifth_last', 'mts_four_fifth_last' );
140
+ remove_shortcode( 'one_sixth' );
141
+ add_shortcode( 'one_sixth', 'mts_one_sixth' );
142
+ remove_shortcode( 'one_sixth_last' );
143
+ add_shortcode( 'one_sixth_last', 'mts_one_sixth_last' );
144
+ remove_shortcode( 'five_sixth' );
145
+ add_shortcode( 'five_sixth', 'mts_five_sixth' );
146
+ remove_shortcode( 'five_sixth_last' );
147
+ add_shortcode( 'five_sixth_last', 'mts_five_sixth_last' );
148
+ remove_shortcode( 'youtube' );
149
+ add_shortcode( 'youtube', 'mts_youtube_video' );
150
+ remove_shortcode( 'vimeo' );
151
+ add_shortcode( 'vimeo', 'mts_vimeo_video' );
152
+ remove_shortcode( 'googlemap' );
153
+ add_shortcode( 'googlemap', 'mts_googleMaps' );
154
+ remove_shortcode( 'tabs' );
155
+ add_shortcode( 'tabs', 'mts_tabs' );
156
+ remove_shortcode( 'toggle' );
157
+ add_shortcode( 'toggle', 'mts_toggle' );
158
+ remove_shortcode( 'divider' );
159
+ add_shortcode( 'divider', 'mts_divider' );
160
+ remove_shortcode( 'divider_top' );
161
+ add_shortcode( 'divider_top', 'mts_divider_top' );
162
+ remove_shortcode( 'clear' );
163
+ add_shortcode( 'clear', 'mts_clear' );
164
+ add_shortcode( 'tooltip', 'mts_tooltip' );
165
+ }
166
+
167
+
168
+ /**
169
+ * Brown Button.
170
+ *
171
+ * @param array $atts Attributes.
172
+ * @param mix $content Content.
173
+ */
174
+ function mts_button_brown( $atts, $content = null ) {
175
+ extract(shortcode_atts(array(
176
+ 'url' => '#',
177
+ 'target' => '_self',
178
+ 'position' => 'left',
179
+ 'rel' => '',
180
+ ),
181
+ $atts));
182
+
183
+ $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_brown " . sanitize_html_class( $position ) . "\"" . ( $rel? " rel=\"" . esc_attr( $rel ) . "\"" : "" ) . "><span class=\"left\">" . do_shortcode( $content ) . "</span></a>";
184
+
185
+ if ( $position == 'center' ) {
186
+ $out = '<div class="button-center">' . $out . '</div>';
187
+ }
188
+
189
+ do_action( 'wps_enqueue_style' );
190
+ return $out;
191
+ }
192
+
193
+ /**
194
+ * Blue Button.
195
+ *
196
+ * @param array $atts Attributes.
197
+ * @param mix $content Content.
198
+ */
199
+ function mts_button_blue( $atts, $content = null ) {
200
+ extract(
201
+ shortcode_atts(
202
+ array(
203
+ 'url' => '#',
204
+ 'target' => '_self',
205
+ 'position' => 'left',
206
+ 'rel' => '',
207
+ ),
208
+ $atts
209
+ )
210
+ );
211
+
212
+ $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_blue " . sanitize_html_class( $position ) . "\"" . ( $rel? " rel=\"" . esc_attr( $rel ) . "\"" : "" ) . "><span class=\"left\">" . do_shortcode( $content ) . "</span></a>";
213
+
214
+ if ( $position == 'center' ) {
215
+ $out = '<div class="button-center">' . $out . '</div>';
216
+ }
217
+
218
+ do_action( 'wps_enqueue_style' );
219
+ return $out;
220
+ }
221
+
222
+ /**
223
+ * Green Button.
224
+ *
225
+ * @param array $atts Attributes.
226
+ * @param mix $content Content.
227
+ */
228
+ function mts_button_green( $atts, $content = null ) {
229
+ extract(
230
+ shortcode_atts(
231
+ array(
232
+ 'url' => '#',
233
+ 'target' => '_self',
234
+ 'position' => 'left',
235
+ 'rel' => '',
236
+ ),
237
+ $atts
238
+ )
239
+ );
240
+
241
+ $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_green " . sanitize_html_class( $position ) . "\"" . ( $rel? " rel=\"" . esc_attr( $rel ) . "\"" : "" ) . "><span class=\"left\">" . do_shortcode( $content ) . "</span></a>";
242
+
243
+ if ( $position == 'center' ) {
244
+ $out = '<div class="button-center">' . $out . '</div>';
245
+ }
246
+
247
+ do_action( 'wps_enqueue_style' );
248
+ return $out;
249
+ }
250
+
251
+ /**
252
+ * Red Button.
253
+ *
254
+ * @param array $atts Attributes.
255
+ * @param mix $content Content.
256
+ */
257
+ function mts_button_red( $atts, $content = null ) {
258
+ extract(
259
+ shortcode_atts(
260
+ array(
261
+ 'url' => '#',
262
+ 'target' => '_self',
263
+ 'position' => 'left',
264
+ 'rel' => '',
265
+ ),
266
+ $atts
267
+ )
268
+ );
269
+
270
+ $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_red " . sanitize_html_class( $position ) . "\"" . ( $rel? " rel=\"" . esc_attr( $rel ) . "\"" : "" ) . "><span class=\"left\">" . do_shortcode( $content ) . "</span></a>";
271
+
272
+ if ( $position == 'center' ) {
273
+ $out = '<div class="button-center">' . $out . '</div>';
274
+ }
275
+
276
+ do_action( 'wps_enqueue_style' );
277
+ return $out;
278
+ }
279
+
280
+ /**
281
+ * White Button.
282
+ *
283
+ * @param array $atts Attributes.
284
+ * @param mix $content Content.
285
+ */
286
+ function mts_button_white( $atts, $content = null ) {
287
+ extract(
288
+ shortcode_atts(
289
+ array(
290
+ 'url' => '#',
291
+ 'target' => '_self',
292
+ 'position' => 'left',
293
+ 'rel' => '',
294
+ ),
295
+ $atts
296
+ )
297
+ );
298
+
299
+ $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_white " . sanitize_html_class( $position ) . "\"" . ( $rel? " rel=\"" . esc_attr( $rel ) . "\"" : "" ) . "><span class=\"left\">" . do_shortcode( $content ) . "</span></a>";
300
+
301
+ if ( $position == 'center' ) {
302
+ $out = '<div class="button-center">' . $out . '</div>';
303
+ }
304
+
305
+ do_action( 'wps_enqueue_style' );
306
+ return $out;
307
+ }
308
+
309
+ /**
310
+ * Yellow Button.
311
+ *
312
+ * @param array $atts Attributes.
313
+ * @param mix $content Content.
314
+ */
315
+ function mts_button_yellow( $atts, $content = null ) {
316
+ extract(
317
+ shortcode_atts(
318
+ array(
319
+ 'url' => '#',
320
+ 'target' => '_self',
321
+ 'position' => 'left',
322
+ 'rel' => '',
323
+ ),
324
+ $atts
325
+ )
326
+ );
327
+
328
+ $out = "<a href=\"" . esc_url( $url ) . "\" target=\"" . esc_attr( $target ) . "\" class=\"buttons btn_yellow " . sanitize_html_class( $position ) . "\"" . ( $rel? " rel=\"" . esc_attr( $rel ) . "\"" : "" ) . "><span class=\"left\">" . do_shortcode( $content ) . "</span></a>";
329
+
330
+ if ( $position == 'center' ) {
331
+ $out = '<div class="button-center">' . $out . '</div>';
332
+ }
333
+
334
+ do_action( 'wps_enqueue_style' );
335
+ return $out;
336
+ }
337
+
338
+ /**
339
+ * Alter Note.
340
+ *
341
+ * @param array $atts Attributes.
342
+ * @param mix $content Content.
343
+ */
344
+ function mts_alert_note( $atts, $content = null ) {
345
+ extract(
346
+ shortcode_atts(
347
+ array(
348
+ 'style' => 'note',
349
+ ),
350
+ $atts
351
+ )
352
+ );
353
+ $out = "<div class=\"message_box note\"><p>" . do_shortcode( $content ) . "</p></div>";
354
+
355
+ do_action( 'wps_enqueue_style' );
356
+ return $out;
357
+ }
358
+
359
+ /**
360
+ * Alter announce.
361
+ *
362
+ * @param array $atts Attributes.
363
+ * @param mix $content Content.
364
+ */
365
+ function mts_alert_announce( $atts, $content = null ) {
366
+ extract(
367
+ shortcode_atts(
368
+ array(
369
+ 'style' => 'announce',
370
+ ),
371
+ $atts
372
+ )
373
+ );
374
+
375
+ $out = "<div class=\"message_box announce\"><p>" . do_shortcode( $content ) . "</p></div>";
376
+
377
+ do_action( 'wps_enqueue_style' );
378
+ return $out;
379
+ }
380
+
381
+ /**
382
+ * Alter Success.
383
+ *
384
+ * @param array $atts Attributes.
385
+ * @param mix $content Content.
386
+ */
387
+ function mts_alert_success( $atts, $content = null ) {
388
+ extract(
389
+ shortcode_atts(
390
+ array(
391
+ 'style' => 'success',
392
+ ),
393
+ $atts
394
+ )
395
+ );
396
+
397
+ $out = "<div class=\"message_box success\"><p>" . do_shortcode( $content ) . "</p></div>";
398
+
399
+ do_action( 'wps_enqueue_style' );
400
+ return $out;
401
+ }
402
+
403
+ /**
404
+ * Alter Warning.
405
+ *
406
+ * @param array $atts Attributes.
407
+ * @param mix $content Content.
408
+ */
409
+ function mts_alert_warning( $atts, $content = null ) {
410
+ extract(
411
+ shortcode_atts(
412
+ array(
413
+ 'style' => 'warning',
414
+ ),
415
+ $atts
416
+ )
417
+ );
418
+
419
+ $out = "<div class=\"message_box warning\"><p>" . do_shortcode( $content ) . "</p></div>";
420
+
421
+ do_action( 'wps_enqueue_style' );
422
+ return $out;
423
+ }
424
+
425
+ /**
426
+ * Column.
427
+ *
428
+ * @param array $atts Attributes.
429
+ * @param mix $content Content.
430
+ */
431
+ function mts_one_third( $atts, $content = null ) {
432
+ do_action( 'wps_enqueue_style' );
433
+ return '<div class="one_third">' . do_shortcode( $content ) . '</div>';
434
+ }
435
+
436
+ /**
437
+ * Column.
438
+ *
439
+ * @param array $atts Attributes.
440
+ * @param mix $content Content.
441
+ */
442
+ function mts_one_third_last( $atts, $content = null ) {
443
+ do_action( 'wps_enqueue_style' );
444
+ return '<div class="one_third column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
445
+ }
446
+
447
+ /**
448
+ * Column.
449
+ *
450
+ * @param array $atts Attributes.
451
+ * @param mix $content Content.
452
+ */
453
+ function mts_two_third( $atts, $content = null ) {
454
+ do_action( 'wps_enqueue_style' );
455
+ return '<div class="two_third">' . do_shortcode( $content ) . '</div>';
456
+ }
457
+
458
+ /**
459
+ * Column.
460
+ *
461
+ * @param array $atts Attributes.
462
+ * @param mix $content Content.
463
+ */
464
+ function mts_two_third_last( $atts, $content = null ) {
465
+ do_action( 'wps_enqueue_style' );
466
+ return '<div class="two_third column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
467
+ }
468
+
469
+ /**
470
+ * Column.
471
+ *
472
+ * @param array $atts Attributes.
473
+ * @param mix $content Content.
474
+ */
475
+ function mts_one_half( $atts, $content = null ) {
476
+ do_action( 'wps_enqueue_style' );
477
+ return '<div class="one_half">' . do_shortcode( $content ) . '</div>';
478
+ }
479
+
480
+ /**
481
+ * Column.
482
+ *
483
+ * @param array $atts Attributes.
484
+ * @param mix $content Content.
485
+ */
486
+ function mts_one_half_last( $atts, $content = null ) {
487
+ do_action( 'wps_enqueue_style' );
488
+ return '<div class="one_half column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
489
+ }
490
+
491
+ /**
492
+ * Column.
493
+ *
494
+ * @param array $atts Attributes.
495
+ * @param mix $content Content.
496
+ */
497
+ function mts_one_fourth( $atts, $content = null ) {
498
+ do_action( 'wps_enqueue_style' );
499
+ return '<div class="one_fourth">' . do_shortcode( $content ) . '</div>';
500
+ }
501
+
502
+ /**
503
+ * Column.
504
+ *
505
+ * @param array $atts Attributes.
506
+ * @param mix $content Content.
507
+ */
508
+ function mts_one_fourth_last( $atts, $content = null ) {
509
+ do_action( 'wps_enqueue_style' );
510
+ return '<div class="one_fourth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
511
+ }
512
+
513
+ /**
514
+ * Column.
515
+ *
516
+ * @param array $atts Attributes.
517
+ * @param mix $content Content.
518
+ */
519
+ function mts_three_fourth( $atts, $content = null ) {
520
+ do_action( 'wps_enqueue_style' );
521
+ return '<div class="three_fourth">' . do_shortcode( $content ) . '</div>';
522
+ }
523
+
524
+ /**
525
+ * Column.
526
+ *
527
+ * @param array $atts Attributes.
528
+ * @param mix $content Content.
529
+ */
530
+ function mts_three_fourth_last( $atts, $content = null ) {
531
+ do_action( 'wps_enqueue_style' );
532
+ return '<div class="three_fourth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
533
+ }
534
+
535
+ /**
536
+ * Column.
537
+ *
538
+ * @param array $atts Attributes.
539
+ * @param mix $content Content.
540
+ */
541
+ function mts_one_fifth( $atts, $content = null ) {
542
+ do_action( 'wps_enqueue_style' );
543
+ return '<div class="one_fifth">' . do_shortcode( $content ) . '</div>';
544
+ }
545
+
546
+ /**
547
+ * Column.
548
+ *
549
+ * @param array $atts Attributes.
550
+ * @param mix $content Content.
551
+ */
552
+ function mts_one_fifth_last( $atts, $content = null ) {
553
+ do_action( 'wps_enqueue_style' );
554
+ return '<div class="one_fifth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
555
+ }
556
+
557
+ /**
558
+ * Column.
559
+ *
560
+ * @param array $atts Attributes.
561
+ * @param mix $content Content.
562
+ */
563
+ function mts_two_fifth( $atts, $content = null ) {
564
+ do_action( 'wps_enqueue_style' );
565
+ return '<div class="two_fifth">' . do_shortcode( $content ) . '</div>';
566
+ }
567
+
568
+ /**
569
+ * Column.
570
+ *
571
+ * @param array $atts Attributes.
572
+ * @param mix $content Content.
573
+ */
574
+ function mts_two_fifth_last( $atts, $content = null ) {
575
+ do_action( 'wps_enqueue_style' );
576
+ return '<div class="two_fifth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
577
+ }
578
+
579
+ /**
580
+ * Column.
581
+ *
582
+ * @param array $atts Attributes.
583
+ * @param mix $content Content.
584
+ */
585
+ function mts_three_fifth( $atts, $content = null ) {
586
+ do_action( 'wps_enqueue_style' );
587
+ return '<div class="three_fifth">' . do_shortcode( $content ) . '</div>';
588
+ }
589
+
590
+ /**
591
+ * Column.
592
+ *
593
+ * @param array $atts Attributes.
594
+ * @param mix $content Content.
595
+ */
596
+ function mts_three_fifth_last( $atts, $content = null ) {
597
+ do_action( 'wps_enqueue_style' );
598
+ return '<div class="three_fifth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
599
+ }
600
+
601
+ /**
602
+ * Column.
603
+ *
604
+ * @param array $atts Attributes.
605
+ * @param mix $content Content.
606
+ */
607
+ function mts_four_fifth( $atts, $content = null ) {
608
+ do_action( 'wps_enqueue_style' );
609
+ return '<div class="four_fifth">' . do_shortcode( $content ) . '</div>';
610
+ }
611
+
612
+ /**
613
+ * Column.
614
+ *
615
+ * @param array $atts Attributes.
616
+ * @param mix $content Content.
617
+ */
618
+ function mts_four_fifth_last( $atts, $content = null ) {
619
+ do_action( 'wps_enqueue_style' );
620
+ return '<div class="four_fifth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
621
+ }
622
+
623
+ /**
624
+ * Column.
625
+ *
626
+ * @param array $atts Attributes.
627
+ * @param mix $content Content.
628
+ */
629
+ function mts_one_sixth( $atts, $content = null ) {
630
+ do_action( 'wps_enqueue_style' );
631
+ return '<div class="one_sixth">' . do_shortcode( $content ) . '</div>';
632
+ }
633
+
634
+ /**
635
+ * Column.
636
+ *
637
+ * @param array $atts Attributes.
638
+ * @param mix $content Content.
639
+ */
640
+ function mts_one_sixth_last( $atts, $content = null ) {
641
+ do_action( 'wps_enqueue_style' );
642
+ return '<div class="one_sixth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
643
+ }
644
+
645
+ /**
646
+ * Column.
647
+ *
648
+ * @param array $atts Attributes.
649
+ * @param mix $content Content.
650
+ */
651
+ function mts_five_sixth( $atts, $content = null ) {
652
+ do_action( 'wps_enqueue_style' );
653
+ return '<div class="five_sixth">' . do_shortcode( $content ) . '</div>';
654
+ }
655
+
656
+ /**
657
+ * Column.
658
+ *
659
+ * @param array $atts Attributes.
660
+ * @param mix $content Content.
661
+ */
662
+ function mts_five_sixth_last( $atts, $content = null ) {
663
+ do_action( 'wps_enqueue_style' );
664
+ return '<div class="five_sixth column-last">' . do_shortcode( $content ) . '</div><div class="clear"></div>';
665
+ }
666
+
667
+ /**
668
+ * YouTube Video.
669
+ *
670
+ * @param array $atts Attributes.
671
+ * @param mix $content Content.
672
+ */
673
+ function mts_youtube_video( $atts, $content = null ) {
674
+ extract(
675
+ shortcode_atts(
676
+ array(
677
+ 'id' => '',
678
+ 'width' => '600',
679
+ 'height' => '340',
680
+ 'position' => 'left',
681
+ ),
682
+ $atts
683
+ )
684
+ );
685
+
686
+ $out = "<div class=\"youtube-video " . sanitize_html_class( $position ) . "\"><iframe width=\"" . esc_attr( $width ) . "\" height=\"" . esc_attr( $height ) . "\" src=\"//www.youtube.com/embed/" . esc_attr( $id ) . "?rel=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
687
+
688
+ do_action( 'wps_enqueue_style' );
689
+ return $out;
690
+ }
691
+
692
+ /**
693
+ * Vimeo Video.
694
+ *
695
+ * @param array $atts Attributes.
696
+ * @param mix $content Content.
697
+ */
698
+ function mts_vimeo_video( $atts, $content = null ) {
699
+ extract(
700
+ shortcode_atts(
701
+ array(
702
+ 'id' => '',
703
+ 'width' => '600',
704
+ 'height' => '340',
705
+ 'position' => 'left',
706
+ ),
707
+ $atts
708
+ )
709
+ );
710
+
711
+ $out = "<div class=\"vimeo-video " . sanitize_html_class( $position ) . "\"><iframe width=\"" . esc_attr( $width ) . "\" height=\"" . esc_attr( $height ) . "\" src=\"//player.vimeo.com/video/" . esc_attr( $id ) . "?title=0&amp;byline=0&amp;portrait=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
712
+
713
+ do_action( 'wps_enqueue_style' );
714
+
715
+ return $out;
716
+ }
717
+
718
+ /**
719
+ * Google Maps Shortcode.
720
+ *
721
+ * @param array $atts Attributes.
722
+ * @param mix $content Content.
723
+ */
724
+ function mts_googleMaps( $atts, $content = null ) {
725
+ extract(
726
+ shortcode_atts(
727
+ array(
728
+ 'width' => '640',
729
+ 'height' => '480',
730
+ 'address' => '',
731
+ 'src' => '', // for backwards compatibility.
732
+ 'position' => 'left',
733
+ ),
734
+ $atts
735
+ )
736
+ );
737
+
738
+ if ( ! empty( $src ) ) {
739
+ $out = "<div class=\"googlemaps " . sanitize_html_class( $position ) . "\"><iframe width=\"" . esc_attr( $width ) . "\" height=\"" . esc_attr( $height ) . "\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"".esc_url( $src ) . "&output=embed\"></iframe></div>";
740
+ } else {
741
+ $out = "<div class=\"googlemaps " . sanitize_html_class( $position ) . "\"><iframe width=\"" . esc_attr( $width ) . "\" height=\"" . esc_attr( $height ) . "\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"//maps.google.com/maps?q=".urlencode( $address ) . "&output=embed\"></iframe></div>";
742
+ }
743
+
744
+ do_action( 'wps_enqueue_style' );
745
+
746
+ return $out;
747
+ }
748
+
749
+ /**
750
+ * Tabs Shortcode.
751
+ *
752
+ * @param array $atts Attributes.
753
+ * @param mix $content Content.
754
+ */
755
+ function mts_tabs( $atts, $content = null ) {
756
+
757
+ if ( ! preg_match_all( "/(.?)\[(tab)\b(.*?)(?:(\/))?\](?:(.+?)\[\/tab\])?(.?)/s", $content, $matches ) ) {
758
+ return do_shortcode( $content );
759
+ } else {
760
+ for ( $i = 0; $i < count( $matches[0]); $i++ ) {
761
+ $matches[3][ $i ] = shortcode_atts(
762
+ array( 'title' => __( 'Untitled', 'wp-shortcode' ) ),
763
+ shortcode_parse_atts( $matches[3][ $i ] )
764
+ );
765
+ $tabid[ $i ] = 'tab-' . $i . '-' . str_replace( '%', '', strtolower( sanitize_title( $matches[3][ $i ]['title'] ) ) );
766
+ }
767
+
768
+ $tabnav = '<ul class="wps_tabs">';
769
+
770
+ for ( $i = 0; $i < count( $matches[0] ); $i++ ) {
771
+ $tabnav .= '<li><a href="#" data-tab="' . $tabid[ $i ] . '">' . $matches[3][ $i ]['title'] . '</a></li>';
772
+ }
773
+ $tabnav .= '</ul>';
774
+
775
+ $tabcontent = '<div class="tab_container">';
776
+
777
+ for ( $i = 0; $i < count( $matches[0] ); $i++ ) {
778
+ $tabcontent .= '<div id="' . $tabid[ $i ] . '" class="tab_content clearfix">' . do_shortcode( trim( $matches[5][ $i ] ) ) . '</div>';
779
+ }
780
+ $tabcontent .= '</div>';
781
+
782
+ do_action( 'wps_enqueue_style', 'tabs' );
783
+ return '<div class="tab_widget wp_shortcodes_tabs">' . $tabnav . $tabcontent . '</div><div class="clear"></div>';
784
+ }
785
+
786
+ }
787
+ add_filter( 'no_texturize_shortcodes', 'no_texturize_tabs' );
788
+
789
+ /**
790
+ * Don't texturize Tabs.
791
+ *
792
+ * @param array $shortcodes Shortcodes.
793
+ */
794
+ function no_texturize_tabs( $shortcodes ) {
795
+ $shortcodes[] = 'tabs';
796
+ return $shortcodes;
797
+ }
798
+
799
+ /**
800
+ * Toggle Shortcode.
801
+ *
802
+ * @param array $atts Attributes.
803
+ * @param mix $content Content.
804
+ */
805
+ function mts_toggle( $atts, $content = null ) {
806
+ extract(
807
+ shortcode_atts(
808
+ array(
809
+ 'title' => __( 'Toggle Title', 'wp-shortcode' ),
810
+ ),
811
+ $atts
812
+ )
813
+ );
814
+
815
+ do_action( 'wps_enqueue_style', 'toggle' );
816
+ return '<div class="toggle clearfix wp_shortcodes_toggle"><div class="wps_togglet"><span>' . wp_kses_post( $title ) . '</span></div><div class="togglec clearfix">' . do_shortcode( trim( $content ) ) . '</div></div><div class="clear"></div>';
817
+ }
818
+
819
+ /**
820
+ * Simple Divider Shortcode.
821
+ *
822
+ * @param array $atts Attributes.
823
+ */
824
+ function mts_divider( $atts ) {
825
+ do_action( 'wps_enqueue_style' );
826
+ return '<div class="divider"></div>';
827
+ }
828
+
829
+ /**
830
+ * Divider with Anchor Link Shortcode.
831
+ *
832
+ * @param array $atts Attributes.
833
+ */
834
+ function mts_divider_top( $atts ) {
835
+ do_action( 'wps_enqueue_style' );
836
+ return '<div class="top-of-page"><a href="#top">' . __( 'Back to Top', 'wp-shortcode' ) . '</a></div>';
837
+ }
838
+
839
+ /**
840
+ * Clear Shortcode.
841
+ *
842
+ * @param array $atts Attributes.
843
+ */
844
+ function mts_clear( $atts ) {
845
+ do_action( 'wps_enqueue_style' );
846
+ return '<div class="clear"></div>';
847
+ }
848
+
849
+
850
+ /**
851
+ * Tooltip Shortcode.
852
+ *
853
+ * @param array $atts Attributes.
854
+ * @param mix $content Content.
855
+ */
856
+ function mts_tooltip( $atts, $content ) {
857
+ $atts = shortcode_atts(
858
+ array(
859
+ 'content' => '',
860
+ 'gravity' => 'n',
861
+ 'fade' => '0',
862
+ ),
863
+ $atts
864
+ );
865
+
866
+ do_action( 'wps_enqueue_style', 'tooltip' );
867
+ return '<span class="wp_shortcodes_tooltip" title="' . esc_attr( $atts['content'] ) . '" data-gravity="' . esc_attr( $atts['gravity'] ) . '" data-fade="' . esc_attr( $atts['fade'] ) . '">' . $content . '</span>';
868
+ }
869
+
870
+ register_activation_hook( __FILE__, 'wp_shortcode_activation' );
871
+
872
+ if ( ! function_exists( 'wp_shortcode_activation' ) ) {
873
+ /**
874
+ * Active the plugin.
875
+ */
876
+ function wp_shortcode_activation() {
877
+ /* Loads activation functions */
878
+ update_option( 'wp_shortcode_activated', time() );
879
+ }
880
+ }
881
+
882
+ add_action( 'admin_notices', 'wp_shortcode_admin_notice' );
883
+ /**
884
+ * Display Notice
885
+ */
886
+ function wp_shortcode_admin_notice() {
887
+ global $current_user;
888
+ $user_id = $current_user->ID;
889
+ /**
890
+ * Check that the user hasn't already clicked to ignore the message
891
+ * Only show the notice 2 days after plugin activation
892
+ */
893
+ if ( ! get_user_meta( $user_id, 'wp_shortcode_ignore_notice' ) && time() >= ( get_option( 'wp_shortcode_activated', 0 ) + ( 2 * 24 * 60 * 60 ) ) ) {
894
+ echo '<div class="updated notice-info wp-shortcode-notice" id="wpshortcode-notice" style="position:relative;">';
895
+ printf( __( '<p>Like WP Shortcode plugin? You will LOVE <a target="_blank" href="https://mythemeshop.com/plugins/wp-shortcode-pro/?utm_source=WP+Shortcode&utm_medium=Notification+Link&utm_content=WP+Shortcode+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Shortcode Pro!</strong></a></p><a class="notice-dismiss mts-notice-dismiss" data-ignore="0" href="%1$s"></a>', 'wp-shortcode' ), '?wp_shortcode_admin_notice_ignore=0' );
896
+ echo '</div>';
897
+ }
898
+ /**
899
+ * Other notice appears right after activating
900
+ * And it gets hidden after showing 3 times
901
+ */
902
+ if ( ! get_user_meta( $user_id, 'wp_shortcode_ignore_notice_2' ) && get_option( 'wp_shortcode_notice_views', 0 ) < 3 && get_option( 'wp_shortcode_activated', 0 ) ) {
903
+ $views = get_option( 'wp_shortcode_notice_views', 0 );
904
+ update_option( 'wp_shortcode_notice_views', ( $views + 1 ) );
905
+ echo '<div class="updated notice-info wp-shortcode-notice" id="wpshortcode-notice2" style="position:relative;">';
906
+ echo '<p>';
907
+ esc_attr_e( 'Thank you for trying WP Shortcode. We hope you will like it.', 'wp-shortcode' );
908
+ echo '</p><a class="notice-dismiss mts-notice-dismiss" data-ignore="1" href="?wp_shortcode_admin_notice_ignore=0"></a>';
909
+ echo '</div>';
910
+ }
911
+ }
912
+
913
+ add_action(
914
+ 'wp_ajax_mts_dismiss_plugin_notice',
915
+ function() {
916
+ global $current_user;
917
+ $user_id = $current_user->ID;
918
+ /* If user clicks to ignore the notice, add that to their user meta */
919
+ if ( isset( $_POST['dismiss'] ) ) {
920
+ if ( '0' === $_POST['dismiss'] ) {
921
+ add_user_meta( $user_id, 'wp_shortcode_ignore_notice', '1', true );
922
+ } elseif ( '1' === $_POST['dismiss'] ) {
923
+ add_user_meta( $user_id, 'wp_shortcode_ignore_notice_2', '1', true );
924
+ }
925
+ }
926
+ }
927
+ );