Changeset 40043
- Timestamp:
- 02/05/2017 03:15:45 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r40028 r40043 114 114 115 115 /** 116 * Retrieve category list in either HTML list or custom format.116 * Retrieve category list for a post in either HTML list or custom format. 117 117 * 118 118 * @since 1.5.1 … … 120 120 * @global WP_Rewrite $wp_rewrite 121 121 * 122 * @param string $separator Optional, default is empty string. Separator for between the categories. 122 * @param string $separator Optional. Separator between the categories. By default, the links are placed 123 * in an unordered list. An empty string will result in the default behavior. 123 124 * @param string $parents Optional. How to display the parents. 124 125 * @param int $post_id Optional. Post ID to retrieve categories. 125 126 * @return string 126 127 */ 127 function get_the_category_list( $separator = '', $parents ='', $post_id = false ) {128 function get_the_category_list( $separator = '', $parents = '', $post_id = false ) { 128 129 global $wp_rewrite; 129 130 if ( ! is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) { … … 237 238 238 239 /** 239 * Display the category list for the post.240 * Display category list for a post in either HTML list or custom format. 240 241 * 241 242 * @since 0.71 242 243 * 243 * @param string $separator Optional, default is empty string. Separator for between the categories. 244 * @param string $separator Optional. Separator between the categories. By default, the links are placed 245 * in an unordered list. An empty string will result in the default behavior. 244 246 * @param string $parents Optional. How to display the parents. 245 247 * @param int $post_id Optional. Post ID to retrieve categories. 246 248 */ 247 function the_category( $separator = '', $parents ='', $post_id = false ) {249 function the_category( $separator = '', $parents = '', $post_id = false ) { 248 250 echo get_the_category_list( $separator, $parents, $post_id ); 249 251 }
Note: See TracChangeset
for help on using the changeset viewer.