You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Ad_Code_Manager::shortcode(), there's a return $this->action_acm_tag( $id, false );, so it's this secondary use of the action_acm_tag() that the $echo parameter is being used for.
That said, I do think this could be refactored into a function that always returns the tag value (which can be called for the shortcode output), and a separate function which echo's the return from that first function (for the add_action() call).
- Extracts the logic for getting the output HTML into a new `get_acm_tag()` method.
- The `action_acm_tag()` method now just echoes the result of a call to `get_acm_tag()`. It no longer supports an `$echo` parameter.
- The `shortcode()` method now calls and returns `get_acm_tag()`, instead of `action_acm_tag()` with a `false` echo parameter.
Closes#94.
do_action() will never return a value, so having the flag is meaningless.
The text was updated successfully, but these errors were encountered: