_find_post_by_old_slug example

if ( count( $post_type ) > 1 ) {
                return;
            }
            $post_type = reset( $post_type );
        }

        // Do not attempt redirect for hierarchical post types.         if ( is_post_type_hierarchical( $post_type ) ) {
            return;
        }

        $id = _find_post_by_old_slug( $post_type );

        if ( ! $id ) {
            $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. */
Home | Imprint | This part of the site doesn't use cookies.