Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#38152 closed defect (bug) (fixed)

Clarify in the DocBlock that get_site_by_path() does not return exact matches

Reported by: ocean90's profile ocean90 Owned by: jeremyfelt's profile jeremyfelt
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: good-first-bug has-patch
Focuses: docs, multisite Cc:

Description

Related Slack discussion: https://wordpress.slack.com/archives/core-multisite/p1474390310000390

get_site_by_path() does not return exact matches because it also searches sites with path = '/'. The same applies to WP_Network::get_by_path() but its DocBlock is much better. We should add a similar comment to get_site_by_path().

Attachments (2)

38152.patch (728 bytes) - added by stevenlinx 8 years ago.
38152.2.patch (786 bytes) - added by stevenlinx 8 years ago.

Download all attachments as: .zip

Change History (10)

@stevenlinx
8 years ago

#1 @stevenlinx
8 years ago

  • Keywords has-patch added; needs-patch removed

#2 @DrewAPicture
8 years ago

  • Milestone changed from Future Release to 4.7
  • Owner set to DrewAPicture
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #docs by morganestes. View the logs.


8 years ago

#4 @morganestes
8 years ago

The patch doesn't seem to match the description. Don't we want the description to be more descriptive, rather than shorter here?

@stevenlinx
8 years ago

#5 @stevenlinx
8 years ago

sry., there was a diff option issue. In the previous patch, the red block should be the green block and vice versa.

I've uploaded a revised version.

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.


8 years ago

#7 @jeremyfelt
8 years ago

  • Owner changed from DrewAPicture to jeremyfelt

#8 @jeremyfelt
8 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 38781:

Multisite: Clarify that get_site_by_path() does not return exact matches.

Props stevenlinx.
Fixes #38152.

Note: See TracTickets for help on using tickets.