Make WordPress Core

Opened 7 years ago

Closed 9 months ago

#42091 closed enhancement (maybelater)

Use get_site_by() in get_id_from_blogname()

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

Description

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 7 years ago.
42091.2.diff (1.3 KB) - added by jeremyfelt 7 years ago.

Download all attachments as: .zip

Change History (10)

@jeremyfelt
7 years ago

@jeremyfelt
7 years ago

#1 @jeremyfelt
7 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
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

As get_site_by() will be reverted (see https://core.trac.wordpress.org/ticket/40180#comment:36), this needs to be reverted as well. It can be merged back in once get_site_by() is actually ready.

#3 @flixos90
7 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
7 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.


7 years ago

#6 @flixos90
6 years ago

  • Milestone changed from 5.0 to 5.1

#7 @pento
6 years ago

  • Milestone changed from 5.1 to Future Release

#8 @jeremyfelt
9 months ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from reopened to closed

get_site_by() isn't a function until #40180 happens, so this can be closed as maybelater.

Note: See TracTickets for help on using tickets.