Attachments - Version 3.0.8.1

Version Description

  • Better storage of special characters for PHP 5.4+
Download this release

Release Info

Developer jchristopher
Plugin Icon wp plugin Attachments
Version 3.0.8.1
Comparing to
See all releases

Code changes from version 3.0.8 to 3.0.8.1

Files changed (4) hide show
  1. README.md +3 -0
  2. classes/class.attachments.php +3 -3
  3. index.php +1 -1
  4. readme.txt +4 -1
README.md CHANGED
@@ -255,6 +255,9 @@ Attachments uses WordPress' built in Media library for uploads and storage.
255
 
256
  <dl>
257
 
 
 
 
258
  <dt>3.0.8</dt>
259
  <dd>Fixed an issue in Firefox where you weren't able to focus inputs unless you clicked their label</dd>
260
  <dd>New field: textarea</dd>
255
 
256
  <dl>
257
 
258
+ <dt>3.0.8.1</dt>
259
+ <dt>Better storage of special characters for PHP 5.4+</dt>
260
+
261
  <dt>3.0.8</dt>
262
  <dd>Fixed an issue in Firefox where you weren't able to focus inputs unless you clicked their label</dd>
263
  <dd>New field: textarea</dd>
classes/class.attachments.php CHANGED
@@ -56,7 +56,7 @@ if ( !class_exists( 'Attachments' ) ) :
56
  global $_wp_additional_image_sizes;
57
 
58
  // establish our environment variables
59
- $this->version = '3.0.8';
60
  $this->url = ATTACHMENTS_URL;
61
  $this->dir = ATTACHMENTS_DIR;
62
 
@@ -999,8 +999,8 @@ if ( !class_exists( 'Attachments' ) ) :
999
  }
1000
  }
1001
 
1002
- // we're going to store JSON
1003
- $attachments = json_encode( $attachments );
1004
 
1005
  // we're going to wipe out any existing Attachments meta (because we'll put it back)
1006
  update_post_meta( $post_id, $this->meta_key, $attachments );
56
  global $_wp_additional_image_sizes;
57
 
58
  // establish our environment variables
59
+ $this->version = '3.0.8.1';
60
  $this->url = ATTACHMENTS_URL;
61
  $this->dir = ATTACHMENTS_DIR;
62
 
999
  }
1000
  }
1001
 
1002
+ // we're going to store JSON (JSON_UNESCAPED_UNICODE is PHP 5.4+)
1003
+ $attachments = version_compare( PHP_VERSION, '5.4.0', '>=' ) ? json_encode( $attachments, JSON_UNESCAPED_UNICODE ) : json_encode( $attachments );
1004
 
1005
  // we're going to wipe out any existing Attachments meta (because we'll put it back)
1006
  update_post_meta( $post_id, $this->meta_key, $attachments );
index.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Attachments gives the ability to append any number of Media Library items to Pages, Posts, and Custom Post Types
7
  * Author: Jonathan Christopher
8
  * Author URI: http://mondaybynoon.com/
9
- * Version: 3.0.8
10
  * Text Domain: attachments
11
  * Domain Path: /languages/
12
  * License: GPLv2 or later
6
  * Description: Attachments gives the ability to append any number of Media Library items to Pages, Posts, and Custom Post Types
7
  * Author: Jonathan Christopher
8
  * Author URI: http://mondaybynoon.com/
9
+ * Version: 3.0.8.1
10
  * Text Domain: attachments
11
  * Domain Path: /languages/
12
  * License: GPLv2 or later
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://mondaybynoon.com/donate/
4
  Tags: post, page, posts, pages, images, PDF, doc, Word, image, jpg, jpeg, picture, pictures, photos, attachment
5
  Requires at least: 3.0
6
  Tested up to: 3.5
7
- Stable tag: 3.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -95,6 +95,9 @@ Attachments uses WordPress' built in Media library for uploads and storage.
95
 
96
  == Changelog ==
97
 
 
 
 
98
  = 3.0.8 =
99
  * Fixed an issue in Firefox where you weren't able to focus inputs unless you clicked their label
100
  * New field: textarea
4
  Tags: post, page, posts, pages, images, PDF, doc, Word, image, jpg, jpeg, picture, pictures, photos, attachment
5
  Requires at least: 3.0
6
  Tested up to: 3.5
7
+ Stable tag: 3.0.8.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
95
 
96
  == Changelog ==
97
 
98
+ = 3.0.8.1 =
99
+ * Better storage of special characters for PHP 5.4+
100
+
101
  = 3.0.8 =
102
  * Fixed an issue in Firefox where you weren't able to focus inputs unless you clicked their label
103
  * New field: textarea