[wp-trac] [WordPress Trac] #28129: Add filter for wp_list_comments() arguments
WordPress Trac
noreply at wordpress.org
Mon May 5 08:16:33 UTC 2014
#28129: Add filter for wp_list_comments() arguments
-------------------------+-----------------------------
Reporter: hlashbrooke | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 3.9
Severity: normal | Keywords:
Focuses: template |
-------------------------+-----------------------------
The arguments for {{{wp_list_comments()}}} cannot currently be filtered
and the only way to modify them is by modifying the call in the
{{{comments.php}}} template file. The problem with this is that if plugins
add any custom comment types that are not meant to be displayed on the
frontend, then there is no way of hiding those types from within the
plugin.
My initial use cause for this is in
[http://www.woothemes.com/products/sensei/ Sensei] - we add user lesson
and course data as comments on the plugin's CPTs in order to track
progress and grades, but these comments all show up on the frontend as
normal comments in the default WordPress themes because those themes (and
many others) do not specify the comment type when calling
{{{wp_list_comments()}}}. However, I'm sure this is something that a
number of other plugins struggle with.
My patch for this simply adds a filter to the {{{wp_list_comments()}}}
arguments, so it will not affect any existing functionality and will make
core just a little bit more customisable.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28129>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list