Skip to content

Commit

Permalink
Add the post type and taxonomy name as a class attribute to the dashb…
Browse files Browse the repository at this point in the history
…oard glance entries. Fixes #97.
  • Loading branch information
johnbillion committed Oct 4, 2018
1 parent ce59550 commit 85e5b49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/class-extended-cpt-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public function glance_items( array $items ) : array {
$url = add_query_arg( [
'post_type' => $this->cpt->post_type,
], admin_url( 'edit.php' ) );
$text = '<a href="' . esc_url( $url ) . '">' . esc_html( $num . ' ' . $text ) . '</a>';
$text = '<a href="' . esc_url( $url ) . '" class="cpt-' . esc_attr( $this->cpt->post_type ) . '-count">' . esc_html( $num . ' ' . $text ) . '</a>';

# Go!
$items[] = $text;
Expand Down
2 changes: 1 addition & 1 deletion src/class-extended-taxonomy-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public function glance_items( array $items ) {
'taxonomy' => $this->taxo->taxonomy,
'post_type' => reset( $taxonomy->object_type ),
], admin_url( 'edit-tags.php' ) );
$text = '<a href="' . esc_url( $url ) . '">' . esc_html( $num . ' ' . $text ) . '</a>';
$text = '<a href="' . esc_url( $url ) . '" class="taxo-' . esc_attr( $this->taxo->taxonomy ) . '-count">' . esc_html( $num . ' ' . $text ) . '</a>';

# Go!
$items[] = $text;
Expand Down

0 comments on commit 85e5b49

Please sign in to comment.