[wp-hackers] ob_start - good or bad?

Simon Wheatley simon at sweetinteraction.com
Thu Apr 23 09:02:37 GMT 2009


Hullo hivemind,

I'm find myself writing various pieces of code using this kind of
pattern recently, does it carry any downsides?

protected function get_edit_post_link( $link = 'Edit This', $before =
'', $after = '' )
{
	ob_start ();
	edit_post_link( $link, $before, $after );
	$output = ob_get_contents ();
	ob_end_clean ();
	return $output;
}

Thanks in advance.

S


---
Sweet Interaction Ltd is Registered in England/Wales, no. 6610741
Registered office: 7 Malton Av, Manchester, M21 8AT


More information about the wp-hackers mailing list