-
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?
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- Export data as CSV in back end with proper HTTP headers
- Admin settings update updating every time home page is hit?
- What’s the best method for emptying an option created with the Settings API?
- What is the recommended way to create plugin administration forms?
- Hook the Keydown Event in the TinyMCE Post Editor
- How do you create a custom edit.php / edit pages page
- Cancel post save
- Overwriting Core WordPress Functions with Plugins
- Create a clickable name in WP_List_Table for Plugin Admin
- URLs of plugin resources?
- Add Admin Menu Inside Construct or Init
- Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page
- How to add custom content under plugin row in WordPress admin plugin list?
- add_menu_page() with function inside a class [duplicate]
- Unified Approach for Placing Option Pages
- Plugin with specific admin menu icon
- How to load the plugin only when logged in?
- OOP Plugin and Menu – Call to undefined function register_setting()
- WP AJAX is not working, always returns 0
- 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
- Using the default wordpress uploader inside plugin
- Modify users.php page to create page/post on button clicked
- 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
- Problems with: manage_${post_type}_posts_columns
- Howto: Use Custom Post Types as Submenu Items in 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
- 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?
- Plugin sub-menu pages recommended structure and links
- Admin – Handle data before creating or updating a post, page or custom post
- 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?
- 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
- 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?
- 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
- Displaying “One Time” Notification in Plugins
- Print Dashboard submenu name and filename
- Admin Subpages without Menu entry
- I am trying to make a page in the admin section similar to the appearance of the Profile page for users
- Filter for admin (back end) ‘reply to’ comment
- Data not insert and update through ajax and jQuery in admin page?
- Catching Form Submission in WordPress Admin Panel
- Is it possible to load the css just on my plugin admin page?
- AJAX button with success callback. (Titan Framework)
- jQuery UI tab does not work in the plugin page
- in_array function Problem
- Best practice for plugin: always detect admin-ajax call?
- How do I force a download in the admin area?
- Submit form to a different PHP file in the same plugin folder
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Restrict certain actions to plugin-specific admin menu pages only
- Remove Permalink Meta Box not working?
- Remove Meta-boxes (Yoast SEO plugin) [duplicate]
- Proper way to create an administration page without adding it to the menu
- Pause plugin option page until all data manipulation is complete
- Get cat parameter from admin-ajax
- WordPress admin panel not working
- Add New Button in Admin Panel
- How to add admin.php to WP Admin Menu Link
- Change Label of custom post type
- How to enable or disable check boxes in custom post type
- How to display properly exception or echo string after posting in plugin?
- Convert each new line in the textfield as a new value in an array
- Same header/footer in Admin, across all network sites in multisite
- Get (eventual) permalink from post within Edit Post in Admin panel
- Developing a plugin where users can edit entries saved in database
- How to add conent (text) to Add New pages form of admin in WordPress
- Add a description/hint field in the admin page of a plugin
- Link to a admin submenu item using a custom link
- Plugin admin list pages as submenu
- Post data in wp-admin to external database
- WordPress multiple user roles accessing on their information on one site?
- Loading jQuery library from WordPress admin
- How to design WooCommerce-like admin tabs for plugin settings page?
- How do I display and edit other posts within the ‘Edit Post’ area of Wp-Admin Dashboard
- Show Admin Menu