Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-7625

Move scripts from Twig templates to JS files

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Should have Should have
    • None
    • 3
    • Technical Debt

      Summary

      Considering code separation and maintainability, JS logic should not be part of Twig templates.
      It should exist in separate files and be included using the wp_enqueue_script function or similar, which also has benefits in terms of security, caching, minification, etc...

      Requirements

      • Remove JS scripts from Twig templates.
      • Move the scripts to JS files.
      • Include the scripts only to the corresponding pages using the wp_enqueue_script function or similar.

      Resources

            pfiguero Pedro Figueroa
            pfiguero Pedro Figueroa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: