Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21547, comment 2


Ignore:
Timestamp:
08/11/2012 07:22:49 AM (13 years ago)
Author:
gkb6891
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21547, comment 2

    initial v1  
    44> The question is: why would you need to 'delocalize' a script?
    55
    6 It's not necessarily for internationalization. In my case, the WordPress.com plugin I was working on uses wp_localize_script to pass dynamic properties to a static javascript file.
     6It's not necessarily for internationalization. In my case, at Automattic, the WordPress.com plugin I was working on uses wp_localize_script to pass dynamic properties to a static javascript file.
    77
    88Here's the specific scenario: we run multiple a/b tests each of which needs some dynamic parameters passed to a static javascript file. Each of these a/b enqueues the static javascript file if it's not already been enqueued.