Skip to content

Commit

Permalink
remove 5.2 support for json awesomemotive#398
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltorbert committed Sep 7, 2016
1 parent 5c5f401 commit 3e4b2fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 856 deletions.
53 changes: 1 addition & 52 deletions inc/aioseop_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* General functions file.
*
* We'll eventually move these to a better place, and figure out ones not being used anymore.
*
*
* @package All-in-One-SEO-Pack
*/

Expand Down Expand Up @@ -974,57 +974,6 @@ function aioseop_array_insert_after( $arr, $insertKey, $newValues ) {
}
}

if ( ! function_exists( 'aioseop_load_json_services' ) ) {
/**
* JSON support for PHP < 5.2.
*
* @TODO Do we really need to support < PHP 5.2 with the following functions??
* @return null|Services_JSON
*/
function aioseop_load_json_services() {
static $services_json = null;
if ( $services_json ) {
return $services_json;
}
if ( ! class_exists( 'Services_JSON' ) ) {
require_once( 'inc/extlib/JSON.php' );
}
if ( ! $services_json ) {
$services_json = new Services_JSON();
}

return $services_json;
}
}

if ( ! function_exists( 'json_encode' ) ) {

/**
* @param $arg
*
* @return mixed
*/
function json_encode( $arg ) {
$services_json = aioseop_load_json_services();

return $services_json->encode( $arg );
}
}

if ( ! function_exists( 'json_decode' ) ) {

/**
* @param $arg
*
* @return mixed
*/
function json_decode( $arg ) {
$services_json = aioseop_load_json_services();

return $services_json->decode( $arg );
}
}

if ( ! function_exists( 'fnmatch' ) ) {
/**
* Support for fnmatch() doesn't exist on Windows pre PHP 5.3.
Expand Down
Loading

0 comments on commit 3e4b2fd

Please sign in to comment.