Hello,
I have a Meta Box custom select field that gets its choices using a PHP callback function that calls an external REST API and then returns the choices for the select field.
I just realized that the callback is executing on the front end of my website as well which is adding significant loading time due to the responsiveness of the external API.
When I remove the callback from the choices field, it runs significantly faster (measured using Query Monitor).
Obviously this callback should only be called on the wp-admin screen where that custom field appears. I'm not sure how to correct this, it seems that this is an issue with the Meta Box plugin?
Let me know if you need any further information!
Thank you!
Jacob Hill