WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 23 months ago

#36765 new defect (bug)

Remove Legacy Code from pingback_ping

Reported by: dshanske Owned by:
Milestone: Future Release 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 2 years ago.
36765.2.diff (3.4 KB) - added by dshanske 2 years ago.
Revert conditional based on feedback
36765.7.diff (2.2 KB) - added by dshanske 23 months ago.
Update based on feedback

Download all attachments as: .zip

Change History (10)

@dshanske
2 years ago

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


2 years ago

@dshanske
2 years ago

Revert conditional based on feedback

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


2 years ago

#3 @rachelbaker
2 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
23 months ago

Update based on feedback

#4 @dshanske
23 months 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.


23 months ago

#6 @rachelbaker
23 months 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
23 months ago

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