Support

Account

Home Forums Backend Issues (wp-admin) Accessing List of Admin Menu Items

Solving

Accessing List of Admin Menu Items

  • Is there a way to create a custom field which is populated by the top-level admin menu items? If so, any idea on how to do it?

    Thanks in advance for any help you can offer.

  • Yes there is, I do this in one of my plugins https://github.com/Hube2/acf-options-page-adder/blob/master/options-pages.php

    On line 57 is where the filter is added and the main function is on 396. This function relies on data collected by the function build_admin_menu_list that starts on line 500. This function builds a list that is meant to work with acf options pages and some of the admin menus are not shown, like comments and plugins. The menu list is collected on the ‘admin_menu’ action. There must be a reason that I did it then, but I don’t remember why at this point, I only say there must be a reason because otherwise it would be in the function that populates the ACF select field.

  • Thanks. I’ll check it out.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.