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 |
---|---|
908 | * |
909 | * Returning a non-null value from the filter will effectively short-circuit |
910 | * the URL guessing, returning the passed value instead. |
911 | * |
912 | * @since 5.5.0 |
913 | * |
914 | * @param null|string|false $pre Whether to short-circuit guessing the redirect for a 404. |
915 | * Default null to continue with the URL guessing. |
916 | */ |
917 | $pre = apply_filters( 'pre_redirect_guess_404_permalink', null ); |
918 | if ( null !== $pre ) { |
919 | return $pre; |
920 | } |
921 |
|
922 | if ( get_query_var( 'name' ) ) { |
923 | /** |
924 | * Filters whether to perform a strict guess for a 404 redirect. |
925 | * |
926 | * Returning a truthy value from the filter will redirect only exact post_name matches. |