Opened 3 months ago
Last modified 2 months ago
#63157 new defect (bug)
wp_list_comments behaves differently when passed string or array
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7.2 |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
- Set up Discussion so that comment does not require manual approval.
- Put function in functions.php which prints 'your commment is waiting approval' if
$comment->comment_approved == '0'.
and which prints the comment.
- call that function in the theme's comment template comments.php
Result: in 6.7.1 if the function is passed as a string, e.g.
wp_list_comments("callback=my_function")
or if it is passed as an array
wp_list_comments(["callback"=>"my_function"])
Behaviour is the same.
Comments are not published unless {{{
$comment->comment_approved == '1'.
}}}
This changed in 6.7.2. Now, if the callback is passed as a string, comments are published even if {{{
$comment->comment_approved == '0'.
}}}
However, now if the callback ias passed an array, comments are not published if {{{
$comment->comment_approved == '0'.
}}}
I cannot see what has caused this change.
Note: See
TracTickets for help on using
tickets.