wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_delete_file › WordPress Function

Seit4.2.0
Veraltetn/v
wp_delete_file ( $file )
Parameter:
  • (string) $file The path to the file to delete.
    Erforderlich: Ja
Definiert in:
Codex:

Deletes a file.



Quellcode

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