Skip to content

Docs shows incorrect hook name for abilities API initialization #132

@huzaifaalmesbah

Description

@huzaifaalmesbah

Description

The documentation in docs/getting-started.md and docs/intro.md references the hook abilities_api_init, but the actual hook name used in the codebase is wp_abilities_api_init (with the wp_ prefix).

Impact

Developers following the documentation examples will register their abilities on a hook that never fires, causing their abilities to not be registered.

Expected Behavior

Documentation should reference wp_abilities_api_init to match the actual hook name.

Files Affected

  • docs/getting-started.md (lines 106-107)
  • docs/intro.md (line 49)

Evidence

The correct hook name wp_abilities_api_init is used in:

  • includes/abilities-api/class-wp-abilities-registry.php (line 294)
  • includes/abilities-api.php (multiple references)
  • docs/hooks.md (correctly documented)
  • docs/php-api.md (correctly documented)
  • All test files

Steps to Reproduce

  1. Follow the "Getting Started" documentation
  2. Register an ability using add_action( 'abilities_api_init', ... )
  3. The ability will not be registered because the hook never fires

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions