Nested Hooks with do_action for performance reasons – safe/necessary?
This is a good use case for either Transients or the Object Cache. The choice of which to use depends on whether you need to perform this query/check on every single request, or whether it only needs to be performed once every hour/day/week etc. For both options would would start by creating a separate function … Read more