Changeset 13862 for trunk/wp-includes/compat.php
- Timestamp:
- 03/28/2010 04:35:42 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/compat.php
r12491 r13862 139 139 140 140 if ( !function_exists('json_decode') ) { 141 function json_decode( $string ) {141 function json_decode( $string, $assoc_array = false ) { 142 142 global $wp_json; 143 143 … … 147 147 } 148 148 149 return $wp_json->decode( $string ); 149 $res = $wp_json->decode( $string ); 150 if ( $assoc_array ) 151 $res = get_object_vars( $res ); 152 return $res; 150 153 } 151 154 }
Note: See TracChangeset
for help on using the changeset viewer.