Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #45103, comment 9


Ignore:
Timestamp:
10/18/2018 03:17:16 PM (6 years ago)
Author:
herregroen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #45103, comment 9

    v1 v2  
    2323From there, before a script is output in `do_item`, we can find it's relative path to the plugin, theme, child theme or root urls. md5 that and find the correct translation file in the appropriate language directory. The domain and locale are known so no issues there.
    2424
    25 This can then be output using basically `register_inline_script ` from the `GB_Scripts`  class. Likely as a new method on `WP_Scripts`.
     25This can then be output using basically `register_inline_script` from the `GB_Scripts`  class. Likely as a new method on `WP_Scripts`.
    2626
    2727One more thing I think we should add is that in `load_plugin_textdomain`, `load_muplugin_textdomain`, `load_theme_textdomain` and `load_child_theme_textdomain` we should remember the paths passed so that, if the translation is for one of those registered domains we can also look in the directories passed there.