WordPress/wp-includes
Jeremy Felt 19f988840f Multisite: Wrap the main bootstrap process in a function
Introduce `ms_load_current_site_and_network`. This is used by core during the multisite bootstrap process to populate the `$current_site` and `$current_blog` globals based on a requested domain and path.

Return values from this function inform `ms-settings.php` as to whether a page view should continue, `ms_not_installed()` should fire, or a redirect to a new location should occur.

This was previously a procedural block in `ms-settings.php`. Wrapping this code and providing specific return values allows us to write tests that do not rely on the manual and repeated inclusion of `ms-settings.php`.

This should not be used by plugins or themes. Please.

See #34941.

Built from https://develop.svn.wordpress.org/trunk@37475


git-svn-id: http://core.svn.wordpress.org/trunk@37443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-20 20:57:28 +00:00
..
ID3
Requests HTTP API: Fix compatibility with cURL <7.22 2016-05-13 11:15:29 +00:00
SimplePie
Text
certificates Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
css System font: The stack does not work with the `font` shorthand property. 2016-05-17 01:45:27 +00:00
customize Customize: Change attachment condition in the site icon control to prevent errors. 2016-05-17 20:39:30 +00:00
fonts Dashicons: Fix incorrect ID in SVG version of font. 2016-03-18 20:43:26 +00:00
images
js Update jQuery Migrate to 1.4.1 2016-05-20 06:11:28 +00:00
pomo
random_compat Update Random_Compat from 1.1.6 to 1.2.1. 2016-03-08 17:15:27 +00:00
rest-api Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
theme-compat Embeds: Change attachment metadata condition to prevent a warning in the embeds template. 2016-05-17 20:33:29 +00:00
widgets Customize: Include shortcut button in Custom Menu widget to edit the selected menu in the Customizer. 2016-05-16 07:22:30 +00:00
admin-bar.php Add grunt prerelease task 2016-03-10 05:37:27 +00:00
atomlib.php External Libraries: After [37402], replace two more instances of `split()` with `explode()` in `wp-includes/atomlib.php`. 2016-05-19 00:06:28 +00:00
author-template.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
bookmark-template.php
bookmark.php
cache.php Docs: Fix an incorrect Codex link in the file header for wp-includes/cache.php. 2016-05-18 22:07:28 +00:00
canonical.php Canonical: Use `get_the_terms()` to verify that a post belongs to the requested `%category%`. 2016-04-20 15:35:27 +00:00
capabilities.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
category-template.php Introduce `required` argument for `wp_dropdown_categories()`. 2016-05-19 02:39:27 +00:00
category.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-IXR.php IXR: Use a strict comparison to ensure that a non-numerically-indexed array is not incorrectly matched as a numeric array. 2016-04-19 06:13:29 +00:00
class-feed.php
class-http.php HTTP API: Pass array-like object to http_api_debug. 2016-05-16 06:12:29 +00:00
class-json.php
class-oembed.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-phpass.php
class-phpmailer.php
class-pop3.php
class-requests.php HTTP API: Replace internals with Requests library. 2016-05-13 04:42:28 +00:00
class-simplepie.php
class-smtp.php
class-snoopy.php Snoopy: use escapeshellarg instead of escapeshellcmd 2016-03-30 13:58:28 +00:00
class-walker-category-dropdown.php Docs: Improve inline documentation in property and method DocBlocks for `Walker_CategoryDropdown`. 2016-03-22 17:22:29 +00:00
class-walker-category.php Docs: Mark optional parameters in `Walker_Category` methods as such. 2016-03-22 17:30:26 +00:00
class-walker-comment.php Comments: pass `$comment` to `comment_text()` in `Walker_Comment::comment()` instead of using a function which can skip the cache. 2016-04-29 15:47:27 +00:00
class-walker-page-dropdown.php Docs: The page object type in use in `Walker_PageDropdown` is `WP_Post`. 2016-03-22 17:53:27 +00:00
class-walker-page.php Docs: Mark optional method parameters as such in `Walker_Page`. 2016-03-22 18:07:27 +00:00
class-wp-admin-bar.php Docs: Improve the DocBlock summary and add a missing initial `@since` version for `WP_Admin_Bar::add_node()`. 2016-03-03 15:58:27 +00:00
class-wp-ajax-response.php Docs: Document default `WP_Ajax_Response::add()` arguments as a hash notation. 2016-03-18 11:59:27 +00:00
class-wp-comment-query.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-comment.php
class-wp-customize-control.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
class-wp-customize-manager.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
class-wp-customize-nav-menus.php Customize: Require opt-in for selective refresh of widgets. 2016-03-21 21:59:29 +00:00
class-wp-customize-panel.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
class-wp-customize-section.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
class-wp-customize-setting.php Customize: Pass `WP_Customize_Setting` instance as second argument to `customize_value_{$id_base}` filter. 2016-05-02 22:42:26 +00:00
class-wp-customize-widgets.php Customize: Handle filtering `sidebars_widgets` when the underlying option is non-existent. 2016-05-02 23:42:28 +00:00
class-wp-editor.php Editor: Merge two strings. 2016-05-16 18:57:29 +00:00
class-wp-embed.php Docs: Correct grammar when referring to "a URL" vs "an URL" in several places. 2016-03-12 12:39:27 +00:00
class-wp-error.php
class-wp-http-cookie.php
class-wp-http-curl.php Docs: Correct grammar when referring to "a URL" vs "an URL" in several places. 2016-03-12 12:39:27 +00:00
class-wp-http-encoding.php
class-wp-http-ixr-client.php
class-wp-http-proxy.php
class-wp-http-requests-response.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-http-response.php
class-wp-http-streams.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-image-editor-gd.php
class-wp-image-editor-imagick.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-image-editor.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-meta-query.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
class-wp-metadata-lazyloader.php Docs: Standardize file header summary for wp-includes/class-wp-metadata-lazyloader.php. 2016-03-09 16:59:27 +00:00
class-wp-network.php
class-wp-oembed-controller.php
class-wp-post.php
class-wp-rewrite.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-role.php
class-wp-roles.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-site.php Multisite: Introduce `get_site()` 2016-05-20 04:41:27 +00:00
class-wp-tax-query.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
class-wp-term.php
class-wp-theme.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-user-query.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-user.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-walker.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp-widget-factory.php Widgets: Provide PHP 5.2 fallback for `spl_object_hash()` if disabled in logic for registering and unregistering pre-instantiated widgets. 2016-04-30 22:36:28 +00:00
class-wp-widget.php Widgets: Make `WP_Widget` a real abstract class. 2016-05-12 20:23:28 +00:00
class-wp-xmlrpc-server.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
class-wp.php Docs: Remove backticks from the DocBlock summary for `WP::$request`, added in [37356]. 2016-05-05 20:03:27 +00:00
class.wp-dependencies.php Docs: Re-add a `@param` that went missing in [36993]. 2016-03-14 22:39:26 +00:00
class.wp-scripts.php Ensure consistent dependency order when using `wp_add_inline_script()` 2016-04-10 03:33:26 +00:00
class.wp-styles.php Dependencies: Improve group processing of script dependencies. 2016-03-06 19:50:27 +00:00
comment-template.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
comment.php Comments: Add `$data` parameter to include the comment data in the `edit_comment` action. 2016-05-12 15:37:27 +00:00
compat.php
cron.php
date.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
default-constants.php
default-filters.php HTTP API: Add browser compatibility hook for 3xx redirects. 2016-05-13 05:11:27 +00:00
default-widgets.php
deprecated.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
embed-template.php
embed.php System font: The stack does not work with the `font` shorthand property. 2016-05-17 01:45:27 +00:00
feed-atom-comments.php
feed-atom.php
feed-rdf.php
feed-rss.php
feed-rss2-comments.php
feed-rss2.php
feed.php Feeds: Revert [36230] which removed the `rss-http` feed content type. Removing this means that any feeds which are using this feed content type are now being served as `application/octet-stream` instead of `text/xml`. 2016-04-21 18:57:28 +00:00
formatting.php Docs: Correct @since tag for Emoji SVG filters 2016-05-20 06:15:27 +00:00
functions.php REST API: Use prepared JSON data correctly. 2016-05-17 03:55:29 +00:00
functions.wp-scripts.php I18N: Update translator comments after [37190]. 2016-04-13 04:30:29 +00:00
functions.wp-styles.php I18N: Update translator comments after [37190]. 2016-04-13 04:30:29 +00:00
general-template.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
http.php HTTP API: Replace internals with Requests library. 2016-05-13 04:42:28 +00:00
kses.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
l10n.php I18N: In `get_translations_for_domain()` check if the global `$l10n` was set by `_load_textdomain_just_in_time()` before accessing it. 2016-05-16 15:10:29 +00:00
link-template.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
load.php Bootstrap/Load: Silence `ini_set()` in `wp_debug_mode()`. 2016-05-17 20:22:28 +00:00
locale.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
media-template.php Customizer, Site Icon preview: improve alt attributes and text accessibility. 2016-04-17 12:01:27 +00:00
media.php Responsive Images: the `src` of the image has to be first in the `srcset`, because of a bug in iOS8. Update the unit tests to reflect the changes. 2016-03-18 19:45:26 +00:00
meta.php Docs: Improve the DocBlock summary for `wp_metadata_lazyloader()`, introduced in [36566]. 2016-03-10 17:50:27 +00:00
ms-blogs.php Multisite: Introduce `get_site()` 2016-05-20 04:41:27 +00:00
ms-default-constants.php I18N: Remove `<code>` tags from translatable string in `wp-admin/network/site-new.php`. 2016-02-29 03:17:26 +00:00
ms-default-filters.php
ms-deprecated.php
ms-files.php
ms-functions.php Docs: Update the return type for `get_active_blog_for_user()` 2016-03-09 07:50:26 +00:00
ms-load.php Multisite: Wrap the main bootstrap process in a function 2016-05-20 20:57:28 +00:00
ms-settings.php Multisite: Wrap the main bootstrap process in a function 2016-05-20 20:57:28 +00:00
nav-menu-template.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
nav-menu.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
option.php Options: After [33738], consistently pass option name as the second parameter to the `'default_option_' . $option` filter in `add_option()` and `update_option()`. 2016-05-05 20:24:29 +00:00
pluggable-deprecated.php
pluggable.php Users: Correct inline docs for cookie expiration. 2016-04-27 02:52:28 +00:00
plugin.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
post-formats.php
post-template.php Themes: Revert [36112] 2016-04-19 21:24:27 +00:00
post-thumbnail-template.php
post.php Docs: Fix typo in a comment in `check_and_publish_future_post()`. 2016-05-08 12:46:29 +00:00
query.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
registration-functions.php
registration.php
rest-api.php Docs: Improve syntax in the DocBlock for `rest_get_server()`, introduced in [36529]. 2016-03-10 18:49:26 +00:00
revision.php
rewrite.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
rss-functions.php
rss.php External Libraries: Replace `split()` with `explode()` in the deprecated Atom and MagpieRSS files. 2016-05-07 15:59:29 +00:00
script-loader.php Update jQuery Migrate to 1.4.1 2016-05-20 06:11:28 +00:00
session.php
shortcodes.php
taxonomy.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
template-loader.php Embeds: Add support for embeds in the theme template hierarchy. 2016-03-07 19:33:26 +00:00
template.php Docs: Correct a typo in the DocBlock summary for `get_embed_template()`, introduced in [36963]. 2016-03-10 22:45:26 +00:00
theme.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
update.php Docs: Add a couple of spaces before hook docs for filters introduced in 4.5. 2016-03-16 16:15:28 +00:00
user.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
vars.php Uploads: Remove an unnecessary static var from `wp_is_mobile()` to allow its direct and indirect use within unit tests. The static `$is_m 2016-03-03 03:25:26 +00:00
version.php Multisite: Wrap the main bootstrap process in a function 2016-05-20 20:57:28 +00:00
widgets.php Docs: Remove inline `@see` tags from function, class, and method references in inline docs. 2016-05-02 04:00:28 +00:00
wlwmanifest.xml The Pinking Shears stir from their slumber, awakened by what may seem, to those 2013-12-11 19:49:11 +00:00
wp-db.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
wp-diff.php Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00