Shortcoder - Version 6.1

Version Description

Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 Shortcoder
Version 6.1
Comparing to
See all releases

Code changes from version 6.0 to 6.1

admin/admin.php CHANGED
@@ -265,7 +265,7 @@ class SC_Admin{
265
 
266
  public static function action_links( $links ){
267
  array_unshift( $links, '<a href="'. esc_url( admin_url( 'edit.php?post_type=shortcoder') ) .'">' . esc_html__( 'View shortcodes', 'shortcoder' ) . '</a>' );
268
- array_unshift( $links, '<a href="https://www.aakashweb.com/wordpress-plugins/shortcoder/?utm_source=admin&utm_medium=menu&utm_campaign=sc-pro#pro" target="_blank"><span style="font-weight: bold">' . esc_html__( 'Upgrade to PRO', 'shortcoder' ) . '</span></a>' );
269
  return $links;
270
  }
271
 
265
 
266
  public static function action_links( $links ){
267
  array_unshift( $links, '<a href="'. esc_url( admin_url( 'edit.php?post_type=shortcoder') ) .'">' . esc_html__( 'View shortcodes', 'shortcoder' ) . '</a>' );
268
+ array_unshift( $links, '<a href="https://www.aakashweb.com/wordpress-plugins/shortcoder/?utm_source=admin&utm_medium=menu&utm_campaign=sc-pro#pro" target="_blank"><b>' . esc_html__( 'Upgrade to PRO', 'shortcoder' ) . '</b></a>' );
269
  return $links;
270
  }
271
 
admin/css/style.css CHANGED
@@ -315,18 +315,27 @@
315
  }
316
  .feedback ul li{
317
  margin: 0;
318
- padding: 12px;
319
  border-bottom: 1px solid #eee;
320
  }
321
  .feedback ul li:last-child{
322
  border-bottom: none;
323
  }
 
 
 
 
 
 
324
  .feedback a{
325
  text-decoration: none;
326
  }
327
  .feedback a:hover{
328
  text-decoration: underline;
329
  }
 
 
 
