Ticket #3315 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Language files in wp-content

Reported by: Nazgul Owned by: Nazgul
Priority: normal Milestone: 2.1
Component: General Version: 2.1
Severity: normal Keywords: has-patch
Cc:

Description

Currently language files have to be stored in wp-include/languages, while other "user content" like plugins and themes are in wp-content. It makes more sense (to me at least) to place language files in wp-content as well.

This also simplifies upgrading, because you don't have to remember to save/backup your language files, before deleting the wp-includes folder, as per the installation instructions.

Attachments

3315.diff Download (977 bytes) - added by Nazgul 5 years ago.
lang_in_content_dir.diff Download (860 bytes) - added by markjaquith 5 years ago.
slightly more streamlined logic

Change History

Nazgul5 years ago

  • Keywords has-patch added
  • Owner changed from anonymous to Nazgul
  • Status changed from new to assigned

Attached patch uses wp-content/languages folder if it exists and falls back to wp-includes/languages if it doesn't. This fallback keeps existing installations working.

Good thinking.

I like it. No modified files or directories should be in wp-admin or wp-includes

comment:4   ryan5 years ago

Why not.

comment:5   idle5 years ago

In response to Ryan's comment:

Because future upgrades will overwrite the modified files, unless you want to manually update your files. Adding new files to wp-includes or wp-admin is a whole different arm, however.

Personally, I never delete my wp-includes directory, but keep my global functions in a file of its own inside that directory. Anyway, I like this patch. Nice work, Nazgul!

comment:6   ryan5 years ago

By why not I meant, +1. :-)

slightly more streamlined logic

Newer patch with more streamlined logic... no need to nest those ifs so deep.

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [4446]) make /languages/ directory default to /wp-content/languages/ with fallback to /wp-includes/languages/. Props Nazgul. fixes #3315

Note: See TracTickets for help on using tickets.