Add an extra FTP_LANG_DIR override constant to short-circuit WP_Filesystem_Base::find_folder(WP_LANG_DIR);. See #11495
git-svn-id: https://develop.svn.wordpress.org/trunk@17579 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
64686e2515
commit
abb6e01681
@ -148,7 +148,7 @@ class WP_Filesystem_Base {
|
|||||||
function find_folder($folder) {
|
function find_folder($folder) {
|
||||||
|
|
||||||
if ( strpos($this->method, 'ftp') !== false ) {
|
if ( strpos($this->method, 'ftp') !== false ) {
|
||||||
$constant_overrides = array( 'FTP_BASE' => ABSPATH, 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, 'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR );
|
$constant_overrides = array( 'FTP_BASE' => ABSPATH, 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, 'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR, 'FTP_LANG_DIR' => WP_LANG_DIR );
|
||||||
foreach ( $constant_overrides as $constant => $dir )
|
foreach ( $constant_overrides as $constant => $dir )
|
||||||
if ( defined($constant) && $folder === $dir )
|
if ( defined($constant) && $folder === $dir )
|
||||||
return trailingslashit(constant($constant));
|
return trailingslashit(constant($constant));
|
||||||
|
Loading…
Reference in New Issue
Block a user