wphooks.info - old_slug_redirect_post_id

old_slug_redirect_post_id

(trunk - 5.0-alpha-42993)

*** New in trunk ***

The hook occurs in the following file:

wp-includes/query.php:
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
			$id = _find_post_by_old_date( $post_type );
		}

		/**
		 * Filters the old slug redirect post ID.
		 *
		 * @since 4.9.3
		 *
		 * @param int $id The redirect post ID.
		 */
		$id = apply_filters( 'old_slug_redirect_post_id', $id );

		if ( ! $id ) {
			return;
		}

		$link = get_permalink( $id );

		if ( get_query_var( 'paged' ) > 1 ) {
			$link = user_trailingslashit( trailingslashit( $link ) . 'page/' . get_query_var( 'paged' ) );