BeAPI / bea-media-analytics

Find where and how media are used across your site.
https://wordpress.org/plugins/bea-media-analytics/
Other
15 stars 2 forks source link

Save statically once the media fields #66

Open MaximeCulea opened 6 years ago

MaximeCulea commented 6 years ago

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 ?

herewithme commented 6 years ago

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

MaximeCulea commented 6 years ago

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.

herewithme commented 6 years ago

Yes, complementary subject.