Changeset 31357
- Timestamp:
- 02/06/2015 09:03:26 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r31188 r31357 297 297 * 298 298 * @param string|array $args { 299 * Array of arguments. 300 * @type string $show_option_all Optional. Text to display for showing all categories. 301 * Default is an empty string. 302 * @type string $show_option_none Optional. Text to display for showing no categories. 303 * Default is an empty string. 304 * @type string $option_none_value Optional. Value to use when no category is selected. 305 * Default is an empty string. 306 * @type string $orderby Optional. Which column to use for ordering categories. 307 * See {@see get_terms()} for list of accepted values. Default: 'id' (term_id). 308 * @type string $order Optional. Whether to order terms in ascending or descending order. 309 * Accepts 'ASC' or 'DESC'. Default 'ASC'. 310 * @type bool $pad_counts Optional. See {@see get_terms()} for description. Default: false. 311 * @type bool|int $show_count Optional. Whether to include post counts. Accepts 0, 1, or their bool 299 * Optional. Array or string of arguments to generate a categories drop-down element. 300 * 301 * @type string $show_option_all Text to display for showing all categories. Default empty. 302 * @type string $show_option_none Text to display for showing no categories. Default empty. 303 * @type string $option_none_value Value to use when no category is selected. Default empty. 304 * @type string $orderby Which column to use for ordering categories. See get_terms() for a list 305 * of accepted values. Default 'id' (term_id). 306 * @type string $order Whether to order terms in ascending or descending order. Accepts 'ASC' 307 * or 'DESC'. Default 'ASC'. 308 * @type bool $pad_counts See get_terms() for an argument description. Default false. 309 * @type bool|int $show_count Whether to include post counts. Accepts 0, 1, or their bool equivalents. 310 * Default 0. 311 * @type bool|int $hide_empty Whether to hide categories that don't have any posts. Accepts 0, 1, or 312 * their bool equivalents. Default 1. 313 * @type int $child_of Term ID to retrieve child terms of. See get_terms(). Default 0. 314 * @type array|string $exclude Array or comma/space-separated string of term ids to exclude. 315 * If `$include` is non-empty, `$exclude` is ignored. Default empty array. 316 * @type bool|int $echo Whether to echo or return the generated markup. Accepts 0, 1, or their 317 * bool equivalents. Default 1. 318 * @type bool|int $hierarchical Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or their bool 312 319 * equivalents. Default 0. 313 * @type bool|int $hide_empty Optional. Whether to hide categories that don't have any posts. 314 * Accepts 0, 1, or their bool equivalents. Default 1. 315 * @type int $child_of Optional. Term ID to retrieve child terms of. See {@see get_terms()}. 316 * Default 0. 317 * @type array|string $exclude Optional. Array or comma/space-separated string of term ids to exclude. 318 * If $include is non-empty, $exclude is ignored. 319 * Default empty array. 320 * @type bool|int $echo Optional. Whether to echo or return the generated markup. Accepts 0, 1, 321 * or their bool equivalents. Default 1. 322 * @type bool|int $hierarchical Optional. Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or 323 * their bool equivalents. Default: 0. 324 * @type int $depth Optional. Maximum depth. Default 0. 325 * @type int $tab_index Optional. Tab index for the select element. Default 0 (no tabindex). 326 * @type string $name Optional. Value for the 'name' attribute of the select element. 327 * Default: 'cat'. 328 * @type string $id Optional. Value for the 'id' attribute of the select element. 329 * Defaults to the value of $name. 330 * @type string $class Optional. Value for the 'class' attribute of the select element. 331 * @type int|string $selected Optional. Value of the option that should be selected. 332 * @type string $value_field Optional. Term field that should be used to populate the 'value' attribute 320 * @type int $depth Maximum depth. Default 0. 321 * @type int $tab_index Tab index for the select element. Default 0 (no tabindex). 322 * @type string $name Value for the 'name' attribute of the select element. Default 'cat'. 323 * @type string $id Value for the 'id' attribute of the select element. Defaults to the value 324 * of `$name`. 325 * @type string $class Value for the 'class' attribute of the select element. Default 'postform'. 326 * @type int|string $selected Value of the option that should be selected. Default 0. 327 * @type string $value_field Term field that should be used to populate the 'value' attribute 333 328 * of the option elements. Accepts any valid term field: 'term_id', 'name', 334 329 * 'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description', 335 330 * 'parent', 'count'. Default 'term_id'. 336 * @type string $taxonomy Optional.Name of the category to retrieve. Default 'category'.337 * @type bool $hide_if_empty Optional.True to skip generating markup if no categories are found.331 * @type string $taxonomy Name of the category to retrieve. Default 'category'. 332 * @type bool $hide_if_empty True to skip generating markup if no categories are found. 338 333 * Default false (create select element even if no categories are found). 339 *340 334 * } 341 335 * @return string HTML content only if 'echo' argument is 0.
Note: See TracChangeset
for help on using the changeset viewer.