Docs: Clarify that `get_the_category_list()` and `the_category()` display links as an unordered list by default.
See #39130. Built from https://develop.svn.wordpress.org/trunk@40043 git-svn-id: http://core.svn.wordpress.org/trunk@39980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cff9bc5a43
commit
47aab2faad
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40042';
|
||||
$wp_version = '4.8-alpha-40043';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue