├── README.md └── network-classification.md /README.md: -------------------------------------------------------------------------------- 1 | multisite-notes 2 | =============== 3 | -------------------------------------------------------------------------------- /network-classification.md: -------------------------------------------------------------------------------- 1 | # Thoughts 2 | 3 | * There are many times when `! is_multisite()` is used purely to perform single site behavior. While going down the road of closed and open networks, we may want to consider something along the lines of `is_single_site()` that makes it easier to follow when something specific to single site is happening. This could make even more sense if we start doing something like `is_multisite( 'closed' )` or `is_closed_network()` or ... 4 | 5 | # Uses of is_multisite() 6 | 7 | As of changeset 28572, there are 255 uses of `is_multisite()` in core. 8 | 9 | ## wp-activate.php 10 | 11 | 1. Possible redirect to `wp-login.php?action=register` if not multisite. 12 | * This check should be for an open multisite network. 13 | * A closed multisite network should redirect to home. 14 | 15 | ## wp-login.php 16 | 17 | 1. Used to determine what the login header URL and title should be. In single site, this is a link to `https://wordpress.org` and `Powered by WordPress`. In multisite, the network's home URL and name are used. 18 | * This seems like appropriate behavior for closed and open networks. 19 | 1. If `retrieve_password()` in multisite, the network's name is used rather than the site's name when sending the password reset email. 20 | * This seems like appropriate behavior for closed and open networks. 21 | 1. Used when handling `action=register` to reroute to `wp-signup.php` if multisite is enabled. 22 | * This should only redirect for open multisite networks. 23 | 1. For `action=login` (and as a default), `is_multisite()` is used twice to determine where to redirect a logged in user. 24 | * This seems valid for open and closed networks. It may be worth considering what `get_active_blog_for_user()` means in this scenario. 25 | 26 | ## wp-settings.php 27 | 28 | 1. Used to initialize multisite with `ms-blogs.php` and `ms-settings.php` if enabled. 29 | * This is necessary for open and closed networks. 30 | 1. Used to load additional multisite specific functionality through `ms-functions.php`, `ms-default-filters.php`, and `ms-deprecated.php`. 31 | * This is necessary for open and closed networks. 32 | 1. Used to load network activated plugins. 33 | * This is necessary for open and closed networks. 34 | 1. Used to fire `ms_cookie_constants()` 35 | * This is necessary for open and closed networks. 36 | 1. Used to check a site's status via `ms_site_check()` before loading it. 37 | * This is valid for open and closed networks, though the flow in `ms_site_check()` around inactive, deleted, etc... "blogs" is worth looking at. 38 | 39 | ## wp-signup.php 40 | 41 | 1. Used in the same fashion as `wp-activate.php` to redirect to `wp-login.php?action=register` if not multisite. 42 | * This should exist on an open multisite network. 43 | * A closed multisite newtwork should redirect to home. 44 | 45 | ## wp-admin/about.php 46 | 47 | 1. Used to determine what language to display for the link back to updates. 48 | * I'm not entirely sure this should exist at all. If it does, seems to work for open and closed networks. 49 | 50 | ## wp-admin/admin-header.php 51 | 52 | 1. Used to add a `multisite` class to `` in the admin header. 53 | * This is valid for both open and closed networks. 54 | 55 | ## wp-admin/admin.php 56 | 57 | 1. Used to redirect to `upgrade.php` if a DB version mismatch is detected and this is not multisite. 58 | * This is valid for both open and closed networks. 59 | 60 | ## wp-admin/index.php 61 | 62 | 1. Used in determining what help message to provide for the dashboard. If multisite, the message about recent and popular plugins is left out. 63 | * This could be modified to change if a site has the ability to install new plugins. 64 | 65 | ## wp-admin/menu.php 66 | 67 | 1. Add "My Sites" to the menu. 68 | * This is applicable to open and closed networks. 69 | 1. Help determine if `wp_get_update_data()` should fire. Currently for non-multisite or for super admins. 70 | * This is applicable to open and closed networks. 71 | 1. If not multisite, updates for plugins, themes, and core are shown in the menu. 72 | * This is applicable to open and closed networks. 73 | 1. If not multisite, add the 'Editor' link to the appearance menu for editing theme files. 74 | * This is applicable to open and closed networks. 75 | 1. If not multisite, show a counter next to plugins to indicate available updates. 76 | * This is applicable to open and closed networks. 77 | 1. If not multisite, add links for 'Add New' and 'Editor' under plugins. 78 | * This could be modified if a site has the ability to install new plugins. It would likely not make sense to add the Editor. 79 | 1. Add a 'Delete Site' option to the tools menu if not the main site. 80 | * This is applicable to open and closed networks. 81 | 1. If not yet multisite, but `WP_ALLOW_MULTISITE` is defined, show a Network Setup option under tools. 82 | * This is applicable to open and closed networks. 83 | 84 | ## wp-admin/ms-delete-site.php 85 | 86 | 1. A check for multisite is performed before any site deletion logic is processed. 87 | * This is applicable to open and closed networks. 88 | 89 | ## wp-admin/my-sites.php 90 | 91 | 1. A check for multisite is performed before showing the My Sites page. 92 | * This is applicable to open and closed networks. 93 | 94 | ## wp-admin/includes/admin.php 95 | 96 | 1. Used to load `wp-admin/includes/ms.php` and `wp-admin/includes/ms-deprecated.php` 97 | * This is applicable to open and closed networks. 98 | 99 | ## wp-admin/includes/ajax-actions.php 100 | 101 | 1. Used before fully firing `wp_ajax_autocomplete_user()`. `wp_die( -1 )` is used if not multisite. 102 | * This is applicable to open and closed networks. 103 | 104 | ## wp-admin/includes/class-wp-importer.php 105 | 106 | 1. Used to determine if `switch_to_blog()` should be used when `set_blog()` fires during an import. 107 | * This is applicable to open and closed networks. 108 | 109 | ## wp-admin/includes/class/wp-plugins-list-table.php 110 | 111 | 1. Used when preparing items for the plugin list table. If multisite is enabled, the advanced plugins list table will display. 112 | * This is likely applicable to open and closed networks, though could be used to display slightly different data. 113 | 1. Used to filter out network only plugins. 114 | * This is applicable to open and closed networks. 115 | 1. Used to help show the update and delete options in either single site mode or in the network admin. 116 | * The behavior of this could change somewhat depending on what restrictions are changed as part of a closed network. This does apply at some level to both open and closed. 117 | 1. Do not show `plugin_rows()` if multisite and not in the network admin **and** looking at mustuse or dropin plugins. 118 | * This could change, though is probably applicable to both closed and open networks. It depends on what access a site on a closed network should have to mu-plugins and drop-in plugins. 119 | 1. Used to prevent the plugin deletion option from appearing in admin area of an individual site. 120 | * This could change if more management flexibility is given to individual sites in a closed network. 121 | 1. Used in combination with `$screen->in_admin( 'network' )` to determine if the edit plugin option should be shown for an individual site. 122 | * This could change if more management flexibility is given to individual sites in a closed network. This also seems scary. :) 123 | 124 | ## wp-admin/includes/class-wp-themes-list-table.php 125 | 126 | 1. Used to guide a network admin to enable or install more themes for an individual site if only one is available in the list table. 127 | * This could change if more management flexibility is given to individual sites for installing themes in a closed network. 128 | 1. Used to show theme deletion options for single site only. 129 | * This could change if individual sites are given the ability to add and remove their own themes. 130 | 131 | ## wp-admin/includes/class-wp-upgrader-skins.php 132 | 133 | 1. Used to determine if a plugin should be network activated once installed by a network administrator. 134 | * This is applicable to both open and closed networks. 135 | 136 | ## wp-admin/includes/class-wp-upgrader.php 137 | 138 | 1. Enter maintenance mode if multisite is enabled and more than one plugins is being bulk upgraded. 139 | * Applicable to both open and closed networks. 140 | * There's a @todo here around only kicking this in for individual sites if possible. That could be a cool feature, especially if sites on a closed network have more control. 141 | 1. Enter maintenance mode if multisite is enabled and more than one theme is being bulk upgraded. 142 | * Applicable to both open and closed networks. 143 | * As with plugins, there is a @todo around maintenance mode for individual sites. 144 | 145 | ## wp-admin/includes/class-wp-users-list-table.php 146 | 147 | 1. Show a "Remove" option to remove users in the users list table rather than the option to delete users from the network entirely. 148 | * This could change if sites are more autonomous around their users. An option to delete a user could be shown if that user is not a member of any other sites on the network. 149 | 1. Used when displaying rows in the users list table. If it is multisite and the user has no role on this site, the user is not shown. 150 | * This seems to be less applicable with closed networks. Open networks can have various registration needs that need to be fulfilled before a user should appear on the site's user list. Closed networks want the user to appear immediately. It may be possible that nothing changes directly here, but that modified closed network behavior as a whole causes a change. 151 | 1. When not multisite, show the delete user option on a single row. 152 | * The determination to display this differently could change one day in a closed network configuration. 153 | 1. When multisite, show the remove user option on a single row. 154 | * The determination to display this differently could change one day in a closed network configuration. 155 | 156 | ## wp-admin/includes/dashboard.php 157 | 158 | 1. If not multisite, or if in the network admin, bring in a feed of popular plugins. 159 | * This use is purely for single site detection. Another check is used for network admin. 160 | * This could change if more plugin management options are provided to sites on a closed network. 161 | 1. If not multisite, return `wp_dashboard_quota()` without doing anything. 162 | 163 | ## wp-admin/includes/deprecated.php 164 | 165 | 1. Helps determine whether to use `user_level` or `capabilities` when retrieving user meta in the deprecated `get_author_user_ids()` 166 | * Applicable to both closed and open networks. Also deprecated. 167 | 1. Helps to determine whether to use `user_level` or `capabilities` when retrieving user meta in the deprecated `get_editable_user_ids()` 168 | * Applicable to both closed and open networks. Also deprecated. 169 | 1. Helps to determine whether to use `user_level` or `capabilities` when retrieving user meta in the deprecated `get_nonauthor_user_ids()` 170 | * Applicable to both closed and open networks. Also deprecated. 171 | 1. Used to help find the correct user meta key in the deprecated WP_User_Search class. 172 | * Applicable to both closed and open networks. Also deprecated. 173 | 174 | ## wp-admin/includes/export.php 175 | 176 | 1. Used to return `network_home_url()` when `wxr_site_url()` fires. 177 | * Applicable to both closed and open networks. 178 | 179 | ## wp-admin/includes/file.php 180 | 181 | 1. Used in a `@uses` comment for `wp_handle_upload()` 182 | 1. Used to show different error messaging in `wp_handle_upload()`. If multisite is not enabled, A suggestion to check your php.ini file is shown. 183 | * Applicable to both open and closed networks. 184 | * Would think this messaging could be improved to show different messaging to a certain level of user so that troubleshooting becomes easier. 185 | 1. When uploading a file, delete the `dirsize_cache` if multisite is enabled. 186 | * Applicable to both closed and open networks. 187 | 188 | ## wp-admin/includes/media.php 189 | 190 | 1. Fires an action when an upload will exceed the defined upload space quota for a site. 191 | * Applicable to both closed and open networks. 192 | 193 | ## wp-admin/includes/misc.php 194 | 195 | 1. Avoid saving rewrite rules in `.htaccess` if multisite is active. 196 | * Applicable to both open and closed networks. 197 | * Kind of a bummer that we can't offer this to multisite installations, though everyone should use nginx anyway. 198 | 1. Avoid saving rewrite rules for IIS if multisite is active. 199 | * Applicable to both open and closed networks. 200 | 201 | ## wp-admin/includes/plugin.php 202 | 203 | 1. Used in `@uses` doc for `_get_dropins()` 204 | 1. Used to add `sunrise.php`, `blog-deleted.php`, `blog-inactive.php`, `blog-suspended.php` to the dropins array. 205 | * This could be changed for close networks to not deal with the deleted, inactive, and suspended dropins. 206 | 1. Returns false if not multisite in `is_plugin_active_for_network()` 207 | * Applicable to both closed and open networks. 208 | 1. Handle network wide plugin activation if this is multisite. 209 | * Applicable to both closed and open networks. 210 | 1. Handle network wide plugin deactivation if this is multisite. 211 | * Applicable to both closed and open networks. 212 | 1. Include network activated plugins in array of plugins to validate in `validate_active_plugins()` if multisite is enabled. 213 | 214 | ## wp-admin/includes/schema.php 215 | 216 | 1. Used first to set the `$is_multisite` variable inside `wp_get_db_schema()` in combination with the `WP_INSTALLING_NETWORK` constant. 217 | 1. `$is_multisite` is first used to determine if `$global_tables` should be made up of `$users_multi_table` and `$usermeta_table` or `$users_single_table` and `$usermeta_table` 218 | * Seems applicable to both open and closed networks, though see notes on registration and activation elsewhere. 219 | 1. `$is_multisite` is used again when the scope for the schema is global, all, and by default to add the `$ms_global_tables` to the configuration. 220 | * The schema laid out by `$ms_global_tables` could be reduced if a closed network does not want to allow activations and registrations. This may be more trouble than it's worth. 221 | 1. In `populate_options`, used to determine what DB version to use in a single site install. 222 | * Single site only. Applicable to both open and closed networks. 223 | 1. In `populate_options`, used to set `blogdescription` and `permalink_structure` options. 224 | * Applicable to both open and closed networks. 225 | 1. In `populate_network()`, used to set `$site_admins` array during multisite installation. 226 | * Occurs during network installation only. 227 | * Applicable to both open and closed networks. 228 | 1. In `populate_network()`, used to set the network meta option for `upload_space_check_disabled`. 229 | * Applicable to both open and closed networks. 230 | 1. In `populate_network()`, used to set the network meta option for `ms_files_rewriting`. 231 | * Applicable to both open and closed networks. 232 | 1. During upgrade from single site to multisite, setup the `$current_site` global and other data under the assumption that this site will be the main site on the new network. This does not occur on future uses of `populate_network()`. 233 | * Applicable for both open and closed networks. 234 | 235 | ## wp-admin/includes/theme.php 236 | 237 | 1. Show update messaging for themes in single site mode. 238 | * This is single site specific, but could possibly be changed to included closed networks if the management of themes at individual site levels change at all. 239 | 240 | ## wp-admin/includes/update.php 241 | 242 | 1. Show a core update nag in `update_nag()` if this is multisite and the user can update core. 243 | * Applicable to both open and closed networks. 244 | 1. Show update messaging in individual plugin rows if in the network admin or if in single site. 245 | * Applicable to both open and closed networks. 246 | * This use is more specific to single site. We use `is_network_admin` as the multisite check here. 247 | 248 | ## wp-admin/includes/upgrade.php 249 | 250 | 1. Used to determine if first post content should be retrieved from network options. 251 | * Applicable to both open and closed networks. 252 | 1. Used to determine if the first comment content should be retrieved from network options. 253 | * Applicable to both open and closed networks. 254 | 1.Used to determine if first page content should be retrieved from network options. 255 | * Applicable to both open and closed networks. 256 | 1. Set an option to show the welcome panel in single site mode. We use an else to handle multisite cases and to show a welcome panel for all non-super admin users. 257 | * Applicable to both open and closed networks. 258 | * It would be worth a look at the welcome panel messaging. I'm not sure if it has open network specific language in it. 259 | 1. If multisite, flush rewrite rules to pick up the new page. 260 | * Applicable to both open and closed networks. 261 | 1. Used to fire `upgrade_network()` in `wp_upgrade()` if multisite is enabled and this is the main site. 262 | * Applicable to both open and closed networks. 263 | 1. If multisite, update or set the db_version in the blog_versions table. 264 | * Applicable to both open and closed networks. 265 | 1. In `upgrade_280()`, retrieve all options from the main options table and create copies for individual site options. 266 | * Old and specific. Applicable to both open and closed networks. 267 | 1. In `upgrade_300()`, add a network level option for `siteurl` if this is the main site and a very old DB version. 268 | * Old and specific. Applicable to both open and closed networks. 269 | 1. In `pre_schema_upgrade()`, upgrade the signups and blogs table. 270 | * Old and specific. Applicable to both open and closed networks. 271 | 272 | ## wp-admin/includes/user.php 273 | 274 | 1. In `edit_user()`, don't allow a user with edit user caps to change their own user role to something without those caps. 275 | * Applicable to both closed and open networks. 276 | 1. In `wp_delete_user()`, use `remove_user_from_blog()` rather than deleting the user completely. 277 | * Applicable to both closed and open networks. 278 | * As stated elsewhere, it may be interesting to handle deletion of users in a closed network when a site admin has the ability. 279 | 280 | ## wp-admin/maint/repair.php 281 | 282 | 1. Determine if repair on the `sitecategories` table should be attempted. 283 | * Applicable to both closed and open networks. Old. 284 | 285 | ## wp-admin/network.php 286 | 287 | 1. Used to determine where to redirect after multisite has been installed during initial page load. 288 | * Applicable to both closed and open networks. Used during installation. 289 | 1. As part of `network_step2()`, used to show original configuration steps if multisite is already installed. 290 | * Applicable to both closed and open networks. 291 | 1. Used as a single site check to determine if the "Enabling the Network" messaging should show in `network_step2()`. 292 | * Applicable to both closed and open networks. 293 | 1. Used in `network_step2()` with the `ms_files_rewriting` option to determine what rules should be written to web config. 294 | * Applicable to both closed and open networks. 295 | * Slightly strange as it wouldn't fire during initial installation. 296 | 1. Used in `network_step2()` with the `ms_files_rewriting` option to determine what rules should be written to `.htaccess`. 297 | * Applicable to both closed and open networks. 298 | * Slightly strange as it wouldn't fire during initial installation. 299 | 1. Used as a single site check in `network_step2()` to explain that the network will be enabled once you complete these steps. 300 | * Applicable to both closed and open networks. 301 | * Could benefit from a less confusing `is_single_site()` or `is_installing_network()` or something. 302 | 1. Determine which network step should fire on the initial page load. 303 | * Applicable to both closed and open networks. 304 | 305 | ## wp-admin/options-discussion.php 306 | 307 | 1. Used to display a message that signup has been disabled. Only registered users can comment. 308 | * Could apply to both open and closed networks, though the lines blur a bit. We might want to allow registration to comment as a user of the site, but not register in the same way that it may have been handled before. 309 | 310 | ## wp-admin/options-general.php 311 | 312 | 1. Used when single site to show messaging about the WordPress URL and Site URL being the same or different. 313 | * Applies as a single site indicator. 314 | 1. Used to display the option for WordPress URL, Site URL, and admin notification information on a single site. 315 | * Applies as a single site indicator. 316 | * The registration options here may be useful or provide some guidance depending on how open networks are handled in multisite. What does registration really mean? 317 | 1. If this is multisite and multiple languages are available in `get_available_languages()`, show a drop down for the site specific option. 318 | * Applicable to open and closed networks. 319 | 320 | ## wp-admin/options-media.php 321 | 322 | 1. If a single site, show messaging around the folder and path used for uploading files. 323 | * Applicable to single sites only. 324 | 1. If a single site, show the option for upload folder and path. 325 | * Applicable to single sites only. 326 | 327 | ## wp-admin/options-permalink.php 328 | 329 | 1. Set a blog prefix of `/blog` if this is a subdirectory install of multisite and is on the main site. 330 | * Applicable to both open and closed networks. 331 | 1. If single site, show messaging around updating your `web.config` or `.htaccess`. 332 | * Applicable to single sites only. 333 | 1. Replace any other mention of `blog` in the various permalink bases if multisite and if a subdirectory install and if on the main site. 334 | * Applicable to both open and closed networks. 335 | 1. If single site, show messaging to communicate troubles around updating rewrite rules due to file permissions. 336 | * Applicable to single sites only. 337 | 338 | ## wp-admin/options.php 339 | 340 | 1. Used to determine if admin email change requests should be processed. 341 | * Applicable to both open and closed networks. 342 | 1. If multisite and not a super admin and an action of update, display a cheating message. This page is not normally accessed directly. 343 | * Applicable to open and closed networks. 344 | 1. If single site, whitelist different options for updating than if multisite. 345 | * Applicable to open and closed networks. 346 | 1. If options are being saved and this is multisite and you are not a super admin, display an insufficient permissions error. 347 | * Applicable to open and closed networks. 348 | 349 | ## wp-admin/plugin-editor.php 350 | 351 | 1. If this is multisite and this file is not being accessed in the `wp-admin/network/` area, redirect to the network admin url version. 352 | * Applicable to both open and closed networks. 353 | 354 | ## wp-admin/plugin-install.php 355 | 356 | 1. If this is multisite and this file is not being accessed in the `wp-admin/network/` area, redirect to the network admin url version. 357 | * Applicable to both open and closed networks. 358 | 359 | ## wp-admin/plugins.php 360 | 361 | 1. If activating a plugin and this is multisite and the page is not being accessed under `wp-admin/network/` and this is a network only plugin, redirect to `self_admin_url()`. 362 | * Applicable to both open and closed networks. 363 | 1. When bulk activating, if multisite, check for any network only plugins and unset them from the bulk activation array. 364 | * Applicable to both open and closed networks. 365 | 1. If single site, or if the user can install plugins and is in the `wp-admin/network` area, show a link for 'Add New'. 366 | * Applicable to both open and closed networks. 367 | * If any capabilities were changed for site administrators to install plugins outside of `is_network_admin()`, this could change. 368 | 369 | ## wp-admin/post-new.php 370 | 371 | 1. If multisite, always do `_admin_notice_post_locked()` on `admin_footer`. 372 | * Applicable to both closed and open networks. 373 | 374 | ## wp-admin/post.php 375 | 376 | 1. If multisite, always do `_admin_notice_post_locked()` on `admin_footer`. 377 | * Applicable to both closed and open networks. 378 | 379 | ## wp-admin/theme-editor.php 380 | 381 | 1. If this is multisite and this page is not loaded under `wp-admin/network`, redirect to the network admin URL. 382 | * Applicable to both closed and open networks. 383 | 384 | ## wp-admin/theme-install.php 385 | 386 | 1. If this is multisite and this page is not loaded under `wp-admin/network`, redirect to the network admin URL. 387 | * Applicable to both closed and open networks. 388 | 389 | ## wp-admin/themes.php 390 | 391 | 1. If this is multisite and the current user can install themes, show a message that theme installation can only be done from the network admin. 392 | * Applicable to closed and open networks. 393 | * But wouldn't it be nice if a trusted site admin on a closed network could install their own themes from the theme page. 394 | 1. Used as a single site flag to set an install themes cap check in `_wpThemeSettings` 395 | * Applicable to single sites. 396 | 1. Used as a single site flag to set an install themes URL in `_wpThemeSettings`. 397 | * Applicable to single sites. 398 | 1. If single site and the user has the install_themes capability, show an 'Add New' option. 399 | * Applicable to single site. 400 | 1. If single site or if the current user can manage network themes, show any error messaging. 401 | * Applicable to both closed and open networks. 402 | * Would benefit from any `is_single_site()` change. 403 | 1. If single site and can edit themes and any themes are broken, show messaging. 404 | * Applicable to single site. 405 | 406 | ## wp-admin/update-core.php 407 | 408 | 1. If this is multisite and this page is not loaded under `wp-admin/network`, redirect to the network admin URL. 409 | 410 | ## wp-admin/user-edit.php 411 | 412 | 1. If multisite, check if the site administrator is allowed to edit any user. 413 | * Applicable to both closed and open networks. 414 | 1. If multisite and on a user's own profile page and an option is set to confirm the profile email change, update the user and send. 415 | * Applicable to both closed and open networks. 416 | * But this is kind of confusing. 417 | 1. If multisite and on a user's own profile page and the option to dismiss a confirmation email is selected, don't send an email (?). 418 | * Applicable to both closed and open networks. 419 | * But this is also kind of confusing. 420 | 1. If multisite, update the email address in signups if present. 421 | * Applicable to open networks. Not necessary in a closed network. 422 | 1. If multisite, handle a request to revoke super admin for a user. 423 | * Applicable to both closed and open networks. 424 | 1. If multisite, and a current user cannot create users, but can promote users, show an 'Add Existing' option when on a user edit page that is not the user's. 425 | * Applicable to open and closed networks. 426 | 1. If multisite and in the network admin area and the current user can manage network options, show the option to grant or revoke super admin rights. 427 | * Applicable to open and closed networks. 428 | 429 | ## wp-admin/user-new.php 430 | 431 | 1. If multisite and the current user cannot create or promote users, show a cheating message. 432 | * Applicable to open and closed networks. 433 | 1. If multisite, create functions for `admin_created_user_email()` and `admin_created_user_subject()`, both invitation related emails to new users. 434 | * Applicable to open networks. 435 | * Seems less applicable to closed networks. I wouldn't invite a user, I would add them. 436 | 1. If multisite, use `wpmu_validate_user_signup()` to validate provided new user information, sign them up, and then activate the signup if the no confirmation option is selected. 437 | * Applicable to open networks. 438 | * In a closed network, so much of this is clunky. 439 | 1. If multisite and the user can both create and promote users, set a `$do_both` flag to be used when deciding what options to show for adding a new user. 440 | * Applicable to both closed and open networks. 441 | 1. If multisite, provide different messaging for adding new and existing users. 442 | * Applicable to both closed and open networks. 443 | 1. If multisite, filter whether to enable user auto-complete for non super admins in multisite. 444 | * Applicable to both closed and open networks. 445 | 1. If multisite, process the possible `$_GET['update']` values and provide appropriate messaging. 446 | * Some separation will be required for open and closed networks. These messages include text referencing invitations and confirmation links. 447 | 1. If multisite, determine whether to show messaging for adding an existing user. Then show the form for adding the user. 448 | * Applicable to both closed and open networks. 449 | * Some changes could be made to language around confirmation email in a closed vs open network. 450 | 1. Comment marking end of `is_multisite()` block. 451 | 1. If single site, show fields for First Name, Last Name, Website, and possibly password fields. 452 | * This is single site specific right now, but could be useful for closed networks where individual site administrators want to add more information about users as they are being created. 453 | 1. Comment marking end of `is_multisite()` block. 454 | 1. If multisite and super admin, add an option to skip the confirmation email. 455 | * Applicable to open networks. 456 | * The handling of this confirmation should be changed in general for closed networks. 457 | 458 | ## wp-admin/users.php 459 | 460 | 1. If multisite, show "Remove" user language instead of "Delete" user language. 461 | * Applicable to open networks. May be interesting to change some of the expectations here for closed networks. 462 | 1. When modifying your own user, used to check if you are a super admin if you try editing your user role to something that cannot promote users when your current role can promote users. 463 | * Applicable to open and closed networks. 464 | 1. If this is multisite and a user is being promoted that is not a member of the blog, throw a cheating message. 465 | * Applicable to open and closed networks. 466 | 1. If multisite, handle a dodelete request. User deletion is not allowed from this screen. Redirect. 467 | * Applicable to open and closed networks. 468 | * Though it would be interesting if users could be deleted in some instances. 469 | 1. If multisite, handle a delete request. User deletion is not allowed from this screen. Redirect. 470 | * Applicable to open and closed networks. 471 | * See note above. 472 | 1. If single site, handle a doremove request. Users cannot be removed in single site, only deleted. 473 | * Would benefit from an `is_single_site()` method. 474 | 1. If single site, handle a remove request. Users cannot be removed in single site, only deleted. 475 | * Would benefit from an `is_single_site()` method. 476 | 1. If multisite, and a current user cannot create users, but can promote users, show an 'Add Existing' option when on a user edit page that is not the user's. 477 | * Applicable to open and closed networks. 478 | 479 | ## wp-admin/user/admin.php 480 | 481 | 1. If single site, redirect to the admin URL. 482 | * Applicable to single site. 483 | 484 | ## wp-includes/admin-bar.php 485 | 486 | 1. Used in `wp_admin_bar_site_menu()` to add an `Edit Site` link to the admin bar if the user can manage sites and is a site admin. 487 | * Applicable to both closed and open networks. 488 | 1. In `wp_admin_bar_my_sites_menu()`, don't show the my sites menu for single site users. 489 | * Would benefit from an `is_single_site()` method. 490 | 491 | ## wp-includes/cache.php 492 | 493 | 1. Used when construction `WP_Object_Cache` to set `$this->multisite`, adding more to the list of uses to check... 494 | * Applicable for both closed and open networks. 495 | 1. Used as `$this->multisite` when deciding what blog prefix to use during object cache construction. 496 | * Applicable for both closed and open networks. 497 | * Each use of `$this->multisite` is only to determine if the blog prefix should be used as part of the key. 498 | 499 | ## wp-includes/canonical.php 500 | 501 | 1. If multisite, redirect to the signup location if `wp-register.php` is requested. 502 | * Applicable to open networks. 503 | * A different process should be provided for closed networks that have no registration. 504 | 505 | ## wp-includes/capabilities.php 506 | 507 | 1. If multisite, super admins have all capabilities by definition. 508 | * Applicable to both closed and open networks. 509 | 1. If multisite, `edit_user` and `edit_users` caps are allowed only for super admins. 510 | * Applicable to open networks. 511 | * May be worth discussing the role of a site admin in a closed network. 512 | 1. Used as part of a single site, super admin check when determining if unfiltered uploads should be allowed. 513 | * Applicable to open networks. 514 | * May be worth discussing the role of a site admin in a closed network and how unfiltered uploads could be used. 515 | 1. Do not allow unfiltered HTML if multisite and the user is not a super admin. 516 | * Applicable to open networks. 517 | * May be worth discussing the role of a site admin in a closed network. 518 | 1. Do not allow non super admins in multisite to edit files, plugins, or themes. 519 | * Applicable to open and closed networks. 520 | * There **may** be an argument for allowing site admins to edit files at the site level, but that's way risky. 521 | 1. Do not allow non super admins to update, delete, install plugins, themes, or core. 522 | * Applicable to open networks. 523 | * Changes around plugins and themes could be interesting for site admins on closed networks. 524 | 1. If multisite, check for and set the proper cap for `manage_network_plugins` 525 | * Applicable to open networks. 526 | * If changes were made around site admins, this cap may be adjusted a bit. 527 | 1. If multisite and not a super admin, do not allow the `delete_users` or `delete_user` cap. 528 | * Applicable to open networks. 529 | * Worth discussing the roles of site admins and whether a user deleted from a site could be deleted completely. 530 | 1. If multisite and a super admin and `add_new_users` is a network option (?), add the `create_users` capability. 531 | * Applicable to open networks. 532 | * The super_admin logic could change on closed networks. 533 | 1. In `current_user_can_for_blog()`, determines if we should `switch_to_blog()` 534 | * Applicable for both closed and open networks. 535 | 1. Also in `current_user_can_for_blog()`, determine if we should `restore_current_blog()` 536 | * Applicable for both closed and open networks. 537 | 1. Used in `is_super_admin()` to call `get_super_admins()` for building the super admin list. 538 | * Applicable for both closed and open networks. 539 | 540 | ## wp-includes/class-wp-admin-bar.php 541 | 542 | 1. When initializing the admin bar, if multisite, use `get_active_blog_for_user()` to figure out what domain to show. 543 | * Applicable for both closed and open networks. 544 | 545 | ## wp-includes/class-wp-theme.php 546 | 547 | 1. Always return true in `WP_Theme`'s `is_allowed()` if single site. Otherwise get themes that are allowed on the network and the site. 548 | * Applicable for both closed and open networks. 549 | * Could be interesting to figure out the logic for this if site admins are ever allowed to install themes. 550 | 1. If single site in `WP_Theme`'s `get_allowed_on_site`, use `get_current_blog_id()`. 551 | * Applicable for both closed and open networks. 552 | 553 | ## wp-includes/class-wp-xmlrpc-server.php 554 | 555 | 1. In `wp_getUsersBlogs()`, if single site, return the value of `blogger_getUsersBlogs()` 556 | * Applicable to both closed and open networks. 557 | 1. In `blogger_getUsersBlogs()`, if multisite, return value of `_multisite_getUsersBlogs()`. This retrieves the user's sites. 558 | * Applicable to both closed and open networks. 559 | 560 | ## wp-includes/default-constants.php 561 | 562 | 1. If multisite, define a slightly larger memory limit. 563 | * Applicable to both closed and open networks. 564 | 565 | ## wp-includes/deprecated.php 566 | 567 | 1. Used in deprecated `wp_admin_bar_dashboard_view_site_menu()` to determine what dashboard URL to use for a user. 568 | * Deprecated. Applicable to open and closed networks. 569 | 570 | ## wp-includes/functions.php 571 | 572 | 1. If multisite is enabled and `ms_files_rewriting` is disabled, obey the value of `UPLOADS`. 573 | * Applicable to open and closed networks. 574 | 1. Additional logic around multisite and upload directories. 575 | * Applicable to open and closed networks. 576 | 1. Used in `is_main_site()` to return true if single site. 577 | * Applicable for single site. 578 | 1. Used in `is_main_network()` to return true if single site. 579 | * Applicable for single site. 580 | 1. Used in `global_terms_enabled` to return false if single site. 581 | * Applicable for single site. 582 | 583 | ## wp-includes/l10n.php 584 | 585 | 1. Used in `get_locale()` to help determine what locale to use when multisite is enabled. 586 | * Applicable to both open and closed networks. 587 | 1. Used in `load_default_textdomain` when multisite is enabled to determine which text domain to use. 588 | * Applicable to both open and closed networks. 589 | 590 | ## wp-includes/link-template.php 591 | 592 | 1. In `get_home_url()`, switch to a specified site before looking up the home URL. 593 | * Applicable to both open and closed networks. 594 | 1. In `get_site_url()`, switch to a specified site before looking up the network URL. 595 | * Applicable to both open and closed networks. 596 | 1. In `network_site_url()`, return `site_url()` if single site. Otherwise determine what the current network URL is. 597 | * Applicable to both open and closed networks. 598 | 1. In `network_home_url()`, return `home_url()` if single site. Otherwise determine what the current network's home URL is. 599 | * Applicable to both open and closed networks. 600 | 1. In `network_admin_url()`, return `admin_url()` if single site. Otherwise determine what the current network's admin URL is. 601 | * Applicable to both open and closed networks. 602 | 1. In `get_dashboard_url()`, return `admin_url()` as the user's dashboard URL if this is a single site installation. Otherwise determine which site is the user's primary site and route there. 603 | * Applicable to both open and closed networks. 604 | 605 | ## wp-includes/load.php 606 | 607 | 1. In `wp_not_installed()`, an error message is shown if the requested site is not installed properly and we are not in the middle of installing. 608 | * Applicable to both open and closed networks. 609 | 1. In `wp_get_active_and_valid_plugins()`, add active network plugins to the array of active plugins. 610 | * Applicable to both open and closed networks. 611 | 1. The definition of `is_multisite()`. 612 | * Applicable to everything. 613 | 614 | ## wp-includes/media-template.php 615 | 616 | 1. If multisite is enabled and upload space is not available, include upload limit exceeded messaging in the inline uploader template. 617 | * Applicable to both open and closed networks. 618 | 619 | ## wp-includes/media.php 620 | 621 | 1. Used to determine if upload limit is exceeded in Plupload default parameters. 622 | * Applicable to both open and closed networks. 623 | 624 | ## wp-includes/ms-deprecated.php 625 | 626 | 1. Used 3 times in a comment for `is_site_admin()`, as this was a method of determining if multisite was enabled before 3.0.0. 627 | * Applicable to both open and closed networks. 628 | 629 | ## wp-includes/ms-files.php 630 | 631 | 1. Used only to redirect if multisite is not enabled. 632 | 633 | ## wp-includes/ms-functions.php 634 | 635 | 1. In `get_active_blog_for_user()`, return the only site if single site. If multisite, determine what the user's primary site is and return that. 636 | * Applicable to both open and closed networks. 637 | 638 | ## wp-includes/option.php 639 | 640 | 1. In `wp_load_alloptions()`, if single site, retrieve `alloptions` from cache. If multisite, retrieve `alloptions` from the database. 641 | * Applicable to both open and closed networks. 642 | 1. In `wp_load_alloptions()`, if single site, save `alloptions` to cache. If multisite, don't. 643 | * Applicable to both open and closed networks. 644 | 1. In a comment for `wp_load_core_site_options()` 645 | 1. If single site or using external object cache or installing, return null in `wp_load_core_site_options()`. Otherwise, load options and provide them in cache. 646 | * Applicable to both open and closed networks. 647 | 1. In `get_site_option()` used to check for single site. If single site, retrieve the option with `get_option()`. If multisite, `get_site_option()` retrieves the network level option from sitemeta. 648 | * Applicable to both open and closed networks. 649 | 1. In `add_site_option()`, use `add_option()` if single site, otherwise set the network level option in the sitemeta table. 650 | * Applicable to both open and closed networks. 651 | 1. In `delete_site_option()`, use `delete_option()` if single site, otherwise delete the network level option from the sitemeta table. 652 | * Applicable to both open and closed networks. 653 | 1. In `update_site_option()`, use `update_option()` if single site, otherwise update the network level option in the sitemeta table. 654 | * Applicable to both open and closed networks. 655 | 656 | ## wp-includes/post.php 657 | 658 | 1. In `wp_delete_attachment()`, delete the `dirsize_cache` transient if multisite is enabled. 659 | * Applicable to both open and closed networks. 660 | 661 | ## wp-includes/rewrite.php 662 | 663 | 1. Add rewrite rules for registration and signup if multisite is enabled in and this is the main site. 664 | * Applicable to open networks. 665 | * Likely an opportunity for different behavior in a closed network. 666 | 667 | ## wp-includes/theme.php 668 | 669 | 1. In `wp_get_themes()`, if multisite, process requests for the type of allowed theme to retrieve - network, site, all - for an individual site. 670 | * Applicable to open and closed networks. 671 | 672 | ## wp-includes/update.php 673 | 674 | 1. In `wp_version_check()`, if multisite, set multisite specific reporting data for the API call. 675 | * Applicable to open and closed networks. 676 | 677 | ## wp-includes/user.php 678 | 679 | 1. In `wp_authenticate_spam_check()`, check if the authenticated user has been marked as a spammer or if the user's primary blog has been marked as spam. 680 | * Applicable to open networks. 681 | * May not have a place in a closed network. 682 | 1. In `WP_User_Query::prepare_query()`, add `user_url` to search columns if this is not multisite or if this is multisite and is not a large user installation. 683 | * Applicable to both open and closed networks. 684 | 1. In `WP_User_Query::prepare_query()`, used to help determine if a cap meta query should be added specific to the site. 685 | * Applicable to both open and closed networks. 686 | 1. In `get_blogs_of_user()`, if single site, set the current site data to the `$blogs` array and return. If multisite, use user meta to build a list of sites and return that array. 687 | * Applicable to both open and closed networks. 688 | 689 | ## wp-includes/wp-db.php 690 | 691 | 1. Used in `init_charset()` if it exists. Sets the charset to UTF8 and the DB collate options. 692 | * Applicable to both open and closed networks. 693 | 1. Used in `set_prefix()` to help determine what table prefix to set. 694 | * Applicable to both open and closed networks. 695 | 1. Used in `get_blog_prefix()` to determine how to build the base prefix for an individual site. 696 | * Applicable to both open and closed networks. 697 | 1. Used twice in `WPDB::tables()` to determine when multisite global tables should be merged into the tables array. 698 | * Applicable to both open and closed networks. 699 | 1. Handle the display of a database error slightly different if multisite is enabled in `WPDB::print_error()`. 700 | * Applicable to both open and closed networks. 701 | 702 | ## wp-admin/network/about.php 703 | 704 | 1. Used only to redirect if multisite is not enabled. 705 | 706 | ## wp-admin/network/admin.php 707 | 708 | 1. Used only to redirect if multisite is not enabled. 709 | 710 | ## wp-admin/network/credits.php 711 | 712 | 1. Used only to redirect if multisite is not enabled. 713 | 714 | ## wp-admin/network/edit.php 715 | 716 | 1. Used only to redirect if multisite is not enabled. 717 | 718 | ## wp-admin/network/freedoms.php 719 | 720 | 1. Used only to redirect if multisite is not enabled. 721 | 722 | ## wp-admin/network/index.php 723 | 724 | 1. Used only to redirect if multisite is not enabled. 725 | 726 | ## wp-admin/network/plugin-editor.php 727 | 728 | 1. Used only to redirect if multisite is not enabled. 729 | 730 | ## wp-admin/network/plugin-install.php 731 | 732 | 1. Used only to redirect if multisite is not enabled. 733 | 734 | ## wp-admin/network/plugins.php 735 | 736 | 1. Used only to redirect if multisite is not enabled. 737 | 738 | ## wp-admin/network/profile.php 739 | 740 | 1. Used only to redirect if multisite is not enabled. 741 | 742 | ## wp-admin/network/settings.php 743 | 744 | 1. Used only to redirect if multisite is not enabled. 745 | 746 | ## wp-admin/network/setup.php 747 | 748 | 1. Used only to redirect if multisite is not enabled. 749 | 750 | ## wp-admin/network/site-info.php 751 | 752 | 1. Used only to redirect if multisite is not enabled. 753 | 754 | ## wp-admin/network/site-new.php 755 | 756 | 1. Used only to redirect if multisite is not enabled. 757 | 758 | ## wp-admin/network/site-settings.php 759 | 760 | 1. Used only to redirect if multisite is not enabled. 761 | 762 | ## wp-admin/network/site-themes.php 763 | 764 | 1. Used only to redirect if multisite is not enabled. 765 | 766 | ## wp-admin/network/site-users.php 767 | 768 | 1. Used only to redirect if multisite is not enabled. 769 | 770 | ## wp-admin/network/sites.php 771 | 772 | 1. Used only to redirect if multisite is not enabled. 773 | 774 | ## wp-admin/network/theme-editor.php 775 | 776 | 1. Used only to redirect if multisite is not enabled. 777 | 778 | ## wp-admin/network/theme-install.php 779 | 780 | 1. Used only to redirect if multisite is not enabled. 781 | 782 | ## wp-admin/network/themes.php 783 | 784 | 1. Used only to redirect if multisite is not enabled. 785 | 786 | ## wp-admin/network/update-core.php 787 | 788 | 1. Used only to redirect if multisite is not enabled. 789 | 790 | ## wp-admin/network/update.php 791 | 792 | 1. Used only to redirect if multisite is not enabled. 793 | 794 | ## wp-admin/network/upgrade.php 795 | 796 | 1. Used only to redirect if multisite is not enabled. 797 | 798 | ## wp-admin/network/user-edit.php 799 | 800 | 1. Used only to redirect if multisite is not enabled. 801 | 802 | ## wp-admin/network/user-new.php 803 | 804 | 1. Used only to redirect if multisite is not enabled. 805 | 806 | ## wp-admin/network/users.php 807 | 808 | 1. Used only to redirect if multisite is not enabled. --------------------------------------------------------------------------------