WP Shortcode by MyThemeShop - Version 1.3

Version Description

  • Added Tooltip shortcode
  • Fixed tab titles issue
  • Made embed URLs protocol-relative
Download this release

Release Info

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

Code changes from version 1.2 to 1.3

css/tipsy.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
4
+ /* Rounded corners */
5
+ .tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
6
+
7
+ /* Uncomment for shadow */
8
+ /*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
9
+
10
+ .tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
11
+
12
+ /* Rules to colour arrows */
13
+ .tipsy-arrow-n { border-bottom-color: #000; }
14
+ .tipsy-arrow-s { border-top-color: #000; }
15
+ .tipsy-arrow-e { border-left-color: #000; }
16
+ .tipsy-arrow-w { border-right-color: #000; }
17
+
18
+ .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; }
19
+ .tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
20
+ .tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
21
+ .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; }
22
+ .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
23
+ .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
24
+ .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; }
25
+ .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
File without changes
images/code.png CHANGED
File without changes
images/cross.png CHANGED
File without changes
images/speaker.png CHANGED
File without changes
images/thumb.png CHANGED
File without changes
images/tick.png CHANGED
File without changes
images/toggle-down.png CHANGED
File without changes
images/toggle-up.png CHANGED
File without changes
js/jquery.tipsy.js ADDED
@@ -0,0 +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);
js/wp-shortcode.js CHANGED
@@ -25,4 +25,14 @@ jQuery(document).ready(function($){
25
  });
26
  });
27
  }
 
 
 
 
 
 
 
 
 
 
28
  });
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
  });
languages/default.mo CHANGED
Binary file
languages/default.po CHANGED
@@ -3,16 +3,17 @@ msgstr ""
3
  "Project-Id-Version: WP Shortcode\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2014-04-17 10:16+0100\n"
6
- "PO-Revision-Date: 2014-04-17 10:16+0100\n"
7
- "Last-Translator: BalazsP <ppbb@freemail.hu>\n"
8
  "Language-Team: MyThemeShop\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
- "X-Poedit-Basepath: C:\\wamp\\www\\wpbeta\\wp-content\\plugins\\wp-shortcode\\languages\n"
14
- "X-Poedit-Language: English\n"
15
- "X-Poedit-Country: UNITED STATES\n"
 
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
  #: ../wp-shortcode.php:367
@@ -43,17 +44,16 @@ msgstr ""
43
  msgid "Brown Button"
44
  msgstr ""
45
 
46
- #: ../tinymce/shortcodes.php:11
47
- #: ../tinymce/shortcodes.php:22
48
- #: ../tinymce/shortcodes.php:33
49
- #: ../tinymce/shortcodes.php:44
50
- #: ../tinymce/shortcodes.php:55
51
- #: ../tinymce/shortcodes.php:66
52
  msgid "Button text"
53
  msgstr ""
54
 
55
  #: ../tinymce/shortcodes.php:12
56
- msgid "Inserts a brown button. Set target to <strong>_blank</strong> to open link in a new window."
 
 
57
  msgstr ""
58
 
59
  #: ../tinymce/shortcodes.php:21
@@ -61,7 +61,9 @@ msgid "Blue Button"
61
  msgstr ""
62
 
63
  #: ../tinymce/shortcodes.php:23
64
- msgid "Inserts a blue button. Set target to <strong>_blank</strong> to open link in a new window."
 
 
65
  msgstr ""
66
 
67
  #: ../tinymce/shortcodes.php:32
@@ -69,7 +71,9 @@ msgid "Green Button"
69
  msgstr ""
70
 
71
  #: ../tinymce/shortcodes.php:34
72
- msgid "Inserts a green button. Set target to <strong>_blank</strong> to open link in a new window."
 
 
73
  msgstr ""
74
 
75
  #: ../tinymce/shortcodes.php:43
@@ -77,7 +81,9 @@ msgid "Yellow Button"
77
  msgstr ""
78
 
79
  #: ../tinymce/shortcodes.php:45
80
- msgid "Inserts a yellow button. Set target to <strong>_blank</strong> to open link in a new window."
 
 
81
  msgstr ""
82
 
83
  #: ../tinymce/shortcodes.php:54
@@ -85,7 +91,9 @@ msgid "Red Button"
85
  msgstr ""
86
 
87
  #: ../tinymce/shortcodes.php:56
88
- msgid "Inserts a red button. Set target to <strong>_blank</strong> to open link in a new window."
 
 
89
  msgstr ""
90
 
91
  #: ../tinymce/shortcodes.php:65
@@ -93,7 +101,9 @@ msgid "White Button"
93
  msgstr ""
94
 
95
  #: ../tinymce/shortcodes.php:67
96
- msgid "Inserts a white button. Set target to <strong>_blank</strong> to open link in a new window."
 
 
97
  msgstr ""
98
 
99
  #: ../tinymce/shortcodes.php:72
@@ -208,61 +218,43 @@ msgid "Clear"
208
  msgstr ""
209
 
210
  #: ../tinymce/shortcodes.php:168
211
- msgid "Clear shortcode can be used to clear an element of its neighbors, no floating elements are allowed on the left or the right side."
 
 
212
  msgstr ""
213
 
214
  #: ../tinymce/shortcodes.php:176
215
  msgid "One Third"
216
  msgstr ""
217
 
218
- #: ../tinymce/shortcodes.php:177
219
- #: ../tinymce/shortcodes.php:185
220
- #: ../tinymce/shortcodes.php:193
221
- #: ../tinymce/shortcodes.php:201
222
- #: ../tinymce/shortcodes.php:209
223
- #: ../tinymce/shortcodes.php:217
224
- #: ../tinymce/shortcodes.php:225
225
- #: ../tinymce/shortcodes.php:233
226
- #: ../tinymce/shortcodes.php:241
227
- #: ../tinymce/shortcodes.php:249
228
- #: ../tinymce/shortcodes.php:257
229
- #: ../tinymce/shortcodes.php:265
230
- #: ../tinymce/shortcodes.php:273
231
- #: ../tinymce/shortcodes.php:281
232
- #: ../tinymce/shortcodes.php:289
233
- #: ../tinymce/shortcodes.php:297
234
- #: ../tinymce/shortcodes.php:305
235
- #: ../tinymce/shortcodes.php:313
236
- #: ../tinymce/shortcodes.php:321
237
- #: ../tinymce/shortcodes.php:329
238
- #: ../tinymce/shortcodes.php:337
239
- #: ../tinymce/shortcodes.php:345
240
  msgid "Column content"
241
  msgstr ""
242
 
243
- #: ../tinymce/shortcodes.php:179
244
- #: ../tinymce/shortcodes.php:187
245
- #: ../tinymce/shortcodes.php:195
246
- #: ../tinymce/shortcodes.php:203
247
- #: ../tinymce/shortcodes.php:211
248
- #: ../tinymce/shortcodes.php:219
249
- #: ../tinymce/shortcodes.php:227
250
- #: ../tinymce/shortcodes.php:235
251
- #: ../tinymce/shortcodes.php:243
252
- #: ../tinymce/shortcodes.php:251
253
- #: ../tinymce/shortcodes.php:259
254
- #: ../tinymce/shortcodes.php:267
255
- #: ../tinymce/shortcodes.php:275
256
- #: ../tinymce/shortcodes.php:283
257
- #: ../tinymce/shortcodes.php:291
258
- #: ../tinymce/shortcodes.php:299
259
- #: ../tinymce/shortcodes.php:307
260
- #: ../tinymce/shortcodes.php:315
261
- #: ../tinymce/shortcodes.php:323
262
- #: ../tinymce/shortcodes.php:331
263
- #: ../tinymce/shortcodes.php:339
264
- #: ../tinymce/shortcodes.php:347
265
- msgid "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>"
266
  msgstr ""
267
 
268
  #: ../tinymce/shortcodes.php:184
@@ -348,4 +340,3 @@ msgstr ""
348
  #: ../tinymce/shortcodes.php:344
349
  msgid "Five Sixth (Last)"
350
  msgstr ""
351
-
3
  "Project-Id-Version: WP Shortcode\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: 2014-04-17 10:16+0100\n"
6
+ "PO-Revision-Date: 2015-01-23 22:40+0530\n"
7
+ "Last-Translator: MyThemeShop <support-team@mythemeshop.com>\n"
8
  "Language-Team: MyThemeShop\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: C:\\wamp\\www\\wpbeta\\wp-content\\plugins\\wp-shortcode"
14
+ "\\languages\n"
15
+ "Language: en_US\n"
16
+ "X-Generator: Poedit 1.6.2\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
  #: ../wp-shortcode.php:367
44
  msgid "Brown Button"
45
  msgstr ""
46
 
47
+ #: ../tinymce/shortcodes.php:11 ../tinymce/shortcodes.php:22
48
+ #: ../tinymce/shortcodes.php:33 ../tinymce/shortcodes.php:44
49
+ #: ../tinymce/shortcodes.php:55 ../tinymce/shortcodes.php:66
 
 
 
50
  msgid "Button text"
51
  msgstr ""
52
 
53
  #: ../tinymce/shortcodes.php:12
54
+ msgid ""
55
+ "Inserts a brown button. Set target to <strong>_blank</strong> to open link "
56
+ "in a new window."
57
  msgstr ""
58
 
59
  #: ../tinymce/shortcodes.php:21
61
  msgstr ""
62
 
63
  #: ../tinymce/shortcodes.php:23
64
+ msgid ""
65
+ "Inserts a blue button. Set target to <strong>_blank</strong> to open link in "
66
+ "a new window."
67
  msgstr ""
68
 
69
  #: ../tinymce/shortcodes.php:32
71
  msgstr ""
72
 
73
  #: ../tinymce/shortcodes.php:34
74
+ msgid ""
75
+ "Inserts a green button. Set target to <strong>_blank</strong> to open link "
76
+ "in a new window."
77
  msgstr ""
78
 
79
  #: ../tinymce/shortcodes.php:43
81
  msgstr ""
82
 
83
  #: ../tinymce/shortcodes.php:45
84
+ msgid ""
85
+ "Inserts a yellow button. Set target to <strong>_blank</strong> to open link "
86
+ "in a new window."
87
  msgstr ""
88
 
89
  #: ../tinymce/shortcodes.php:54
91
  msgstr ""
92
 
93
  #: ../tinymce/shortcodes.php:56
94
+ msgid ""
95
+ "Inserts a red button. Set target to <strong>_blank</strong> to open link in "
96
+ "a new window."
97
  msgstr ""
98
 
99
  #: ../tinymce/shortcodes.php:65
101
  msgstr ""
102
 
103
  #: ../tinymce/shortcodes.php:67
104
+ msgid ""
105
+ "Inserts a white button. Set target to <strong>_blank</strong> to open link "
106
+ "in a new window."
107
  msgstr ""
108
 
109
  #: ../tinymce/shortcodes.php:72
218
  msgstr ""
219
 
220
  #: ../tinymce/shortcodes.php:168
221
+ msgid ""
222
+ "Clear shortcode can be used to clear an element of its neighbors, no "
223
+ "floating elements are allowed on the left or the right side."
224
  msgstr ""
225
 
226
  #: ../tinymce/shortcodes.php:176
227
  msgid "One Third"
228
  msgstr ""
229
 
230
+ #: ../tinymce/shortcodes.php:177 ../tinymce/shortcodes.php:185
231
+ #: ../tinymce/shortcodes.php:193 ../tinymce/shortcodes.php:201
232
+ #: ../tinymce/shortcodes.php:209 ../tinymce/shortcodes.php:217
233
+ #: ../tinymce/shortcodes.php:225 ../tinymce/shortcodes.php:233
234
+ #: ../tinymce/shortcodes.php:241 ../tinymce/shortcodes.php:249
235
+ #: ../tinymce/shortcodes.php:257 ../tinymce/shortcodes.php:265
236
+ #: ../tinymce/shortcodes.php:273 ../tinymce/shortcodes.php:281
237
+ #: ../tinymce/shortcodes.php:289 ../tinymce/shortcodes.php:297
238
+ #: ../tinymce/shortcodes.php:305 ../tinymce/shortcodes.php:313
239
+ #: ../tinymce/shortcodes.php:321 ../tinymce/shortcodes.php:329
240
+ #: ../tinymce/shortcodes.php:337 ../tinymce/shortcodes.php:345
 
 
 
 
 
 
 
 
 
 
 
