Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#38152 closed defect (bug) (fixed)

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

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

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 10 years ago.
38152.2.patch​ (786 bytes ) - added by stevenlinx 10 years ago.

Download all attachments as: .zip

Change History (10)

@stevenlinx
10 years ago

#1 @stevenlinx
10 years ago

  • Keywords has-patch added; needs-patch removed

#2 @DrewAPicture
10 years ago

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

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


10 years ago

#4 @morganestes
10 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
10 years ago

#5 @stevenlinx
10 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.


10 years ago

#7 @jeremyfelt
10 years ago

  • Owner changed from DrewAPicture to jeremyfelt

#8 @jeremyfelt
10 years ago

  • Resolution → fixed
  • Status reviewing → 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.