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 |
|---|---|
| 921 | /** |
| 922 | * Filters whether to perform a strict guess for a 404 redirect. |
| 923 | * |
| 924 | * Returning a truthy value from the filter will redirect only exact post_name matches. |
| 925 | * |
| 926 | * @since 5.5.0 |
| 927 | * |
| 928 | * @param bool $strict_guess Whether to perform a strict guess. Default false (loose guess). |
| 929 | */ |
| 930 | $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false ); |
| 931 | |
| 932 | if ( $strict_guess ) { |
| 933 | $where = $wpdb->prepare( 'post_name = %s', get_query_var( 'name' ) ); |
| 934 | } else { |
| 935 | $where = $wpdb->prepare( 'post_name LIKE %s', $wpdb->esc_like( get_query_var( 'name' ) ) . '%' ); |
| 936 | } |
| 937 | |
| 938 | // If any of post_type, year, monthnum, or day are set, use them to refine the query. |
| 939 | if ( get_query_var( 'post_type' ) ) { |