WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#3315 closed enhancement (fixed)

Language files in wp-content

Reported by: Nazgul Owned by: Nazgul
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords: has-patch
Focuses: 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 (2)

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

Download all attachments as: .zip

Change History (10)

@Nazgul8 years ago

comment:1 @Nazgul8 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.

comment:2 @Viper007Bond8 years ago

Good thinking.

comment:3 @markjaquith8 years ago

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

comment:4 @ryan8 years ago

Why not.

comment:5 @idle8 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 @ryan8 years ago

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

@markjaquith8 years ago

slightly more streamlined logic

comment:7 @markjaquith8 years ago

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

comment:8 @markjaquith8 years ago

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

(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.