@@ -23,10 +23,16 @@ |
||
| 23 | 23 | |
| 24 | 24 | // @see https://gist.github.com/muhqu/820694 |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @return string |
|
| 28 | + */ |
|
| 26 | 29 | protected function json_serialize( $any ) { |
| 27 | 30 | return wp_json_encode( jetpack_json_wrap( $any ) ); |
| 28 | 31 | } |
| 29 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $str |
|
| 35 | + */ |
|
| 30 | 36 | protected function json_unserialize( $str ) { |
| 31 | 37 | return $this->json_unwrap( json_decode( $str, true ) ); |
| 32 | 38 | } |