WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2633 | * from the filesystem and return the passed value instead. |
2634 | * |
2635 | * @since 5.5.0 |
2636 | * |
2637 | * @param array|null $files The list of files to use for filename comparisons. |
2638 | * Default null (to retrieve the list from the filesystem). |
2639 | * @param string $dir The directory for the new file. |
2640 | * @param string $filename The proposed filename for the new file. |
2641 | */ |
2642 | $files = apply_filters( 'pre_wp_unique_filename_file_list', null, $dir, $filename ); |
2643 |
|
2644 | if ( null === $files ) { |
2645 | // List of all files and directories contained in $dir. |
2646 | $files = @scandir( $dir ); |
2647 | } |
2648 |
|
2649 | if ( ! empty( $files ) ) { |
2650 | // Remove "dot" dirs. |
2651 | $files = array_diff( $files, array( '.', '..' ) ); |