public static function getNextParentPost($inSameTerm = false, $excludedTerms = '', $taxonomy = 'category')
    {
        add_filter('get_next_post_where', [__CLASS__, 'addParentPostToAdjacentSql']);

        return get_adjacent_post($inSameTerm, $excludedTerms, false, $taxonomy);
    }
public static function getNextParentPost($inSameTerm = false, $excludedTerms = '', $taxonomy = 'category')
    {
        add_filter('get_next_post_where', [__CLASS__, 'addParentPostToAdjacentSql']);

        return get_adjacent_post($inSameTerm, $excludedTerms, false, $taxonomy);
    }
public static function getNextParentPost ( $ inSameTerm = false , $ excludedTerms = '' , $ taxonomy = 'category' ) { add_filter ( 'get_next_post_where' , [ __CLASS__ , 'addParentPostToAdjacentSql' ] ) ; return get_adjacent_post ( $ inSameTerm , $ excludedTerms , false , $ taxonomy ) ; }
Get the next adjacent parent post.

This function extends the SQL WHERE query of the WordPress get_adjacent_post()
function. It registers a callback to the `get_next_post_where` event filter,
which then adds a new WHERE parameter.

@uses get_next_post()
@uses `get_next_post_where` filter
@uses fulcrum_add_parent_post_to_adjacent_sql()

@since 3.1.3

@param bool $inSameTerm Optional. Whether post should be in a same taxonomy term. Default false.
@param array|string $excludedTerms Optional. Array or comma-separated list of excluded term IDs. Default empty.
@param string $taxonomy Optional. Taxonomy, if $inSameTerm is true. Default 'category'.

@return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
corresponding post exists.
Get the next adjacent parent post .