Ryflex
Ryflex

Reputation: 5769

Wordpress admin detecting how/where a menu is being rendered/generated from

I have a menu in my wordpress admin menu for example:

https://website.com/wp-admin/admin.php?page=menu-item

I am unable to find where it is being generated from, I've tried using query monitor to find out but I can't see anything.

Is there an easy way to find out or a specific method/hook to find out the origin of the menu?

Upvotes: 0

Views: 27

Answers (1)

Ashish Patel
Ashish Patel

Reputation: 3614

check 'admin menu' hook in your function in which menu slug parameter would be 'menu-item'.

Check below link.

Administration Menus

Upvotes: 1

Related Questions