Shortcoder - Version 4.2

Version Description

  • Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
  • Fix: Javascript in insert shortcode popup not working in IE 11.
  • Fix: Missing parenthesis while calling is_year.
  • Fix: Widgets page not loading insert shortcode popup.
  • Fix: Removed settings emoji icon from plugin actions list.
  • Fix: Load latest version 5.42.0 of codemirror.
  • Fix: Updated minimum required WordPress version.
Download this release

Release Info

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

Code changes from version 4.1.9 to 4.2

admin/css/style-insert.css CHANGED
@@ -1,7 +1,7 @@
1
  body{
2
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
3
  color: #444;
4
- padding: 10px;
5
  background: #f1f1f1;
6
  }
7
  h2{
1
  body{
2
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
3
  color: #444;
4
+ padding: 0 10px 10px 10px;
5
  background: #f1f1f1;
6
  }
7
  h2{
admin/js/script-insert.js CHANGED
@@ -4,7 +4,7 @@ $(document).ready(function(){
4
 
5
  var last_sort = 'desc';
6
 
7
- var send_editor = function( content = '' ){
8
  if( typeof parent.send_to_editor === 'function' ){
9
  parent.send_to_editor( content );
10
  }else{
4
 
5
  var last_sort = 'desc';
6
 
7
+ var send_editor = function( content ){
8
  if( typeof parent.send_to_editor === 'function' ){
9
  parent.send_to_editor( content );
10
  }else{
admin/sc-admin.php CHANGED
@@ -426,13 +426,18 @@ class Shortcoder_Admin{
426
  if( self::$pagehook == $screen->id )
427
  return;
428
 
 
 
429
  echo '
430
  <script>
431
- window.onload = function(){
432
- if( typeof QTags === "function" ){
433
- QTags.addButton( "QT_sc_insert", "Shortcoder", sc_show_insert );
434
- }
 
 
435
  }
 
436
  function sc_show_insert(){
437
  tb_show( "Insert a Shortcode", "' . admin_url( 'admin-ajax.php?action=sc_admin_ajax&do=insert_shortcode&TB_iframe=true' ) . '" );
438
  }
@@ -475,13 +480,13 @@ class Shortcoder_Admin{
475
  }
476
 
477
  public static function load_codemirror_editor( $value ){
478
- echo '<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/codemirror.min.css" rel="stylesheet">';
479
- echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/codemirror.min.js"></script>';
480
- echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/mode/htmlmixed/htmlmixed.min.js"></script>';
481
- echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/mode/css/css.min.js"></script>';
482
- echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/mode/xml/xml.min.js"></script>';
483
- echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/mode/javascript/javascript.min.js"></script>';
484
- echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.37.0/addon/selection/active-line.min.js"></script>';
485
 
486
  echo '<div class="sc_cm_menu"></div>';
487
  echo '<textarea name="sc_content" id="sc_content">' . esc_textarea( $value ) . '</textarea>';
@@ -536,7 +541,7 @@ class Shortcoder_Admin{
536
 
537
  public static function action_links( $links ){
538
  array_unshift( $links, '<a href="https://goo.gl/qMF3iE" target="_blank">Donate</a>' );
539
- array_unshift( $links, '<a href="'. esc_url( admin_url( 'options-general.php?page=shortcoder' ) ) .'">⚙️ Settings</a>' );
540
  return $links;
541
  }
542
 
426
  if( self::$pagehook == $screen->id )
427
  return;
428
 
429
+ add_thickbox();
430
+
431
  echo '
432
  <script>
433
+ if(window.addEventListener){
434
+ window.addEventListener("load", function(){
435
+ if( typeof QTags === "function" ){
436
+ QTags.addButton( "QT_sc_insert", "Shortcoder", sc_show_insert );
437
+ }
438
+ });
439
  }
440
+
441
  function sc_show_insert(){
442
  tb_show( "Insert a Shortcode", "' . admin_url( 'admin-ajax.php?action=sc_admin_ajax&do=insert_shortcode&TB_iframe=true' ) . '" );
443
  }
480
  }
481
 
482
  public static function load_codemirror_editor( $value ){
483
+ echo '<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/codemirror.min.css" rel="stylesheet">';
484
+ echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/codemirror.min.js"></script>';
485
+ echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/mode/htmlmixed/htmlmixed.min.js"></script>';
486
+ echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/mode/css/css.min.js"></script>';
487
+ echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/mode/xml/xml.min.js"></script>';
488
+ echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/mode/javascript/javascript.min.js"></script>';
489
+ echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/addon/selection/active-line.min.js"></script>';
490
 
491
  echo '<div class="sc_cm_menu"></div>';
492
  echo '<textarea name="sc_content" id="sc_content">' . esc_textarea( $value ) . '</textarea>';
541
 
542
  public static function action_links( $links ){
543
  array_unshift( $links, '<a href="https://goo.gl/qMF3iE" target="_blank">Donate</a>' );
544
+ array_unshift( $links, '<a href="'. esc_url( admin_url( 'options-general.php?page=shortcoder' ) ) .'">Settings</a>' );
545
  return $links;
546
  }
547
 
admin/sc-insert.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <html>
2
  <head>
3
  <title>Insert shortcode</title>
1
+ <!DOCTYPE html>
2
  <html>
3
  <head>
4
  <title>Insert shortcode</title>
includes/metadata.php CHANGED
@@ -113,7 +113,7 @@ class Shortcoder_Metadata{
113
  'url' => get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) )
114
  );
115
 
116
- }elseif( is_year ){
117
 
118
  $d = array(
119
  'title' => wp_title( '', false ),
113
  'url' => get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) )
114
  );
115
 
116
+ }elseif( is_year() ){
117
 
118
  $d = array(
119
  'title' => wp_title( '', false ),
readme.txt CHANGED
@@ -5,9 +5,9 @@ Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
5
  Tags: shortcode, html, javascript, shortcodes, short code, posts, pages, widgets, insert, adsense, ads, snippets,
6
  Donate link: https://goo.gl/qMF3iE
7
  License: GPLv2 or later
8
- Requires at least: 3.3
9
  Tested up to: 4.9.8
10
- Stable tag: 4.1.9
11
 
12
  Create custom "Shortcodes" easily for HTML, JavaScript snippets and use the shortcodes within posts, pages & widgets.
13
 
@@ -91,6 +91,15 @@ Note: When you disable a shortcode, the shortcode will not be executed in the pa
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
 
 
 
94
  = 4.1.9 =
95
  * Fix: Minor UI refinements for better experience.
96
  * Fix: Import error where some exported JSON files have 0 as EOF.
5
  Tags: shortcode, html, javascript, shortcodes, short code, posts, pages, widgets, insert, adsense, ads, snippets,
6
  Donate link: https://goo.gl/qMF3iE
7
  License: GPLv2 or later
8
+ Requires at least: 4.4.0
9
  Tested up to: 4.9.8
10
+ Stable tag: 4.2
11
 
12
  Create custom "Shortcodes" easily for HTML, JavaScript snippets and use the shortcodes within posts, pages & widgets.
13
 
91
 
92
  == Changelog ==
93
 
94
+ = 4.2 =
95
+ * Fix: Some plugins fail to fire onload JS event since it was overwritten by shortcoder.
96
+ * Fix: Javascript in insert shortcode popup not working in IE 11.
97
+ * Fix: Missing parenthesis while calling `is_year`.
98
+ * Fix: Widgets page not loading insert shortcode popup.
99
+ * Fix: Removed settings emoji icon from plugin actions list.
100
+ * Fix: Load latest version 5.42.0 of codemirror.
101
+ * Fix: Updated minimum required WordPress version.
102
+
103
  = 4.1.9 =
104
  * Fix: Minor UI refinements for better experience.
105
  * Fix: Import error where some exported JSON files have 0 as EOF.
shortcoder.php CHANGED
@@ -4,11 +4,11 @@ Plugin Name: Shortcoder
4
  Plugin URI: https://www.aakashweb.com/
5
  Description: Shortcoder is a plugin which allows to create a custom shortcode and store HTML, JavaScript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get executed in that place. You can create a shortcode for Youtube videos, adsense ads, buttons and more.
6
  Author: Aakash Chakravarthy
7
- Version: 4.1.9
8
  Author URI: https://www.aakashweb.com/
9
  */
10
 
11
- define( 'SC_VERSION', '4.1.9' );
12
  define( 'SC_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
13
  define( 'SC_URL', plugin_dir_url( __FILE__ ) );
14
  define( 'SC_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
4
  Plugin URI: https://www.aakashweb.com/
5
  Description: Shortcoder is a plugin which allows to create a custom shortcode and store HTML, JavaScript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get executed in that place. You can create a shortcode for Youtube videos, adsense ads, buttons and more.
6
  Author: Aakash Chakravarthy
7
+ Version: 4.2
8
  Author URI: https://www.aakashweb.com/
9
  */
10
 
11
+ define( 'SC_VERSION', '4.2' );
12
  define( 'SC_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
13
  define( 'SC_URL', plugin_dir_url( __FILE__ ) );
14
  define( 'SC_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );