[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
Tue Aug 31 21:18:15 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:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Script Loader  |    Version:
 Severity:  normal         |   Keywords:
  Focuses:  docs           |
---------------------------+-----------------------------
 For each of `wp_localize_script`, `wp_set_script_translations`,
 `wp_script_add_data` and `wp_style_add_data` function, the DocBlock
 description specifies that it ''"Works only if the script|stylesheet has
 already been added"''.

 It's not clear whether "added" refers to "registered", "enqueued" or even
 "printed". I think we should probably replace "added" with "registered" as
 it's more accurate.

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


More information about the wp-trac mailing list