#55977 closed defect (bug) (fixed)
Fix doc block for do_action
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.1 | Priority: | normal |
| Severity: | trivial | Version: | |
| Component: | General | Keywords: | good-first-bug has-patch commit |
| Focuses: | docs | Cc: |
Description
The code example in the do_action function code block assigns the return of the do_action call to a variable, even though do_action does not return anything.
As reported here: https://developer.wordpress.org/reference/functions/do_action/#comment-5351
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #docs by leogermani. View the logs.
4 years ago
This ticket was mentioned in PR #2816 on WordPress/wordpress-develop by dknauss.
4 years ago
#4
The example code block shows the do_action() call returning a value, but the function has no return value.
Trac ticket: https://core.trac.wordpress.org/ticket/55977
#5
@
4 years ago
- Owner changed from leogermani to audrasjb
- Status changed from assigned to reviewing
- Version 6.0 deleted
Hello, thanks for spotting this and for the patch,
Self assigning for review/commit.
I have removed the do_action return variable from the doc block and attached the patch.