241
  msgid "Column content"
242
  msgstr ""
243
 
244
+ #: ../tinymce/shortcodes.php:179 ../tinymce/shortcodes.php:187
245
+ #: ../tinymce/shortcodes.php:195 ../tinymce/shortcodes.php:203
246
+ #: ../tinymce/shortcodes.php:211 ../tinymce/shortcodes.php:219
247
+ #: ../tinymce/shortcodes.php:227 ../tinymce/shortcodes.php:235
248
+ #: ../tinymce/shortcodes.php:243 ../tinymce/shortcodes.php:251
249
+ #: ../tinymce/shortcodes.php:259 ../tinymce/shortcodes.php:267
250
+ #: ../tinymce/shortcodes.php:275 ../tinymce/shortcodes.php:283
251
+ #: ../tinymce/shortcodes.php:291 ../tinymce/shortcodes.php:299
252
+ #: ../tinymce/shortcodes.php:307 ../tinymce/shortcodes.php:315
253
+ #: ../tinymce/shortcodes.php:323 ../tinymce/shortcodes.php:331
254
+ #: ../tinymce/shortcodes.php:339 ../tinymce/shortcodes.php:347
255
+ msgid ""
256
+ "Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. "
257
+ "<br /><strong>One Third + One Third + One Third (Last)</strong>"
 
 
 
 
 
 
 
 
 
258
  msgstr ""
259
 
260
  #: ../tinymce/shortcodes.php:184
340
  #: ../tinymce/shortcodes.php:344
341
  msgid "Five Sixth (Last)"
342
  msgstr ""
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Creator's website link: http://mythemeshop.com/
4
  Tags: shortcodes, shortcode, shortcodes list, toggle shortcode, buttons, google map shortcode, youtube shortcode, viemo shortcode, alert shortcode, notification shortcode, column shortcodes
5
  Requires at least: 3.0.1
6
  Tested up to: 4.1
7
- Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,14 +48,19 @@ Please disable all plugins and check if shortcode plugin is working properly. Th
48
  7. Google Maps Shortcode
49
 
50
  == Changelog ==
51
-
 
 
 
 
 
52
  = 1.2 =
53
- * Made compatible with (with TinyMCE 3 & 4).
54
- * Made translation-ready
55
- * Added "centre" position for buttons.
56
 
57
  = 1.1 =
58
- * Fixed small issue in button shortcode CSS.
59
 
60
  = 1.0 =
61
  * Official plugin release.
4
  Tags: shortcodes, shortcode, shortcodes list, toggle shortcode, buttons, google map shortcode, youtube shortcode, viemo shortcode, alert shortcode, notification shortcode, column shortcodes
5
  Requires at least: 3.0.1
6
  Tested up to: 4.1
7
+ Stable tag: 1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
  7. Google Maps Shortcode
49
 
50
  == Changelog ==
51
+
52
+ = 1.3 =
53
+ * Added Tooltip shortcode
54
+ * Fixed tab titles issue
55
+ * Made embed URLs protocol-relative
56
+
57
  = 1.2 =
58
+ * Made compatible with (with TinyMCE 3 & 4).
59
+ * Made translation-ready
60
+ * Added "centre" position for buttons.
61
 
62
  = 1.1 =
63
+ * Fixed small issue in button shortcode CSS.
64
 
65
  = 1.0 =
66
  * Official plugin release.
tinymce/editor_plugin.css CHANGED
File without changes
tinymce/editor_plugin.js CHANGED
File without changes
tinymce/editor_plugin.php CHANGED
@@ -16,7 +16,7 @@ if ( !current_user_can('edit_pages') && !current_user_can('edit_posts') )
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>
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?v=1.3"></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>
tinymce/langs.php CHANGED
File without changes
tinymce/mnm_config.php CHANGED
File without changes
tinymce/shortcode.png CHANGED
File without changes
tinymce/shortcodes.php CHANGED
@@ -345,6 +345,21 @@ $shortcodes = array(
345
  "content" => __("Column content", "wpshortcode"),
346
  "content_field" => "textarea",
347
  "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  )
349
  );
