Opened 8 years ago
Closed 8 years ago
#2668 closed defect (bug) (fixed)
Plugin Directory Admin: Replies to internal notes have the wrong comment type
Reported by: | ocean90 | Owned by: | coffee2code |
---|---|---|---|
Milestone: | Plugin Directory v3.0 | Priority: | high |
Component: | Plugin Directory | Keywords: | has-patch commit |
Cc: |
Description
WordPressdotorg\Plugin_Directory\Admin\Customizations::save_custom_comment()
(or wp_ajax_replyto_comment()
sets the type if $_POST['comment_type']
is set but wp_comment_reply()
doesn't define a comment_type
field.
To make it work on edit.php and edit-comments.php we could add a check to preprocess_comment
which sets comment_type
if $commentdata['comment_parent']
is an ID for an internal note.
Attachments (3)
Change History (8)
#2
@
8 years ago
To make it work on edit.php and edit-comments.php we could add a check to
preprocess_comment
which setscomment_type
if$commentdata['comment_parent']
is an ID for an internal note.
I think we could just inherit comment type from parent comment in ::save_custom_comment()
, see 2668.2.patch (also includes the patch from #2667).
There's a code to add the
comment_type
field injs/edit-form.js
, but it doesn't account for replies, and it adds duplicate fields when clicking the "Add note" button several times.2668.patch fixes both issues.