[wp-trac] [WordPress Trac] #19372: Don't call wp_count_comments() when we don't need to
WordPress Trac
noreply at wordpress.org
Thu Nov 5 00:53:04 UTC 2015
#19372: Don't call wp_count_comments() when we don't need to
----------------------------+-----------------------------
Reporter: johnbillion | Owner: wonderboymusic
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 4.4
Component: Comments | Version: 3.2
Severity: minor | Resolution:
Keywords: has-patch | Focuses: performance
----------------------------+-----------------------------
Comment (by bordoni):
@justindocanto It's not a duck tape solution because that's how it's
currently dealt with, the label for comments is always there, but if you
have 0 comments it will be hidden by CSS.
On the file ''/src/wp-admin/css/admin-menu.css'' there is a ref to:
{{{
#adminmenu li span.count-0 {
display: none;
}
}}}
You just got to add a new css rule somewhere to prevent it from showing up
on the admin menu, maybe:
{{{
#wpadminbar #wp-admin-bar-comments .count-0 {
display: none;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19372#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list