Scripts n Styles - Version 3.0.2

Version Description

  • Bug Fix: Fatal Error on post save
Download this release

Release Info

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

Code changes from version 3.0.1 to 3.0.2

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpressfoundation.org/donate/
4
  Tags: admin, CSS, javascript, code, custom, Style
5
  Requires at least: 3.2
6
  Tested up to: 3.3-RC2
7
- Stable tag: 3.0.1
8
  License: GPLv2 or later
9
 
10
  This plugin allows Admin users to individually add custom CSS, Classes and JavaScript directly to Post, Pages or any other custom post types.
@@ -53,6 +53,9 @@ Sure, if you are an Admin, just go to the plugin editor and wipe out the uninsta
53
 
54
  == Changelog ==
55
 
 
 
 
56
  = 3.0.1 =
57
  * Option to show Metabox by default
58
  * Check upgrade in more places
@@ -97,6 +100,9 @@ Sure, if you are an Admin, just go to the plugin editor and wipe out the uninsta
97
 
98
  == Upgrade Notice ==
99
 
 
 
 
100
  = 3.0.1 =
101
  Bug fixes
102
 
4
  Tags: admin, CSS, javascript, code, custom, Style
5
  Requires at least: 3.2
6
  Tested up to: 3.3-RC2
7
+ Stable tag: 3.0.2
8
  License: GPLv2 or later
9
 
10
  This plugin allows Admin users to individually add custom CSS, Classes and JavaScript directly to Post, Pages or any other custom post types.
53
 
54
  == Changelog ==
55
 
56
+ = 3.0.2 =
57
+ * Bug Fix: Fatal Error on post save
58
+
59
  = 3.0.1 =
60
  * Option to show Metabox by default
61
  * Check upgrade in more places
100
 
101
  == Upgrade Notice ==
102
 
103
+ = 3.0.2 =
104
+ Bug fix
105
+
106
  = 3.0.1 =
107
  Bug fixes
108
 
includes/class.SnS_Admin_Meta_Box.php CHANGED
@@ -372,11 +372,19 @@ class SnS_Admin_Meta_Box
372
  if ( isset( $styles[ 'classes_mce' ] ) && empty( $styles[ 'classes_mce' ] ) )
373
  unset( $styles[ 'classes_mce' ] );
374
 
375
- if ( empty( $scripts ) ) unset( $SnS['scripts'] );
376
- else $SnS['scripts'] = $scripts;
 
 
 
 
377
 
378
- if ( empty( $styles ) ) unset( $SnS['styles'] );
379
- else $SnS['styles'] = $styles;
 
 
 
 
380
 
381
  if ( empty( $SnS ) )
382
  delete_post_meta( $post_id, '_SnS' );
372
  if ( isset( $styles[ 'classes_mce' ] ) && empty( $styles[ 'classes_mce' ] ) )
373
  unset( $styles[ 'classes_mce' ] );
374
 
375
+ if ( empty( $scripts ) ) {
376
+ if ( isset( $SnS['scripts'] ) )
377
+ unset( $SnS['scripts'] );
378
+ } else {
379
+ $SnS['scripts'] = $scripts;
380
+ }
381
 
382
+ if ( empty( $styles ) ) {
383
+ if ( isset( $SnS['styles'] ) )
384
+ unset( $SnS['styles'] );
385
+ } else {
386
+ $SnS['styles'] = $styles;
387
+ }
388
 
389
  if ( empty( $SnS ) )
390
  delete_post_meta( $post_id, '_SnS' );
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.0.1
9
  License: GPLv2 or later
10
  Text Domain: scripts-n-styles
11
  Network: true
@@ -47,7 +47,7 @@ Network: true
47
  * @link http://www.unfocus.com/projects/scripts-n-styles/ Plugin URI
48
  * @author unFocus Projects
49
  * @link http://www.unfocus.com/ Author URI
50
- * @version 3.0.1
51
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
52
  * @copyright Copyright (c) 2010 - 2011, Kenneth Newman
53
  *
@@ -72,7 +72,7 @@ class Scripts_n_Styles
72
  /**#@+
73
  * @static
74
  */
75
- const VERSION = '3.0.1';
76
  static $file = __FILE__;
77
  /**#@-*/
78
 
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.0.2
9
  License: GPLv2 or later
10
  Text Domain: scripts-n-styles
11
  Network: true
47
  * @link http://www.unfocus.com/projects/scripts-n-styles/ Plugin URI
48
  * @author unFocus Projects
49
  * @link http://www.unfocus.com/ Author URI
50
+ * @version 3.0.2
51
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
52
  * @copyright Copyright (c) 2010 - 2011, Kenneth Newman
53
  *
72
  /**#@+
73
  * @static
74
  */
75
+ const VERSION = '3.0.2';
76
  static $file = __FILE__;
77
  /**#@-*/
78