WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 7 weeks ago

#41285 closed defect (bug) (invalid)

Remove $site_id and $public multisite globals that are no longer used

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

Description

As @jeremyfelt noted in #39419 and #34217, there are two globals used in ms-settings.php that are no longer used anywhere else by core, $site_id and $public.

Can we explore removing these?

Attachments (1)

41285.patch (512 bytes) - added by tejas5989 4 months ago.

Download all attachments as: .zip

Change History (11)

@tejas5989
4 months ago

#1 @tejas5989
4 months ago

  • Keywords has-patch added

I have added patch of removing $public.

#2 @SergeyBiryukov
4 months ago

  • Milestone changed from Awaiting Review to 4.9

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


4 months ago

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


3 months ago

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


2 months ago

#6 @jeremyfelt
2 months ago

  • Owner set to jeremyfelt
  • Status changed from new to reviewing

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


2 months ago

#8 @jeremyfelt
2 months ago

Thanks for the patch, @tejas5989!

It looks like we need to be careful with $site_id. VaultPress is using it for something, likely in the WPCOM environment. If anyone has details on the safeness of removing that, please chime in. :)

I've poked around quite a bit and can't find anyone using $public. I feel pretty comfortable about removing that one, but will keep digging.

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


2 months ago

#10 @jeremyfelt
7 weeks ago

  • Milestone 4.9 deleted
  • Resolution set to invalid
  • Status changed from reviewing to closed

I really want to do this, but I don't think it's worth it. There are too many unknowns out there as to how these might be used and it doesn't harm much to leave them in. I think we can document them as deprecated in #39419.

Note: See TracTickets for help on using tickets.