Changeset 28574 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 05/25/2014 04:09:07 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/link-template.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r28327 r28574 1752 1752 * @return string 1753 1753 */ 1754 function get_previous_post_link( $format = '« %link', $link = '%title', $in_same_ cat= false, $excluded_terms = '', $taxonomy = 'category' ) {1755 return get_adjacent_post_link( $format, $link, $in_same_ cat, $excluded_terms, true, $taxonomy );1754 function get_previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { 1755 return get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, true, $taxonomy ); 1756 1756 } 1757 1757 … … 1768 1768 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1769 1769 */ 1770 function previous_post_link( $format = '« %link', $link = '%title', $in_same_ cat= false, $excluded_terms = '', $taxonomy = 'category' ) {1771 echo get_previous_post_link( $format, $link, $in_same_ cat, $excluded_terms, $taxonomy );1770 function previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { 1771 echo get_previous_post_link( $format, $link, $in_same_term, $excluded_terms, $taxonomy ); 1772 1772 } 1773 1773 … … 1784 1784 * @return string 1785 1785 */ 1786 function get_next_post_link( $format = '%link »', $link = '%title', $in_same_ cat= false, $excluded_terms = '', $taxonomy = 'category' ) {1787 return get_adjacent_post_link( $format, $link, $in_same_ cat, $excluded_terms, false, $taxonomy );1786 function get_next_post_link( $format = '%link »', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { 1787 return get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, false, $taxonomy ); 1788 1788 } 1789 1789 … … 1800 1800 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1801 1801 */ 1802 function next_post_link( $format = '%link »', $link = '%title', $in_same_ cat= false, $excluded_terms = '', $taxonomy = 'category' ) {1803 echo get_next_post_link( $format, $link, $in_same_ cat, $excluded_terms, $taxonomy );1802 function next_post_link( $format = '%link »', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { 1803 echo get_next_post_link( $format, $link, $in_same_term, $excluded_terms, $taxonomy ); 1804 1804 } 1805 1805 … … 1819 1819 * @return string 1820 1820 */ 1821 function get_adjacent_post_link( $format, $link, $in_same_ cat= false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {1821 function get_adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { 1822 1822 if ( $previous && is_attachment() ) 1823 1823 $post = get_post( get_post()->post_parent ); 1824 1824 else 1825 $post = get_adjacent_post( $in_same_ cat, $excluded_terms, $previous, $taxonomy );1825 $post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy ); 1826 1826 1827 1827 if ( ! $post ) { … … 1875 1875 * @param string $format Link anchor format. 1876 1876 * @param string $link Link permalink format. 1877 * @param bool $in_same_ cat Optional. Whether link should be in a same category.1877 * @param bool $in_same_term Optional. Whether link should be in a taxonomy term. 1878 1878 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. 1879 1879 * @param bool $previous Optional. Whether to display link to previous or next post. Default true. … … 1881 1881 * @return string 1882 1882 */ 1883 function adjacent_post_link( $format, $link, $in_same_ cat= false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {1884 echo get_adjacent_post_link( $format, $link, $in_same_ cat, $excluded_terms, $previous, $taxonomy );1883 function adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { 1884 echo get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, $previous, $taxonomy ); 1885 1885 } 1886 1886
Note: See TracChangeset
for help on using the changeset viewer.