Skip to content

Instantly share code, notes, and snippets.

@modemlooper
Created December 3, 2014 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modemlooper/c004802c8c19ef6ea952 to your computer and use it in GitHub Desktop.
Save modemlooper/c004802c8c19ef6ea952 to your computer and use it in GitHub Desktop.
function custom_json_api_prepare_post( $post_response, $post, $context ) {
$post_response['do_api_action']['default']['above_title'] = 'this is above the title';
$post_response['do_api_action']['default']['below_title'] = 'this is below the title';
$post_response['do_api_action']['default']['above_content'] = 'this is above the content';
$post_response['do_api_action']['default']['below_content'] = 'this is below the content';
return $post_response;
}
add_filter( 'json_prepare_post', 'custom_json_api_prepare_post', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment