Make WordPress Core

Ticket #43846: 43846.diff

File 43846.diff, 1.4 KB (added by allendav, 6 years ago)

Add .count spans to post status count links on request tables

  • src/wp-admin/includes/user.php

     
    10581058                $counts         = wp_count_posts( $this->post_type );
    10591059
    10601060                $current_link_attributes = empty( $current_status ) ? ' class="current" aria-current="page"' : '';
    1061                 $views['all']            = '<a href="' . esc_url( $admin_url ) . "\" $current_link_attributes>" . esc_html__( 'All' ) . ' (' . absint( array_sum( (array) $counts ) ) . ')</a>';
     1061                $views['all']            = '<a href="' . esc_url( $admin_url ) . "\" $current_link_attributes>" . esc_html__( 'All' ) . ' <span class="count">(' . absint( array_sum( (array) $counts ) ) . ')</span></a>';
    10621062
    10631063                foreach ( $statuses as $status => $label ) {
    10641064                        $current_link_attributes = $status === $current_status ? ' class="current" aria-current="page"' : '';
    1065                         $views[ $status ]        = '<a href="' . esc_url( add_query_arg( 'filter-status', $status, $admin_url ) ) . "\" $current_link_attributes>" . esc_html( $label ) . ' (' . absint( $counts->$status ) . ')</a>';
     1065                        $views[ $status ]        = '<a href="' . esc_url( add_query_arg( 'filter-status', $status, $admin_url ) ) . "\" $current_link_attributes>" . esc_html( $label ) . ' <span class="count">(' . absint( $counts->$status ) . ')</span></a>';
    10661066                }
    10671067
    10681068                return $views;