old_slug_redirect_post_id WordPress Filter Hook
The old_slug_redirect_post_id hook is used to redirect users to the new post URL if they try to access the old post URL. This can be useful if you change the permalink structure of your site and want to make sure that users are redirected to the new URL.
apply_filters( 'old_slug_redirect_post_id', int $id ) #
Filters the old slug redirect post ID.
Parameters
- $id
(int)The redirect post ID.
Source
File: wp-includes/query.php
Changelog
Version | Description |
---|---|
4.9.3 | Introduced. |