pre_move_uploaded_file
过滤钩子
apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type )
- 参数
-
-
(mixed)
$move_new_file
If null (default) move the file after the upload.- Required: 是
-
(array)
$file
{
Reference to a single element from `$_FILES`.@type string $name The original name of the file on the client machine.
@type string $type The mime type of the file, if the browser provided this information.
@type string $tmp_name The temporary filename of the file in which the uploaded file was stored on the server.
@type int $size The size, in bytes, of the uploaded file.
@type int $error The error code associated with this file upload.
}- Required: 是
-
(string)
$new_file
Filename of the newly-uploaded file.- Required: 是
-
(string)
$type
Mime type of the newly-uploaded file.- Required: 是
-
(mixed)
- 定义位置
-
-
wp-admin/includes/file.php
, line 980
-
wp-admin/includes/file.php
- 引入
- 4.9.0
- 弃用
- –
Filters whether to short-circuit moving the uploaded file after passing all checks.
If a non-null value is returned from the filter, moving the file and any related
error reporting will be completely skipped.
$move_new_file = apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type );
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。