| 363 | |
| 364 | |
| 365 | /** |
| 366 | * Filter the taxonomy parent drop-down on the Post Edit page. |
| 367 | * |
| 368 | * @since 3.7.0 |
| 369 | * |
| 370 | * @param string|array $args { |
| 371 | * Optional. Array or string of arguments to generate a categories drop-down element. |
| 372 | * |
| 373 | * @type string $show_option_all Text to display for showing all categories. Default empty. |
| 374 | * @type string $show_option_none Text to display for showing no categories. Default empty. |
| 375 | * @type string $option_none_value Value to use when no category is selected. Default empty. |
| 376 | * @type string $orderby Which column to use for ordering categories. See get_terms() for a list |
| 377 | * of accepted values. Default 'id' (term_id). |
| 378 | * @type string $order Whether to order terms in ascending or descending order. Accepts 'ASC' |
| 379 | * or 'DESC'. Default 'ASC'. |
| 380 | * @type bool $pad_counts See get_terms() for an argument description. Default false. |
| 381 | * @type bool|int $show_count Whether to include post counts. Accepts 0, 1, or their bool equivalents. |
| 382 | * Default 0. |
| 383 | * @type bool|int $hide_empty Whether to hide categories that don't have any posts. Accepts 0, 1, or |
| 384 | * their bool equivalents. Default 1. |
| 385 | * @type int $child_of Term ID to retrieve child terms of. See get_terms(). Default 0. |
| 386 | * @type array|string $exclude Array or comma/space-separated string of term ids to exclude. |
| 387 | * If `$include` is non-empty, `$exclude` is ignored. Default empty array. |
| 388 | * @type bool|int $echo Whether to echo or return the generated markup. Accepts 0, 1, or their |
| 389 | * bool equivalents. Default 1. |
| 390 | * @type bool|int $hierarchical Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or their bool |
| 391 | * equivalents. Default 0. |
| 392 | * @type int $depth Maximum depth. Default 0. |
| 393 | * @type int $tab_index Tab index for the select element. Default 0 (no tabindex). |
| 394 | * @type string $name Value for the 'name' attribute of the select element. Default 'cat'. |
| 395 | * @type string $id Value for the 'id' attribute of the select element. Defaults to the value |
| 396 | * of `$name`. |
| 397 | * @type string $class Value for the 'class' attribute of the select element. Default 'postform'. |
| 398 | * @type int|string $selected Value of the option that should be selected. Default 0. |
| 399 | * @type string $value_field Term field that should be used to populate the 'value' attribute |
| 400 | * of the option elements. Accepts any valid term field: 'term_id', 'name', |
| 401 | * 'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description', |
| 402 | * 'parent', 'count'. Default 'term_id'. |
| 403 | * @type string $taxonomy Name of the category to retrieve. Default 'category'. |
| 404 | * @type bool $hide_if_empty True to skip generating markup if no categories are found. |
| 405 | * Default false (create select element even if no categories are found). |
| 406 | * } |
| 407 | * @param string $taxonomy The taxonomy slug. |
| 408 | * |
| 409 | */ |
| 410 | $r = apply_filters( 'taxonomy_parent_dropdown_post_edit_args', $r, $args['taxonomy']); |
| 411 | |