minor improvmenet to helper function

Signed-off-by: Elliot Condon <e@elliotcondon.com>
Added 3rd party support

https://github.com/AdvancedCustomFields/acf5-beta/issues/325
Signed-off-by: Elliot Condon <e@elliotcondon.com>