For anyone else arriving here later,
If you check line 425 in options-page.php you’ll see it’s doing a bit more than that. It seems to be applying filters, checking for parent child redirects, returning false if there are no options pages, and finally returning all the pages.
My use case is an automatic generation of field groups based on registered option pages.
I’m going to ‘connect’ a Taxonomy to an attachment and needed a UX-friendly way of doing so. So I’ll be making a sort of link table in an option page. Having a Taxonomy dropdown, and a file-field or a media selection field.
Anyways, I was bummed to find out that acf_get_options_pages() is undocumented and at the moment, I’m not sure if $GLOBALS['acf_options_pages'] is always there. Either way this was exactly what I needed and seems to work flawlessly in ACF Pro 5.11.4.
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Get a list of defined Option Pages?’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users