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 |
---|---|
2540 | * from the filesystem and return the passed value instead. |
2541 | * |
2542 | * @since 5.5.0 |
2543 | * |
2544 | * @param array|null $files The list of files to use for filename comparisons. |
2545 | * Default null (to retrieve the list from the filesystem). |
2546 | * @param string $dir The directory for the new file. |
2547 | * @param string $filename The proposed filename for the new file. |
2548 | */ |
2549 | $files = apply_filters( 'pre_wp_unique_filename_file_list', null, $dir, $filename ); |
2550 |
|
2551 | if ( null === $files ) { |
2552 | // List of all files and directories contained in $dir. |
2553 | $files = @scandir( $dir ); |
2554 | } |
2555 |
|
2556 | if ( ! empty( $files ) ) { |
2557 | // Remove "dot" dirs. |
2558 | $files = array_diff( $files, array( '.', '..' ) ); |