Before WordPress core had AJAX plugin actions, uninstallation in
register_uninstall_hook() worked fine:
if ( ! current_user_can( 'activate_plugins' ) ) return; check_admin_referer( 'bulk-plugins' );
But it fails with AJAX plugin uninstallation with Are you sure you want to do this? I'd like to keep up strong security.
What is the solution? What is the AJAX counterpart of
check_admin_referer( 'bulk-plugins' ) in plugin uninstallation?