mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 03:30:06 +00:00
Coding Standards: Rename the $file parameter to $path in some WP_Filesystem_* methods.
This aims to bring more clarity to the code, and applies to methods where the path can be a file or a directory: * `WP_Filesystem_*::exists()` * `WP_Filesystem_*::is_writable()` Follow-up to [6779], [25560]. See #55647. git-svn-id: https://develop.svn.wordpress.org/trunk@53872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -557,11 +557,11 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $file Path to file or directory.
|
||||
* @return bool Whether $file exists or not.
|
||||
* @param string $path Path to file or directory.
|
||||
* @return bool Whether $path exists or not.
|
||||
*/
|
||||
public function exists( $file ) {
|
||||
return file_exists( $this->sftp_path( $file ) );
|
||||
public function exists( $path ) {
|
||||
return file_exists( $this->sftp_path( $path ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -605,10 +605,10 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $file Path to file or directory.
|
||||
* @return bool Whether $file is writable.
|
||||
* @param string $path Path to file or directory.
|
||||
* @return bool Whether $path is writable.
|
||||
*/
|
||||
public function is_writable( $file ) {
|
||||
public function is_writable( $path ) {
|
||||
// PHP will base its writable checks on system_user === file_owner, not ssh_user === file_owner.
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user