WordPress.org

Make WordPress Core

Ticket #26948: taxonomy_quick_edit3.diff

File taxonomy_quick_edit3.diff, 2.1 KB (added by hlashbrooke, 7 years ago)

Adding doc block comment and re-adding filter

  • wp-admin/includes/class-wp-posts-list-table.php

     
    752752                $hierarchical_taxonomies = array();
    753753                $flat_taxonomies = array();
    754754                foreach ( $taxonomy_names as $taxonomy_name ) {
     755
     756                        $show_taxonomy = apply_filters( 'quick_edit_show_taxonomy', true, $taxonomy_name, $screen->post_type );
     757
     758                        if( ! $show_taxonomy ) {
     759                                continue;
     760                        }
     761
    755762                        $taxonomy = get_taxonomy( $taxonomy_name );
    756763
     764                        if( ! $taxonomy->show_in_quick_edit ) {
     765                                continue;
     766                        }
     767
    757768                        if ( !$taxonomy->show_ui )
    758769                                continue;
    759770
  • wp-includes/taxonomy.php

     
    289289 *     * If not set, the default is inherited from public.
    290290 * - show_tagcloud - Whether to list the taxonomy in the Tag Cloud Widget.
    291291 *     * If not set, the default is inherited from show_ui.
     292 * - show_in_quick_edit - Whether to show the taxonomy in the quick/bulk edit panel.
     293 *         * It not set, the default is inherited from show_ui.
    292294 * - show_admin_column - Whether to display a column for the taxonomy on its post type listing screens.
    293295 *     * Defaults to false.
    294296 * - meta_box_cb - Provide a callback function for the meta box display.
     
    338340                'show_in_menu'          => null,
    339341                'show_in_nav_menus'     => null,
    340342                'show_tagcloud'         => null,
     343                'show_in_quick_edit'    => null,
    341344                'show_admin_column'     => false,
    342345                'meta_box_cb'           => null,
    343346                'capabilities'          => array(),
     
    394397        if ( null === $args['show_tagcloud'] )
    395398                $args['show_tagcloud'] = $args['show_ui'];
    396399
     400        // If not set, default to the setting for show_ui.
     401        if ( null === $args['show_in_quick_edit'] )
     402                $args['show_in_quick_edit'] = $args['show_ui'];
     403
    397404        $default_caps = array(
    398405                'manage_terms' => 'manage_categories',
    399406                'edit_terms'   => 'manage_categories',