Make WordPress Core

Ticket #44343: 44343.diff

File 44343.diff, 1.2 KB (added by obiplabon, 7 years ago)

Patch for this feature

  • src/wp-admin/includes/ajax-actions.php

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index 04c31e5..d5beb08 100644
    a b function _wp_ajax_add_hierarchical_term() { 
    565565                );
    566566        }
    567567
     568        $dropdown_args = array(
     569                'taxonomy'         => $taxonomy->name,
     570                'hide_empty'       => 0,
     571                'name'             => 'new' . $taxonomy->name . '_parent',
     572                'orderby'          => 'name',
     573                'hierarchical'     => 1,
     574                'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —',
     575        );
     576
     577        /**
     578         * Filters the arguments for the taxonomy dropdown.
     579         *
     580         * @param array $dropdown_args
     581         */
     582        $dropdown_args = apply_filters( 'ajax_add_hierarchical_term_dropdown_args', $dropdown_args );
     583
    568584        ob_start();
    569585
    570         wp_dropdown_categories(
    571                 array(
    572                         'taxonomy'         => $taxonomy->name,
    573                         'hide_empty'       => 0,
    574                         'name'             => 'new' . $taxonomy->name . '_parent',
    575                         'orderby'          => 'name',
    576                         'hierarchical'     => 1,
    577                         'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —',
    578                 )
    579         );
     586        wp_dropdown_categories( $dropdown_args );
    580587
    581588        $sup = ob_get_clean();
    582589