Changeset 47060 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 01/11/2020 06:30:58 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/category-template.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r46823 r47060 479 479 * 'current-cat' class. Default 0. 480 480 * @type int $depth Category depth. Used for tab indentation. Default 0. 481 * @type bool|int $echo True to echo markup, false to return it. Default 1. 481 * @type bool|int $echo Whether to echo or return the generated markup. Accepts 0, 1, or their 482 * bool equivalents. Default 1. 482 483 * @type array|string $exclude Array or comma/space-separated string of term IDs to exclude. 483 484 * If `$hierarchical` is true, descendants of `$exclude` terms will also … … 494 495 * the list. Default false (title will always be shown). 495 496 * @type string $separator Separator between links. Default '<br />'. 496 * @type bool|int $show_count Whether to show how many posts are in the category. Default 0. 497 * @type bool|int $show_count Whether to include post counts. Accepts 0, 1, or their bool equivalents. 498 * Default 0. 497 499 * @type string $show_option_all Text to display for showing all categories. Default empty string. 498 500 * @type string $show_option_none Text to display for the 'no categories' option. … … 504 506 * to disable. Default 'Categories'. 505 507 * @type bool|int $use_desc_for_title Whether to use the category description as the title attribute. 506 * Default 1.508 * Accepts 0, 1, or their bool equivalents. Default 1. 507 509 * } 508 * @return false|string HTML list of categories only if 'echo' argument is 0. 510 * @return void|string|false Void if 'echo' argument is true, HTML list of categories if 'echo' is false. 511 * False if the taxonomy does not exist. 509 512 */ 510 513 function wp_list_categories( $args = '' ) { … … 672 675 * @type bool $echo Whether or not to echo the return value. Default true. 673 676 * } 674 * @return void| array Generated tag cloud, only if no failures and 'array' is set for the 'format' argument.675 * Otherwise, this function outputs the tag cloud.677 * @return void|string|array Void if 'echo' argument is true, or on failure. Otherwise, tag cloud 678 * as a string or an array, depending on 'format' argument. 676 679 */ 677 680 function wp_tag_cloud( $args = '' ) { … … 693 696 'show_count' => 0, 694 697 ); 695 $args = wp_parse_args( $args, $defaults ); 698 699 $args = wp_parse_args( $args, $defaults ); 696 700 697 701 $tags = get_terms( … … 715 719 $link = get_term_link( intval( $tag->term_id ), $tag->taxonomy ); 716 720 } 721 717 722 if ( is_wp_error( $link ) ) { 718 723 return; … … 730 735 * @since 2.3.0 731 736 * 732 * @param string $return HTML output of the tag cloud.733 * @param array $args An array of tag cloud arguments.737 * @param string|array $return Tag cloud as a string or an array, depending on 'format' argument. 738 * @param array $args An array of tag cloud arguments. 734 739 */ 735 740 $return = apply_filters( 'wp_tag_cloud', $return, $args ); … … 1266 1271 * @since 2.5.0 1267 1272 * 1268 * @param int $idPost ID.1273 * @param int $id Post ID. 1269 1274 * @param string $taxonomy Taxonomy name. 1270 * @param string $before Optional. Before list.1271 * @param string $sep Optional. Separate items using this.1272 * @param string $after Optional. After list.1275 * @param string $before Optional. Before list. 1276 * @param string $sep Optional. Separate items using this. 1277 * @param string $after Optional. After list. 1273 1278 * @return string|false|WP_Error A list of terms on success, false if there are no terms, WP_Error on failure. 1274 1279 */ … … 1379 1384 * @since 2.5.0 1380 1385 * 1381 * @param int $idPost ID.1386 * @param int $id Post ID. 1382 1387 * @param string $taxonomy Taxonomy name. 1383 * @param string $before Optional. Before list.1384 * @param string $sep Optional. Separate items using this.1385 * @param string $after Optional. After list.1386 * @return false|voidFalse on WordPress error.1388 * @param string $before Optional. Before list. 1389 * @param string $sep Optional. Separate items using this. 1390 * @param string $after Optional. After list. 1391 * @return void|false False on WordPress error. 1387 1392 */ 1388 1393 function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) { … … 1413 1418 * 1414 1419 * @param string|int|array $category Optional. The category name/term_id/slug or array of them to check for. 1415 * @param int|object $postOptional. Post to check instead of the current post.1420 * @param int|object $post Optional. Post to check instead of the current post. 1416 1421 * @return bool True if the current post has any of the given categories (or any category, if no category specified). 1417 1422 */ … … 1437 1442 * @since 2.6.0 1438 1443 * 1439 * @param string|int|array $tag Optional. The tag name/term_id/slug or array of them to check for.1440 * @param int|object $post Optional. Post to check instead of the current post. (since 2.7.0)1444 * @param string|int|array $tag Optional. The tag name/term_id/slug or array of them to check for. 1445 * @param int|object $post Optional. Post to check instead of the current post. (since 2.7.0) 1441 1446 * @return bool True if the current post has any of the given tags (or any tag, if no tag specified). 1442 1447 */
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)