Example #1
0
 function json_decode($string, $assoc_array = false)
 {
     global $json;
     if (!is_a($json, 'Services_JSON')) {
         require_once W3TC_LIB_DIR . '/JSON.php';
         $json = new Services_JSON();
     }
     $res = $json->decode($string);
     if ($assoc_array) {
         $res = _json_decode_object_helper($res);
     }
     return $res;
 }
Example #2
0
 function json_decode($string, $assoc_array = false)
 {
     global $wp_json;
     if (!$wp_json instanceof Services_JSON) {
         require_once ABSPATH . WPINC . '/class-json.php';
         $wp_json = new Services_JSON();
     }
     $res = $wp_json->decode($string);
     if ($assoc_array) {
         $res = _json_decode_object_helper($res);
     }
     return $res;
 }
Example #3
0
 function json_decode($string, $assoc_array = false)
 {
     global $nxt_json;
     if (!is_a($nxt_json, 'Services_JSON')) {
         require_once ABSPATH . nxtINC . '/class-json.php';
         $nxt_json = new Services_JSON();
     }
     $res = $nxt_json->decode($string);
     if ($assoc_array) {
         $res = _json_decode_object_helper($res);
     }
     return $res;
 }
Example #4
0
 function json_decode($string, $assoc_array = false)
 {
     global $wp_hotfix_json;
     if (!is_a($wp_hotfix_json, 'Services_JSON')) {
         require_once dirname(__FILE__) . '/inc/class-json.php';
         $wp_hotfix_json = new Services_JSON();
     }
     $res = $wp_hotfix_json->decode($string);
     if ($assoc_array) {
         $res = _json_decode_object_helper($res);
     }
     return $res;
 }