Opened 16 months ago
Last modified 15 months ago
#63157 new defect (bug)
wp_list_comments behaves differently when passed string or array
| Reported by: | John_W_B | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Comments | Version: | 6.7.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi, I tried reproducing the issue, but the translations are working fine for me.