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
- Best collection of code for your 'functions.php' file [closed]
- How to check if user is in back end?
- How do i know the current post type when on post.php in admin?
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Admin menu as submenu from another plugin
- Creating a WordPress admin page without a menu for a plugin
- Admin plugin, how can I output a different content-type?
- Plugin or mod for wordpress to make content publication SUPER easy
- How can I log a user out of WordPress before the page loads?
- Delete option doesn’t appear for plugins
- How do I only load a plugin js on it’s settings pages?
- How to enable Admins to see Plugins
- Adding an admin page – OOP approach not working
- How to add a help tab to all admin pages – including plugin pages
- Generate Advanced Custom Fields box in custom admin menu page
- Bad Request (Invalid Hostname) on working server, database problem
- Plugin development: how to create a form and get custom data?
- How to develop a community feature in the dashboard for multiauthor site
- What’s the point of using WordPress’s built in admin-ajax.php?
- Sub menu with a URL parameter and access the page
- Filter or action hook to insert content on admin pages before tag
- How to set CORS header?
- How to edit/delete single row items in a table on my own menu page
- Admin Dashboard with Custom Tab for Client
- reorder plugin menu position
- Hide Theme options and Customize Admin menu
- Change wording of admin menu item?
- wordpress reusable content blocks
- Cannot access wp-admin after disabling all plugin
- 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?
- What would be the advantages/disadvantages of remote plugin installation?
- White page on custom plugin option submit
- Make menu page link inaccessible or disabled
- Layout Plugin Admin Pages: Use BootStrap? [closed]
- Remove Duplicator plugin from admin menu if not an administrator
- Doubt using $wpbd->get_col for a single column
- Add a custom form on the post-new.php admin page
- All Users > User List > Update User Meta Field Inline
- Admin accounts unable to see plugins from external IP
- Plugin dependencies: show notice like theme plugins dependencies
- Polylang : Interverting languages after development [closed]
- WordPress wp-admin/network/plugin-install
- how to access all user dashboard on fronted page [closed]
- How to set add question capability for author role in wp pro quiz plugin
- Suggestions on Approach to New Plugin I’m Stuck On
- do_action() hook into load-(page)
- Add menu page issues (permissions & position)
- Add sub menu page in your plugin
- Editing a text file from plugin menu
- Simply poll & Events Calendar plugins clashing
- Why WP_Screeen doesn’t show all options with admin_body_class
- add_submenu_page returns null
- in source code but I can’t find it in files or plugins
- Updating WordPress plugin admin panel footer text
- How do I add an options page at the bottom of the list?
- How to remove a CPT Menu from the Root Admin only
- Remove value from array within post meta ajax admin
- Plugin permissions for Editor role
- How do you add a settings page to another menu?
- Error: Can´t access facebook comment plugin admin page
- How to add an admin alert for missing plugins
- Custom page in plugin visible in menu
- Gathering all Custom Post Type posts in to array/object the proper way
- Adding a jQuery modal dialog to the admin area
- Redirect plugin after form submit or show errors
- How to create a plugin page that shows XML?
- Adding custom Field To The Posts Listing
- What is the most efficient way of adding additional functionaliy for admin only
- How to create admin setting for this small plugin
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Admin Custom Plugin List Files in admin Table
- Hide all Admin Notices and move on a separate page
- How To Remove “All, Publish, Draft and Expired” in Events Dashboard
- Custom Icon assigned to menu items not working for multi-site networks
- Admin menu hilighting wrong item for CPT
- Add_Meta_box to custom page (formidable edit post)
- How to enable Admins to see Plugins
- Defined user role to access plugin’s pages
- Add a checkbox in plugin options page and make it actually work
- Embedding code snippets in posts with indentation
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- Assigning a custom post type to a custom page
- admin panel save option with ajax
- What would cause edit buttons for plugins to disappear?
- How to create plugin list groups?
- What is the recommended way to be notified of security updates to my plugins? [closed]
- Why plugin’s icon for the menu not found?
- Allow direct access to files/folders within WordPress to replace wp-admin
- What plugin presents these extra columns in wp-admin -> plugins
- How is wp_admin_notice supposed to work?