Add option for consent cookie name#50
Open
Julix91 wants to merge 2 commits intodfactoryplugins:masterfrom
Open
Add option for consent cookie name#50Julix91 wants to merge 2 commits intodfactoryplugins:masterfrom
Julix91 wants to merge 2 commits intodfactoryplugins:masterfrom
Conversation
added 2 commits
January 8, 2020 16:20
Note that cnArgs already includes cookieName and the "soft-coded" version was already being used further up in the code!
- Add a default value
- `add_settings_field` (plus function for html for the setting)
- fill with default value when appropriate
- validate field (like implemented like `css_class` - though there should there be other requirements
> A <cookie-name> can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }.
Didn't implement that, but it might be worth having. Leave a comment and I'll add that.
- read cookie_name value from option in static function
- localize cookie_name from options to front.js same as other properties
``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This looks like that:
So just another option in the plugin's settings. Think that would help with discoverability.
I tested it locally and on my staging, it works. But I didn't implement proper validation for the cookie field.
If you're interested in merging this and want me to add that functionality just let me know and I will. :)