SoundCloud Is Gold - Version 2.5.1

Version Description

  • Fixing the insert shortcode button not inserting the shortcode anymore.
  • Renamed the media upload tab to "insert from Soundcloud" for consistency with Wordpress and better UX.
  • Minor styling update to fix the image placeholder in the editor.
Download this release

Release Info

Developer realTM
Plugin Icon wp plugin SoundCloud Is Gold
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.5 to 2.5.1

readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: realtm
3
  Donate link: https://www.paypal.com/donate/?token=BWzoCeVKupkWFJQ7nIA-0il0ndBxJOConYsL8hEYVgQHTMPaKM6bjYu0GqHO7aE2j0px_m
4
  Tags: soundcloud, simple, shortcode, music, sound, podcasts, widget
5
  Requires at least: 3.2
6
- Tested up to: 4.9.4
7
- Stable tag: 2.5
8
 
9
  Browse and insert Soundcloud tracks, playlists and favourites to your posts. Live preview and customise your player to fit your website's design.
10
 
@@ -156,6 +156,11 @@ Sometimes, I generally keep a eye on my plugin's forums and website's comments.
156
 
157
  == Changelog ==
158
 
 
 
 
 
 
159
  = 2.5 =
160
  * 🤟 You can now change playlists' height!
161
  * 🤟 Mini player is back!! You can now Force the player height to show the Mini Player.
3
  Donate link: https://www.paypal.com/donate/?token=BWzoCeVKupkWFJQ7nIA-0il0ndBxJOConYsL8hEYVgQHTMPaKM6bjYu0GqHO7aE2j0px_m
4
  Tags: soundcloud, simple, shortcode, music, sound, podcasts, widget
5
  Requires at least: 3.2
6
+ Tested up to: 4.9.7
7
+ Stable tag: 2.5.1
8
 
9
  Browse and insert Soundcloud tracks, playlists and favourites to your posts. Live preview and customise your player to fit your website's design.
10
 
156
 
157
  == Changelog ==
158
 
159
+ = 2.5.1 =
160
+ * 🔧 Fixing the insert shortcode button not inserting the shortcode anymore.
161
+ * ✍🏻 Renamed the media upload tab to "insert from Soundcloud" for consistency with Wordpress and better UX.
162
+ * ✍🏻 Minor styling update to fix the image placeholder in the editor.
163
+
164
  = 2.5 =
165
  * 🤟 You can now change playlists' height!
166
  * 🤟 Mini player is back!! You can now Force the player height to show the Mini Player.
soundcloud-is-gold-functions.php CHANGED
@@ -390,7 +390,7 @@ if(!function_exists('printl')){
390
  /*********************************************************************/
391
  /* Add a new Tab */
392
  function soundcloud_is_gold_media_upload_tab($tabs) {
393
- $newtab = array('soundcloud_is_gold' => __('Soundcloud is Gold', 'soundcloud_is_gold'));
394
  return array_merge($tabs, $newtab);
395
  }
396
  add_filter('media_upload_tabs', 'soundcloud_is_gold_media_upload_tab');
390
  /*********************************************************************/
391
  /* Add a new Tab */
392
  function soundcloud_is_gold_media_upload_tab($tabs) {
393
+ $newtab = array('soundcloud_is_gold' => __('Insert from Soundcloud', 'soundcloud_is_gold_tabname'));
394
  return array_merge($tabs, $newtab);
395
  }
396
  add_filter('media_upload_tabs', 'soundcloud_is_gold_media_upload_tab');
soundcloud-is-gold-js.js CHANGED
@@ -238,15 +238,17 @@ jQuery(document).ready(function($){
238
  });
239
 
240
  function insertShortcode(sh){
241
- //Insert Content at the end of the editor content
242
- //parent.tinyMCE.activeEditor.setContent(parent.tinyMCE.activeEditor.getContent() + sh);
 
 
 
 
243
 
244
- //Insert Content where the cursor is in the editor (plus refresh)
245
- parent.tinyMCE.activeEditor.execCommand('mceInsertRawHTML', false, sh);
246
- //Insert Content where the cursor is in the editor (no refresh)
247
- //parent.tinyMCE.activeEditor.execCommand('mceInsertContent', false, sh);
248
- //Close window
249
  parent.jQuery(".media-modal-close").click();
 
 
250
  }
251
 
252
  /********************************************/
238
  });
239
 
240
  function insertShortcode(sh){
241
+ //Insert Content where the cursor is in the editor (no refresh)
242
+ var myActiveEditor = parent.tinyMCE.get('content');
243
+ if(myActiveEditor!==null){
244
+ //myActiveEditor.execCommand('mycustomcommand', false, sh);//run command, used for custom commands
245
+ myActiveEditor.insertContent(sh); // insert Shortcode into tinyMCE's content
246
+ }
247
 
248
+ //Close window
 
 
 
 
249
  parent.jQuery(".media-modal-close").click();
250
+ //Close window when using reduced modal (happens when clicking on an existing placeholder in editor)
251
+ parent.jQuery("#TB_closeWindowButton").click();
252
  }
253
 
254
  /********************************************/
soundcloud-is-gold.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Soundcloud is Gold
4
  Plugin URI: http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin
5
  Description: <strong><a href="http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin">Soundcloud is gold</a></strong> integrates perfectly into wordpress. Select, set and add track, playlists or favorites to your post using the soundcloud player. Live Preview, easy, smart and straightforward. You can set default settings in the option page, choose your defaut soundcloud player (Standard, Artwork, Visual), its width, extra Css classes for you CSS lovers and your favorite colors. You'll still be able to set players to different settings before adding to your post if you fancy a one off change!
6
- Version: 2.5
7
  Author: Thomas Michalak
8
  Author URI: http://www.mightymess.com/thomas-michalak
9
  License: GPL2 or Later
3
  Plugin Name: Soundcloud is Gold
4
  Plugin URI: http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin
5
  Description: <strong><a href="http://www.mightymess.com/soundcloud-is-gold-wordpress-plugin">Soundcloud is gold</a></strong> integrates perfectly into wordpress. Select, set and add track, playlists or favorites to your post using the soundcloud player. Live Preview, easy, smart and straightforward. You can set default settings in the option page, choose your defaut soundcloud player (Standard, Artwork, Visual), its width, extra Css classes for you CSS lovers and your favorite colors. You'll still be able to set players to different settings before adding to your post if you fancy a one off change!
6
+ Version: 2.5.1
7
  Author: Thomas Michalak
8
  Author URI: http://www.mightymess.com/thomas-michalak
9
  License: GPL2 or Later
tinymce-plugin/soundcloud-is-gold-editor_plugin.css CHANGED
@@ -1,10 +1,9 @@
1
  img.soundcloudIsGold_placeholder{
2
- background: url("img/player-placeholder.jpg") no-repeat scroll top left #DAE8F6;
3
- background-size: 100% auto;
4
  border: 1px solid #7B9DA2;
5
  margin-bottom: 10px;
 
6
  max-width: 566px;
7
- height: 166px;
8
  }
9
  img.soundcloudIsGold_placeholder:hover{
10
  background-color: #0085ba;
1
  img.soundcloudIsGold_placeholder{
 
 
2
  border: 1px solid #7B9DA2;
3
  margin-bottom: 10px;
4
+ width: 100%;
5
  max-width: 566px;
6
+ height: auto;
7
  }
8
  img.soundcloudIsGold_placeholder:hover{
9
  background-color: #0085ba;
tinymce-plugin/soundcloud-is-gold-editor_plugin.js CHANGED
@@ -93,9 +93,10 @@
93
  return co.replace(/\[soundcloud([^\]]*)\]/g, function(a,b){
94
  //console.log(obj);
95
  //console.log('----');
 
96
  //data-mce-resize="false": stop been able to rezise the placeholder
97
  //data-mce-placeholder="1": Set the image as a placehoder, no more UI poping up.
98
- placeholder = '<img class="soundcloudIsGold_placeholder" src="../wp-content/plugins/soundcloud-is-gold/tinymce-plugin/img/t.gif" class="soundcloudIsGold mceItem" data-mce-resize="false" data-mce-placeholder="1" title="soundcloud'+tinymce.DOM.encode(b)+'" width="566px" height="166px" />';
99
  return placeholder;
100
  });
101
  },
@@ -165,11 +166,12 @@
165
  author : 'TM',
166
  authorurl : 'http://www.mightymess.com',
167
  infourl : '',
168
- version : "1.1"
169
  };
170
  }
171
 
172
  });
173
 
174
  tinymce.PluginManager.add('soundcloudIsGold', tinymce.plugins.soundcloudIsGold);
 
175
  })();
93
  return co.replace(/\[soundcloud([^\]]*)\]/g, function(a,b){
94
  //console.log(obj);
95
  //console.log('----');
96
+
97
  //data-mce-resize="false": stop been able to rezise the placeholder
98
  //data-mce-placeholder="1": Set the image as a placehoder, no more UI poping up.
99
+ placeholder = '<img class="soundcloudIsGold_placeholder" src="../wp-content/plugins/soundcloud-is-gold/tinymce-plugin/img/player-placeholder.jpg" class="soundcloudIsGold mceItem" data-mce-resize="false" data-mce-placeholder="1" title="soundcloud'+tinymce.DOM.encode(b)+'" width="566px" height="166px" />';
100
  return placeholder;
101
  });
102
  },
166
  author : 'TM',
167
  authorurl : 'http://www.mightymess.com',
168
  infourl : '',
169
+ version : "1.2"
170
  };
171
  }
172
 
173
  });
174
 
175
  tinymce.PluginManager.add('soundcloudIsGold', tinymce.plugins.soundcloudIsGold);
176
+
177
  })();