From Dev.to
Declare a WordPress feature once: REST route, WP-CLI command and Ability with wp-kit
This is a cross-post of our guide on mammothwp.com. The code and behaviour below are taken from that page. A plugin feature often needs more than one entry point. The admin screen calls a REST route,...
