wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_delete_file › WordPress Function

Da4.2.0
Deprecaton/a
› wp_delete_file ( $file )
Parametri:
  • (string) $file The path to the file to delete.
    Richiesto: Sì
Ritorna:
  • (bool) True on success, false on failure.
Definito a:
Codex:
ChangeLog:
  • 6.7.0

Deletes a file.



Sorgenti

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 ) ) {
		return @unlink( $delete );
	}

	return false;
}