[wp-trac] [WordPress Trac] #54044: Docs: Provide a more accurate description for functions `wp_localize_script`, `wp_set_script_translations`, `wp_script_add_data` and `wp_style_add_data`

WordPress Trac noreply at wordpress.org
Thu Sep 2 08:29:18 UTC 2021


#54044: Docs: Provide a more accurate description for functions
`wp_localize_script`, `wp_set_script_translations`, `wp_script_add_data`
and `wp_style_add_data`
---------------------------+-----------------------------
 Reporter:  audrasjb       |       Owner:  SergeyBiryukov
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:  5.9
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:  fixed
 Keywords:  has-patch      |     Focuses:  docs
---------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51726" 51726]:
 {{{
 #!CommitTicketReference repository="" revision="51726"
 Docs: Provide a more accurate description for a few script and style
 functions.

 This should make it clear that the functions only work if the script or
 style has already been registered.

 This affects:
 * `wp_localize_script()`
 * `wp_set_script_translations()`
 * `wp_script_add_data()`
 * `wp_style_add_data()`

 Follow-up to [7970], [18464], [25594], [31223], [36633], [44169], [44350].

 Props audrasjb.
 Fixes #54044.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54044#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list