WordPress do not accept nonce in the slug that you are trying to provide in the above code.
I mean in this line:
'my_dashboard&nonce-field=' . wp_create_nonce('my_action'), 'show_dashboard'
I was facing the same issue like you are facing. As the admin menu already verified for specific users so we don’t need to verify it again with nonce. Therefore, to skip that issue you can use that code at top of your file where you using $_GET or $_POST super global.
check_admin_referer(-1);
It will remove the warning for nonce verification.
Related Posts:
- Nonces can be reused multiple times? Bug / Security issue?
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- Nonce in settings API with tabbed navigation
- WordPress REST API call generates nonce twice on every call
- Confusion on WP Nonce usage in my Plugin
- WordPress password reset – why post rp_key?
- Verify Nonce returns false – Request Nonce returns correct value
- Maximum lifetime for nonce
- Is nonce in PHP form and Ajax both necessary?
- Custom login doesn’t work properly
- wp_nonce_field displaying twice
- The Correct Way to Use Nonce Field without Settings API
- How to use nonce
- Where to use nonce
- WP_List_Table Inside Metabox With Bulk Actions Not Working on Submit
- Saving metabox updates causing fatal error
- $_POST form request with admin-post
- How can I configure Docker for developing and deploying a custom theme?
- Add screen options to custom admin pages
- How can I run AJAX on a button click event?
- Completely remove WP_Admin_Bar for specific user roles
- What is the difference between using global $current_screen and get_current_screen()?
- How to make repeated component/block in Gutenberg
- How Do I Make WordPress Run an Event Every Day?
- How can I change the frequency of a scheduled event?
- How to filter $post->post_content prior to save
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to check if certain plugin exists and in expected version
- Why won’t register_setting() create a setting?
- One time username change from frontend?
- Customizer Not Saving Options
- How to add SQL file with PHP to WordPress database [closed]
- How to extend a plugin like we do a theme?
- How to add custom text in wordpress logs
- Platform/Website that Supports Crowd-Funded WordPress Projects? [closed]
- Get user id for delete and update selected user
- How can I call template partials inside my custom plugin
- WordPress REST API, run long background job
- Make a list with header and subtext in Gutenberg blocks
- Add version query tag to all images
- Creating table with plugin is not working
- How to store a medium amount of options?
- Get the post id as early as possible
- How to delete an user including data from custom database tables
- Custom plugin changes not showing
- How plugins_loaded works?
- Beginner advice
- How To Prevent Certain Folder To Be Overwritten During Plugin Update?
- Multiple options pages validation for a plugin
- how to append custom metabox field with the ACF custom fields id in wordpress development
- $_FILES empty on created_{taxonomy} and create_{taxonomy} yet is is not on edit_{taxonomy}
- Memberpress Hooks and Activity
- WordPress allows multiple users to have same email ID; and I’ve a problem with it!
- Adding fields to category manager. Does a method exist to get the link to the category edit screen?
- wordpress add_submenu_page adds broken link
- WP Enqueue style on all plug-in pages
- Wp-admin Custom User Management
- Can we intercept user_login and user_pass from a wp_login_form?
- Hook add_attachment error
- How do I find the page/url where a search came from when using pre_get_posts filter?
- Shortcode conflicts
- How can I add rewrite rules to a class-based plugin?
- How to output functions from plugin inside theme
- Sharing Variables between scheduled events
- Using delete_post_meta for deleting multiple selected options
- Workflow for new importer plugin – your advices?
- Should I put my plugin javascript inline?
- Can / should a widget plugin define its own Widget Area?
- How to automatically activate a plugin on install
- disable defaault wordpress comments from a plugin
- How to get the `comment_post_ID`?
- Can someone explain what’s the use of parse request function in WordPress?
- add_editor_style to the blog editor view (Gutenberg?)
- How does update method in Widget class saves $instance array from Select tag?
- By adding “?login – failed” code unable to access my dashboard
- jQueryUI draggable doesn’t work in WordPress plugin
- call funcution when clicking submit
- WooCommerce – Stop assigning order numbers
- How to prevent users from deleting their accounts?
- How do I get a reference to the HTML memory buffer while the page is being constructed?
- How to Maintain url on form submit
- How to customize the size of Featured Images or Post Thumbnails in WordPress?
- add_option_{$option} action hook not being called
- Remove all capabilities in separate method fails versus included in method
- Hook for plugin to show content for certain urls
- Why does unzip_file always return true but nothing happens?
- Let user override plugin CSS
- Add_menu_page and saving settings
- add short code not working
- What method would I use to show an image in between X amount of posts on category archive? [duplicate]
- Shortcode attribute “title” doesn’t appear in $atts array
- Plugin – Proper way to handle 404 pages?
- Checking if the query is empty does not work
- Remove default wordpress roles
- What is the meta_query key name for the woo product average rating? [closed]
- how to catch a data from a array in WordPress
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- External api call using wordpress
- Set link dialog to open in blank by default
- plugabble wp_authenticate function not works from wp-login.php