@@ 1768-1771 (lines=4) @@ | ||
1765 | * @return string|void The adjacent post relational link URL. |
|
1766 | */ |
|
1767 | function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { |
|
1768 | if ( $previous && is_attachment() && $post = get_post() ) |
|
1769 | $post = get_post( $post->post_parent ); |
|
1770 | else |
|
1771 | $post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy ); |
|
1772 | ||
1773 | if ( empty( $post ) ) |
|
1774 | return; |
|
@@ 2010-2013 (lines=4) @@ | ||
2007 | * @return string The link URL of the previous or next post in relation to the current post. |
|
2008 | */ |
|
2009 | function get_adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { |
|
2010 | if ( $previous && is_attachment() ) |
|
2011 | $post = get_post( get_post()->post_parent ); |
|
2012 | else |
|
2013 | $post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy ); |
|
2014 | ||
2015 | if ( ! $post ) { |
|
2016 | $output = ''; |