Thanks. I see it does work when I add query_args and post_status of inherit since Media files use Inherit instead of Publish by default. This seems to get me what I want as it looks like the WP_Query loop knows to only get the most recent Post/Page and not all the inherited revisions.
'fields' => [
[
'id' => 'vpp_post',
'type' => 'post',
'name' => 'Post or Page?',
'post_type' => ['post','page','attachment'],
'field_type' => 'select_advanced',
'query_args' => [
'post_status' => ['publish','inherit'],
'posts_per_page' => - 1,
],
],
],
I'm not sure if updating the code to work without the query_args is the right answer, or updating the docs, but I'll let you and the devs work that out 🙂
Thanks again for taking a look!
Andrew