#25662 closed defect (bug) (fixed)
Hook Docs: wp-admin/includes/class-wp-comments-list-table.php
Reported by: | siobhyb | Owned by: | kpdesign |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Inline Docs | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Patch forthcoming.
Attachments (5)
Change History (20)
#1
follow-up:
↓ 4
@
10 years ago
I've attached my first pass at inline docs for wp-admin/includes/class-wp-comments-list-table.php and have added my notes below. :)
Actions:
- restrict_manage_comments. Trac ticket where hook was first discussed and added: #21344.
- manage_comments_nav. First added: [7018].
- manage_comments_custom_column. Trac ticket where hook was first discussed and added: #9583.
Filters:
The documentation for the filters had already been completed by @drewapicture as part of his Filter of the Day project: http://fotd.werdswords.com/. The last two hooks are duplicates.
- comments_per_page. Drew's writeup: http://fotd.werdswords.com/comments_per_page/.
- comment_status_links. Drew's writeup: http://fotd.werdswords.com/comment_status_links/.
- admin_comment_types_dropdown. Drew's writeup: http://fotd.werdswords.com/admin_comment_types_dropdown/.
- comment_edit_pre. Duplicate hook, was first-added to wp-admin/includes/comment.php.
- comment_row_actions. Duplicate hook, was first-added to wp-admin/includes/dashboard.php.
I know the handling of duplicate hooks is being discussed in another ticket, I've used the "duplicate_hook" comment as I wasn't sure what approach to use. Let me know if this or anything else needs changing/improving. Thanks! :)
#4
in reply to:
↑ 1
;
follow-up:
↓ 5
@
10 years ago
Replying to siobhyb:
I know the handling of duplicate hooks is being discussed in another ticket, I've used the "duplicate_hook" comment as I wasn't sure what approach to use. Let me know if this or anything else needs changing/improving. Thanks! :)
The style to use is:
/** This action|filter is documented in wp-admin/whatever.php */
@
10 years ago
Second pass at inline docs for wp-admin/includes/class-wp-comments-list-table.php. Including correct notation for duplicate hooks.
#5
in reply to:
↑ 4
@
10 years ago
Replying to DrewAPicture:
The style to use is:
/** This action|filter is documented in wp-admin/whatever.php */
Thanks! I've updated the patch accordingly.
#6
@
10 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.8
- Owner set to kpdesign
- Status changed from new to reviewing
Thanks for the updated patch. We'll get back to you shortly with some notes.
#7
@
10 years ago
@siobhyb: Thanks for the patch. :)
General:
- Please make your patch from the root directory of your SVN checkout, not the folder the file is in. :)
- Make sure there is a blank space before the
*
on each line after the opening/**
so that the block lines up correctly. Like this:
/** * Short description. * * @since x.x.x * * @param ... */
comments_per_page
:
- Align the parameters and the descriptions.
- Change "Default is 'All'" to "Default 'All'."
comment_status_links
:
- Remove long description.
- Change @param description to "An array of fully-formed status links. Default 'All'. Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'." Break the line before "Accepts...", and then align it with the description.
admin_comment_types_dropdown
:
- s/drop down/dropdown in short description.
- Remove long description.
- Change @param to: "@param array $comment_types An array of comment types. Accepts 'Comments', 'Pings'."
restrict_manage_comments
:
- Change short description to "Fires just before the Filter submit button for comment types."
- Remove long description.
manage_comments_nav
:
- Change short description to "Fires after the Filter submit button for comment types."
- Remove long description.
manage_comments_custom_column
:
- Short description should be "Fires when the default column output is displayed for a single row."
- Remove long description.
- Align the parameters and the descriptions, use spaces please.
Could you make these changes, and submit a new patch please? :)
#8
follow-up:
↓ 9
@
10 years ago
@kpdesign: I've updated the patch as requested.
Please make your patch from the root directory of your SVN checkout, not the folder the file is in. :)
Can you let me know if I've done this correctly this time? Thanks. :)
#9
in reply to:
↑ 8
@
10 years ago
@siobhyb: Thanks for updating the patch. :)
Just a few small things to fix:
I noticed you edited lines 314-315, but there's no filter there. Could you remove that edit please?
comments_per_page
:
- Remove extra whitespace at the end of each line in the doc block.
comment_status_links
:
- Remove extra whitespace at the end of the first @param line.
comment_edit_pre
:
- Remove
<?php echo
after opening<textarea class=...>
tag (same line). - Change
esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) );
toecho esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) );
.
It should look like this:
<textarea class="comment" rows="1" cols="1"> <?php /** This filter is documented in wp-admin/includes/comment.php */ echo esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) ); ?> </textarea>
manage_comments_custom_column
:
- Second @param line, only one space between the $var and the description, then align the description on the first @param line to match the description on the second line.
Can you let me know if I've done this correctly this time? Thanks. :)
Yes, you did. The latest patch is from the root directory. :)
#11
@
10 years ago
I noticed you edited lines 314-315, but there's no filter there. Could you remove that edit please?
Genuinely didn't realise I'd done that! So glad you noticed. :)
I've completed all the changes you set out and updated the patch.
#12
@
10 years ago
- Keywords has-patch commit added; needs-patch removed
25662.3.patch looks good. Ready for commit.
First pass at wp-admin\includes\class-wp-comments-list-table.php.