Felix Arntz
f2d9abd022
Multisite: Introduce get_main_site_id()
.
...
This function can be used to easily get the main site ID of a given network via the optional `$network_id` parameter, which defaults to the current network. The existing `is_main_site()` now uses the new function internally and now accepts an optional `$network_id` parameter as well.
The main purpose of the new function at this point is to ensure that the `WP_Network::$blog_id` property is always set. Magic getters in the class have been adjusted to auto-fill the property when it is accessed and empty. Furthermore the function encapsulates logic that was previously part of `ms_load_current_site_and_network()` and has been replaced with a call to the function now.
Props spacedmonkey, jeremyfelt, johnjamesjacoby, flixos90.
Fixes #29684 .
Built from https://develop.svn.wordpress.org/trunk@41380
git-svn-id: http://core.svn.wordpress.org/trunk@41213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-15 11:15:52 +00:00
..
2017-08-19 20:10:47 +00:00
2017-09-13 06:08:47 +00:00
2017-07-31 19:50:45 +00:00
2017-09-14 19:29:44 +00:00
2016-12-13 02:48:41 +00:00
2017-09-09 13:49:43 +00:00
2017-09-13 06:08:47 +00:00
2017-07-26 16:45:44 +00:00
2016-12-13 01:49:39 +00:00
2017-09-13 06:08:47 +00:00
2016-12-14 04:18:42 +00:00
2017-07-27 00:41:44 +00:00
2017-08-16 21:11:43 +00:00
2017-08-29 16:43:47 +00:00
2017-08-03 16:13:44 +00:00
2017-01-29 11:50:41 +00:00
2016-12-03 03:30:42 +00:00
2017-08-03 15:24:44 +00:00
2017-09-08 15:01:44 +00:00
2017-01-11 01:23:41 +00:00
2017-01-11 01:23:41 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-21 15:35:46 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-13 06:08:47 +00:00
2017-09-09 13:19:45 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-02 05:35:41 +00:00
2017-07-27 00:41:44 +00:00
2017-09-08 14:03:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-01 16:58:42 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:12:44 +00:00
2017-08-22 11:12:44 +00:00
2017-08-22 11:12:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:52:48 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-03 14:34:44 +00:00
2017-09-15 11:15:52 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-04 11:17:43 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-13 14:48:45 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-01 20:44:43 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-13 06:08:47 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-20 20:13:47 +00:00
2017-07-01 13:36:41 +00:00
2017-07-28 01:15:52 +00:00
2017-06-30 04:54:41 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:52:48 +00:00
2017-09-10 06:33:44 +00:00
2017-08-24 17:53:27 +00:00
2017-08-22 11:52:48 +00:00
2017-07-16 01:15:46 +00:00
2016-12-16 06:39:41 +00:00
2016-12-16 06:39:41 +00:00
2016-12-16 06:39:41 +00:00
2016-12-16 06:42:40 +00:00
2017-01-05 03:06:42 +00:00
2017-08-25 23:28:45 +00:00
2017-09-15 11:15:52 +00:00
2017-09-13 06:08:47 +00:00
2017-06-25 22:06:41 +00:00
2017-06-25 22:16:40 +00:00
2017-08-22 11:52:48 +00:00
2017-08-09 04:07:43 +00:00
2017-07-01 22:13:41 +00:00
2016-12-03 04:16:38 +00:00
2017-08-31 11:17:45 +00:00
2017-09-01 12:28:46 +00:00
2017-05-10 06:10:43 +00:00
2017-09-12 03:34:48 +00:00
2017-05-09 17:15:43 +00:00
2017-08-22 11:52:48 +00:00
2017-08-30 19:53:45 +00:00
2017-09-15 11:15:52 +00:00
2017-07-05 21:31:44 +00:00
2017-08-09 21:04:47 +00:00
2017-08-12 13:11:43 +00:00
2017-09-10 21:09:45 +00:00
2017-09-12 12:54:45 +00:00
2017-08-20 20:03:54 +00:00
2017-06-13 01:11:43 +00:00
2017-08-18 18:19:44 +00:00
2017-09-09 13:53:42 +00:00
2017-07-27 08:19:43 +00:00
2017-08-10 01:38:43 +00:00
2017-09-13 06:08:47 +00:00
2016-12-03 03:51:41 +00:00
2017-08-20 20:38:42 +00:00
2017-07-28 01:15:52 +00:00
2017-08-31 12:26:42 +00:00
2017-06-29 16:05:41 +00:00
2017-09-09 13:19:45 +00:00
2017-05-06 14:30:40 +00:00
2017-09-13 06:08:47 +00:00
2017-06-15 12:05:42 +00:00
2017-09-15 11:15:52 +00:00
2017-09-06 21:32:43 +00:00
2017-08-12 12:48:47 +00:00