Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_delete_file ›

Desde4.2.0
Obsoleton/a
wp_delete_file ( $file )
Parâmetros:
  • (string) $file The path to the file to delete.
    Required: Yes
Definido em:
Codex:

Delete a file



Fonte

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 );
	}
}