最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Get full URL of WP plugin admin page

programmeradmin5浏览0评论

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 1
Add a comment  | 

1 Answer 1

Reset to default 0
$parts           = parse_url( admin_url() );
$url             = "{$parts['scheme']}://{$parts['host']}" . add_query_arg( NULL, NULL );

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论