Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36765 new defect (bug)

Remove Legacy Code from pingback_ping

Reported by: dshanske's profile dshanske Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Pings/Trackbacks Keywords: has-patch dev-feedback needs-unit-tests
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Proposing we remove the legacy conditional url_to_postid and $way debugging line leftover from [30139].

/ let's find which post is linked to
    // FIXME: does url_to_postid() cover all these cases already?
    //        if so, then let's use it and drop the old code.

Related: #34419

Attachments (3)

36765.diff (3.3 KB) - added by dshanske 8 years ago.
36765.2.diff (3.4 KB) - added by dshanske 8 years ago.
Revert conditional based on feedback
36765.7.diff (2.2 KB) - added by dshanske 8 years ago.
Update based on feedback

Download all attachments as: .zip

Change History (10)

@dshanske
8 years ago

This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.


8 years ago

@dshanske
8 years ago

Revert conditional based on feedback

This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.


8 years ago

#3 @rachelbaker
8 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release

@dshanske your latest patch 36765.2.diff contains style edits for lines you are not editing. Your patch should only include code changes, not additional refactoring. See: https://make.wordpress.org/core/handbook/contribute/code-refactoring/

@dshanske
8 years ago

Update based on feedback

#4 @dshanske
8 years ago

  • Keywords has-patch dev-feedback added; needs-refresh removed

Fixed per feedback by @rachelbaker

This ticket was mentioned in Slack in #core-comments by dshanske. View the logs.


8 years ago

#6 @rachelbaker
8 years ago

  • Keywords needs-unit-tests added

@dshanske this is looking good so far. Are there any conditions covered by the duplicate logic you are removing in this ticket that are not covered by url_to_post_id()? Would be good to check the tests in trunk/tests/phpunit/tests/rewrite.php, and add any conditions that are missing.

#7 @SergeyBiryukov
8 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.