Skip to content

v2.1.0

Latest
Compare
Choose a tag to compare
@matapatos matapatos released this 15 Nov 14:58
· 1 commit to main since this release
eb5d9be
  • Adds support for router dependencies
  • Adds dependencies support for native WP REST endpoints by passing dependencies via argument
$router = new Router('api', 'v1');
$router->depends('buddypress');  // Global dependency across all sub-routers/endpoints
// Support for native WP REST endpoints
$args = [
    'methods' => 'GET',
    'depends' => ['buddypress'],
    ...
];
register_rest_route('api/v1', 'custom-endpoint', $args);