Opened 9 years ago
Closed 8 years ago
#37007 closed enhancement (fixed)
Allow Ability to Disable Pingbacks and Trackbacks by Protocol
Reported by: | dshanske | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 4.7 | Priority: | low |
Severity: | trivial | Version: | 1.2 |
Component: | Pings/Trackbacks | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Related #36576, which covers making it easier to disable sending of linkbacks by protocol in a functional manner..
The form I am thinking this would take would be a filter that filtered an array of protocols to receive and another for protocols to send, hooking this in to the various areas.
Attachments (3)
Change History (21)
This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.
8 years ago
#3
@
8 years ago
- Keywords has-patch added
In the interest of simplicity, I created a patch for an alternate solution. A hook that runs when wp-trackback is triggered that can either be used to process the trackback in lieu of the existing code(allowing it to be possibly enhanced or moved into a function attached to same, but to simply add an exit which will not process anything.
This ticket was mentioned in Slack in #core by dshanske. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.
8 years ago
#6
@
8 years ago
@dshanske Looking at 37007.diff I noticed you aren't passing any values for the action. How would you then use this hook to determine if you would allow the trackback?
This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.
8 years ago
#11
@
8 years ago
- Milestone changed from Awaiting Review to 4.7
- Priority changed from normal to low
- Severity changed from normal to trivial
This ticket was mentioned in Slack in #core by chriscct7. View the logs.
8 years ago
#14
@
8 years ago
@dshanske Looking through 37007.2.diff I started feeling as though this hook would be more useful if we could include a populated $td_id
(the comment_post_ID). To do that, the action needs to move lower in the function to occur JUST before the trackback is added. See 37007.3.diff where I move the pre_trackback_post
action down several lines and add the $tb_id
parameter.
Would this still fit your use-case?
#15
@
8 years ago
Since the goal is to allow an easy disabling of receiving trackbacks separate from pingbacks and/or allow for an improved trackback handler that is more security sensitive, that would not interfere with that goal.
The function I am thinking would be allowed_ping_protocol and would be filterable.
It would be called in wp_trackback, do_all_pings, and pingback_ping and terminate, skip, or reject if the protocol was not allowed.