Opened 9 years ago
Closed 9 years ago
#37319 closed defect (bug) (fixed)
Documentation for first parameter of `comment_max_links_url` is incorrect
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.6 | Priority: | normal |
| Severity: | normal | Version: | 3.8 |
| Component: | Comments | Keywords: | has-patch |
| Focuses: | docs | Cc: |
Description
$num_links is not the "number of links allowed", it's the number of found links in a comment.
Attachments (3)
Change History (10)
#2
@
9 years ago
- Keywords has-patch added; needs-patch removed
OK we looked at this and the filters name doesn't make sense
So we have deprecated the current filter and added 2 more to place it
one that allows's you to change / set the max links allowed
and a renamed filter that allows you to filter the number of links found in the comment
Plus whitespace tidy / code format for the rest of the function ( if this too many changes ask and I will remove the extra changes
We used patch as a demo at contrib2core toronto meetup
#3
@
9 years ago
- Keywords needs-refresh added
@pbearne Thanks for the patch. While I agree that comment_max_links_url isn't the BEST filter name, I don't see why the scope of this ticket can't be kept to just updating the parameter description.
Additional feedback on comment.php.13.patch :
- Core already has
pre_option_{name}filters (example:pre_option_comment_max_links) which should suffice most use-cases of thecomment_max_links_allowedfilter you added. - Your patch should only include code changes, not additional style or formatting refactoring. See: https://make.wordpress.org/core/handbook/contribute/code-refactoring/
#4
@
9 years ago
- Keywords good-first-bug needs-refresh removed
@pbearne For the future, please ignore tickets with the good-first-bug keyword. Such tickets are designed for new contributors. If you have worked with new contributors let them comment and upload the patch.
#5
@
9 years ago
@rachelbaker sorry about the code tidy got carried away :-)
I pushed up 2 patches one with just the comment change
But a relooking at this I felt that the filter wasn't much use as the sort of use that would make to do do a recount with a different regx (eg not include links to .gov sites). So I also have added a patch that adds a new filter that also passes the functions args as well
this filter lies
it says is change the max links allow but changes the number of links found