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 |
---|---|
866 | * |
867 | * Returning a non-null value from the filter will effectively short-circuit |
868 | * the URL guessing, returning the passed value instead. |
869 | * |
870 | * @since 5.5.0 |
871 | * |
872 | * @param null|string|false $pre Whether to short-circuit guessing the redirect for a 404. |
873 | * Default null to continue with the URL guessing. |
874 | */ |
875 | $pre = apply_filters( 'pre_redirect_guess_404_permalink', null ); |
876 | if ( null !== $pre ) { |
877 | return $pre; |
878 | } |
879 |
|
880 | if ( get_query_var( 'name' ) ) { |
881 | /** |
882 | * Filters whether to perform a strict guess for a 404 redirect. |
883 | * |
884 | * Returning a truthy value from the filter will redirect only exact post_name matches. |