Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created July 8, 2016 20:48
Show Gist options
  • Save LinzardMac/8f4620f599d1d4a4afc7f29d2020022c to your computer and use it in GitHub Desktop.
Save LinzardMac/8f4620f599d1d4a4afc7f29d2020022c to your computer and use it in GitHub Desktop.
initialize the REST API methods in a plugin
add_action('plugins_loaded', 'bs_initialize_rest_api');
function bs_initialize_rest_api(){
add_action( 'rest_api_init', 'bs_add_custom_rest_fields' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment