| 108 | | <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?> |
| | 108 | <?php |
| | 109 | $dropdown_args = array( |
| | 110 | 'hide_empty' => 0, |
| | 111 | 'hide_if_empty' => false, |
| | 112 | 'name' => 'parent', |
| | 113 | 'orderby' => 'name', |
| | 114 | 'taxonomy' => $taxonomy, |
| | 115 | 'selected' => $tag->parent, |
| | 116 | 'exclude_tree' => $tag->term_id, |
| | 117 | 'hierarchical' => true, |
| | 118 | 'show_option_none' => __('None') |
| | 119 | ); |
| | 120 | |
| | 121 | /** |
| | 122 | * Filter the taxonomy parent drop-down on the Single Edit Term page. |
| | 123 | * |
| | 124 | * @since ? |
| | 125 | * |
| | 126 | * @param array $dropdown_args { |
| | 127 | * An array of taxonomy parent drop-down arguments. |
| | 128 | * |
| | 129 | * @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false. |
| | 130 | * @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false. |
| | 131 | * @type string $name The name attribute value for select element. Default 'parent'. |
| | 132 | * @type string $orderby The field to order by. Default 'name'. |
| | 133 | * @type string $taxonomy The taxonomy slug. |
| | 134 | * @type int $selected Which category ID is selected. |
| | 135 | * @type array|string $exclude_tree Array or comma/space-separated string of term ids to exclude |
| | 136 | * along with all of their descendant terms. If $include is |
| | 137 | * non-empty, $exclude_tree is ignored. Default current term ID. |
| | 138 | * @type bool $hierarchical Whether the taxonomy is hierarchical. Default true. |
| | 139 | * @type string $show_option_none Label to display if there are no terms. Default 'None'. |
| | 140 | * } |
| | 141 | * @param string $taxonomy The taxonomy slug. |
| | 142 | */ |
| | 143 | $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args_single', $dropdown_args, $taxonomy ); |
| | 144 | wp_dropdown_categories( $dropdown_args ); ?> |