The $function argument of add_menu_page should be a function that produces your page output, or if omitted, then the $menu_slug argument can be a file that when included will output the menu page.
But your output right now has nothing to do with the add_menu_page call, the problem is that you’re requiring aio_dashboard.php, which has a function hooked to current_screen. The current_screen action should not generate output, that’s not what it’s for, it fires too early in the load process. Its purpose is for adding filters and actions based on the current admin page being viewed.
Change the add_menu_page $function argument to contain the function that outputs the page content, remove the add_action call hooking that function to current_screen.
Related Posts:
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How do I remove the entire left nav bar in admin for certain level users?
- How to send little data between admin pages of my plugin?
- What’s causing this error? “Warning: Invalid argument”
- Move plugin-settings to ‘Settings’-menu in the admin
- creating a plug in that would tap into save/update action of posts [closed]
- Add logo to admin menu in my plugin
- Getting 404 page not found error while trying to access add new plugin / themes
- Create tabs inside Plugins Admin Page [closed]
- Changing the “Plugin Activated” Message Default
- What are the best practices for updating?
- How to set back-end language per user?
- Is There a WordPress Hook to Filter the Edit Posts View?
- Changing wp login url without .htaccess
- Add section (add_settings_section) to a custom page (add_submenu_page)
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- Custom plugin settings: clicking “save changes” does not display success message
- Creating button next to “add media” that allows you to choose a single post
- Master menu item for multiple plugins?
- How to make a WP admin button/menu similar to Jetpack Notifications?
- Trying to add admin file upload form plugin
- wp_verify_nonce() why return false?
- Detecting when a custom taxonomy has been changed and display alert?
- WordPress Plugin Look & Feel
- Is there an action that is called when a post is restored from the trash?
- How can I get a list of plugins and which blogs are using them?
- Removing WordPress Plugin Menu Item for a specific user
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- add function to saving change on Options Pages
- why in my wordpress admin panel the membership option is not showing
- How to set CORS header?
- Change the $parent_file of a plugin page
- Moving WordPress from host without FTP?
- Making menu link open in new tab?
- How to handle admin and passwords requests from plugins developers?
- how can I link to a PlugIn admin-sub-menu page after processing a formular
- How can I make uploaded images in the editor load with HTTPS?
- Hook to plugins admin settings
- Make menu page link inaccessible or disabled
- See which user installed a plugin?
- Edit default comments page in WP Admin
- All Users > User List > Update User Meta Field Inline
- Globally register styles but enqueue them selectively
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Plugin dependencies: show notice like theme plugins dependencies
- Show existing POST categories as items in the sidebar menu [closed]
- Polylang : Interverting languages after development [closed]
- WP Plugins – Use includes to display page content
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Sync User to cPanel webmail?
- Adding CSS to custom post type admin page causes error
- Display Custom Field Value on Admin Page Column
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- How do I add some javascript validation to the admin interface form’s onsubmit?
- remove all submenus from plugin
- Create WordPress posts from JSON array using plugin in admin
- Plugin getting Cannot modify header information errors
- Display Plugin Panels Outside of Admin Areas
- How to see which sites use my installed plugins (wordpress multisite)
- Why WP_Screeen doesn’t show all options with admin_body_class
- Plugin Admin Menu Boiler Plate
- How to use the CSS of the WordPress core in the development of my administration page?
- WordPress permissions error with admin account
- Plugin – Admin menu page broken url
- getting notifications about updates only in the “core” page
- Show WordPress Plugin Menu(Admin) To Editor
- Problem after updating plugins
- Equivalent of admin.php for public pages
- Remove specific administrator’s capability
- problem with register_activation_hook in plugin
- Custom page in plugin visible in menu
- How to hide plugin options for editors via functions.php
- Ajax request sends url rather than data
- How to add captcha to publish widget
- Creating an admin button that when clicked shows a popup form
- Can I create a separate admin section for my plugin?
- add menu page not showing Icon
- Disable plugin for administrator
- Echo custom admin field into a is_single()
- Creating Admin Submenu Page via Class Method
- Get content and send to 3rd party
- Wordress admin page is fetching error You do not have sufficient permissions to access this page.
- Admin page and admin menu. Permissions plugin
- Plugin option for input box validation
- Plugins not activated after update?
- Create a blank admin page from plugin
- Plugin menu replaced by another plugin?
- Custom Form only for admin
- how to call jQuery in admin as well as in homepage
- WordPress plugins not showing after switching servers
- Plugin link does not appear in my toolbar
- Need help with restricted page for users
- admin_enqueue_scripts using hook_suffix vs GET page
- Submitting form to admin-post.php WordPress
- Display Any Field fromAdmin Panel in Frontend via Shortcode?
- How can I hide Dashboard notifications for just one particular plugin?
- Remove 3rd party plugin notices from within own plugin