infinum / eightshift-gdpr

MIT License
0 stars 0 forks source link

Plugin rewrite #14

Closed dingo-d closed 3 years ago

dingo-d commented 3 years ago

This is a full plugin rewrite.

The settings page will be written in JS (why not).

The only thing that will change is that the advanced options will have a repeater field for adding levels (that way we can have 3 or 4 levels if needed by the design).

Also, I'll try to add the block for modal component here, that can be reused in the theme in an easy way. The idea (goal) is to avoid having to add the folder in the theme root just to override the modal (I find that kind of ugly). A hook can be added that will output the modal in the footer or header, plus, like in the forms plugin, we should be able to overwrite the modal block if needed.

The helpers will probably be set to static methods with depreciations - this part I'm not 100% sure. Will have to examine the old functionality and see what to keep in the new version.

I put the tag to 1.1.0 but it looks more like 2.0.0 for me.

dingo-d commented 3 years ago

I just realized that we don't need a plugin but a way to add settings plus modal component with the JS settings that can be set in the theme. The actual GDPRness is handled by the GTM tag anyhow.

I'll try to revisit how we can add the theme options for GDPR using libs (with or without ACF) and adding a modal GDPR component is super easy plus makes this whole thing a lot more flexible.