wpseek.com WordPress开发者和主题制作者的搜索引擎 功能 过滤器 动作 常量 XINGTwitterFacebookDelicious 通用信息 源码 wp_delete_file › WordPress FunctionSince4.2.0已弃用n/a› wp_delete_file ( $file )参数:(string) $file The path to the file to delete.Required: Yes定义在:wp-includes/functions.php , line 7585 文档:developer.wordpress.org / wp_delete_fileDeletes a file.Related Functions: wp_delete_site, wp_delete_link, wp_delete_user, wp_delete_term, _deprecated_file 源码 function wp_delete_file( $file ) { /** * Filters the path of the file to delete. * * @since 2.1.0 * * @param string $file Path to the file to delete. */ $delete = apply_filters( 'wp_delete_file', $file ); if ( ! empty( $delete ) ) { @unlink( $delete ); } }