bea-media-analytics
bea-media-analytics copied to clipboard
Save statically once the media fields
In each helper, we duplicate code and reuse the same "helper" to get possible ACF media fields to work with.
So we could move and refactor recursive_get_post_media_fields
into admin/main
to be triggered on acf_save_post
action.
This will cause to check fields once and save somewhere as static to faster/easier reuse into helpers.
@herewithme your thought ?
@MaximeCulea 100% agree. But I'm not sure that we should invest time on the current format because ACF should be totally outsourced in an addon.
Let's do things step by step ;) We should have done it here https://github.com/BeAPI/bea-media-analytics/issues/51#issuecomment-368344743 :p Anyway I created an issue https://github.com/BeAPI/bea-media-analytics/issues/68 to focus on this refactoring.
Yes, complementary subject.