[wp-trac] [WordPress Trac] #58318: Remove `load_theme_textdomain()` calls from default themes

WordPress Trac noreply at wordpress.org
Mon May 15 13:12:19 UTC 2023


#58318: Remove `load_theme_textdomain()` calls from default themes
---------------------------+-----------------------------
 Reporter:  swissspidy     |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Bundled Theme  |    Version:
 Severity:  normal         |   Keywords:  needs-patch
  Focuses:                 |
---------------------------+-----------------------------
 Since WordPress 4.6 introduced just-in-time translation loading, themes
 and plugins no longer need to manually call
 `load_theme_textdomain`/`load_plugin_textdomain`, unless they are on a
 version prior to 4.6.

 Still, for some reason the default themes before Twenty Twenty-Two still
 use `load_theme_textdomain`, sometimes even pointing to a `/languages`
 folder that doesn't actually exist.

 Related: #34884

 Suggestion:

 1. Remove `load_theme_textdomain()` call from Twenty Seventeen and up,
 since these themes all require at least WordPress 4.7
 2. On older default themes, only call `load_theme_textdomain()`
 conditionally depending on the WordPress version.

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


More information about the wp-trac mailing list