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 |
---|---|
377 | /** |
378 | * Filter the source file location for the upgrade package. |
379 | * |
380 | * @since 2.8.0 |
381 | * |
382 | * @param string $source File source location. |
383 | * @param string $remote_source Remove file source location. |
384 | * @param WP_Upgrader $this WP_Upgrader instance. |
385 | */ |
386 | $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this ); |
387 | if ( is_wp_error( $source ) ) { |
388 | return $source; |
389 | } |
390 |
|
391 | // Has the source location changed? If so, we need a new source_files list. |
392 | if ( $source !== $remote_source ) { |
393 | $source_files = array_keys( $wp_filesystem->dirlist( $source ) ); |
394 | } |
395 | /* |