WP_Filesystem_FTPext::ownerpublicWP 2.5.0

Gets the file owner.

Метод класса: WP_Filesystem_FTPext{}

Хуков нет.

Возвращает

string|int<1, max>|false. Username of the owner on success, false on failure.

Использование

$WP_Filesystem_FTPext = new WP_Filesystem_FTPext();
$WP_Filesystem_FTPext->owner( $file );
$file(строка) (обязательный)
Path to the file.

Список изменений

С версии 2.5.0 Введена.

Код WP_Filesystem_FTPext::owner() WP 7.1

public function owner( $file ) {
	$dir = $this->dirlist( $file );

	return $dir[ $file ]['owner'] ?? '';
}