Instead, the field is not populated with any options.
I've tried to log function execution adding "error_log('triggered');" but on my log txt this is not displyed, so it seems that the function is never executed.
Actually since this is an undocumented function from within our then its not guaranteed to produce the results that is expected by you.
We cannot assist with this one, however there is a report on our internal site that there is a feature request for something like this where you can populate the types custom field with a hook.
For now there is not much we can do but wait until this request is completed.
Thanks,
Shane
It's a nonsense this limitation where select custom fields can't be populated dynamically. ACF has this feature since years ago.
Anyway, maybe you have a better solution for my workaround. I have a CPT with a custom field which is a date field. I want to be able to filter this posts with a given year via URL parameter. I tried with an aditional select field where just years are stored buy it is not possible to populate dynamically as you say.
So... is there a way to filter posts in archive using a date custom field with a given year in URL param?