-
When using admin-post.php, no loaded menus on an admin-post.php request is standard wordpress behavior. Standard practise to redirect after processing done on post action hook is to use:
wp_redirect( admin_url( 'admin.php?page=YOUR_PAGE' ) );
-
When using admin-post.php, wordpress will include wp-admin/includes/wp-admin.php instead of wp-admin/wp-admin.php ( WordPress Admin Bootstrap ) to skip some setup. One of the API call skipped in this included files is menu build files.
During WordPress Admin Bootstrap, system includes menu.php which eventually fire actions to load and build admin menus. Post action intentionally skipped menu loads processing.
-
For plugins and forms, post to adin-post.php is considered correct
and after processing use wp_redirect with admin_url to redirect page
to original menu item page.
Related Posts:
- Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?
- How to put placeholder text in the main post input area?
- Creating Admin Plugin – Content of a page is displayed at global scope as well
- Disable Auto-Expanding Menu in WordPress Admin Menus
- How to add text editor in plugin menu?
- How to make an admin plugin menu page go full screen?
- Forcing ALL plugin Admin menus into a separate menu
- How can I add an image upload field directly to a custom write panel?
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How do i best handle custom plugin page actions?
- Passing arguments to a admin menu page callback?
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- Plugin API for easy admin list table generation, handling & exporting of MySQL tables?
- Export data as CSV in back end with proper HTTP headers
- Completely remove WP_Admin_Bar for specific user roles
- Admin settings update updating every time home page is hit?
- What’s the best method for emptying an option created with the Settings API?
- API to trigger prompt on leaving page
- What is the recommended way to create plugin administration forms?
- Show message on wordpress admin dashboard
- How to add a new plugin page under desired Options page?
- Hook the Keydown Event in the TinyMCE Post Editor
- how to use thickbox in admin?
- How do you create a custom edit.php / edit pages page
- Cancel post save
- Add a jQuery function to admin pages
- Overwriting Core WordPress Functions with Plugins
- Is it save to require plugin.php early to be able to use get_plugin_data() earlier?
- WP Cron doesn’t save or in post body
- Create a clickable name in WP_List_Table for Plugin Admin
- Naming Admin Menus and Submenus
- Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
- Current class on admin menu using add_submenu_page()
- URLs of plugin resources?
- Add Admin Menu Inside Construct or Init
- Problems with removing admin bar
- Hook event for upload image in the menu
- Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page
- Check if I am in the Admin Panel (wp-admin)?
- How to add custom content under plugin row in WordPress admin plugin list?
- add_menu_page() with function inside a class [duplicate]
- How to add Font Awesome 5 icons in WP Admin dashboard menu?
- Unified Approach for Placing Option Pages
- Plugin with specific admin menu icon
- How to load the plugin only when logged in?
- How to redirect to action on custom page within admin section
- Hide Theme options and Customize Admin menu
- OOP Plugin and Menu – Call to undefined function register_setting()
- WP AJAX is not working, always returns 0
- Add notification bubble notice in navigation using transients
- Can I individually style items in the backend widget list?
- How to run a external JavaScript file on wp-admin if admin, and other if normal user?
- add a class when login
- Add a panel to edit post
- Where should I put “run once” plugin pages?
- Using the default wordpress uploader inside plugin
- Modify users.php page to create page/post on button clicked
- Issue plugin commands in admin settings page
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- maintaing consistent layout wordpress dashboard
- Replacing Scripts in Admin Load_Scripts
- Programmatically modify an admin page UI of a WordPress site from my WordPress plugin
- Problems with: manage_${post_type}_posts_columns
- Howto: Use Custom Post Types as Submenu Items in Admin
- Sub Menu content is being duplicated
- Render content after post title in wp-admin
- On cliking add new post redirect user to a custom page first
- Set different custom menu items for different user roles
- Show/Hide ‘add new user’ custom fields in wordpress admin panel by click another field
- What should happen when a WordPress Plugin is activated across the network (Network Wide Activation)
- Prevent third party plugin’s admin page access based on user type
- Bootstrap doesn’t work on admin menu page-How to override wp-admin style?
- How to add WordPress Admin “Insert Link” UI (searches through existing posts for URL) and functionality into a custom plugin?
- Is it possible to restrict all admin pages except theme customisation and storefront using plugin?
- is it recommended to use WP_List_Table?
- Plugin sub-menu pages recommended structure and links
- Admin – Handle data before creating or updating a post, page or custom post
- wp_filesystem put_contents issue with owner/group
- Password field is empty when using wp_signon();
- How can I replace content in the WP Admin area before an admin page is rendered?
- Using ReactJS in the WordPress admin for plugin development
- template_redirect or admin-ajax.php?
- Add a page in admin without adding menu item
- How to load library scripts in admin from plugins in noConflict wrapper?
- Show error message after exception handled
- Issue with contextual help overwriting existing content
- Enqueue script globally
- Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins
- How do I add a favicon that only shows during viewing of my plugin’s admin panel?
- How do I link to a php file in my plugin directory?
- WordPress Admin Login Custom Logo
- Silently register plugin pages
- How to create custom settings page for custom plugin
- 400 Bad Request, in wordpress theme development, wp_ajax
- How to import the css in the plugin admin area?
- Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor
- WordPress theme options Menu
- Displaying “One Time” Notification in Plugins
- Print Dashboard submenu name and filename