Using ob_start() in plugin

No, this is not a correct use for ob_start(). You’re getting the warning because your script is outputting code before the page headers are sent – meaning you’re printing output before the html page.

Without knowing what’s going on in your // other plugin code it’s difficult to say what’s happening exactly. I would guess you’re calling plugin_rvce_options_page() somewhere in the root of the functions.php file instead of in a function that outputs to an admin page. In any case, try and fix the issue and don’t use ob_start() as a work-around.

Leave a Comment