echo vs. return for WP functions
-
I’ve seen a few people talking about this issue but never found an answer.
Is there a way (preferably an easy one) to have WP functions like
get_calendar(),get_links(), etc… return to a variable instead of echo?This seems like something that would be quite handy and used a lot by people integrating WP into an existing site.
Can anyone answer this or at least explain why these functions echo inside the class instead of just using
<? echo get_calendar(); ?>in the template?Functionally, this would work the same as the default
<? get_calendar(); ?>, so why not have a simple way to do it?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘echo vs. return for WP functions’ is closed to new replies.