350
  echo "<script type=\"text/javascript\">var shortcodes = ".json_encode($shortcodes).";</script>";
345
  "content" => __("Column content", "wpshortcode"),
346
  "content_field" => "textarea",
347
  "description" => __("Use column shortcodes in conjunction with their <em>(Last)</em> version, eg. <br /><strong>One Third + One Third + One Third (Last)</strong>", "wpshortcode")
348
+ ),
349
+ "tooltip" => array(
350
+ "self-closing" => false,
351
+ "atts" => array(
352
+ "content" => __("Tooltip content", "wpshortcode"),
353
+ "direction" => "n",
354
+ "fade" => "0"
355
+ ),
356
+ "att_labels" => array(
357
+ "content" => __("Tooltip content", "wpshortcode"),
358
+ "direction" => __("Direction (cardinal)", "wpshortcode"),
359
+ ),
360
+ "label" => __("Tooltip", "wpshortcode"),
361
+ "content" => __("Trigger text", "wpshortcode"),
362
+ "description" => __("Add a tooltip that appears on hover. Possible values for direction: nw | n | ne | w | e | sw | s | se", "wpshortcode")
363
  )
364
  );
365
  echo "<script type=\"text/javascript\">var shortcodes = ".json_encode($shortcodes).";</script>";
tinymce/tinymce.js CHANGED
@@ -49,7 +49,9 @@ jQuery(function($) {
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']) {
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
+ var label = index;
53
+ if (typeof shortcodes[mnm_shortcodeid]['att_labels'] !== 'undefined' && typeof shortcodes[mnm_shortcodeid]['att_labels'][index] !== 'undefined') label = shortcodes[mnm_shortcodeid]['att_labels'][index];
54
+ html += '<tr class="mnmshortcode_att_name"><td>'+label+'</td><td><input type="text" name="shortcode_att_'+index+'" id="shortcode_att_'+index+'" value="'+item+'" /></td></tr>';
55
  });
56
 
57
  if (!shortcodes[mnm_shortcodeid]['self-closing']) {
tinymce/tinymce.php CHANGED
File without changes
wp-shortcode.php CHANGED
@@ -4,15 +4,20 @@ Plugin Name: WP Shortcode by MyThemeShop
4
  Plugin URI: http://mythemeshop.com/
5
  Description: With the vast array of shortcodes, you can quickly and easily build content for your posts and pages and turbocharge your blogging experience.
6
  Author: MyThemeShop
7
- Version: 1.2
8
  Author URI: http://mythemeshop.com/
9
  */
10
 
11
  function mts_wpshortcodes_scripts() {
12
 
 
 
 
13
  wp_register_style('mts_wpshortcodes', plugins_url('css/wp-shortcode.css', __FILE__));
14
  wp_enqueue_style('mts_wpshortcodes');
15
 
 
 
16
  wp_register_script('mts_wpshortcodes', plugins_url('js/wp-shortcode.js', __FILE__), array('jquery'));
17
  wp_enqueue_script('mts_wpshortcodes');
18
  }
@@ -76,6 +81,7 @@ function mts_wpshortcodes_add() {
76
  remove_shortcode('divider'); add_shortcode('divider', 'mts_divider');
77
  remove_shortcode('divider_top'); add_shortcode('divider_top', 'mts_divider_top');
78
  remove_shortcode('clear'); add_shortcode('clear', 'mts_clear');
 
79
  }
80
 
81
 
@@ -297,9 +303,9 @@ function mts_youtube_video( $atts, $content = null ) {
297
  'id' => '',
298
  'width' => '600',
299
  'height' => '340',
300
- 'position' => 'left'
301
  ), $atts));
302
- $out = "<div class=\"youtube-video " .$position . "\"><iframe width=\"" .$width . "\" height=\"" .$height ."\" src=\"http://www.youtube.com/embed/" . $id . "?rel=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
303
  return $out;
304
  }
305
 
