#55977 closed defect (bug) (fixed)
Fix doc block for do_action
Reported by: | leogermani | Owned by: | audrasjb |
---|---|---|---|
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.
Code: https://core.trac.wordpress.org/browser/tags/6.0/src/wp-includes/plugin.php#L427
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.
2 years ago
This ticket was mentioned in PR #2816 on WordPress/wordpress-develop by dknauss.
2 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
@
2 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.
2 years ago
#8
Committed in https://core.trac.wordpress.org/changeset/53748
I have removed the do_action return variable from the doc block and attached the patch.