Read about “Nonces”.
Create one and append it to your URL:
$url="example.php?filename=whatever&nonce=" . wp_create_nonce('my_sensitive_action');
When your request is fulfilled check for it:
// here verify if the nonce was used before
if(wp_verify_nonce($_GET['nonce'], 'my_sensitive_action')){
// it's ok, it wasn't used before
}
Also the validity of these nonces has a time limit, like one day or so.
If the nonce is not used within this period, it will expire…
Related Posts:
- wp_verify_nonce vs check_admin_referer
- How does admin-ajax.php work?
- This CSS Stuffing Works, But Is This A Good Practice?
- Securing Admin Accounts – Username Discovery
- Settings API – easiest way of validating checkboxes?
- WordPress Admin back-end – advanced options page?
- How To View Site from Non-Logged-In User’s Perspective
- wp_dropdown_pages() in theme admin page
- Assuming a theme is properly secured, how save is the WordPress admin?
- Don’t attribute content to admin users
- How can I show the contents of only a few users
- Settings API not saving values to database
- WordPress ACL (folder + permissions)
- Admin option sidebar count
- using rewrites to secure login page
- Problem with Settings API: changes are not saved after submit
- Add Custom Script in Other Plugin’s Options page
- Accessing variable from admin panel?
- How can I POST or GET to the same admin page from which I am POST-ing or GET-ing
- How do I diagnose a plugin resource 404?
- WordPress Brute Force Prevention
- Changing admin user id for database
- Does deleting the table users prevent all logins?
- Show global Message in User Profiles with admin only Input field in WordPress Backend
- [Multisite]How can I update custom blog option?
- Call require_once form admin page with checkbox
- Why does my admin email address keep changing to something random?
- Where to store publicly-accessible files
- Get Link of Page Selected through a Select Field in Custom Admin Page
- My code for creating an admin option doesn’t work
- I don’t have permission to save the theme options I created myself?
- Pull Random Images From Options Page [closed]
- Woo Commerce Settings for Check-out Form [closed]
- Admin Ajax is returning 0
- Add a Separator to the Admin Menu?
- Adding a custom admin page
- Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”
- Is it safe to store a user setting you don’t want the user to ever modify as a user option?
- Custom admin email for new user registration
- A similar hook as wp_head for the admin area
- Hide allow trackbacks/pingbacks
- Hide Admin menus per role in WordPress
- wordpress upload http error?
- How to find out if an wp-admin action edited a file?
- Text snippets shared across posts
- Add Admin User via SQL
- How to remove Gravatar from Username column
- Page only shows when user is logged in (even with visibility set to public)
- get_template_part in admin
- Why Jetpack is missing the “Feedbacks” menu item? [closed]
- Getting the different post statuses + count like in edit.php, in a custom submenu page
- How to set CORS header?
- Create a Meta Box in the Admin User Screen?
- Send email to Admin when user/member updates specific user/member data
- Help with shortcode in admin-ajax [closed]
- Protect custom php file with login
- Limit Words in Category / Term Description – Admin Panel
- Change top level menu item to point to custom submenu item
- Change admin logout URL
- Default admin color scheme as “blue”
- Can user #1 (the initial user) be deleted without ill effect?
- wp-admin post.php JavaScript Links Not Working
- Remove duplicate product link from WooCommerce Page Row Actions
- How to set default editor tab
- Make the Status, Visibility, or Date fields opened by default in the Publish box
- Options page – dropdown of users
- Force to use STRONG users password and implement rule to prevent REUSE [closed]
- WordPress Admin Login Redirect Problem
- 500 internal server error on wp-admin only
- Admin Top Bar Not Showing On Front End
- WordPress administration Over SSL – To Force SSL Logins and SSL Admin Access
- Only Admin can Edit, Delete or Update
- How to verify nonces in bulk?
- Getting admin notices to appear after page refresh
- Hide post title input for all roles except admin
- How to activate the dashboard
- /wp-admin/install.php redirecting to 123-reg
- How to prevent plugins from sniffing/stealing other plugins’ options?
- Home page is redirecting to another page – no obvious reason
- Backend Checkboxes working – but not visual?
- Redirect admin 403 “Cheatin uh?” admin pages
- iframe with Youtube video appears for logged-in users, but not for incognito users
- Admin mode breaks with subdomains in latest WP
- How do I create a post_id column, for admin posts list?
- Custom Jquery in admin breaks media-upload script
- How should I change the username of or delete the admin user?
- Extending the user profile [closed]
- Show private pages in public when you logged in as admin?
- Any known plugins for master admin login to edit all on front end?
- How to exclude some post from admin edit screen
- How to show WordPress admin dashboard forms on front-end?
- Allow custom REST route to return before doing long operation
- Cannot access wp-admin after installing SSL – user capabilities not being set
- Show only content in page after action click in WordPress admin
- Display Graphs in Admin Pages
- Dropdown list of available posts for post editing
- Unsure how to add simple checkboxes that write to a small table to admin
- Custom styles and scripts for specific admin screen
- Is it possible to get rid of admin new updates notifications?
- What Role to assign remote site developer?