mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-05 17:50:03 +00:00
Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing. Some functions can simply return `apply_filters(...)` instead of setting a variable that is immediately returned. See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -42,7 +42,11 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
public $sftp_link;
|
||||
public $keys = false;
|
||||
|
||||
public function __construct($opt='') {
|
||||
/**
|
||||
*
|
||||
* @param array $opt
|
||||
*/
|
||||
public function __construct( $opt = '' ) {
|
||||
$this->method = 'ssh2';
|
||||
$this->errors = new WP_Error();
|
||||
|
||||
@@ -89,9 +93,12 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
} else {
|
||||
$this->options['password'] = $opt['password'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function connect() {
|
||||
if ( ! $this->keys ) {
|
||||
$this->link = @ssh2_connect($this->options['hostname'], $this->options['port']);
|
||||
@@ -126,8 +133,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
* @param bool $returnbool
|
||||
* @return bool|string
|
||||
*/
|
||||
public function run_command( $command, $returnbool = false) {
|
||||
|
||||
public function run_command( $command, $returnbool = false ) {
|
||||
if ( ! $this->link )
|
||||
return false;
|
||||
|
||||
@@ -166,8 +172,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $contents
|
||||
* @param string $file
|
||||
* @param string $contents
|
||||
* @param bool|int $mode
|
||||
* @return bool
|
||||
*/
|
||||
@@ -182,6 +188,10 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function cwd() {
|
||||
$cwd = $this->run_command('pwd');
|
||||
if ( $cwd ) {
|
||||
@@ -201,7 +211,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $group
|
||||
* @param bool $recursive
|
||||
* @param bool $recursive
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function chgrp($file, $group, $recursive = false ) {
|
||||
if ( ! $this->exists($file) )
|
||||
@@ -213,8 +225,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param int $mode
|
||||
* @param bool $recursive
|
||||
* @param int $mode
|
||||
* @param bool $recursive
|
||||
* @return bool|string
|
||||
*/
|
||||
public function chmod($file, $mode = false, $recursive = false) {
|
||||
@@ -289,9 +301,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param bool $overwrite
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param bool $overwrite
|
||||
* @param int|bool $mode
|
||||
* @return bool
|
||||
*/
|
||||
@@ -307,7 +319,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
/**
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param bool $overwrite
|
||||
* @param bool $overwrite
|
||||
* @return bool
|
||||
*/
|
||||
public function move($source, $destination, $overwrite = false) {
|
||||
@@ -315,8 +327,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param bool $recursive
|
||||
* @param string $file
|
||||
* @param bool $recursive
|
||||
* @param string|bool $type
|
||||
* @return bool
|
||||
*/
|
||||
@@ -403,8 +415,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param int $time
|
||||
* @param int $atime
|
||||
* @param int $time
|
||||
* @param int $atime
|
||||
*/
|
||||
public function touch($file, $time = 0, $atime = 0) {
|
||||
//Not implemented.
|
||||
@@ -412,9 +424,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param mixed $chmod
|
||||
* @param mixed $chown
|
||||
* @param mixed $chgrp
|
||||
* @param mixed $chmod
|
||||
* @param mixed $chown
|
||||
* @param mixed $chgrp
|
||||
* @return bool
|
||||
*/
|
||||
public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) {
|
||||
@@ -435,7 +447,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param bool $recursive
|
||||
* @param bool $recursive
|
||||
* @return bool
|
||||
*/
|
||||
public function rmdir($path, $recursive = false) {
|
||||
@@ -444,8 +456,8 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param bool $include_hidden
|
||||
* @param bool $recursive
|
||||
* @param bool $include_hidden
|
||||
* @param bool $recursive
|
||||
* @return bool|array
|
||||
*/
|
||||
public function dirlist($path, $include_hidden = true, $recursive = false) {
|
||||
|
||||
Reference in New Issue
Block a user