@@ -310,7 +316,7 @@ function mts_vimeo_video( $atts, $content = null ) {
310
  'height' => '340',
311
  'position' => 'left'
312
  ), $atts));
313
- $out = "<div class=\"vimeo-video " .$position . "\"><iframe width=\"" .$width . "\" height=\"" .$height ."\" src=\"http://player.vimeo.com/video/" . $id . "?title=0&amp;byline=0&amp;portrait=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
314
  return $out;
315
  }
316
 
@@ -362,6 +368,11 @@ function mts_tabs( $atts, $content = null ) {
362
  }
363
 
364
  }
 
 
 
 
 
365
 
366
  /*--------------------------------------------------------
367
  Toggles
@@ -393,4 +404,17 @@ function mts_clear( $atts ) {
393
  return '<div class="clear"></div>';
394
  }
395
 
 
 
 
 
 
 
 
 
 
 
 
 
 
396
  ?>
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.3
8
  Author URI: http://mythemeshop.com/
9
  */
10
 
11
  function mts_wpshortcodes_scripts() {
12
 
13
+ wp_register_style('tipsy', plugins_url('css/tipsy.css', __FILE__));
14
+ wp_enqueue_style( 'tipsy' );
15
+
16
  wp_register_style('mts_wpshortcodes', plugins_url('css/wp-shortcode.css', __FILE__));
17
  wp_enqueue_style('mts_wpshortcodes');
18
 
19
+ wp_register_script('tipsy', plugins_url('js/jquery.tipsy.js', __FILE__), array('jquery'));
20
+ wp_enqueue_script( 'tipsy' );
21
  wp_register_script('mts_wpshortcodes', plugins_url('js/wp-shortcode.js', __FILE__), array('jquery'));
22
  wp_enqueue_script('mts_wpshortcodes');
23
  }
81
  remove_shortcode('divider'); add_shortcode('divider', 'mts_divider');
82
  remove_shortcode('divider_top'); add_shortcode('divider_top', 'mts_divider_top');
83
  remove_shortcode('clear'); add_shortcode('clear', 'mts_clear');
84
+ add_shortcode('tooltip', 'mts_tooltip');
85
  }
86
 
87
 
303
  'id' => '',
304
  'width' => '600',
305
  'height' => '340',
306
+ 'position' => 'left'
307
  ), $atts));
308
+ $out = "<div class=\"youtube-video " .$position . "\"><iframe width=\"" .$width . "\" height=\"" .$height ."\" src=\"//www.youtube.com/embed/" . $id . "?rel=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
309
  return $out;
310
  }
311
 
316
  'height' => '340',
317
  'position' => 'left'
318
  ), $atts));
319
+ $out = "<div class=\"vimeo-video " .$position . "\"><iframe width=\"" .$width . "\" height=\"" .$height ."\" src=\"//player.vimeo.com/video/" . $id . "?title=0&amp;byline=0&amp;portrait=0\" frameborder=\"0\" allowfullscreen></iframe></div>";
320
  return $out;
321
  }
322
 
368
  }
369
 
370
  }
371
+ add_filter( 'no_texturize_shortcodes', 'no_texturize_tabs' );
372
+ function no_texturize_tabs($shortcodes){
373
+ $shortcodes[] = 'tabs';
374
+ return $shortcodes;
375
+ }
376
 
377
  /*--------------------------------------------------------
378
  Toggles
404
  return '<div class="clear"></div>';
405
  }
406
 
407
+
408
+ /*-----------------------------------------------------------------------------------*/
409
+ /* Tooltip
410
+ /*-----------------------------------------------------------------------------------*/
411
+
412
+ function mts_tooltip( $atts, $content ) {
413
+ $atts = shortcode_atts(array(
414
+ 'content' => '',
415
+ 'direction' => 'n',
416
+ 'fade' => '0'
417
+ ), $atts);
418
+ return '<span class="wp_shortcodes_tooltip" title="'.esc_attr( $atts['content'] ).'" data-gravity="'.esc_attr( $atts['direction'] ).'" data-fade="'.esc_attr( $atts['fade'] ).'">'.$content.'</span>';
419
+ }
420
  ?>