Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#42091 reopened enhancement

Use get_site_by() in get_id_from_blogname()

Reported by: jeremyfelt Owned by: jeremyfelt
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-unit-tests has-patch
Focuses: multisite Cc:


The introduction of get_site_by() (see #40180) gives us the opportunity to clean up some similar code.

Attachments (2)

42091.diff (985 bytes) - added by jeremyfelt 4 years ago.
42091.2.diff (1.3 KB) - added by jeremyfelt 4 years ago.

Download all attachments as: .zip

Change History (9)

4 years ago

4 years ago

#1 @jeremyfelt
4 years ago

  • Owner set to jeremyfelt
  • Resolution set to fixed
  • Status changed from new to closed

In 41743:

Multisite: Use get_site_by() in get_id_from_blogname().

Fixes #42091.

#2 @flixos90
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

As get_site_by() will be reverted (see, this needs to be reverted as well. It can be merged back in once get_site_by() is actually ready.

#3 @flixos90
4 years ago

In 41884:

Multisite: Revert [41698] and [41743].

In order for get_site_by() to be truly beneficial, caching in WP_Site_Query needs to be improved to account for common use-cases and have them be invalidated less aggressively.

See #40180, #40228, #42091.

#4 @flixos90
4 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from 4.9 to 5.0

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

4 years ago

#6 @flixos90
3 years ago

  • Milestone changed from 5.0 to 5.1

#7 @pento
3 years ago

  • Milestone changed from 5.1 to Future Release
Note: See TracTickets for help on using tickets.