Created
March 26, 2019 10:12
-
-
Save zeikeland/4df358993cb451b9115fe55088c2e787 to your computer and use it in GitHub Desktop.
filter wp rest response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// filter rest data on postype | |
add_filter( 'rest_prepare_postype', 'zp_add_rest_meta', 10, 3 ); | |
function zp_add_rest_meta( $response, $post_item, $request ) { | |
// $response->data['meta'][] = $data; | |
return $response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment