Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: old_slug_redirect_url

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
4938           }
4939
4940           /**
4941            * Filter the old slug redirect URL.
4942            *
4943            * @since 4.4.0
4944            *
4945            * @param string $link The redirect URL.
4946            */
4947           $link = apply_filters( 'old_slug_redirect_url', $link );
4948
4949           if ( ! $link ) {
4950                return;
4951           }
4952
4953           wp_redirect( $link, 301 ); // Permanent redirect
4954           exit;
4955      endif;
4956 }