Changeset 20549
- Timestamp:
- 04/20/2012 10:06:05 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r20023 r20549 996 996 * @param string $sep Optional. Between tags. 997 997 * @param string $after Optional. After tags. 998 * @param int $id Optional. Post ID. Defaults to the current post. 998 999 * @return string 999 1000 */ 1000 function get_the_tag_list( $before = '', $sep = '', $after = '' ) {1001 return apply_filters( 'the_tags', get_the_term_list( 0, 'post_tag', $before, $sep, $after ), $before, $sep, $after);1001 function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) { 1002 return apply_filters( 'the_tags', get_the_term_list( $id, 'post_tag', $before, $sep, $after ), $before, $sep, $after, $id ); 1002 1003 } 1003 1004 … … 1054 1055 * @since 2.5.0 1055 1056 * 1056 * @param int $id Post ID. Is not optional.1057 * @param int $id Post ID. 1057 1058 * @param string $taxonomy Taxonomy name. 1058 1059 * @return array|bool False on failure. Array of term objects on success. 1059 1060 */ 1060 function get_the_terms( $id = 0, $taxonomy ) {1061 function get_the_terms( $id, $taxonomy ) { 1061 1062 global $post; 1062 1063 … … 1064 1065 1065 1066 if ( !$id ) { 1066 if ( !$post->ID)1067 if ( empty( $post->ID ) ) 1067 1068 return false; 1068 1069 else … … 1096 1097 * @return string 1097 1098 */ 1098 function get_the_term_list( $id = 0, $taxonomy, $before = '', $sep = '', $after = '' ) {1099 function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) { 1099 1100 $terms = get_the_terms( $id, $taxonomy ); 1100 1101 … … 1129 1130 * @return null|bool False on WordPress error. Returns null when displaying. 1130 1131 */ 1131 function the_terms( $id = 0, $taxonomy, $before = '', $sep = ', ', $after = '' ) {1132 function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) { 1132 1133 $term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after ); 1133 1134
Note: See TracChangeset
for help on using the changeset viewer.