Docs: Clarify that `get_the_category_list()` and `the_category()` display links as an unordered list by default.

See #39130.

git-svn-id: https://develop.svn.wordpress.org/trunk@40043 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-02-05 15:15:45 +00:00
parent d20d535e24
commit bdae9cd0fd
1 changed files with 8 additions and 6 deletions

View File

@ -113,18 +113,19 @@ function get_the_category_by_ID( $cat_ID ) {
}
/**
* Retrieve category list in either HTML list or custom format.
* Retrieve category list for a post in either HTML list or custom format.
*
* @since 1.5.1
*
* @global WP_Rewrite $wp_rewrite
*
* @param string $separator Optional, default is empty string. Separator for between the categories.
* @param string $separator Optional. Separator between the categories. By default, the links are placed
* in an unordered list. An empty string will result in the default behavior.
* @param string $parents Optional. How to display the parents.
* @param int $post_id Optional. Post ID to retrieve categories.
* @return string
*/
function get_the_category_list( $separator = '', $parents='', $post_id = false ) {
function get_the_category_list( $separator = '', $parents = '', $post_id = false ) {
global $wp_rewrite;
if ( ! is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) {
/** This filter is documented in wp-includes/category-template.php */
@ -236,15 +237,16 @@ function in_category( $category, $post = null ) {
}
/**
* Display the category list for the post.
* Display category list for a post in either HTML list or custom format.
*
* @since 0.71
*
* @param string $separator Optional, default is empty string. Separator for between the categories.
* @param string $separator Optional. Separator between the categories. By default, the links are placed
* in an unordered list. An empty string will result in the default behavior.
* @param string $parents Optional. How to display the parents.
* @param int $post_id Optional. Post ID to retrieve categories.
*/
function the_category( $separator = '', $parents='', $post_id = false ) {
function the_category( $separator = '', $parents = '', $post_id = false ) {
echo get_the_category_list( $separator, $parents, $post_id );
}