Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: do_redirect_guess_404_permalink

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
885       *
886       * Returning a false value from the filter will disable the URL guessing
887       * and return early without performing a redirect.
888       *
889       * @since 5.5.0
890       *
891       * @param bool $do_redirect_guess Whether to attempt to guess a redirect URL
892       *                                for a 404 request. Default true.
893       */
894      if ( false === apply_filters( 'do_redirect_guess_404_permalink', true ) ) {
895           return false;
896      }
897
898      /**
899       * Short-circuits the redirect URL guessing for 404 requests.
900       *
901       * Returning a non-null value from the filter will effectively short-circuit
902       * the URL guessing, returning the passed value instead.
903       *