parsed_tax_query = false; // Force it to be re-parsed. return $q; } function wp_hotfix_313_post_status_query_string() { add_filter( 'request', 'wp_hotfix_313_post_status_query_string_request' ); } function wp_hotfix_313_post_status_query_string_request( $qvs ) { if ( isset( $qvs['post_status'] ) && is_array( $qvs['post_status'] ) ) $qvs['post_status'] = implode( ',', $qvs['post_status'] ); return $qvs; } if ( ! function_exists( 'json_encode' ) ) { function json_encode( $string ) { 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(); } return $wp_hotfix_json->encodeUnsafe( $string ); } } if ( ! function_exists( 'json_decode' ) && ! function_exists( '_json_decode_object_helper' ) ) { 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; } function _json_decode_object_helper($data) { if ( is_object($data) ) $data = get_object_vars($data); return is_array($data) ? array_map(__FUNCTION__, $data) : $data; } }