Felix Arntz
e23004c344
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@41380 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-15 11:14:49 +00:00
..
2017-07-16 01:14:36 +00:00
2017-09-13 06:07:48 +00:00
2017-07-31 19:49:31 +00:00
2016-10-29 21:31:29 +00:00
2017-09-14 19:28:57 +00:00
2016-12-13 02:47:07 +00:00
2017-09-09 13:48:47 +00:00
2017-09-13 06:07:48 +00:00
2017-07-26 16:44:34 +00:00
2016-12-13 01:48:41 +00:00
2017-09-13 06:07:48 +00:00
2016-12-14 04:17:38 +00:00
2017-07-27 00:40:27 +00:00
2017-08-16 21:10:39 +00:00
2017-08-29 16:42:55 +00:00
2017-08-03 16:12:25 +00:00
2017-01-29 11:49:49 +00:00
2016-12-03 03:29:23 +00:00
2017-08-03 15:23:25 +00:00
2017-09-08 15:00:33 +00:00
2017-01-11 01:22:46 +00:00
2016-10-31 06:27:53 +00:00
2017-01-11 01:22:46 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-08-21 15:34:19 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-09-13 06:07:48 +00:00
2017-09-09 13:18:23 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-08-02 05:34:32 +00:00
2017-07-27 00:40:27 +00:00
2017-09-08 14:02:43 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-01 16:57:13 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-08-22 11:11:23 +00:00
2017-08-22 11:11:23 +00:00
2017-08-22 11:11:23 +00:00
2017-07-27 00:40:27 +00:00
2017-08-22 11:51:11 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-08-03 14:33:19 +00:00
2017-09-15 11:14:49 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-09-04 11:16:18 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-09-13 14:47:07 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-08-01 20:43:25 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-09-13 06:07:48 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-07-27 00:40:27 +00:00
2017-08-20 20:12:50 +00:00
2017-07-01 13:35:38 +00:00
2017-07-28 01:14:03 +00:00
2017-06-30 04:53:53 +00:00
2017-07-27 00:40:27 +00:00
2017-08-22 11:51:11 +00:00
2017-09-10 06:32:34 +00:00
2017-08-24 17:51:26 +00:00
2017-08-22 11:51:11 +00:00
2017-06-25 21:45:42 +00:00
2016-12-16 06:38:10 +00:00
2016-12-16 06:38:10 +00:00
2016-12-16 06:38:10 +00:00
2016-12-16 06:41:45 +00:00
2017-01-05 03:05:53 +00:00
2017-08-25 23:27:55 +00:00
2017-09-15 11:14:49 +00:00
2017-09-13 06:07:48 +00:00
2017-06-25 22:05:54 +00:00
2017-06-25 22:15:18 +00:00
2017-08-22 11:51:11 +00:00
2017-08-09 04:06:17 +00:00
2017-07-01 22:13:00 +00:00
2016-12-03 04:15:33 +00:00
2017-08-31 11:16:56 +00:00
2017-09-01 12:27:49 +00:00
2017-05-10 06:09:36 +00:00
2017-09-12 03:33:58 +00:00
2017-05-09 17:14:08 +00:00
2017-08-22 11:51:11 +00:00
2017-08-30 19:52:59 +00:00
2017-09-15 11:14:49 +00:00
2017-07-05 21:30:30 +00:00
2017-08-09 21:03:16 +00:00
2017-08-12 13:10:24 +00:00
2017-09-10 21:08:19 +00:00
2017-09-12 12:53:21 +00:00
2017-08-20 20:02:10 +00:00
2017-06-13 01:10:23 +00:00
2017-08-18 18:18:51 +00:00
2017-09-09 13:52:46 +00:00
2017-07-27 08:18:25 +00:00
2017-08-10 01:37:30 +00:00
2016-11-09 22:59:02 +00:00
2016-10-31 06:27:53 +00:00
2017-09-13 06:07:48 +00:00
2016-12-03 03:50:02 +00:00
2017-08-20 20:37:47 +00:00
2017-07-28 01:14:03 +00:00
2017-08-31 12:25:14 +00:00
2017-06-29 16:04:45 +00:00
2017-09-09 13:18:23 +00:00
2017-05-06 14:29:01 +00:00
2017-09-13 06:07:48 +00:00
2017-06-15 12:04:56 +00:00
2017-06-01 21:47:10 +00:00
2017-09-06 21:31:26 +00:00
2017-08-12 12:47:38 +00:00