[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 01:23:37 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 justindocanto):
@bordoni Again - I disagree.
To do your method, a user would have to figure out a way to...
1) Figure out a way to only trigger your wp_count_comments filter when
being used in /wp-admin/menu.php and send the function false information
2) This then depends on a css rule, meant to hide the pending comment
count bubble when theres 0 pending comment, irregardless if there ARE
pending comments.
1 and 2 are both using inaccurate info to trick WP to do what you want.
That's a hack to me, not a solution. Other menu items have ways to disable
them. I don't understand why we wouldn't want a way to properly disable
this as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/19372#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list