I'd like to append an admin notice to the edit page of a particular 3rd party plugin to help prevent user error.
The URL is .../wp-admin/admin.php?page=plugin-name&action=edit...
As $pagenow only returns admin.php and the get_current_screen value for action returns "", how can I identify the full URL to effectively as if page="xx" and action = "yy"?
Thanks
I'd like to append an admin notice to the edit page of a particular 3rd party plugin to help prevent user error.
The URL is .../wp-admin/admin.php?page=plugin-name&action=edit...
As $pagenow only returns admin.php and the get_current_screen value for action returns "", how can I identify the full URL to effectively as if page="xx" and action = "yy"?
Thanks
Share Improve this question asked Nov 2, 2019 at 13:19 user8481001user8481001 11 Answer
Reset to default 0$parts = parse_url( admin_url() );
$url = "{$parts['scheme']}://{$parts['host']}" . add_query_arg( NULL, NULL );