Skip to content

Example code probably wrong | do_action #389

@3ele-projects

Description

@3ele-projects

Issue Description

In the example there is the line:

$value = do_action( 'example_action', $arg1, $arg2 );

If you check the function at
https://github.com/WordPress/wordpress-develop/blob/6.0/src/wp-includes/plugin.php#L441-L479

there is no return. So it seems that no value is returned.

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/do_action)

Section of Page with the issue

Example usage:
Line 13

Why is this a problem?

Developer expects different behaviour than what is shown.

Suggested Fix

Removing the line?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions