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 |
|---|---|
| 879 | /** |
| 880 | * Filters whether to perform a strict guess for a 404 redirect. |
| 881 | * |
| 882 | * Returning a truthy value from the filter will redirect only exact post_name matches. |
| 883 | * |
| 884 | * @since 5.5.0 |
| 885 | * |
| 886 | * @param bool $strict_guess Whether to perform a strict guess. Default false (loose guess). |
| 887 | */ |
| 888 | $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false ); |
| 889 | |
| 890 | if ( $strict_guess ) { |
| 891 | $where = $wpdb->prepare( 'post_name = %s', get_query_var( 'name' ) ); |
| 892 | } else { |
| 893 | $where = $wpdb->prepare( 'post_name LIKE %s', $wpdb->esc_like( get_query_var( 'name' ) ) . '%' ); |
| 894 | } |
| 895 | |
| 896 | // If any of post_type, year, monthnum, or day are set, use them to refine the query. |
| 897 | if ( get_query_var( 'post_type' ) ) { |