I want to create a Post Object field containing only posts with status “publish” and I can’t see any option to achieve this…
The only option I can think of is to directly edit the plugin’s code in core/fields/post_object.php line 93,
replacing this: 'post_status' => array('publish', 'private', 'draft', 'inherit', 'future'),
by this: 'post_status' => array('publish'),
But I prefer not to touch the plugin’s code, because it’ll be overriden if I update it later on and it’s not in my repo…
So, is there anything else I can do in my own code (e.g., in my functions.php) to achieve the same result?