robhyrk
Forum Replies Created
-
Forum: Plugins
In reply to: [Age Gate] On click/submit doesn’t remove restriction classesI was on a time crunch and couldn’t wait haha. Hopefully it helps out for a future release!
Great plugin btw! Even the paid ones aren’t as good. Cheers!
Forum: Plugins
In reply to: [Age Gate] On click/submit doesn’t remove restriction classesSo after hours of fiddling around with cache settings the issue was actually a bug in the code.
If you have “Transitions” selected to anything other than none the code to remove all the css classes will not run.
The following code block in public/js/age-gate-public.js needs to fixed
key: "hide", value: function () { var e = this; age_gate_params.settings.transition ? (jQuery(".age-gate-wrapper").on("transitionend", function (t) { jQuery(window).scrollTop(0), jQuery("body").removeClass("age-restriction"), jQuery("html").removeClass("age-gate-restricted age-gate-js"), jQuery("body").removeClass("age-gate--error"), jQuery(".age-gate-wrapper").remove(), e.removeViewport(); }), jQuery(".age-gate-wrapper").addClass("transition " + age_gate_params.settings.transition)) : (jQuery(window).scrollTop(0), jQuery("body").removeClass("age-restriction"), jQuery("body").removeClass("age-gate--error"), jQuery("html").removeClass("age-gate-restricted age-gate-js"), jQuery(".age-gate-wrapper").remove(), this.removeViewport()); },When I output age_gate_params.settings.transition to the console it showed the transition correctly but it skipped all those lines of jQuery code.
If anyone else is having this issue you may just need to disable Transitions in the Appearance settings.
Forum: Plugins
In reply to: [Age Gate] On click/submit doesn’t remove restriction classesActually nvm, that does not seem to be the problem. I can confirm that the css classes do not get removed when a user verifies their age which causes the issues I mentioned above.
Forum: Plugins
In reply to: [Age Gate] On click/submit doesn’t remove restriction classesIt looks like it might be server related as it is not occurring on the staging site. It appears that once input is submitted admin-ajax.php loads in the network tab but nothing else does. It stops there. If I refresh the page everything else loads fine.