Go with your last idea – generate a URL like so:
$raw_url = admin_url( 'admin.php?page=add-edit-record&edit-id=' . $id );
$esc_url = esc_url( $raw_url ); // For href attributes and the like
And then in your handler for add-edit-record
:
if ( ! empty( $_GET['edit-id'] ) && $id = absint( $_GET['edit-id'] ) ) {
if ( ! $record = get_record( $id ) )
wp_die( 'Nope' ); // Or something similar
}
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?
- What’s causing this error? “Warning: Invalid argument”
- Move plugin-settings to ‘Settings’-menu in the admin
- WordPress Admin Menu defining function is seperate file
- 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
- How to check if user is in back end?
- How do i know the current post type when on post.php in admin?
- Create tabs inside Plugins Admin Page [closed]
- What are the best practices for updating?
- How to set back-end language per user?
- Admin menu as submenu from another plugin
- Is There a WordPress Hook to Filter the Edit Posts View?
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Plugin or mod for wordpress to make content publication SUPER easy
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- Delete option doesn’t appear for plugins
- How do I only load a plugin js on it’s settings pages?
- Adding an admin page – OOP approach not working
- How to add a help tab to all admin pages – including plugin pages
- Custom plugin settings: clicking “save changes” does not display success message
- Generate Advanced Custom Fields box in custom admin menu page
- Plugin development: how to create a form and get custom data?
- How to develop a community feature in the dashboard for multiauthor site
- 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?
- WordPress Plugin Look & Feel
- What’s the point of using WordPress’s built in admin-ajax.php?
- How can I get a list of plugins and which blogs are using them?
- Filter or action hook to insert content on admin pages before tag
- Removing WordPress Plugin Menu Item for a specific user
- add function to saving change on Options Pages
- How to set CORS header?
- Change the $parent_file of a plugin page
- How to edit/delete single row items in a table on my own menu page
- Change wording of admin menu item?
- How to handle admin and passwords requests from plugins developers?
- Set of plugins to control the Admin UI
- how can I link to a PlugIn admin-sub-menu page after processing a formular
- Which plugin will let me decide what users have access to on their side bar in wp-admin?
- How can I make uploaded images in the editor load with HTTPS?
- 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
- Admin Panel pagination link styles
- Plugin dependencies: show notice like theme plugins dependencies
- 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
- 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?
- in source code but I can’t find it in files or plugins
- Updating WordPress plugin admin panel footer text
- WordPress permissions error with admin account
- Plugin – Admin menu page broken url
- getting notifications about updates only in the “core” page
- Problem after updating plugins
- Remove specific administrator’s capability
- problem with register_activation_hook in plugin
- How do you add a settings page to another menu?
- Custom page in plugin visible in menu
- How to hide plugin options for editors via functions.php
- How to add captcha to publish widget
- Admin Custom Plugin List Files in admin Table
- Can I create a separate admin section for my plugin?
- Disable plugin for administrator
- 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
- Plugins not activated after update?
- Create a blank admin page from plugin
- Plugin menu replaced by another plugin?
- admin panel save option with ajax
- Custom Form only for admin
- how to call jQuery in admin as well as in homepage
- What would cause edit buttons for plugins to disappear?
- WordPress plugins not showing after switching servers
- Plugin link does not appear in my toolbar
- Need help with restricted page for users
- Allow direct access to files/folders within WordPress to replace wp-admin
- 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?