There’s an inconsistency in how the Abilities API handles the action checks for category and ability registration.
Current behavior:
- Categories:
- The doing_action( 'abilities_api_categories_init' )check is performed directly inside theregister()method.
- This enforces registration only during the abilities_api_categories_initaction.
 
- Abilities:
- The check is performed in the wrapper function wp_register_ability().
- It uses did_action()instead, allowing registration even after the action has fired.
 
Discussion points:
- Should both follow the same pattern for consistency across the API?
- Should registration be restricted strictly to the init action (doing_action()), or remain flexible usingdid_action()?
- Which level (core register()method vs wrapper function) should enforce this restriction?
Originally posted by @gziolo in #102 (comment)