Category Template Tags and API.
| Class | Description |
|---|---|
| Walker_Category | Create HTML list of categories. |
| Walker_CategoryDropdown | Create HTML dropdown list of Categories. |
Retrieve category description.
Default topic count scaling for tag links
Default text for tooltip for tag links
Retrieve category link URL.
Retrieve category parents with separator.
Retrieve the link to the tag.
Retrieve post categories.
Retrieve category name based on category ID.
Retrieve category list in either HTML list or custom format.
Retrieve the tags for a post.
Retrieve the tags for a post formatted as a string.
Retrieve the terms of the taxonomy that are attached to the post.
Retrieve a post's terms as a list with specified format.
Check if the current post has any of given category.
Check if the current post has any of given tags.
The given tags are checked against the post's tags' term_ids, names and slugs. Tags given as integers will only be checked against the post's tags' term_ids. If no tags are given, determines if post has any tags.
Prior to v2.7 of WordPress, tags given as integers would also be checked against the post's tags' names and slugs (in addition to term_ids) Prior to v2.7, this function could only be used in the WordPress Loop. As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
Check if the current post has any of given terms.
The given terms are checked against the post's terms' term_ids, names and slugs. Terms given as integers will only be checked against the post's terms' term_ids. If no terms are given, determines if post has any terms.
Check if the current post in within any of the given categories.
The given categories are checked against the post's categories' term_ids, names and slugs. Categories given as integers will only be checked against the post's categories' term_ids.
Prior to v2.5 of WordPress, category names were not supported. Prior to v2.7, category slugs were not supported. Prior to v2.7, only one category could be compared: in_category( $single_category ). Prior to v2.7, this function could only be used in the WordPress Loop. As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
Retrieve tag description.
Retrieve term description.
Display the category list for the post.
Retrieve the tags for a post.
Display the terms in a list.
Retrieve HTML dropdown (select) content for category list.
Retrieve HTML list content for category list.
Display or retrieve the HTML dropdown list of categories.
The list of arguments is below: 'show_option_all' (string) - Text to display for showing all categories. 'show_option_none' (string) - Text to display for showing no categories. 'orderby' (string) default is 'ID' - What column to use for ordering the categories. 'order' (string) default is 'ASC' - What direction to order categories. 'show_count' (bool|int) default is 0 - Whether to show how many posts are in the category. 'hide_empty' (bool|int) default is 1 - Whether to hide categories that don't have any posts attached to them. 'child_of' (int) default is 0 - See get_categories(). 'exclude' (string) - See get_categories(). 'echo' (bool|int) default is 1 - Whether to display or retrieve content. 'depth' (int) - The max depth. 'tab_index' (int) - Tab index for select element. 'name' (string) - The name attribute value for select element. 'id' (string) - The ID attribute value for select element. Defaults to name if omitted. 'class' (string) - The class attribute value for select element. 'selected' (int) - Which category ID is selected. 'taxonomy' (string) - The name of the taxonomy to retrieve. Defaults to category.
The 'hierarchical' argument, which is disabled by default, will override the depth argument, unless it is true. When the argument is false, it will display all of the categories. When it is enabled it will use the value in the 'depth' argument.
Generates a tag cloud (heatmap) from provided data.
The text size is set by the 'smallest' and 'largest' arguments, which will use the 'unit' argument value for the CSS text size unit. The 'format' argument can be 'flat' (default), 'list', or 'array'. The flat value for the 'format' argument will separate tags with spaces. The list value for the 'format' argument will format the tags in a UL HTML list. The array value for the 'format' argument will return in PHP array type format.
The 'tag_cloud_sort' filter allows you to override the sorting. Passed to the filter: $tags array and $args array, has to return the $tags array after sorting it.
The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'. The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC' or 'RAND'.
The 'number' argument is how many tags to return. By default, the limit will be to return the entire tag cloud list.
The 'topic_count_text_callback' argument is a function, which given the count of the posts with that tag returns a text for the tooltip of the tag link.
Display or retrieve the HTML list of categories.
The list of arguments is below: 'show_option_all' (string) - Text to display for showing all categories. 'orderby' (string) default is 'ID' - What column to use for ordering the categories. 'order' (string) default is 'ASC' - What direction to order categories. 'show_count' (bool|int) default is 0 - Whether to show how many posts are in the category. 'hide_empty' (bool|int) default is 1 - Whether to hide categories that don't have any posts attached to them. 'use_desc_for_title' (bool|int) default is 1 - Whether to use the description instead of the category title. 'feed' - See get_categories(). 'feed_type' - See get_categories(). 'feed_image' - See get_categories(). 'child_of' (int) default is 0 - See get_categories(). 'exclude' (string) - See get_categories(). 'exclude_tree' (string) - See get_categories(). 'echo' (bool|int) default is 1 - Whether to display or retrieve content. 'current_category' (int) - See get_categories(). 'hierarchical' (bool) - See get_categories(). 'title_li' (string) - See get_categories(). 'depth' (int) - The max depth.
Display tag cloud.
The text size is set by the 'smallest' and 'largest' arguments, which will use the 'unit' argument value for the CSS text size unit. The 'format' argument can be 'flat' (default), 'list', or 'array'. The flat value for the 'format' argument will separate tags with spaces. The list value for the 'format' argument will format the tags in a UL HTML list. The array value for the 'format' argument will return in PHP array type format.
The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'. The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC'.
The 'number' argument is how many tags to return. By default, the limit will be to return the top 45 tags in the tag cloud list.
The 'topic_count_text_callback' argument is a function, which, given the count of the posts with that tag, returns a text for the tooltip of the tag link.
The 'exclude' and 'include' arguments are used for the get_tags() function. Only one should be used, because only one will be used and the other ignored, if they are both set.
Documentation generated on Tue, 15 May 2012 23:17:43 +0000 by phpDocumentor 1.4.1