Scripts n Styles - Version 3.3.1

Version Description

Download this release

Release Info

Developer WraithKenny
Plugin Icon wp plugin Scripts n Styles
Version 3.3.1
Comparing to
See all releases

Code changes from version 3.3 to 3.3.1

README.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Scripts n Styles ===
2
  Contributors: WraithKenny, CaptainN
3
  Tags: admin, CSS, javascript, code, custom, Style
4
- Requires at least: 3.6
5
- Tested up to: 3.6
6
- Stable tag: 3.3
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
1
  === Scripts n Styles ===
2
  Contributors: WraithKenny, CaptainN
3
  Tags: admin, CSS, javascript, code, custom, Style
4
+ Requires at least: 4.2.2
5
+ Tested up to: 4.7
6
+ Stable tag: 3.3.1
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
includes/class-sns-ajax.php CHANGED
@@ -398,6 +398,7 @@ class SnS_AJAX
398
 
399
  // Differs from SnS_Admin_Meta_Box::maybe_set() in that this needs no prefix.
400
  static function maybe_set( $o, $i ) {
 
401
  if ( empty( $_REQUEST[ $i ] ) ) {
402
  if ( isset( $o[ $i ] ) ) unset( $o[ $i ] );
403
  } else $o[ $i ] = $_REQUEST[ $i ];
398
 
399
  // Differs from SnS_Admin_Meta_Box::maybe_set() in that this needs no prefix.
400
  static function maybe_set( $o, $i ) {
401
+ if ( ! is_array( $o ) ) return array();
402
  if ( empty( $_REQUEST[ $i ] ) ) {
403
  if ( isset( $o[ $i ] ) ) unset( $o[ $i ] );
404
  } else $o[ $i ] = $_REQUEST[ $i ];
includes/class-sns-meta-box.php CHANGED
@@ -409,6 +409,7 @@ class SnS_Admin_Meta_Box
409
  * Filters $o and Checks if the sent data $i is empty (intended to clear). If not, updates.
410
  */
411
  static function maybe_set( $o, $i, $p = 'SnS_' ) {
 
412
  if ( empty( $_REQUEST[ $p . $i ] ) ) {
413
  if ( isset( $o[ $i ] ) ) unset( $o[ $i ] );
414
  } else {
409
  * Filters $o and Checks if the sent data $i is empty (intended to clear). If not, updates.
410
  */
411
  static function maybe_set( $o, $i, $p = 'SnS_' ) {
412
+ if ( ! is_array( $o ) ) return array();
413
  if ( empty( $_REQUEST[ $p . $i ] ) ) {
414
  if ( isset( $o[ $i ] ) ) unset( $o[ $i ] );
415
  } else {
js/meta-box.js CHANGED
@@ -483,15 +483,15 @@ jQuery( document ).ready( function( $ ) {
483
  }
484
  initData.style_formats = style_formats;
485
 
486
- if ( initData.theme_advanced_buttons2.indexOf( "styleselect" ) == -1 ) {
487
  var tempString = "styleselect,";
488
- initData.theme_advanced_buttons2 = tempString.concat(initData.theme_advanced_buttons2);
489
  }
490
 
491
  $( '#delete-mce-dropdown-names', context ).show();
492
  } else {
493
  delete initData.style_formats;
494
- initData.theme_advanced_buttons2 = initData.theme_advanced_buttons2.replace("styleselect,", "");
495
 
496
  $( '#delete-mce-dropdown-names', context ).hide();
497
  }
@@ -580,7 +580,7 @@ jQuery( document ).ready( function( $ ) {
580
  ed.remove();
581
  if ( initDatas[ed.id] && initDatas[ed.id].wpautop )
582
  $('#'+ed.id).val( switchEditors.wpautop( $('#'+ed.id).val() ) );
583
- ed = new tinymce.Editor( ed.id, initDatas[ed.id] );
584
  ed.render();
585
  ed.hide();
586
  }
483
  }
484
  initData.style_formats = style_formats;
485
 
486
+ if ( initData.toolbar2.indexOf( "styleselect" ) == -1 ) {
487
  var tempString = "styleselect,";
488
+ initData.toolbar2 = tempString.concat(initData.toolbar2);
489
  }
490
 
491
  $( '#delete-mce-dropdown-names', context ).show();
492
  } else {
493
  delete initData.style_formats;
494
+ initData.toolbar2 = initData.toolbar2.replace("styleselect,", "");
495
 
496
  $( '#delete-mce-dropdown-names', context ).hide();
497
  }
580
  ed.remove();
581
  if ( initDatas[ed.id] && initDatas[ed.id].wpautop )
582
  $('#'+ed.id).val( switchEditors.wpautop( $('#'+ed.id).val() ) );
583
+ ed = new tinymce.Editor( ed.id, initDatas[ed.id], tinymce.EditorManager );
584
  ed.render();
585
  ed.hide();
586
  }
scripts-n-styles.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.unfocus.com/projects/scripts-n-styles/
5
  Description: Allows WordPress admin users the ability to add custom CSS and JavaScript directly to individual Post, Pages or custom post types.
6
  Author: unFocus Projects
7
  Author URI: http://www.unfocus.com/
8
- Version: 3.3
9
  License: GPLv3 or later
10
  Text Domain: scripts-n-styles
11
  */
5
  Description: Allows WordPress admin users the ability to add custom CSS and JavaScript directly to individual Post, Pages or custom post types.
6
  Author: unFocus Projects
7
  Author URI: http://www.unfocus.com/
8
+ Version: 3.3.1
9
  License: GPLv3 or later
10
  Text Domain: scripts-n-styles
11
  */