filesystem_method
Filters the filesystem method to use.
Использование
add_filter( 'filesystem_method', 'wp_kama_filesystem_method_filter', 10, 4 ); /** * Function for `filesystem_method` filter-hook. * * @param string $method Filesystem method to return. * @param array $args An array of connection details for the method. * @param string $context Full path to the directory that is tested for being writable. * @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable. * * @return string */ function wp_kama_filesystem_method_filter( $method, $args, $context, $allow_relaxed_file_ownership ){ // filter... return $method; }
- $method(строка)
- Filesystem method to return.
- $args(массив)
- An array of connection details for the method.
- $context(строка)
- Full path to the directory that is tested for being writable.
- $allow_relaxed_file_ownership(true|false)
- Whether to allow Group/World writable.
Список изменений
С версии 2.6.0 | Введена. |
Где вызывается хук
filesystem_method
wp-admin/includes/file.php 2338
return apply_filters( 'filesystem_method', $method, $args, $context, $allow_relaxed_file_ownership );