Version Description
- Fix - an issue with the border effect on glossy buttons
- Fix - remove
box-shadow
properties from FASC buttons by default, some themes such as twentyseventeen add this to all anchor tags - Fix - remove button rollover/hover effects from TinyMCE editor
- Fix - some issues when using multiple buttons in a post, and their settings not being saved/retrieved correctly
Download this release
Release Info
Developer | DesignsAndCode |
Plugin | Forget About Shortcode Buttons |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- admin/css/button-styles.css +41 -53
- admin/js/forget-about-shortcode-buttons-fasc-views.js +22 -1
- admin/js/mce/fasc-button.js +1 -25
- admin/js/mce/fasc-plugin.js +2 -2
- forget-about-shortcode-buttons.php +1 -1
- includes/class-forget-about-shortcode-buttons.php +1 -1
- public/css/button-styles.css +14 -6
- readme.txt +7 -1
admin/css/button-styles.css
CHANGED
@@ -8,10 +8,18 @@ a.fasc-button
|
|
8 |
color:#ffffff;
|
9 |
text-decoration:none;
|
10 |
margin: 3px 0;
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
-
a.fasc-button:hover
|
13 |
{
|
14 |
text-decoration:none;
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
/*a.fasc-button.fasc-ico:before, */
|
@@ -169,6 +177,7 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
169 |
}
|
170 |
|
171 |
|
|
|
172 |
/* sizes */
|
173 |
.fasc-size-xsmall
|
174 |
{
|
@@ -181,6 +190,7 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
181 |
font-size:12px;
|
182 |
padding:6px 8px;
|
183 |
border:0;
|
|
|
184 |
}
|
185 |
|
186 |
.fasc-size-medium
|
@@ -188,6 +198,7 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
188 |
font-size:14px;
|
189 |
padding:7px 9px;
|
190 |
font-size:14px;
|
|
|
191 |
border:0;
|
192 |
}
|
193 |
|
@@ -196,50 +207,50 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
196 |
font-size:18px;
|
197 |
padding:8px 10px;
|
198 |
border:0;
|
|
|
199 |
}
|
200 |
.fasc-size-xlarge
|
201 |
{
|
202 |
font-size:24px;
|
203 |
padding:11px 13px;
|
204 |
border:0;
|
|
|
205 |
}
|
206 |
|
207 |
|
208 |
/* Types */
|
209 |
.fasc-type-flat:hover
|
210 |
{
|
211 |
-
|
|
|
212 |
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
213 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
214 |
-
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))
|
215 |
}
|
216 |
|
217 |
|
218 |
/* glossy */
|
219 |
|
220 |
-
.fasc-type-glossy
|
221 |
-
{
|
222 |
background-color: #247edd;
|
223 |
-
border:1px solid rgba(0,0,0, 0.1);
|
224 |
-
/*text-shadow:5px solid rgba(0,0,0, 0.5);*/
|
225 |
|
226 |
-
/*-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
|
227 |
-
box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);*/
|
228 |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
229 |
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
230 |
background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
231 |
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
232 |
|
233 |
}
|
234 |
-
.fasc-type-glossy:hover
|
235 |
{
|
236 |
-
|
237 |
-
|
238 |
-
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.1), 0(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
239 |
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
240 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
241 |
-
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1))
|
242 |
|
|
|
243 |
}
|
244 |
|
245 |
.fasc-type-glossy.fasc-size-xlarge
|
@@ -265,75 +276,50 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
265 |
|
266 |
|
267 |
|
268 |
-
/* 3d */
|
269 |
-
.fasc-type-popout.fasc-size-xlarge
|
|
|
270 |
{
|
271 |
-webkit-box-shadow: 7px 7px 0px #777777;
|
272 |
-moz-box-shadow: 7px 7px 0px #777777;
|
273 |
box-shadow: 7px 7px 0px #777777;
|
274 |
}
|
275 |
-
.fasc-type-popout.fasc-size-large
|
|
|
276 |
{
|
277 |
-webkit-box-shadow: 6px 6px 0px #777777;
|
278 |
-moz-box-shadow: 6px 6px 0px #777777;
|
279 |
box-shadow: 6px 6px 0px #777777;
|
280 |
}
|
281 |
-
.fasc-type-popout.fasc-size-medium
|
282 |
-
|
283 |
-
-webkit-box-shadow: 5px 5px 0px #777777;
|
284 |
-
-moz-box-shadow: 5px 5px 0px #777777;
|
285 |
-
box-shadow: 5px 5px 0px #777777;
|
286 |
-
}
|
287 |
-
.fasc-type-popout.fasc-size-small
|
288 |
-
{
|
289 |
-
-webkit-box-shadow: 4px 4px 0px #777777;
|
290 |
-
-moz-box-shadow: 4px 4px 0px #777777;
|
291 |
-
box-shadow: 4px 4px 0px #777777;
|
292 |
-
}
|
293 |
-
.fasc-type-popout.fasc-size-xsmall
|
294 |
-
{
|
295 |
-
-webkit-box-shadow: 3px 3px 0px #777777;
|
296 |
-
-moz-box-shadow: 3px 3px 0px #777777;
|
297 |
-
box-shadow: 3px 3px 0px #777777;
|
298 |
-
}
|
299 |
-
.fasc-type-popout.fasc-size-xlarge:hover
|
300 |
{
|
301 |
-webkit-box-shadow: 5px 5px 0px #777777;
|
302 |
-moz-box-shadow: 5px 5px 0px #777777;
|
303 |
box-shadow: 5px 5px 0px #777777;
|
304 |
}
|
305 |
-
.fasc-type-popout.fasc-size-
|
|
|
306 |
{
|
307 |
-webkit-box-shadow: 4px 4px 0px #777777;
|
308 |
-moz-box-shadow: 4px 4px 0px #777777;
|
309 |
box-shadow: 4px 4px 0px #777777;
|
310 |
}
|
311 |
-
.fasc-type-popout.fasc-size-
|
312 |
-
|
313 |
-
-webkit-box-shadow: 3px 3px 0px #777777;
|
314 |
-
-moz-box-shadow: 3px 3px 0px #777777;
|
315 |
-
box-shadow: 3px 3px 0px #777777;
|
316 |
-
}
|
317 |
-
.fasc-type-popout.fasc-size-small:hover
|
318 |
{
|
319 |
-webkit-box-shadow: 3px 3px 0px #777777;
|
320 |
-moz-box-shadow: 3px 3px 0px #777777;
|
321 |
box-shadow: 3px 3px 0px #777777;
|
322 |
-
}
|
323 |
-
.fasc-type-popout.fasc-size-xsmall:hover
|
324 |
-
{
|
325 |
-
-webkit-box-shadow: 2px 2px 0px #777777;
|
326 |
-
-moz-box-shadow: 2px 2px 0px #777777;
|
327 |
-
box-shadow: 2px 2px 0px #777777;
|
328 |
-
}
|
329 |
|
330 |
|
331 |
.fasc-type-popout:hover
|
332 |
{
|
333 |
-
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
334 |
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
335 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
336 |
-
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))
|
337 |
}
|
338 |
|
339 |
/* rounded */
|
@@ -358,6 +344,8 @@ a.fasc-button.rounded.fasc-size-xsmall, .fasc-rounded-medium.fasc-size-xsmall
|
|
358 |
border-radius:7px;
|
359 |
}
|
360 |
|
|
|
|
|
361 |
a.fasc-style-bold
|
362 |
{
|
363 |
font-weight:bold;
|
8 |
color:#ffffff;
|
9 |
text-decoration:none;
|
10 |
margin: 3px 0;
|
11 |
+
border:0;
|
12 |
+
-webkit-box-shadow: none;
|
13 |
+
-moz-box-shadow: none;
|
14 |
+
box-shadow: none;
|
15 |
+
box-sizing: border-box;
|
16 |
}
|
17 |
+
a.fasc-button:hover, a.fasc-button:focus, a.fasc-button:visited, a.fasc-button:active
|
18 |
{
|
19 |
text-decoration:none;
|
20 |
+
-webkit-box-shadow: none;
|
21 |
+
-moz-box-shadow: none;
|
22 |
+
box-shadow: none;
|
23 |
}
|
24 |
|
25 |
/*a.fasc-button.fasc-ico:before, */
|
177 |
}
|
178 |
|
179 |
|
180 |
+
|
181 |
/* sizes */
|
182 |
.fasc-size-xsmall
|
183 |
{
|
190 |
font-size:12px;
|
191 |
padding:6px 8px;
|
192 |
border:0;
|
193 |
+
line-height: 17px;
|
194 |
}
|
195 |
|
196 |
.fasc-size-medium
|
198 |
font-size:14px;
|
199 |
padding:7px 9px;
|
200 |
font-size:14px;
|
201 |
+
line-height: 19px;
|
202 |
border:0;
|
203 |
}
|
204 |
|
207 |
font-size:18px;
|
208 |
padding:8px 10px;
|
209 |
border:0;
|
210 |
+
line-height: 24px;
|
211 |
}
|
212 |
.fasc-size-xlarge
|
213 |
{
|
214 |
font-size:24px;
|
215 |
padding:11px 13px;
|
216 |
border:0;
|
217 |
+
line-height: 33px;
|
218 |
}
|
219 |
|
220 |
|
221 |
/* Types */
|
222 |
.fasc-type-flat:hover
|
223 |
{
|
224 |
+
/* remove hover effects for tinymce editor */
|
225 |
+
/*background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
226 |
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
227 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
228 |
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));*/
|
229 |
}
|
230 |
|
231 |
|
232 |
/* glossy */
|
233 |
|
234 |
+
a.fasc-type-glossy
|
235 |
+
{
|
236 |
background-color: #247edd;
|
237 |
+
border: 1px solid rgba(0,0,0, 0.1);
|
|
|
238 |
|
|
|
|
|
239 |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
240 |
background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
241 |
background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
242 |
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
243 |
|
244 |
}
|
245 |
+
a.fasc-type-glossy:hover
|
246 |
{
|
247 |
+
/* remove hover effects for tinymce editor */
|
248 |
+
/*background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.1), 0(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
|
|
249 |
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
250 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
251 |
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));*/
|
252 |
|
253 |
+
border: 1px solid rgba(0,0,0, 0.1);
|
254 |
}
|
255 |
|
256 |
.fasc-type-glossy.fasc-size-xlarge
|
276 |
|
277 |
|
278 |
|
279 |
+
/* 3d */ /* changes to prevent rollover, :hover should be set to same as regular */
|
280 |
+
.fasc-type-popout.fasc-size-xlarge,
|
281 |
+
.fasc-type-popout.fasc-size-xlarge:hover
|
282 |
{
|
283 |
-webkit-box-shadow: 7px 7px 0px #777777;
|
284 |
-moz-box-shadow: 7px 7px 0px #777777;
|
285 |
box-shadow: 7px 7px 0px #777777;
|
286 |
}
|
287 |
+
.fasc-type-popout.fasc-size-large,
|
288 |
+
.fasc-type-popout.fasc-size-large:hover
|
289 |
{
|
290 |
-webkit-box-shadow: 6px 6px 0px #777777;
|
291 |
-moz-box-shadow: 6px 6px 0px #777777;
|
292 |
box-shadow: 6px 6px 0px #777777;
|
293 |
}
|
294 |
+
.fasc-type-popout.fasc-size-medium,
|
295 |
+
.fasc-type-popout.fasc-size-medium:hover
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
{
|
297 |
-webkit-box-shadow: 5px 5px 0px #777777;
|
298 |
-moz-box-shadow: 5px 5px 0px #777777;
|
299 |
box-shadow: 5px 5px 0px #777777;
|
300 |
}
|
301 |
+
.fasc-type-popout.fasc-size-small,
|
302 |
+
.fasc-type-popout.fasc-size-small:hover
|
303 |
{
|
304 |
-webkit-box-shadow: 4px 4px 0px #777777;
|
305 |
-moz-box-shadow: 4px 4px 0px #777777;
|
306 |
box-shadow: 4px 4px 0px #777777;
|
307 |
}
|
308 |
+
.fasc-type-popout.fasc-size-xsmall,
|
309 |
+
.fasc-type-popout.fasc-size-xsmall:hover
|
|
|
|
|
|
|
|
|
|
|
310 |
{
|
311 |
-webkit-box-shadow: 3px 3px 0px #777777;
|
312 |
-moz-box-shadow: 3px 3px 0px #777777;
|
313 |
box-shadow: 3px 3px 0px #777777;
|
314 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
|
316 |
|
317 |
.fasc-type-popout:hover
|
318 |
{
|
319 |
+
/*background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
320 |
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
321 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
322 |
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));*/
|
323 |
}
|
324 |
|
325 |
/* rounded */
|
344 |
border-radius:7px;
|
345 |
}
|
346 |
|
347 |
+
|
348 |
+
|
349 |
a.fasc-style-bold
|
350 |
{
|
351 |
font-weight:bold;
|
admin/js/forget-about-shortcode-buttons-fasc-views.js
CHANGED
@@ -1,4 +1,25 @@
|
|
|
|
|
|
1 |
/*
|
2 |
* The TinyMCE view API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
*/
|
4 |
-
!function(a,b,c,d){"use strict";var e={},f={};b.mce=b.mce||{},b.mce.fascviews={register:function(a,b){},unregister:function(a){delete e[a]},get:function(a){return e[a]},unbind:function(){_.each(f,function(a){a.unbind()})},render:function(a){_.each(f,function(b){b.render(a)})},edit:function(a,b){var c=this.getInstance(b);c&&c.edit&&c.edit(c.text,function(d,e){c.update(d,a,b,e)})},remove:function(a,b){var c=this.getInstance(b);c&&c.remove(a,b)}},b.mce.View=function(a){_.extend(this,a),this.initialize()},b.mce.View.extend=Backbone.View.extend,_.extend(b.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content}})}(window,window.wp,window.wp.shortcode,window.jQuery);
|
1 |
+
/* global tinymce */
|
2 |
+
|
3 |
/*
|
4 |
* The TinyMCE view API.
|
5 |
+
*
|
6 |
+
* Note: this API is "experimental" meaning that it will probably change
|
7 |
+
* in the next few releases based on feedback from 3.9.0.
|
8 |
+
* If you decide to use it, please follow the development closely.
|
9 |
+
*
|
10 |
+
* Diagram
|
11 |
+
*
|
12 |
+
* |- registered view constructor (type)
|
13 |
+
* | |- view instance (unique text)
|
14 |
+
* | | |- editor 1
|
15 |
+
* | | | |- view node
|
16 |
+
* | | | |- view node
|
17 |
+
* | | | |- ...
|
18 |
+
* | | |- editor 2
|
19 |
+
* | | | |- ...
|
20 |
+
* | |- view instance
|
21 |
+
* | | |- ...
|
22 |
+
* |- registered view
|
23 |
+
* | |- ...
|
24 |
*/
|
25 |
+
!function(a,b,c,d){"use strict";var e={},f={};b.mce=b.mce||{},b.mce.fascviews={register:function(a,b){},unregister:function(a){delete e[a]},get:function(a){return e[a]},unbind:function(){_.each(f,function(a){a.unbind()})},render:function(a){_.each(f,function(b){b.render(a)})},edit:function(a,b){var c=this.getInstance(b);c&&c.edit&&c.edit(c.text,function(d,e){c.update(d,a,b,e)})},remove:function(a,b){var c=this.getInstance(b);c&&c.remove(a,b)}},b.mce.View=function(a){_.extend(this,a),this.initialize()},b.mce.View.extend=Backbone.View.extend,_.extend(b.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content}})}(window,window.wp,window.wp.shortcode,window.jQuery);
|
admin/js/mce/fasc-button.js
CHANGED
@@ -1,25 +1 @@
|
|
1 |
-
(function() {
|
2 |
-
|
3 |
-
/* Register the buttons */
|
4 |
-
tinymce.create('tinymce.plugins.FascButton', {
|
5 |
-
init : function(ed, url) {
|
6 |
-
/**
|
7 |
-
* Inserts shortcode content
|
8 |
-
*/
|
9 |
-
ed.addButton( 'button_fasc_insert_button', {
|
10 |
-
title : 'Insert Button',
|
11 |
-
icon : 'fascbutton-ico',
|
12 |
-
onclick : function() {
|
13 |
-
ed.execCommand('popup_insert_fasc_button', 0, 0);
|
14 |
-
}
|
15 |
-
});
|
16 |
-
|
17 |
-
},
|
18 |
-
createControl : function(n, cm) {
|
19 |
-
return null;
|
20 |
-
},
|
21 |
-
});
|
22 |
-
|
23 |
-
/* Start the buttons */
|
24 |
-
tinymce.PluginManager.add( 'fascbutton', tinymce.plugins.FascButton );
|
25 |
-
})();
|
1 |
+
!function(){tinymce.create("tinymce.plugins.FascButton",{init:function(a,b){a.addButton("button_fasc_insert_button",{title:"Insert Button",icon:"fascbutton-ico",onclick:function(){a.execCommand("popup_insert_fasc_button",0,0)}})},createControl:function(a,b){return null}}),tinymce.PluginManager.add("fascbutton",tinymce.plugins.FascButton)}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/mce/fasc-plugin.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/* global tinymce */
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*/
|
6 |
-
!function(){tinymce.PluginManager.add("fascview",function(a){function q(a){a.stopPropagation()}function s(){var b=tinymce.activeEditor.dom.select(".fasc-button"),c=!1;jQuery(b).each(function(){if(jQuery(this).is("[data-fasc-style]")){var b=jQuery(this).attr("data-fasc-style").replace(/\s+/,""),d="";jQuery(this).is("[style]")&&(d=jQuery(this).attr("style").replace(/\s+/,"")),b!=d&&(jQuery(this).attr("style",jQuery(this).attr("data-fasc-style")),a.nodeChanged(),c=!0)}})}function t(b){a.undoManager.transact(function(){a.dom.remove(b),v(),a.focus()})}function u(b){var e=a.dom;b&&(b!==c&&(a.getBody().focus(),v(),c=b,e.setAttrib(b,"data-mce-selected",1)),a.nodeChanged())}function v(){var d=a.dom;c&&(d.unbind(c,"beforedeactivate focusin focusout click mouseup",q),d.setAttrib(c,"data-mce-selected",null)),c=null}function w(c){var d=b(c),e=d.find(".fasc-button");
|
1 |
/* global tinymce */
|
2 |
|
3 |
/**
|
4 |
+
* WordPress View plugin.
|
5 |
*/
|
6 |
+
!function(){tinymce.PluginManager.add("fascview",function(a){function q(a){a.stopPropagation()}function s(){var b=tinymce.activeEditor.dom.select(".fasc-button"),c=!1;jQuery(b).each(function(){if(jQuery(this).is("[data-fasc-style]")){var b=jQuery(this).attr("data-fasc-style").replace(/\s+/,""),d="";jQuery(this).is("[style]")&&(d=jQuery(this).attr("style").replace(/\s+/,"")),b!=d&&(jQuery(this).attr("style",jQuery(this).attr("data-fasc-style")),a.nodeChanged(),c=!0)}})}function t(b){a.undoManager.transact(function(){a.dom.remove(b),v(),a.focus()})}function u(b){var e=a.dom;b&&(b!==c&&(a.getBody().focus(),v(),c=b,e.setAttrib(b,"data-mce-selected",1)),a.nodeChanged())}function v(){var d=a.dom;c&&(d.unbind(c,"beforedeactivate focusin focusout click mouseup",q),d.setAttrib(c,"data-mce-selected",null)),c=null}function w(c){var d=b(c),e=d.find(".fasc-button");return console.log("found fasc button: "),console.log(e),b(e).each(function(){var a=b(this),c=a.attr("data-fasc-href");a.attr("data-fasc-temp",null),a.attr("data-fasc-style",null),void 0!==c&&(a.attr("href",c),a.attr("data-fasc-href",null))}),a.dom.getOuterHTML(d)}function x(){for(var b=a.dom.select(".fasc-button"),c=0;c<b.length;c++){var d=b[c],e=a.dom.getAttrib(d,"href");""==a.dom.getAttrib(d,"data-fasc-href")&&""!=e&&(a.dom.setAttrib(d,"data-fasc-href",e),a.dom.setAttrib(d,"href",""))}}function y(a,b,c,d,e){if(void 0===e)var e="";"function"!=typeof d&&(d=function(d,e){var f=a.$(d);c?a.$(b).replaceWith(f):a.selection.setContent(d);a.$("[data-fasc-id='"+e+"']");v(),a.focus(),a.nodeChanged(),u(a.dom.select("a[data-fasc-id='"+e+"']")[0])}),wp.mce.fascpopup.open(b,"button",d,c,e)}var c,k,l,m,p,b=a.$,h=(tinymce.Env,tinymce.util.VK,tinymce.dom.TreeWalker,!0),i=function(){return!1};/iPad|iPod|iPhone/.test(navigator.userAgent);if("undefined"==typeof wp||!wp.mce)return{getView:i};a.on("SetContent",function(){x()}),a.on("init",function(){a.on("dblClick",function(b){if(a.dom.hasClass(b.target,"fasc-button"))return b.preventDefault(),y(a,b.target,!0),!1},!0),a.addCommand("popup_insert_fasc_button",function(b,c){var d=!1;a.dom.hasClass(a.selection.getNode(),"fasc-button")&&(d=!0);var e=a.selection.getContent({format:"text"});y(a,a.selection.getNode(),d,{},e)});var b=!1;a.selection,window.MutationObserver||window.WebKitMutationObserver;a.dom.bind(a.getDoc(),"touchmove",function(){b=!0}),a.on("mousedown mouseup click touchend",function(c){h=!1,a.dom.hasClass(c.target,"fasc-button")?"touchend"===c.type&&b?b=!1:u(c.target):"touchend"!==c.type&&"mousedown"!==c.type||v(),"touchend"===c.type&&b&&(b=!1)},!0)}),a.on("PreProcess",function(a){},!0),a.on("hide",function(){v()}),a.on("PostProcess",function(a){a.content&&(a.content=w(a.content))}),a.on("keydown",function(c){if(v(),32==c.keyCode&&a.dom.hasClass(a.selection.getNode(),"fasc-button")){if(a.selection.getRng().startOffset==b(a.selection.getNode()).text().length){var f=tinymce.DOM.uniqueId(),g=a.dom.create("span",{id:f}," ");a.dom.insertAfter(g,a.selection.getNode());var h=a.dom.select("span#"+f);return a.selection.select(h[0]),a.selection.collapse(0),a.dom.setAttrib(f,"id",""),!1}}}),a.on("focus",function(){m=!0,h=!1}),a.on("blur",function(){m=!1}),a.on("NodeChange",function(b){a.dom,a.dom.select(".fascview-wrap"),b.element.className;l=!1,clearInterval(k)}),a.on("BeforeExecCommand",function(){a.selection.getNode()}),a.on("ExecCommand",function(){}),a.on("ResolveName",function(a){}),a.on("PastePostProcess",function(){s()}),a.addButton("fasc_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){c&&y(a,c,!0)}}),a.addButton("fasc_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){c&&t(c)}}),a.once("preinit",function(){a.wp&&a.wp._createToolbar&&(p=a.wp._createToolbar(["fasc_view_edit","fasc_view_remove"]))}),a.on("wptoolbar",function(a){c&&(a.element=c,a.toolbar=p)}),a.wp=a.wp||{}})}();
|
forget-about-shortcode-buttons.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: Forget About Shortcode Buttons
|
17 |
* Plugin URI: http://www.designsandcode.com/wordpress-plugins/forget-about-shortcode-buttons-plugin/
|
18 |
* Description: A visual way to add CSS buttons in the post editor screen and to your themes.
|
19 |
-
* Version: 2.0.
|
20 |
* Author: Designs & Code
|
21 |
* Author URI: http://designsandcode.com
|
22 |
* License: GPL-2.0+
|
16 |
* Plugin Name: Forget About Shortcode Buttons
|
17 |
* Plugin URI: http://www.designsandcode.com/wordpress-plugins/forget-about-shortcode-buttons-plugin/
|
18 |
* Description: A visual way to add CSS buttons in the post editor screen and to your themes.
|
19 |
+
* Version: 2.0.1
|
20 |
* Author: Designs & Code
|
21 |
* Author URI: http://designsandcode.com
|
22 |
* License: GPL-2.0+
|
includes/class-forget-about-shortcode-buttons.php
CHANGED
@@ -69,7 +69,7 @@ class Forget_About_Shortcode_Buttons {
|
|
69 |
public function __construct() {
|
70 |
|
71 |
$this->plugin_name = 'forget-about-shortcode-buttons';
|
72 |
-
$this->version = '2.0.
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
69 |
public function __construct() {
|
70 |
|
71 |
$this->plugin_name = 'forget-about-shortcode-buttons';
|
72 |
+
$this->version = '2.0.1';
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
public/css/button-styles.css
CHANGED
@@ -7,11 +7,18 @@ a.fasc-button
|
|
7 |
color:#ffffff;
|
8 |
text-decoration:none;
|
9 |
margin: 3px 0;
|
10 |
-
border:
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
-
a.fasc-button:hover
|
13 |
{
|
14 |
text-decoration:none;
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
/*a.fasc-button.fasc-ico:before, */
|
@@ -222,12 +229,12 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
222 |
|
223 |
/* glossy */
|
224 |
|
225 |
-
.fasc-type-glossy
|
226 |
{
|
227 |
background-color: #247edd;
|
228 |
-
border:1px solid rgba(0,0,0, 0.1);
|
229 |
-
/*text-shadow:5px solid rgba(0,0,0, 0.5);*/
|
230 |
|
|
|
231 |
/*-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
|
232 |
box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);*/
|
233 |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
@@ -236,7 +243,7 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
236 |
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
237 |
|
238 |
}
|
239 |
-
.fasc-type-glossy:hover
|
240 |
{
|
241 |
/*-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
|
242 |
box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);*/
|
@@ -245,6 +252,7 @@ a.fasc-size-xlarge.ico-fa.fasc-ico-after:after
|
|
245 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
246 |
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
247 |
|
|
|
248 |
}
|
249 |
|
250 |
.fasc-type-glossy.fasc-size-xlarge
|
7 |
color:#ffffff;
|
8 |
text-decoration:none;
|
9 |
margin: 3px 0;
|
10 |
+
border:0;
|
11 |
+
-webkit-box-shadow: none;
|
12 |
+
-moz-box-shadow: none;
|
13 |
+
box-shadow: none;
|
14 |
+
box-sizing: border-box;
|
15 |
}
|
16 |
+
a.fasc-button:hover, a.fasc-button:focus, a.fasc-button:visited, a.fasc-button:active
|
17 |
{
|
18 |
text-decoration:none;
|
19 |
+
-webkit-box-shadow: none;
|
20 |
+
-moz-box-shadow: none;
|
21 |
+
box-shadow: none;
|
22 |
}
|
23 |
|
24 |
/*a.fasc-button.fasc-ico:before, */
|
229 |
|
230 |
/* glossy */
|
231 |
|
232 |
+
a.fasc-type-glossy
|
233 |
{
|
234 |
background-color: #247edd;
|
235 |
+
border: 1px solid rgba(0,0,0, 0.1);
|
|
|
236 |
|
237 |
+
/*text-shadow:5px solid rgba(0,0,0, 0.5);*/
|
238 |
/*-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
|
239 |
box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);*/
|
240 |
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
243 |
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.12) 51%, rgba(0, 0, 0, 0.04));
|
244 |
|
245 |
}
|
246 |
+
a.fasc-type-glossy:hover
|
247 |
{
|
248 |
/*-webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
|
249 |
box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);*/
|
252 |
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
253 |
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 51%, rgba(0, 0, 0, 0.1));
|
254 |
|
255 |
+
border: 1px solid rgba(0,0,0, 0.1);
|
256 |
}
|
257 |
|
258 |
.fasc-type-glossy.fasc-size-xlarge
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ZAHPN
|
|
4 |
Tags: css, button, shortcode, edit, visual editor, buttons, wysiwyg, post editor, tinymce, shortcodes, button editor, wysiwyg
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -31,6 +31,12 @@ Ask me some questions!
|
|
31 |
|
32 |
== Changelog ==
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
= 2.0.0 =
|
35 |
* Rewritten the core to use WP standards - no more iframes - be much quicker to load
|
36 |
* New - integrated with WP Views - inline toolbars for editing and deleting - more options to come
|
4 |
Tags: css, button, shortcode, edit, visual editor, buttons, wysiwyg, post editor, tinymce, shortcodes, button editor, wysiwyg
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 2.0.1 =
|
35 |
+
* Fix - an issue with the border effect on glossy buttons
|
36 |
+
* Fix - remove `box-shadow` properties from FASC buttons by default, some themes such as twentyseventeen add this to all anchor tags
|
37 |
+
* Fix - remove button rollover/hover effects from TinyMCE editor
|
38 |
+
* Fix - some issues when using multiple buttons in a post, and their settings not being saved/retrieved correctly
|
39 |
+
|
40 |
= 2.0.0 =
|
41 |
* Rewritten the core to use WP standards - no more iframes - be much quicker to load
|
42 |
* New - integrated with WP Views - inline toolbars for editing and deleting - more options to come
|