You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The phtml template method breaks separation of concerns and is not clean (using str_replace for templating is bad because PHP is a templating language by itself)
Alternative Solution:
Embed a javsacript snipped via a .js file in the codebase that is injected on our page using wp_enqueue_script
The only parameter needed when we call the script is pageId, so we embed a tiny snippet in the template that does it safely.
The phtml template method breaks separation of concerns and is not clean (using
str_replace
for templating is bad because PHP is a templating language by itself)Alternative Solution:
.js
file in the codebase that is injected on our page using wp_enqueue_scriptpageId
, so we embed a tiny snippet in the template that does it safely.The event handler is attached via the script injected
The text was updated successfully, but these errors were encountered: