Skip to content

Instantly share code, notes, and snippets.

View wbaxterh's full-sized avatar

Wes Huber wbaxterh

View GitHub Profile
@mahlamusa
mahlamusa / extend-wp-rest-api.php
Last active June 1, 2023 10:38
Extend WordPress REST API with custom rest fields and endpoints
<?php
/**
* Register custom rest fields
*/
add_action( 'rest_api_init', 'register_custom_fields' );
/**
* Register rest fields and endpoint
*