Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify loading of plugin text domain
The `load_plugin_textdomain()` is now a single line, so it doesn't need to be in a wrapping function or method. It is moved to the `plugins_loaded` hook, which is considerably earlier than init, so any strings defined before then (even if not output) will be translatable too. The removal of the explicit `load_textdomain()` and variables comes from https://core.trac.wordpress.org/changeset/25059 which automatically loads (for example) wp-content/languages/plugins/genesis-header-nav-en_GB.mo instead of wp-content/languages/genesis-header-nav/genesis-header-nav-en_GB.mo . This is therefore a backwards compatibility change but one which supports the upcoming language packs. It bumps the WP requirement to 3.7. Move any existing custom .mo to the new location for it to work. The change from `basename( dirname( __FILE__ ) )` back to the more standard `dirname( plugin_basename( __FILE__ ) )` comes from the fixes in https://core.trac.wordpress.org/ticket/16953 which make `plugin_basename()` resolve symlinked plugins. This bumps the requirement for WP to 3.9.
- Loading branch information