Closed VesterDe closed 6 years ago
It's not really needed - app_partial()
is an echo-ing shortcut so you can just use what it uses internally:
https://github.com/htmlburger/wpemerge/blob/master/src/functions.php#L79-L83
i.e. this is what you need:
$html = View::make( $views )->with( $context )->toString();
Yeah ok, I saw that, I guess that also an ok option.
Thanks.
Would it be against the general design of this framework to make a new function (let's say) app_partial_s, which is exactly the same as app_partial, but returns the output of the composed View, instead of echoing it?
I want to handle shortcodes within wpemerge, and app_partial can't work in that situation, since it echoes.
I can write the PR, if it's approved.
Edit: To clarify, I can wrap ob_start() around it, but I'd rather not.