Version Description
- New: Code editor is now made the default editor.
- Fix: Minor changes to admin UI.
Download this release
Release Info
Developer | vaakash |
Plugin | Shortcoder |
Version | 5.3.1 |
Comparing to | |
See all releases |
Code changes from version 5.3 to 5.3.1
- admin/css/style.css +111 -14
- admin/edit.php +39 -26
- admin/images/ufw.png +0 -0
- admin/js/script.js +24 -2
- readme.txt +7 -3
- shortcoder.php +3 -3
admin/css/style.css
CHANGED
@@ -198,12 +198,27 @@
|
|
198 |
}
|
199 |
|
200 |
/* Coffee - metabox */
|
201 |
-
|
|
|
|
|
|
|
202 |
display: flex;
|
203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
}
|
205 |
.cfe_form{
|
206 |
-
|
207 |
}
|
208 |
.cfe_form select{
|
209 |
width: 100%;
|
@@ -212,10 +227,6 @@
|
|
212 |
.cfe_form .button{
|
213 |
text-align: center;
|
214 |
}
|
215 |
-
.cfe_text img{
|
216 |
-
width: 48px;
|
217 |
-
margin-left: 1em;
|
218 |
-
}
|
219 |
|
220 |
/** Changelog **/
|
221 |
.sc_changelog{
|
@@ -310,24 +321,61 @@
|
|
310 |
.feedback a:hover{
|
311 |
text-decoration: underline;
|
312 |
}
|
313 |
-
.feedback .adjust_icons .dashicons{
|
314 |
-
font-size: 14px;
|
315 |
-
height: 14px;
|
316 |
-
margin-top: 3px;
|
317 |
-
}
|
318 |
.feedback .ufw{
|
319 |
background: linear-gradient(180deg, #2196F3, #58a4e1);
|
320 |
color: #fff;
|
|
|
|
|
|
|
321 |
}
|
322 |
.feedback .ufw a{
|
323 |
color: #fff;
|
324 |
}
|
325 |
-
.feedback .ufw
|
326 |
opacity: 0.8;
|
327 |
display: block;
|
328 |
font-style: italic;
|
329 |
-
margin
|
|
|
|
|
|
|
|
|
330 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
.stars {
|
332 |
display: inline-flex;
|
333 |
line-height: 1;
|
@@ -341,6 +389,55 @@
|
|
341 |
color: #FF9800;
|
342 |
}
|
343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
/** Import/Export link **/
|
345 |
.ie_top_link{
|
346 |
float: left;
|
198 |
}
|
199 |
|
200 |
/* Coffee - metabox */
|
201 |
+
|
202 |
+
.cfe_bottom{
|
203 |
+
background: #fff;
|
204 |
+
padding: 15px;
|
205 |
display: flex;
|
206 |
+
border: 1px solid #e3bbac;
|
207 |
+
align-items: center;
|
208 |
+
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
209 |
+
}
|
210 |
+
.cfe_bottom > * {
|
211 |
+
margin: 0 15px 0 0;
|
212 |
+
vertical-align: middle;
|
213 |
+
}
|
214 |
+
.cfe_bottom h3{
|
215 |
+
font-size: 15px;
|
216 |
+
}
|
217 |
+
.cfe_bottom img{
|
218 |
+
height: 32px;
|
219 |
}
|
220 |
.cfe_form{
|
221 |
+
display: flex;
|
222 |
}
|
223 |
.cfe_form select{
|
224 |
width: 100%;
|
227 |
.cfe_form .button{
|
228 |
text-align: center;
|
229 |
}
|
|
|
|
|
|
|
|
|
230 |
|
231 |
/** Changelog **/
|
232 |
.sc_changelog{
|
321 |
.feedback a:hover{
|
322 |
text-decoration: underline;
|
323 |
}
|
|
|
|
|
|
|
|
|
|
|
324 |
.feedback .ufw{
|
325 |
background: linear-gradient(180deg, #2196F3, #58a4e1);
|
326 |
color: #fff;
|
327 |
+
border-radius: 5px;
|
328 |
+
padding: 10px;
|
329 |
+
margin: 15px 0 0 0;
|
330 |
}
|
331 |
.feedback .ufw a{
|
332 |
color: #fff;
|
333 |
}
|
334 |
+
.feedback .ufw p{
|
335 |
opacity: 0.8;
|
336 |
display: block;
|
337 |
font-style: italic;
|
338 |
+
margin: 5px 0 0 0;
|
339 |
+
}
|
340 |
+
.feedback .ufw h4{
|
341 |
+
margin: 0 0 10px 0;
|
342 |
+
font-size: 1.3em;
|
343 |
}
|
344 |
+
.feedback .ufw h4 i{
|
345 |
+
font-weight: normal;
|
346 |
+
}
|
347 |
+
.feedback .ufw .balloon{
|
348 |
+
float: right;
|
349 |
+
}
|
350 |
+
|
351 |
+
/** Rate & review **/
|
352 |
+
.rate_review{
|
353 |
+
display: block;
|
354 |
+
padding: 15px;
|
355 |
+
background: #f6f6f6;
|
356 |
+
margin-top: 15px;
|
357 |
+
border-radius: 5px;
|
358 |
+
text-decoration: none;
|
359 |
+
color: #444;
|
360 |
+
}
|
361 |
+
.rate_review h4 {
|
362 |
+
margin: 0;
|
363 |
+
font-size: 15px;
|
364 |
+
}
|
365 |
+
.rate_review p {
|
366 |
+
margin: 15px 0 0 0;
|
367 |
+
}
|
368 |
+
.rate_review .dashicons {
|
369 |
+
float: right;
|
370 |
+
font-size: 32px;
|
371 |
+
margin: 10px;
|
372 |
+
color: #FFC107;
|
373 |
+
}
|
374 |
+
.rate_review:hover{
|
375 |
+
background-color: #fcfcfc;
|
376 |
+
text-decoration: none;
|
377 |
+
}
|
378 |
+
|
379 |
.stars {
|
380 |
display: inline-flex;
|
381 |
line-height: 1;
|
389 |
color: #FF9800;
|
390 |
}
|
391 |
|
392 |
+
.social_share {
|
393 |
+
display: flex;
|
394 |
+
}
|
395 |
+
.social_share a{
|
396 |
+
width: 100%;
|
397 |
+
text-align: center;
|
398 |
+
padding: 10px 0;
|
399 |
+
font-weight: bold;
|
400 |
+
}
|
401 |
+
.social_share a:hover {
|
402 |
+
text-decoration: none;
|
403 |
+
}
|
404 |
+
.social_share .dashicons {
|
405 |
+
font-size: 32px;
|
406 |
+
width: 32px;
|
407 |
+
height: 32px;
|
408 |
+
margin: 0 0 5px 0;
|
409 |
+
}
|
410 |
+
|
411 |
+
.subscribe_form {
|
412 |
+
display: flex;
|
413 |
+
padding: 15px;
|
414 |
+
background: #f7f7f7;
|
415 |
+
border-radius: 5px;
|
416 |
+
margin-top: 10px;
|
417 |
+
flex-direction: column;
|
418 |
+
}
|
419 |
+
.subscribe_form .subscribe_email_box {
|
420 |
+
width: 100%;
|
421 |
+
margin-bottom: 10px;
|
422 |
+
}
|
423 |
+
.subscribe_form .subscribe_btn .dashicons{
|
424 |
+
font-size: 16px;
|
425 |
+
width: 16px;
|
426 |
+
margin: 7px 3px 0 0;
|
427 |
+
}
|
428 |
+
.subscribe_confirm{
|
429 |
+
display: none;
|
430 |
+
margin: 0 0 10px 0;
|
431 |
+
color: green;
|
432 |
+
}
|
433 |
+
.ss_facebook{
|
434 |
+
color: #3578E5;
|
435 |
+
}
|
436 |
+
.ss_twitter{
|
437 |
+
color: #1DA1F2;
|
438 |
+
font-weight: bold;
|
439 |
+
}
|
440 |
+
|
441 |
/** Import/Export link **/
|
442 |
.ie_top_link{
|
443 |
float: left;
|
admin/edit.php
CHANGED
@@ -50,9 +50,7 @@ class SC_Admin_Edit{
|
|
50 |
|
51 |
add_meta_box( 'sc_mb_settings', __( 'Shortcode settings', 'shortcoder' ), array( __class__, 'settings_form' ), SC_POST_TYPE, 'normal', 'default' );
|
52 |
|
53 |
-
add_meta_box( '
|
54 |
-
|
55 |
-
add_meta_box( 'sc_mb_links', __( 'Feedback', 'shortcoder' ), array( __class__, 'feedback' ), SC_POST_TYPE, 'side', 'default' );
|
56 |
|
57 |
remove_meta_box( 'slugdiv', SC_POST_TYPE, 'normal' );
|
58 |
|
@@ -298,33 +296,48 @@ class SC_Admin_Edit{
|
|
298 |
|
299 |
}
|
300 |
|
301 |
-
public static function
|
302 |
-
echo '<div class="
|
303 |
-
|
304 |
-
echo '<p>
|
305 |
-
|
306 |
-
echo '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
echo '<div class="cfe_form">';
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
echo '</div>';
|
316 |
echo '</div>';
|
317 |
-
}
|
318 |
|
319 |
-
public static function feedback( $post ){
|
320 |
-
echo '<div class="feedback">';
|
321 |
-
echo '<ul>
|
322 |
-
<li><a href="https://wordpress.org/support/plugin/shortcoder/reviews/?rate=5#new-post" target="_blank">Rate and review</a><div class="stars"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></div></li>
|
323 |
-
<li><a href="https://www.aakashweb.com/forum/discuss/wordpress-plugins/shortcoder/#new-post" target="_blank">Support forum</a> / <a href="https://www.aakashweb.com/docs/shortcoder-doc/" target="_blank">FAQ</a></li>
|
324 |
-
<li class="adjust_icons"><a href="https://twitter.com/aakashweb" target="_blank">Follow on Twitter <span class="dashicons dashicons-twitter"></span></a> <a href="https://facebook.com/aakashweb" target="_blank">Facebook <span class="dashicons dashicons-facebook"></span></a></li>
|
325 |
-
<li><a href="https://www.aakashweb.com/wordpress-plugins/" target="_blank">More plugins</a></li>
|
326 |
-
<li class="ufw"><a href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/" target="_blank"><i>Check out</i> - <strong>Ultimate floating widgets</strong></a><span>A WordPress plugin to create floating widgets from the same developer</span></li>
|
327 |
-
</ul>';
|
328 |
echo '</div>';
|
329 |
}
|
330 |
|
50 |
|
51 |
add_meta_box( 'sc_mb_settings', __( 'Shortcode settings', 'shortcoder' ), array( __class__, 'settings_form' ), SC_POST_TYPE, 'normal', 'default' );
|
52 |
|
53 |
+
add_meta_box( 'sc_mb_links', __( 'Get updates', 'shortcoder' ), array( __class__, 'feedback' ), SC_POST_TYPE, 'side', 'default' );
|
|
|
|
|
54 |
|
55 |
remove_meta_box( 'slugdiv', SC_POST_TYPE, 'normal' );
|
56 |
|
296 |
|
297 |
}
|
298 |
|
299 |
+
public static function feedback( $post ){
|
300 |
+
echo '<div class="feedback">';
|
301 |
+
|
302 |
+
echo '<p>Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.</p>';
|
303 |
+
|
304 |
+
echo '<div class="social_share">
|
305 |
+
<a href="https://www.facebook.com/aakashweb" class="ss_facebook" target="_blank"><span class="dashicons dashicons-facebook"></span><div>Facebook</div></a>
|
306 |
+
<a href="https://twitter.com/aakashweb" class="ss_twitter" target="_blank"><span class="dashicons dashicons-twitter"></span><div>Twitter</div></a>
|
307 |
+
</div>';
|
308 |
+
|
309 |
+
echo '<div class="subscribe_form" data-action="https://aakashweb.us19.list-manage.com/subscribe/post-json?u=b7023581458d048107298247e&id=ef5ab3c5c4&c=">
|
310 |
+
<input type="email" class="subscribe_email_box" placeholder="Your email address">
|
311 |
+
<p class="subscribe_confirm">Thanks for subscribing !</p>
|
312 |
+
<button class="button subscribe_btn"><span class="dashicons dashicons-email"></span> Subscribe</button>
|
313 |
+
</div>';
|
314 |
+
|
315 |
+
echo '<div class="ufw"><h4><a href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=ufw" target="_blank">
|
316 |
+
<i>Check out <span class="dashicons dashicons-arrow-right-alt2"></span></i>
|
317 |
+
<br/> Ultimate floating widgets</a></h4>
|
318 |
+
<img src="' . SC_ADMIN_URL . 'images/ufw.png" class="balloon" />
|
319 |
+
<p>A WordPress plugin to create floating widgets from the same developer</p></div>';
|
320 |
+
|
321 |
+
echo '<a class="rate_review" href="https://wordpress.org/support/plugin/shortcoder/reviews/?rate=5#new-post" target="_blank">
|
322 |
+
<h4>Rate & Review</h4>
|
323 |
+
<span class="dashicons dashicons-star-filled"></span>
|
324 |
+
<p>Like this plugin ? please do rate and review.</p>
|
325 |
+
</a>';
|
326 |
+
|
327 |
+
echo '<div class="cfe_bottom">';
|
328 |
+
echo '<img src="' . SC_ADMIN_URL . '/images/coffee.svg" />';
|
329 |
+
echo '<h3>Buy me a Coffee !</h3><p>If you like this plugin, buy me a coffee and help support this plugin !</p>';
|
330 |
echo '<div class="cfe_form">';
|
331 |
+
echo '<select class="cfe_amt">';
|
332 |
+
for($i = 5; $i <= 15; $i++){
|
333 |
+
echo '<option value="' . $i . '" ' . ($i == 6 ? 'selected="selected"' : '') . '>$' . $i . '</option>';
|
334 |
+
}
|
335 |
+
echo '<option value="">Custom</option>';
|
336 |
+
echo '</select>';
|
337 |
+
echo '<a class="button button-primary cfe_btn" href="https://www.paypal.me/vaakash/6" data-link="https://www.paypal.me/vaakash/" target="_blank">' . __( 'Buy me a coffee !', 'shortcoder' ) . '</a>';
|
338 |
echo '</div>';
|
339 |
echo '</div>';
|
|
|
340 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
echo '</div>';
|
342 |
}
|
343 |
|
admin/images/ufw.png
ADDED
Binary file
|
admin/js/script.js
CHANGED
@@ -27,13 +27,18 @@ $(document).ready(function(){
|
|
27 |
}
|
28 |
|
29 |
if(typeof window.SC_VARS !== 'undefined'){
|
30 |
-
if(SC_VARS['screen']['base'] == 'edit'){
|
31 |
|
|
|
32 |
var version = '<small>v' + SC_VARS['sc_version'] + '</small>';
|
33 |
$('.wp-heading-inline').append(version);
|
34 |
-
|
35 |
add_top_import_export_btn();
|
|
|
36 |
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
add_top_coffee_btn();
|
@@ -218,6 +223,23 @@ $(document).ready(function(){
|
|
218 |
$btn.attr('href', $btn.data('link') + $(this).val());
|
219 |
});
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
init();
|
222 |
|
223 |
});
|
27 |
}
|
28 |
|
29 |
if(typeof window.SC_VARS !== 'undefined'){
|
|
|
30 |
|
31 |
+
if(SC_VARS['screen']['base'] == 'edit'){
|
32 |
var version = '<small>v' + SC_VARS['sc_version'] + '</small>';
|
33 |
$('.wp-heading-inline').append(version);
|
|
|
34 |
add_top_import_export_btn();
|
35 |
+
}
|
36 |
|
37 |
+
if(SC_VARS['screen']['base'] == 'post'){
|
38 |
+
var $cfe_button = $('.cfe_bottom');
|
39 |
+
if($cfe_button.length > 0){
|
40 |
+
$cfe_button.appendTo('#normal-sortables');
|
41 |
+
}
|
42 |
}
|
43 |
|
44 |
add_top_coffee_btn();
|
223 |
$btn.attr('href', $btn.data('link') + $(this).val());
|
224 |
});
|
225 |
|
226 |
+
$('.subscribe_btn').click(function(e){
|
227 |
+
e.preventDefault();
|
228 |
+
var action = $(this).parent().data('action');
|
229 |
+
$.ajax({
|
230 |
+
type: 'get',
|
231 |
+
url: action,
|
232 |
+
cache: false,
|
233 |
+
dataType: 'jsonp',
|
234 |
+
data: {
|
235 |
+
'EMAIL': $('.subscribe_email_box').val()
|
236 |
+
},
|
237 |
+
success : function(data) {
|
238 |
+
}
|
239 |
+
});
|
240 |
+
$('.subscribe_confirm').show();
|
241 |
+
});
|
242 |
+
|
243 |
init();
|
244 |
|
245 |
});
|
readme.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
=== Shortcoder
|
2 |
Contributors: vaakash
|
3 |
Author URI: https://www.aakashweb.com/
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
|
@@ -7,8 +7,8 @@ Donate link: https://www.paypal.me/vaakash/
|
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.3
|
9 |
Requires at least: 4.4
|
10 |
-
Tested up to: 5.
|
11 |
-
Stable tag: 5.3
|
12 |
|
13 |
Create custom "Shortcodes" easily for HTML, JavaScript snippets and use the shortcodes within posts, pages & widgets.
|
14 |
|
@@ -88,6 +88,10 @@ Please check the following if you notice that the shortcode content is not print
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
91 |
= 5.3 =
|
92 |
* New: Added support for underscores in custom parameters.
|
93 |
* New: Getting ready for internationalization of the plugin.
|
1 |
+
=== Shortcoder ===
|
2 |
Contributors: vaakash
|
3 |
Author URI: https://www.aakashweb.com/
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.3
|
9 |
Requires at least: 4.4
|
10 |
+
Tested up to: 5.4.1
|
11 |
+
Stable tag: 5.3.1
|
12 |
|
13 |
Create custom "Shortcodes" easily for HTML, JavaScript snippets and use the shortcodes within posts, pages & widgets.
|
14 |
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= 5.3.1 =
|
92 |
+
* New: Code editor is now made the default editor.
|
93 |
+
* Fix: Minor changes to admin UI.
|
94 |
+
|
95 |
= 5.3 =
|
96 |
* New: Added support for underscores in custom parameters.
|
97 |
* New: Getting ready for internationalization of the plugin.
|
shortcoder.php
CHANGED
@@ -4,13 +4,13 @@ Plugin Name: Shortcoder
|
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
|
5 |
Description: Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript and other snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.
|
6 |
Author: Aakash Chakravarthy
|
7 |
-
Version: 5.3
|
8 |
Author URI: https://www.aakashweb.com/
|
9 |
Text Domain: shortcoder
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
-
define( 'SC_VERSION', '5.3' );
|
14 |
define( 'SC_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
|
15 |
define( 'SC_URL', plugin_dir_url( __FILE__ ) );
|
16 |
define( 'SC_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
|
@@ -108,7 +108,7 @@ final class Shortcoder{
|
|
108 |
return array(
|
109 |
'_sc_disable_sc' => 'no',
|
110 |
'_sc_disable_admin' => 'no',
|
111 |
-
'_sc_editor' => '
|
112 |
'_sc_allowed_devices' => 'all'
|
113 |
);
|
114 |
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
|
5 |
Description: Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript and other snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.
|
6 |
Author: Aakash Chakravarthy
|
7 |
+
Version: 5.3.1
|
8 |
Author URI: https://www.aakashweb.com/
|
9 |
Text Domain: shortcoder
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
+
define( 'SC_VERSION', '5.3.1' );
|
14 |
define( 'SC_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
|
15 |
define( 'SC_URL', plugin_dir_url( __FILE__ ) );
|
16 |
define( 'SC_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
|
108 |
return array(
|
109 |
'_sc_disable_sc' => 'no',
|
110 |
'_sc_disable_admin' => 'no',
|
111 |
+
'_sc_editor' => 'code',
|
112 |
'_sc_allowed_devices' => 'all'
|
113 |
);
|
114 |
|