Well, looks like I have found the answer. The action should be changed like so:
$action = 'install-plugin';
$slug = 'akismet';
wp_nonce_url(
add_query_arg(
array(
'action' => $action,
'plugin' => $slug
),
admin_url( 'update.php' )
),
$action.'_'.$slug
);
The answer was found in line 275 in the source code: https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-admin/includes/plugin-install.php
Related Posts:
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- I found this in a plugin. What does it do? is it dangerous?
- Disable /wp-admin/plugin-install.php
- How to eliminate weird 404 errors in wp-admin?
- How to stop showing admin notice after close button has been clicked
- Is There a WordPress Hook to Filter the Edit Posts View?
- Reordering themes in admin panel
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- Is there any record of installed plugins in the database?
- Best way to manage a lot of pages in Wp Admin [closed]
- Custom admin column disappearing when using Quick Edit [duplicate]
- WordPress admin notice in plugin function
- Using tabs for wordpress plugin
- How do I add to the list table a filter?
- Getting Custom Post Type content from main-site of a Multisite
- how to not show plugin in admin area
- How to make a WP admin button/menu similar to Jetpack Notifications?
- Getting “Fatal error: Call to undefined function wp_cache_get() in option.php” after updating a cache plugin [closed]
- How Restrict access to admin dashboard by specific static ip?
- When is it useful to use wp_verify_nonce
- Why would WP-CLI and WP Admin show different list of plugins with updates?
- Edits to plugin not taking effect
- How to get the wpnonce value?
- Hide Theme options and Customize Admin menu
- Making menu link open in new tab?
- After activating a Plugin, /wp-admin is no longer accessible
- Weird problems after recovery from security breach
- Security checking in meta_box save is reluctant?
- Cannot access wp-admin after disabling all plugin
- Function to prevent users from trashing comments
- How to Sort the Favorite Plugins Screen Alphabetically?
- Hide extra menus from WordPress Dashboard
- How to provide a plugin which requires CMB2 (plugin dependencies)?
- ‘wp_login’ action hook not working with wp-login.php file
- WordPress takes too much time (100 seconds) to load – Front end and back end
- WordPress on AWS with ELB
- wp_create_nonce function doesn’t work inside a plugin?
- Edit default comments page in WP Admin
- All Users > User List > Update User Meta Field Inline
- Is there an easy way to flag posts in the admin area?
- Default WordPress WP Editor removing style tags and html tag
- Nonce failing on form submission
- Is it possible make a back-end for WordPress with WordPress?
- Dynamic admin submenu
- Remove ‘Check Compatibility’ from Plugins menu
- Add menu page issues (permissions & position)
- Cannot access my wp-admin after installing Gzip compression [closed]
- Plugin settings won’t save changes
- Is there any way to make myself an admin?
- How can i force wp-admin to use 2-column dashboard layout? [closed]
- Odd /wp-admin/admin-ajax.php entries showing in Wassup
- Display Plugin Panels Outside of Admin Areas
- How to display terms and conditions in post area?
- Is there a plugin for WordPress for creating ‘Accounts’ where all users who belong to that Account can only see Account data? [closed]
- WordPress Site is Broken, Cannot see wp-admin page [closed]
- How to add a WordPress Nonce for this form to avoid CSRF
- How to remove a CPT Menu from the Root Admin only
- Remove value from array within post meta ajax admin
- Is there a better way of handling AJAX requests in WordPress?
- Mowing site to another domain in simplest way
- Cannot access WP admin because plugin returns 204
- Install old version of plugin from admin panel?
- WordPress as heavily personalized content management portal, and somewhat like dropbox [closed]
- Nonce failing with second argument
- Can’t save changes or modify settings in Dashboard but Pages and Posts are fine
- Trigger jQuery to add events after AJAX-loading table in admin plugin
- how to move a plugin-block in Edit Post page back to bottom area?
- wp_post not working, keeps redirecting to posts page
- WordPress fatal error from php protocol codes
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function
- Can we hide a certain user in WP?
- How to properly enqueue jQuery knob on WordPress without conflict?
- WordPress Dashboard add user password not working, etc
- Add custom WordPress admin page with pretty url via code
- How to find where an image is used by it’s url
- Unable to update plugins or log out
- Get full URL of WP plugin admin page
- WordPress Plugin PHP Not Calling Function
- Admin menu hilighting wrong item for CPT
- Is admin section completely customizable in terms of styling?
- Not able to upload Plugins/ Theme from Admin backend
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- Disable plugin on admin page
- Ajax return 0 in plugin – ajax only used in wp-admin
- How to add php stylesheet to admin section instead of admin_head hook
- How to activate/deactivate menu tab and keep the same id?
- Get post id in Post Page within Wp-admin
- AdBlock blocks my non-advertising sidebar images [closed]
- Combining JS files to one script
- Screen Options drop-down does not show
- plugin translations not reflected in admin dashboard
- How to display content depending on the Woocommerce Product Category
- Allow direct access to files/folders within WordPress to replace wp-admin
- WordPress website is redirecting on some different shopping page
- PHP FATAL ERROR
- Fatal Error in my WP “Call to undefined function get_option()”
- Secure way to add JS Script to WordPress filesystem
- Not applying update field (acf) in my plugin
- search by meta field in the regular WordPress admin panel search
- Show only those pages that are created by the specific logged in user in WordPress