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.
Related Posts:
- WordPress Plugin Development – Headers Already Sent Message
- Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files
- Headers already sent error with CSV export plugin
- Get file headers in custom file
- Adding custom code into header.php using a plugin
- How can I change HTTP headers only to posts of a specific category from a plugin
- The plugin generated 80 characters of unexpected output!
- Cannot modify header information – headers already sent by pluggable.php
- Header Button Chance Polylang Elementor
- An echo line in a transition_post_status action leads to “cannot modify header information – headers already sent by”
- Proper way to pass credentials in a custom login form to avoid “headers already sent”
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- How to give a download link to a .csv file from the custom plugin?
- Adding custom stylesheet into header.php using a plugin
- Need Help Determining Where Header Error is Happening
- Why does website stretch and white space on load? [duplicate]
- Downloading File via headers doesnt work
- WordPress Favicon not Working For Images/Videos/PDFs
- Two same AJAX calls – one is working, other doesn’t
- Some data has already been output, can’t send PDF file – fpdf issue in WordPress
- Headers already sent on custom plugin (Export function)
- How to force download a plugin generated file?
- Objective Best Practices for Plugin Development? [closed]
- How can I add an option to the Page Template list from a Plugin?
- Using composer for dependency management in plugindevelopment
- wp_mail is undefined
- How do you use the plugin boilerplate loader class to hook actions and filters?
- Build path for a custom portfolio plugin
- How to save block attributes when the output doesn’t change
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- How to: Rest endpoint returning empty object
- Ensuring a plugin is loaded/run last?
- Why is my shortcode not working
- Creating option to allow user to select the page my plugin content will display on
- What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- Use php libarary in wordpress plugins
- Can’t get JS code to work with shortcode
- How to add a secondary button to a settings page with a custom action?
- Plugin options page – form with two different submit buttons
- Show Parent category and Subcategory
- Frontend Ajax call not working using wp_ajax, wp_enqueue_script and wp_localize_script
- best practice for query string values – get_query_var always empty for my value supplied in query string
- update post meta for checkbox in the admin when inserted in the front-end
- Gutenberg Block showing invalid content on edit
- Register a sidebar in a WordPress plugin
- How to implement filesystem cache in WordPress
- Check for template part, else filter content
- How can I add a custom “Text” widget to Appearance manager from functions.php?
- How to stop your plugin from executing on certain pages?
- what are the checksums surrounding keywords in the SQL generated by WP_Query and do I need to use them too?
- Search the product by tag or category not working
- Is it possible to make sure that only my plugins output is shown to the enduser?
- How to filter content for specific content variable
- Plugin generated virtual pages
- add javascript files only when plugin is called?
- wp_dropdown_roles() to replace option value = code
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- Trying to Implement .pdf File Upload in Admin for plugin
- Writing a wordpress plugin and trying to include the Facebook PHP SDK
- Codex Version Focus on Production or Nightly?
- Make a plugin page out of influence of the theme’s style
- plugin_dir_path wrong url
- 400 Bad Request, in wordpress theme development, wp_ajax
- Fatal error: Uncaught Error: Call to undefined function convert_to_screen()
- Return Value of load_plugin_textdomain
- Multiple array for post_content on plugin activation
- Using AND and bracket grouping in SQL not working
- Taxonomy archive page listing terms instead of posts
- Check if the current user is author of first comment
- custom wp_editor does not save the content in plugin settings
- How do I force a download in the admin area?
- add_action wp_ajax_ not loading in plugin file WP Network
- Change the behaviour of a button
- Login page too many redirects
- Configuring Xdebug with docker compose
- Progress bar in plugin within admin
- Jquery php request is returning a weird result
- WordPress admin panel not working
- Load script on frontend from widget plugin
- Get the current post/page URL with plain permalinks
- Using the same class across multiple functions
- ajax multiple Values
- Change Label of custom post type
- Ajax Response Error | just getting error as the response
- admin-ajax.php returns “No Script Kiddies!” sometimes
- Ajax functionality not being called under wordpress plugin
- Widget won’t be activated
- Plugin outputs content of posts unbidden!
- Add a description/hint field in the admin page of a plugin
- Client Profiles
- Saving multiple fields as array
- Serialized Data
- I don’t understand how symlinks in plugin work
- Undo operation not working in Rich text [Gutenberg]
- Update custom settings field in plugin
- URL rewrite parameter lost (add_rewrite_rule)
- PHPUnit Ajax Serialization of ‘Closure’ is not allowed
- Saving metabox updates causing fatal error
- Calling get_header() with installed FSE theme