PixCodes - Version 2.3.6

Version Description

  • Improve compatibility with WordPress 5.7.2.
Download this release

Release Info

Developer pixelgrade
Plugin Icon wp plugin PixCodes
Version 2.3.6
Comparing to
See all releases

Code changes from version 2.3.5 to 2.3.6

Files changed (3) hide show
  1. js/add_shortcode.js +38 -36
  2. pixcodes.php +1 -1
  3. readme.txt +5 -2
js/add_shortcode.js CHANGED
@@ -1,12 +1,45 @@
1
  editor = '';
2
  (function($) {
3
 
4
- $( document ).ready( function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- $( 'body' ).append( '<div id="pixelgrade_shortcodes_modal" class="reveal-modal l_pxg_modal">' );
7
 
8
- var modal_selector = $( '#pixelgrade_shortcodes_modal' ),
9
- plugin_url;
10
 
11
  $.ajax( {
12
  url: ajaxurl,
@@ -166,37 +199,6 @@ editor = '';
166
  } // end of ajax success
167
  } );
168
 
169
- tinymce.create( 'tinymce.plugins.wpgrade', {
170
- init: function( ed, url ) {
171
- plugin_url = url;
172
- ed.addButton( 'wpgrade', {
173
- title: 'Add a shortcode',
174
- // text : 'PixCodes',
175
- classes: 'btn pixelgrade_shortcodes',
176
- onclick: function() {
177
- $( '.l_pxg_modal .btn_primary' ).addClass( 'disabled' );
178
- $( 'body' ).addClass( 'pixcodes_select_tags_opened' );
179
- //let's clean up some more first
180
- $( '.l_pxg_modal' ).removeClass( 's_active' );
181
-
182
- modal_selector.reveal( {
183
- animation: 'fadeAndPop', //fade, fadeAndPop, none
184
- animationspeed: 400, //how fast animtions are
185
- closeonbackgroundclick: true, //if you click background will modal close?
186
- dismissmodalclass: 'close' //the class of a button or element that will close an open modal
187
- } );
188
- editor = ed;
189
- get_current_editor_selected_content = function() {
190
- return editor;
191
- };
192
-
193
- window.send_to_editor_clone = window.send_to_editor;
194
- }
195
- } );
196
- }
197
- } );
198
- tinymce.PluginManager.add( 'wpgrade', tinymce.plugins.wpgrade );
199
-
200
  // if the shortcode doesn't have params it needs to be inserted directly
201
  modal_selector.on( 'click', '.insert-direct-shortcode', function() {
202
 
@@ -310,4 +312,4 @@ editor = '';
310
  */
311
  $.fn.reveal=function(e){var t={animation:"fadeAndPop",animationspeed:300,closeonbackgroundclick:true,dismissmodalclass:"close-reveal-modal"};var e=$.extend({},t,e);return this.each(function(){function u(){i=false}function a(){i=true}var t=$(this),n=parseInt(t.css("top")),r=t.height()+n,i=false,s=$(".reveal-modal-bg");if(s.length==0){s=$('<div class="reveal-modal-bg" />').insertAfter(t)}t.bind("reveal:open",function(){s.unbind("click.modalEvent");$("."+e.dismissmodalclass).unbind("click.modalEvent");if(!i){a();if(e.animation=="fadeAndPop"){t.css({top:$(document).scrollTop()-r,opacity:0,visibility:"visible"});s.fadeIn(e.animationspeed/2);t.delay(e.animationspeed/2).animate({top:$(document).scrollTop()+n+"px",opacity:1},e.animationspeed,u())}if(e.animation=="fade"){t.css({opacity:0,visibility:"visible",top:$(document).scrollTop()+n});s.fadeIn(e.animationspeed/2);t.delay(e.animationspeed/2).animate({opacity:1},e.animationspeed,u())}if(e.animation=="none"){t.css({visibility:"visible",top:$(document).scrollTop()+n});s.css({display:"block"});u()}}t.unbind("reveal:open")});t.bind("reveal:close",function(){if(!i){a();if(e.animation=="fadeAndPop"){s.delay(e.animationspeed).fadeOut(e.animationspeed);t.animate({top:$(document).scrollTop()-r+"px",opacity:0},e.animationspeed/2,function(){t.css({top:n,opacity:1,visibility:"hidden"});u()})}if(e.animation=="fade"){s.delay(e.animationspeed).fadeOut(e.animationspeed);t.animate({opacity:0},e.animationspeed,function(){t.css({opacity:1,visibility:"hidden",top:n});u()})}if(e.animation=="none"){t.css({visibility:"hidden",top:n});s.css({display:"none"})}}t.unbind("reveal:close")});t.trigger("reveal:open");var o=$("."+e.dismissmodalclass).bind("click.modalEvent",function(){t.trigger("reveal:close")});if(e.closeonbackgroundclick){s.css({cursor:"pointer"});s.bind("click.modalEvent",function(){t.trigger("reveal:close")})}$("body").keyup(function(e){if(e.which===27){t.trigger("reveal:close")}})})}
312
 
313
- })(jQuery);
1
  editor = '';
2
  (function($) {
3
 
4
+ $( 'body' ).append( '<div id="pixelgrade_shortcodes_modal" class="reveal-modal l_pxg_modal">' );
5
+
6
+ let modal_selector = $( '#pixelgrade_shortcodes_modal' ),
7
+ plugin_url;
8
+
9
+ tinymce.create( 'tinymce.plugins.wpgrade', {
10
+ init: function( ed, url ) {
11
+ plugin_url = url;
12
+ ed.addButton( 'wpgrade', {
13
+ title: 'Add a shortcode',
14
+ // text : 'PixCodes',
15
+ classes: 'btn pixelgrade_shortcodes',
16
+ onclick: function() {
17
+ $( '.l_pxg_modal .btn_primary' ).addClass( 'disabled' );
18
+ $( 'body' ).addClass( 'pixcodes_select_tags_opened' );
19
+ //let's clean up some more first
20
+ $( '.l_pxg_modal' ).removeClass( 's_active' );
21
+
22
+ modal_selector.reveal( {
23
+ animation: 'fadeAndPop', //fade, fadeAndPop, none
24
+ animationspeed: 400, //how fast animtions are
25
+ closeonbackgroundclick: true, //if you click background will modal close?
26
+ dismissmodalclass: 'close' //the class of a button or element that will close an open modal
27
+ } );
28
+ editor = ed;
29
+ get_current_editor_selected_content = function() {
30
+ return editor;
31
+ };
32
+
33
+ window.send_to_editor_clone = window.send_to_editor;
34
+ }
35
+ } );
36
+ }
37
+ } );
38
+ tinymce.PluginManager.add( 'wpgrade', tinymce.plugins.wpgrade );
39
 
40
+ $( document ).ready( function() {
41
 
42
+ var modal_selector = $( '#pixelgrade_shortcodes_modal' );
 
43
 
44
  $.ajax( {
45
  url: ajaxurl,
199
  } // end of ajax success
200
  } );
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  // if the shortcode doesn't have params it needs to be inserted directly
203
  modal_selector.on( 'click', '.insert-direct-shortcode', function() {
204
 
312
  */
313
  $.fn.reveal=function(e){var t={animation:"fadeAndPop",animationspeed:300,closeonbackgroundclick:true,dismissmodalclass:"close-reveal-modal"};var e=$.extend({},t,e);return this.each(function(){function u(){i=false}function a(){i=true}var t=$(this),n=parseInt(t.css("top")),r=t.height()+n,i=false,s=$(".reveal-modal-bg");if(s.length==0){s=$('<div class="reveal-modal-bg" />').insertAfter(t)}t.bind("reveal:open",function(){s.unbind("click.modalEvent");$("."+e.dismissmodalclass).unbind("click.modalEvent");if(!i){a();if(e.animation=="fadeAndPop"){t.css({top:$(document).scrollTop()-r,opacity:0,visibility:"visible"});s.fadeIn(e.animationspeed/2);t.delay(e.animationspeed/2).animate({top:$(document).scrollTop()+n+"px",opacity:1},e.animationspeed,u())}if(e.animation=="fade"){t.css({opacity:0,visibility:"visible",top:$(document).scrollTop()+n});s.fadeIn(e.animationspeed/2);t.delay(e.animationspeed/2).animate({opacity:1},e.animationspeed,u())}if(e.animation=="none"){t.css({visibility:"visible",top:$(document).scrollTop()+n});s.css({display:"block"});u()}}t.unbind("reveal:open")});t.bind("reveal:close",function(){if(!i){a();if(e.animation=="fadeAndPop"){s.delay(e.animationspeed).fadeOut(e.animationspeed);t.animate({top:$(document).scrollTop()-r+"px",opacity:0},e.animationspeed/2,function(){t.css({top:n,opacity:1,visibility:"hidden"});u()})}if(e.animation=="fade"){s.delay(e.animationspeed).fadeOut(e.animationspeed);t.animate({opacity:0},e.animationspeed,function(){t.css({opacity:1,visibility:"hidden",top:n});u()})}if(e.animation=="none"){t.css({visibility:"hidden",top:n});s.css({display:"none"})}}t.unbind("reveal:close")});t.trigger("reveal:open");var o=$("."+e.dismissmodalclass).bind("click.modalEvent",function(){t.trigger("reveal:close")});if(e.closeonbackgroundclick){s.css({cursor:"pointer"});s.bind("click.modalEvent",function(){t.trigger("reveal:close")})}$("body").keyup(function(e){if(e.which===27){t.trigger("reveal:close")}})})}
314
 
315
+ })(jQuery);
pixcodes.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: PixCodes
4
  Plugin URI: https://pixelgrade.com
5
  Description: WordPress shortcodes plugin everywhere. Loaded with shortcodes, awesomeness and more.
6
- Version: 2.3.5
7
  Author: PixelGrade
8
  Author URI: https://pixelgrade.com
9
  Author Email: contact@pixelgrade.com
3
  Plugin Name: PixCodes
4
  Plugin URI: https://pixelgrade.com
5
  Description: WordPress shortcodes plugin everywhere. Loaded with shortcodes, awesomeness and more.
6
+ Version: 2.3.6
7
  Author: PixelGrade
8
  Author URI: https://pixelgrade.com
9
  Author Email: contact@pixelgrade.com
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: pixelgrade, vlad.olaru, babbardel
3
  Tags: shortcodes, insert, columns, sliders, tabs, buttons
4
  Requires at least: 4.9.0
5
- Tested up to: 5.1.0
6
  Requires PHP: 5.2.4
7
- Stable tag: 2.3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -30,6 +30,9 @@ Here is a [detailed documentation](http://github.com/pixelgrade/pixcodes/blob/ma
30
 
31
  == Changelog ==
32
 
 
 
 
33
  = 2.3.5 =
34
  * Checked and made sure that the plugin works with the latest WordPress version (5.1)
35
  * Fixed some edged cases for the OpenTable shortcode
2
  Contributors: pixelgrade, vlad.olaru, babbardel
3
  Tags: shortcodes, insert, columns, sliders, tabs, buttons
4
  Requires at least: 4.9.0
5
+ Tested up to: 5.7.2
6
  Requires PHP: 5.2.4
7
+ Stable tag: 2.3.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
30
 
31
  == Changelog ==
32
 
33
+ = 2.3.6 =
34
+ * Improve compatibility with WordPress 5.7.2.
35
+
36
  = 2.3.5 =
37
  * Checked and made sure that the plugin works with the latest WordPress version (5.1)
38
  * Fixed some edged cases for the OpenTable shortcode