filesystem_method
云策文档标注
概述
filesystem_method 是一个 WordPress 过滤器,用于动态控制文件系统方法的选择。它允许开发者根据连接参数和上下文条件,自定义文件读写操作的处理方式。
关键要点
- 过滤器名称:filesystem_method
- 参数:$method(文件系统方法字符串)、$args(连接详情数组)、$context(目录路径字符串)、$allow_relaxed_file_ownership(是否允许宽松文件所有权布尔值)
- 用途:在 get_filesystem_method() 函数中调用,决定文件系统操作的方法
- 引入版本:WordPress 2.6.0
原文内容
Filters the filesystem method to use.
Parameters
$methodstring-
Filesystem method to return.
$argsarray-
An array of connection details for the method.
$contextstring-
Full path to the directory that is tested for being writable.
$allow_relaxed_file_ownershipbool-
Whether to allow Group/World writable.
Source
return apply_filters( 'filesystem_method', $method, $args, $context, $allow_relaxed_file_ownership );
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |