Opened 8 years ago
Closed 7 years ago
#39168 closed defect (bug) (fixed)
Double slash when loading mu-plugin textdomain
Reported by: | nsundberg | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
load_muplugin_textdomain()
creates double slashes for load_textdomain()
. The function first uses trailingslashit()
and then concatenating the path and filename with an additional /
.
See lines 756-758 trunk/src/wp-includes/l10n.php#L756:
$path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) );
return load_textdomain( $domain, $path . '/' . $mofile );
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Introduced in [37414].
I think we can keep the slash and remove the
trailingslashit()
call instead, for consistency withload_plugin_textdomain()
andload_theme_textdomain()
.