Skip to content

Commit 3845992

Browse files
committed
Address feedback from review
1 parent ca6a230 commit 3845992

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

docs/6.hooks.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 6. Hooks
22

3-
The Abilities API provides WordPress action hooks that allow developers to monitor and respond to ability execution events. These hooks enable logging, debugging, analytics, and custom integrations.
3+
The Abilities API provides [WordPress Action Hooks](https://developer.wordpress.org/apis/hooks/) that allow developers to monitor and respond to ability execution events.
44

55
## Available Actions
66

@@ -48,32 +48,6 @@ do_action( 'after_execute_ability', $ability_name, $input, $result );
4848
- `$input` (`mixed`): The input data that was passed to the ability.
4949
- `$result` (`mixed`): The validated result returned by the ability's execution callback.
5050

51-
## When Actions Fire
52-
53-
**`before_execute_ability` fires when:**
54-
55-
- ✅ Permission checks pass.
56-
- ✅ Input validation succeeds (if input schema is defined).
57-
- ✅ Just before the execution callback is called.
58-
59-
**`before_execute_ability` does NOT fire when:**
60-
61-
- ❌ Permission checks fail.
62-
- ❌ Input validation fails.
63-
64-
**`after_execute_ability` fires when:**
65-
66-
- ✅ The execution callback returns successfully (not a `WP_Error`).
67-
- ✅ Output validation passes (if output schema is defined).
68-
- ✅ The ability execution completes successfully.
69-
70-
**`after_execute_ability` does NOT fire when:**
71-
72-
- ❌ Permission checks fail.
73-
- ❌ Input validation fails.
74-
- ❌ The execution callback returns a `WP_Error`.
75-
- ❌ Output validation fails.
76-
7751
## Usage Examples
7852

7953
**Basic Logging**

0 commit comments

Comments
 (0)