I have added some data attributes to an a-tag, to trigger a plugin’s function. This works as long as I’m logged in, but as soon as I log out and try to click the tag, nothing happens.
Apparently all custom attributes are removed, when a visitor is not logged in.
If I log in, the attribute is visible again and I can click on the link, and it triggers the plugin.
What is happening here? Why is X, Cornerstone or whatever is doing it, removing data attributes when a visitor is not logged in? It’s not Wordpress, because I have different projects with the same plugin, that don’t run on X and Cornerstone, where it works without a problem.
When logged in, the a-tag looks like this:
<a href="#" data-event_no="66205" data-test="test" class="basm basm_select basm-btn" style="outline: none;">Get your festival pass >></a>
When not logged in, it looks like this:
<a href="#" class="basm basm_select basm-btn" style="outline: none;">Get your festival pass >></a>