Changeset 59126 for trunk/src/wp-includes/l10n.php
- Timestamp:
- 09/30/2024 02:57:32 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r59029 r59126 1208 1208 $relative = explode( '/', $relative ); 1209 1209 1210 $languages_path = WP_LANG_DIR . '/plugins'; 1210 /* 1211 * Ensure correct languages path when using a custom `WP_PLUGIN_DIR` / `WP_PLUGIN_URL` configuration. 1212 * See https://core.trac.wordpress.org/ticket/60891 and https://core.trac.wordpress.org/ticket/62016. 1213 */ 1214 $plugins_dir = array_slice( explode( '/', $plugins_url['path'] ), 2 ); 1215 $plugins_dir = trim( $plugins_dir[0], '/' ); 1216 $dirname = $plugins_dir === $relative[0] ? 'plugins' : 'themes'; 1217 1218 $languages_path = WP_LANG_DIR . '/' . $dirname; 1211 1219 1212 1220 $relative = array_slice( $relative, 2 ); // Remove plugins/<plugin name> or themes/<theme name>.
Note: See TracChangeset
for help on using the changeset viewer.