330
  .feedback .button{
331
  display: block;
332
  text-align: center;
@@ -344,34 +353,9 @@
344
  .feedback > *:last-child{
345
  margin-bottom: 0;
346
  }
347
- .feedback .twitter_btn.button{
348
- background: #1b95e0;
349
- color: #fff;
350
- border-color: transparent;
351
- }
352
- .feedback .facebook_btn.button{
353
- background: #4080ff;
354
- color: #fff;
355
- border-color: transparent;
356
- }
357
- .promo_slides > .promo_slide{
358
- display: none;
359
- }
360
- .promo_slides > .promo_slide:first-child{
361
- display: block;
362
- }
363
- .promo_slide img {
364
- width: 100%;
365
- border-radius: 5px;
366
- margin: 7px 0 0 0;
367
- }
368
- .promo_btn{
369
- text-decoration: none;
370
- }
371
- .promo_btns{
372
- display: flex;
373
- justify-content: space-between;
374
- margin-bottom: 20px;
375
  }
376
 
377
  .stars {
315
  }
316
  .feedback ul li{
317
  margin: 0;
318
+ padding: 10px;
319
  border-bottom: 1px solid #eee;
320
  }
321
  .feedback ul li:last-child{
322
  border-bottom: none;
323
  }
324
+ .feedback li .dashicons {
325
+ width: 15px;
326
+ height: 15px;
327
+ font-size: 15px;
328
+ margin: 3px 5px 0 0;
329
+ }
330
  .feedback a{
331
  text-decoration: none;
332
  }
333
  .feedback a:hover{
334
  text-decoration: underline;
335
  }
336
+ .feedback a:hover .dashicons{
337
+ text-decoration: none;
338
+ }
339
  .feedback .button{
340
  display: block;
341
  text-align: center;
353
  .feedback > *:last-child{
354
  margin-bottom: 0;
355
  }
356
+ .feedback h3 {
357
+ font-size: 1.125em;
358
+ margin: 1em 0 1em 0.5em;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  }
360
 
361
  .stars {
admin/edit.php CHANGED
@@ -51,9 +51,9 @@ class SC_Admin_Edit{
51
 
52
  add_meta_box( 'sc_mb_settings', __( 'Shortcode settings', 'shortcoder' ), array( __CLASS__, 'settings_form' ), SC_POST_TYPE, 'normal', 'default' );
53
 
54
- add_meta_box( 'sc_mb_links', __( 'WordPress News', 'shortcoder' ), array( __CLASS__, 'feedback' ), SC_POST_TYPE, 'side', 'default' );
55
 
56
- add_meta_box( 'sc_mb_more_plugins', __( 'More plugins from us', 'shortcoder' ), array( __CLASS__, 'more_plugins' ), SC_POST_TYPE, 'side', 'default' );
57
 
58
  remove_meta_box( 'slugdiv', SC_POST_TYPE, 'normal' );
59
 
@@ -213,18 +213,21 @@ class SC_Admin_Edit{
213
  echo '</div>';
214
  echo '</div>';
215
 
 
 
 
216
  if( SC_Admin::is_edit_page( 'new' ) ){
217
  $general_settings = Shortcoder::get_settings();
218
- $post->post_content = $general_settings[ 'default_content' ];
219
  }
220
 
221
  if( $editor[ 'active' ] == 'code' ){
222
  echo '<div class="sc_cm_menu"></div>';
223
- echo '<textarea name="sc_content" id="sc_content" class="sc_cm_content">' . esc_textarea( $post->post_content ) . '</textarea>';
224
  }
225
 
226
  if( in_array( $editor[ 'active' ], array( 'text', 'visual' ) ) ){
227
- wp_editor( $post->post_content, 'sc_content', array(
228
  'wpautop'=> false,
229
  'textarea_rows'=> 20,
230
  'tinymce' => ( $editor[ 'active' ] == 'visual' )
@@ -324,40 +327,28 @@ class SC_Admin_Edit{
324
  <button class="button subscribe_btn"><span class="dashicons dashicons-email"></span> Subscribe</button>
325
  </div>';
326
 
327
- echo '<p>';
328
- echo '<a href="https://twitter.com/intent/follow?screen_name=aakashweb" target="_blank" class="button twitter_btn"><span class="dashicons dashicons-twitter"></span> Follow us on Twitter</a>';
329
- echo '<a href="https://www.facebook.com/aakashweb/" target="_blank" class="button facebook_btn"><span class="dashicons dashicons-facebook-alt"></span> on Facebook</a>';
330
- echo '</p>';
331
-
332
  echo '</div>';
333
  }
334
 
335
  public static function more_plugins( $post ){
336
 
337
  echo '<div class="feedback">';
338
- echo '<div class="promo_slides">';
339
- echo '<div class="promo_slide">';
340
- echo '<a class="side_banner" href="https://www.aakashweb.com/wordpress-plugins/super-rss-reader/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=srr-pro" target="_blank"><img src="' . esc_url( SC_ADMIN_URL ) . 'images/super-rss-reader.png" /></a>';
341
- echo '</div>';
342
-
343
- echo '<div class="promo_slide">';
344
- echo '<a class="side_banner" href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=ufw-pro" target="_blank"><img src="' . esc_url( SC_ADMIN_URL ) . 'images/ultimate-floating-widgets.png" /></a>';
345
- echo '</div>';
346
-
347
- echo '<div class="promo_slide">';
348
- echo '<a class="side_banner" href="https://www.aakashweb.com/wordpress-plugins/announcer/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=announcer-pro" target="_blank"><img src="' . esc_url( SC_ADMIN_URL ) . 'images/announcer.png" /></a>';
349
- echo '</div>';
350
- echo '</div>';
351
 
352
- echo '<p class="promo_btns">
353
- <a href="#" onclick="sc_next_promo_slide(-1, event)" class="promo_btn"><span class="dashicons dashicons-arrow-left-alt2"></span> Prev</a>
354
- <a href="#" onclick="sc_next_promo_slide(1, event)" class="promo_btn right">Next <span class="dashicons dashicons-arrow-right-alt2"></span></a>
355
- </p>';
 
 
356
 
357
- echo '<p>';
358
- echo '<a href="https://wordpress.org/support/plugin/shortcoder/reviews/?rate=5#new-post" target="_blank" class="button"><span class="dashicons dashicons-star-filled"></span> Rate this plugin</a>';
359
- echo '<a href="https://www.aakashweb.com/forum/discuss/wordpress-plugins/shortcoder/" target="_blank" class="button"><span class="dashicons dashicons-format-chat"></span> Support forum</a>';
360
- echo '</p>';
 
 
 
 
361
 
362
  echo '</div>';
363
 
51
 
52
  add_meta_box( 'sc_mb_settings', __( 'Shortcode settings', 'shortcoder' ), array( __CLASS__, 'settings_form' ), SC_POST_TYPE, 'normal', 'default' );
53
 
54
+ add_meta_box( 'sc_mb_more_plugins', __( 'Support', 'shortcoder' ), array( __CLASS__, 'more_plugins' ), SC_POST_TYPE, 'side', 'default' );
55
 
56
+ add_meta_box( 'sc_mb_links', __( 'WordPress News', 'shortcoder' ), array( __CLASS__, 'feedback' ), SC_POST_TYPE, 'side', 'default' );
57
 
58
  remove_meta_box( 'slugdiv', SC_POST_TYPE, 'normal' );
59
 
213
  echo '</div>';
214
  echo '</div>';
215
 
216
+ $post_data = get_post( $post->ID );
217
+ $post_content = $post_data->post_content;
218
+
219
  if( SC_Admin::is_edit_page( 'new' ) ){
220
  $general_settings = Shortcoder::get_settings();
221
+ $post_content = $general_settings[ 'default_content' ];
222
  }
223
 
224
  if( $editor[ 'active' ] == 'code' ){
225
  echo '<div class="sc_cm_menu"></div>';
226
+ echo '<textarea name="sc_content" id="sc_content" class="sc_cm_content">' . esc_textarea( $post_content ) . '</textarea>';
227
  }
228
 
229
  if( in_array( $editor[ 'active' ], array( 'text', 'visual' ) ) ){
230
+ wp_editor( $post_content, 'sc_content', array(
231
  'wpautop'=> false,
232
  'textarea_rows'=> 20,
233
  'tinymce' => ( $editor[ 'active' ] == 'visual' )
327
  <button class="button subscribe_btn"><span class="dashicons dashicons-email"></span> Subscribe</button>
328
  </div>';
329
 
 
 
 
 
 
330
  echo '</div>';
331
  }
332
 
333
  public static function more_plugins( $post ){
334
 
335
  echo '<div class="feedback">';
 
 
 
 
 
 
 
 
 
 
 
 
 
336
 
337
+ echo '<ul>';
338
+ echo '<li><a href="https://twitter.com/intent/follow?screen_name=aakashweb" target="_blank"><span class="dashicons dashicons-twitter"></span> Follow on Twitter</a></li>';
339
+ echo '<li><a href="https://www.facebook.com/aakashweb/" target="_blank"><span class="dashicons dashicons-facebook-alt"></span> Follow on Facebook</a></li>';
340
+ echo '<li><a href="https://www.aakashweb.com/forum/discuss/wordpress-plugins/shortcoder/" target="_blank"><span class="dashicons dashicons-format-chat"></span> Support Forum</a></li>';
341
+ echo '<li><a href="https://wordpress.org/support/plugin/shortcoder/reviews/?rate=5#new-post" target="_blank"><span class="dashicons dashicons-star-filled"></span> Rate plugin</a></li>';
342
+ echo '</ul>';
343
 
344
+ echo '<h3>More WordPress plugins from us</h3>';
345
+ echo '<ul>';
346
+ echo '<li><a href="https://www.aakashweb.com/wordpress-plugins/super-rss-reader/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=srr-pro" target="_blank">Super RSS Reader</a> - Display RSS feeds</li>';
347
+ echo '<li><a href="https://www.aakashweb.com/wordpress-plugins/announcer/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=announcer-pro" target="_blank">Announcer</a> - Add notification message bars easily</li>';
348
+ echo '<li><a href="https://www.aakashweb.com/wordpress-plugins/ultimate-floating-widgets/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=ufw-pro" target="_blank">Ultimate Floating Widget</a> - Create floating sidebar popup and add widgets inside</li>';
349
+ echo '<li><a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=wpsr-pro" target="_blank">WP Socializer</a> - Add beautiful social media share icons</li>';
350
+ echo '<li><a href="https://www.aakashweb.com/wordpress-plugins/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=aw" target="_blank">More</a> <span class="dashicons dashicons-arrow-right-alt"></span></li>';
351
+ echo '</ul>';
352
 
353
  echo '</div>';
354
 
admin/insert.php CHANGED
@@ -17,9 +17,9 @@
17
  <span class="promo_link">
18
  <?php
19
  $promo_links = array(
20
- array('super-rss-reader/?utm_source=wp-socializer&utm_medium=insert&utm_campaign=srr-pro', 'Super RSS Reader', 'super-rss-reader.png'),
21
- array('ultimate-floating-widgets/?utm_source=wp-socializer&utm_medium=insert&utm_campaign=ufw-pro', 'Ultimate Floating Widgets', 'ultimate-floating-widgets.png'),
22
- array('announcer/?utm_source=wp-socializer&utm_medium=sidebar&utm_campaign=announcer-pro', 'Announcer', 'announcer.png'),
23
  );
24
  $promo_link_id = array_rand( $promo_links, 1 );
25
  $promo_link = $promo_links[$promo_link_id ];
17
  <span class="promo_link">
18
  <?php
19
  $promo_links = array(
20
+ array('super-rss-reader/?utm_source=shortcoder&utm_medium=insert&utm_campaign=srr-pro', 'Super RSS Reader', 'super-rss-reader.png'),
21
+ array('ultimate-floating-widgets/?utm_source=shortcoder&utm_medium=insert&utm_campaign=ufw-pro', 'Ultimate Floating Widgets', 'ultimate-floating-widgets.png'),
22
+ array('announcer/?utm_source=shortcoder&utm_medium=sidebar&utm_campaign=announcer-pro', 'Announcer', 'announcer.png'),
23
  );
24
  $promo_link_id = array_rand( $promo_links, 1 );
25
  $promo_link = $promo_links[$promo_link_id ];
admin/js/script.js CHANGED
@@ -146,18 +146,6 @@ $(document).ready(function(){
146
 
147
  }
148
 
149
- var show_promo_slide = function(){
150
-
151
- var slides = $('.promo_slide').length;
152
-
153
- if(!slides){
154
- return;
155
- }
156
- var rand_slide = Math.floor(Math.random() * slides);
157
- sc_current_slide(rand_slide);
158
-
159
- }
160
-
161
  $('#post_name').on('change keyup', function(){
162
  set_sc_preview_text($(this).val());
163
  });
@@ -304,33 +292,4 @@ $(document).ready(function(){
304
  init();
305
 
306
  });
307
- })( jQuery );
308
-
309
- var promo_slide_index = 1;
310
-
311
- function sc_next_promo_slide(n, event) {
312
- event.preventDefault();
313
- sc_promo_slide(promo_slide_index += n);
314
- }
315
-
316
- function sc_current_slide(n) {
317
- sc_promo_slide(promo_slide_index = n);
318
- }
319
-
320
- function sc_promo_slide(n) {
321
- var slides = document.getElementsByClassName('promo_slide');
322
- if(slides.length == 0){
323
- return;
324
- }
325
- var i;
326
- if (n > slides.length) {
327
- promo_slide_index = 1
328
- }
329
- if (n < 1) {
330
- promo_slide_index = slides.length
331
- }
332
- for (i = 0; i < slides.length; i++) {
333
- slides[i].style.display = 'none';
334
- }
335
- slides[promo_slide_index - 1].style.display = 'block';
336
- }
146
 
147
  }
148
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  $('#post_name').on('change keyup', function(){
150
  set_sc_preview_text($(this).val());
151
  });
292
  init();
293
 
294
  });
295
+ })( jQuery );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -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.9.0
10
- Tested up to: 6.0.1
11
- Stable tag: 6.0
12
 
13
  Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes within posts, pages & widgets
14
 
@@ -130,6 +130,11 @@ Yes, this feature is available in the PRO version. You can upgrade to the [PRO v
130
 
131
  ## Changelog
132
 
 
 
 
 
 
133
  ### 6.0
134
  * New: PRO version is introduced.
135
  * New: Prevent same shortcode nested loop.
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
  Requires at least: 4.9.0
10
+ Tested up to: 6.1
11
+ Stable tag: 6.1
12
 
13
  Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes within posts, pages & widgets
14
 
130
 
131
  ## Changelog
132
 
133
+ ### 6.1
134
+ * New: Enhancements to shortcode edit screen meta boxes.
135
+ * Fix: HTML is escaped in the editor sometimes.
136
+ * Fix: Support for WordPress 6.1
137
+
138
  ### 6.0
139
  * New: PRO version is introduced.
140
  * New: Prevent same shortcode nested loop.
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: 6.0
8
  Author URI: https://www.aakashweb.com/
9
  Text Domain: shortcoder
10
  Domain Path: /languages
11
  */
12
 
13
- define( 'SC_VERSION', '6.0' );
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' ) );
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: 6.1
8
  Author URI: https://www.aakashweb.com/
9
  Text Domain: shortcoder
10
  Domain Path: /languages
11
  */
12
 
13
+ define( 'SC_VERSION', '6.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' ) );