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 |
---|---|
580 | * |
581 | * @since 2.8.0 |
582 | * @since 4.4.0 The $hook_extra parameter became available. |
583 | * |
584 | * @param string $source File source location. |
585 | * @param string $remote_source Remote file source location. |
586 | * @param WP_Upgrader $upgrader WP_Upgrader instance. |
587 | * @param array $hook_extra Extra arguments passed to hooked filters. |
588 | */ |
589 | $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] ); |
590 |
|
591 | if ( is_wp_error( $source ) ) { |
592 | return $source; |
593 | } |
594 |
|
595 | if ( ! empty( $args['hook_extra']['temp_backup'] ) ) { |
596 | $temp_backup = $this->move_to_temp_backup_dir( $args['hook_extra']['temp_backup'] ); |
597 |
|
598 | if ( is_wp_error( $temp_backup ) ) { |