Make WordPress Core

Ticket #33026: 33026.4.patch

File 33026.4.patch, 2.8 KB (added by theMikeD, 8 years ago)
  • src/wp-admin/includes/meta-boxes.php

     
    509509                                        <label class="screen-reader-text" for="new<?php echo $tax_name; ?>_parent">
    510510                                                <?php echo $taxonomy->labels->parent_item_colon; ?>
    511511                                        </label>
    512                                         <?php wp_dropdown_categories( array( 'taxonomy' => $tax_name, 'hide_empty' => 0, 'name' => 'new' . $tax_name . '_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $taxonomy->labels->parent_item . ' &mdash;' ) ); ?>
     512                                        <?php
     513                                        $parent_dropdown_args = array(
     514                                                'taxonomy'          => $tax_name,
     515                                                'hide_empty'        => 0,
     516                                                'name'              => 'new' . $tax_name . '_parent',
     517                                                'orderby'           => 'name',
     518                                                'hierarchical'      => 1,
     519                                                'show_option_none'  => '&mdash; ' . $taxonomy->labels->parent_item . ' &mdash;',
     520                                        );
     521                                        /**
     522                                         * Filters the taxonomy parent drop-down on the Post Edit page.
     523                                         *
     524                                         * @since 4.4.0
     525                                         *
     526                                         * @param array $parent_dropdown_args {
     527                                         *     Optional. Array of arguments to generate a categories drop-down element.
     528                                         *
     529                                         *     @type string       $taxonomy          Name of the category to retrieve. Default 'category'.
     530                                         *     @type bool         $hide_if_empty     True to skip generating markup if no categories are found.
     531                                         *     @type string       $name              Value for the 'name' attribute of the select element. Default 'cat'.
     532                                         *     @type string       $orderby           Which column to use for ordering categories. See get_terms() for a list
     533                                         *                                           of accepted values. Default 'id' (term_id).
     534                                         *                                           Default false (create select element even if no categories are found).
     535                                         *     @type bool|int     $hierarchical      Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or their bool
     536                                         *                                           equivalents. Default 0.
     537                                         *     @type string       $show_option_none  Text to display for showing no categories. Default empty.
     538                                         * }
     539                                         *
     540                                         */
     541                                        $parent_dropdown_args = apply_filters( 'post_edit_category_parent_dropdown_args', $parent_dropdown_args );
     542                                        wp_dropdown_categories( $parent_dropdown_args );
     543                                        ?>
    513544                                        <input type="button" id="<?php echo $tax_name; ?>-add-submit" data-wp-lists="add:<?php echo $tax_name; ?>checklist:<?php echo $tax_name; ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $taxonomy->labels->add_new_item ); ?>" />
    514545                                        <?php wp_nonce_field( 'add-' . $tax_name, '_ajax_nonce-add-' . $tax_name, false ); ?>
    515546                                        <span id="<?php echo $tax_name; ?>-ajax-response"></span>