v2.0.0
- Changed variable special vars from {ID} to <ID> to keep consistency
- Specifying endpoint plugin dependencies. This feature by its own doesn't do anything but if the WP-FastEndpoints-Depends plugin is active it does speed up your endpoints 😊
$router->get('(?P<postId>[\d]+)', function ($postId) {
return get_post($postId);
})
->hasCap('edit_post', '<ID>')
// With WP-FastEndpoints-Depends it only loads the buddypress plugin
->depends('buddypress');