Sometimes admin_url() is OK, but it is generally safer to use self_admin_url() if you don't specifically intend to link to the URL for a particular site on multisite. It is also preferable to network_admin_url(), unless you specifically want to hook to the network admin.
The only issue here is that there are legitimate use-cases, so we need to be able to whitelist them in some way. I'm not sure that the forbidden functions sniff that we are using allows for that.
Sometimes
admin_url()
is OK, but it is generally safer to useself_admin_url()
if you don't specifically intend to link to the URL for a particular site on multisite. It is also preferable tonetwork_admin_url()
, unless you specifically want to hook to the network admin.