Comments Re: WordPress functions outputing directly
-
I am using WordPress 1.5 through my own content management system and to do so, I need WordPress functions to NOT directly echo() onto the PHP stream, but rather return a value, so I can place it into a variable for my content management system.
The problem is that most functions do not allow this at all, they echo directly onto the stream which is very annoying. To use such a function, I have to copy that function from the original source, give it a different name and modify that function to return a value, rather than echo it directly to the stream.
The problem also, is that there is inconsitency in these functions. Some functions can take a boolean $echo parameter, true or false, some do not have that parameter. Worse of all, some functions have the paramater but it doesn’t even work – it echos directly to the stream regardless.
for example function the get_links() function in links.php will echo to the stream regardless if the last parameter is set to true or false. and I have seen other functions like this too.
I had this same issue with WordPress 1.2 it would be nice to see it addressed in the future.
- The topic ‘Comments Re: WordPress functions outputing directly’ is closed to new replies.