bea-media-analytics icon indicating copy to clipboard operation
bea-media-analytics copied to clipboard

Save statically once the media fields

Open MaximeCulea opened this issue 6 years ago • 3 comments

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 avatar Mar 28 '18 08:03 MaximeCulea

@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.

herewithme avatar Mar 28 '18 08:03 herewithme

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.

MaximeCulea avatar Mar 28 '18 08:03 MaximeCulea

Yes, complementary subject.

herewithme avatar Mar 28 '18 08:03 herewithme