Make WordPress Core

Ticket #42669: 42669.diff

File 42669.diff, 1.7 KB (added by boonebgorges, 6 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
    index c16b9a8ed4..92ef2047b9 100644
    a b class WP_Posts_List_Table extends WP_List_Table { 
    11261126                        $taxonomy_object = get_taxonomy( $taxonomy );
    11271127                        $terms           = get_the_terms( $post->ID, $taxonomy );
    11281128                        if ( is_array( $terms ) ) {
    1129                                 $out = array();
     1129                                $term_links = array();
    11301130                                foreach ( $terms as $t ) {
    11311131                                        $posts_in_term_qv = array();
    11321132                                        if ( 'post' != $post->post_type ) {
    class WP_Posts_List_Table extends WP_List_Table { 
    11401140                                        }
    11411141
    11421142                                        $label = esc_html( sanitize_term_field( 'name', $t->name, $t->term_id, $taxonomy, 'display' ) );
    1143                                         $out[] = $this->get_edit_link( $posts_in_term_qv, $label );
     1143                                        $term_links[] = $this->get_edit_link( $posts_in_term_qv, $label );
    11441144                                }
     1145
     1146                                /**
     1147                                 * Filters the links in `$taxonomy` column of edit.php.
     1148                                 *
     1149                                 * @since 5.2.0
     1150                                 *
     1151                                 * @param array  $term_links List of links to edit.php, filtered by the taxonomy term.
     1152                                 * @param string $taxonomy   Taxonomy name.
     1153                                 * @param array  $terms      Array of terms appearing in the post row.
     1154                                 */
     1155                                $term_links = apply_filters( 'post_column_taxonomy_links', $term_links, $taxonomy, $terms );
     1156
    11451157                                /* translators: used between list items, there is a space after the comma */
    1146                                 echo join( __( ', ' ), $out );
     1158                                echo join( __( ', ' ), $term_links );
    11471159                        } else {
    11481160                                echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
    11491161                        }