WordPress/wp-admin
Boone Gorges 0e7c1d3b14 Use wp_installing() instead of WP_INSTALLING constant.
The `WP_INSTALLING` constant is a flag that WordPress sets in a number of
places, telling the system that options should be fetched directly from the
database instead of from the cache, that WP should not ping wordpress.org for
updates, that the normal "not installed" checks should be bypassed, and so on.

A constant is generally necessary for this purpose, because the flag is
typically set before the WP bootstrap, meaning that WP functions are not yet
available.  However, it is possible - notably, during `wpmu_create_blog()` -
for the "installing" flag to be set after WP has already loaded. In these
cases, `WP_INSTALLING` would be set for the remainder of the process, since
there's no way to change a constant once it's defined. This, in turn, polluted
later function calls that ought to have been outside the scope of site
creation, particularly the non-caching of option data. The problem was
particularly evident in the case of the automated tests, where `WP_INSTALLING`
was set the first time a site was created, and remained set for the rest of the
suite.

The new `wp_installing()` function allows developers to fetch the current
installation status (when called without any arguments) or to set the
installation status (when called with a boolean `true` or `false`). Use of
the `WP_INSTALLING` constant is still supported; `wp_installing()` will default
to `true` if the constant is defined during the bootstrap.

Props boonebgorges, jeremyfelt.
See #31130.
Built from https://develop.svn.wordpress.org/trunk@34828


git-svn-id: http://core.svn.wordpress.org/trunk@34793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 15:06:28 +00:00
..
css Plugins: on the Install page, move the name of each plugin into the <h4> to accommodate screen readers. 2015-10-02 04:16:27 +00:00
images
includes Use wp_installing() instead of WP_INSTALLING constant. 2015-10-05 15:06:28 +00:00
js Customize: Fix nav_menu_item CSS classes array being incorrectly presented in input field as comma-delimited list. 2015-10-03 00:15:24 +00:00
maint
network MS: Use *_network_option() functions throughout core. 2015-10-02 19:08:26 +00:00
user
about.php About: Remove period from placeholder. 2015-09-11 19:27:24 +00:00
admin-ajax.php Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user. 2015-09-18 20:14:24 +00:00
admin-footer.php
admin-functions.php
admin-header.php
admin-post.php Superglobals: Revert [34059] until further notice. 2015-09-17 12:33:26 +00:00
admin.php Use wp_installing() instead of WP_INSTALLING constant. 2015-10-05 15:06:28 +00:00
async-upload.php Superglobals: Revert [34059] until further notice. 2015-09-17 12:33:26 +00:00
comment.php Include placeholders in translator comments. 2015-09-18 18:58:24 +00:00
credits.php Move ad hoc functions from wp-admin/credits.php to wp-admin/includes/credits.php, which is only included by the former. 2015-09-11 04:55:26 +00:00
custom-background.php callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead. 2015-09-25 23:58:25 +00:00
custom-header.php callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead. 2015-09-25 23:58:25 +00:00
customize.php Customize: Reduce peak memory usage by JSON-encoding settings and controls individually. 2015-09-17 19:42:26 +00:00
edit-comments.php Comments: add date column to WP_Comments_List_Table to allow sorting and to break out the date/time from the comment content column. 2015-09-24 17:27:26 +00:00
edit-form-advanced.php Replace a stray semicolon on Edit Page screen with a full stop. 2015-09-26 13:44:26 +00:00
edit-form-comment.php Add missing translator comment after [34295]. 2015-09-18 18:50:24 +00:00
edit-link-form.php
edit-tag-form.php When applying the 'editable_slug' filter, add a second param that provides more context. 2015-09-19 05:49:24 +00:00
edit-tags.php Remove the ability to view the term editing screen for taxonomies with show_ui set to false. It is unexpected and unintended behaviour that this is allowed. 2015-09-20 17:11:25 +00:00
edit.php Remove the ability to view the post listing screen and post editing screen for post types with show_ui set to false. It is unexpected and unintended behaviour that this is allowed. 2015-09-15 10:27:29 +00:00
export.php Export: allow Media to exported separately from other types. 2015-09-19 16:47:25 +00:00
freedoms.php About: Third pass at 4.3 about page: 2015-08-13 22:11:35 +00:00
import.php
index.php Replace some hyphens with &mdash;s in admin help tabs. 2015-08-19 04:53:25 +00:00
install-helper.php
install.php Install: Replace the "Privacy" setting with the "Search Engine Visibility" setting from Reading Settings. 2015-10-01 21:35:25 +00:00
link-add.php
link-manager.php
link-parse-opml.php
link.php
load-scripts.php Create a new file, wp-admin/includes/noop.php, which loads all of the noop functions for load-script|styles.php and is only loaded by those files. DRYs in the process. 2015-09-11 05:04:23 +00:00
load-styles.php Create a new file, wp-admin/includes/noop.php, which loads all of the noop functions for load-script|styles.php and is only loaded by those files. DRYs in the process. 2015-09-11 05:04:23 +00:00
media-new.php media-new.php, when using the browser uploader, if the result of uploading is a WP_Error - wp_die() with the error, instead of redirecting with a generic error. 2015-09-10 17:18:24 +00:00
media-upload.php Provide more helful feedback than just "Cheatin' uh?" for permission errors in wp-admin/media-upload.php. 2015-09-02 16:21:21 +00:00
media.php
menu-header.php Docs: Document declaration of the $submenu_file global in wp-admin/menu-header.php. 2015-10-01 01:48:25 +00:00
menu.php Don't show the "Add New" link on post-new.php. 2015-10-01 00:48:25 +00:00
moderation.php
ms-admin.php
ms-delete-site.php
ms-edit.php
ms-options.php
ms-sites.php
ms-themes.php
ms-upgrade-network.php
ms-users.php
my-sites.php Merge two similar strings about insufficient permissions. 2015-07-27 13:25:25 +00:00
nav-menus.php Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/nav-menus.php. 2015-09-02 18:21:21 +00:00
network.php Network Setup: don't use <code> in translation strings in wp-admin/network files. 2015-09-18 18:18:27 +00:00
options-discussion.php Comments: Trash blacklisted comments by default. 2015-10-01 01:49:25 +00:00
options-general.php Add missing translator comments after [34294]. 2015-09-18 18:46:24 +00:00
options-head.php
options-media.php Bump H3 headings to H2 on the Media Settings screen for better accessibility. 2015-09-05 20:12:25 +00:00
options-permalink.php MS: Provide better UI when a main site's /blog prefix is changed. 2015-10-01 20:39:24 +00:00
options-reading.php Move ad hoc Options functions to wp-admin/includes/options.php: 2015-09-10 21:45:24 +00:00
options-writing.php MS: Use *_network_option() functions throughout core. 2015-10-02 19:08:26 +00:00
options.php MS: Use *_network_option() functions throughout core. 2015-10-02 19:08:26 +00:00
plugin-editor.php Switch the remaining user-facing links to wordpress.org over to HTTPS. 2015-10-02 22:46:28 +00:00
plugin-install.php
plugins.php MS: Use *_network_option() functions throughout core. 2015-10-02 19:08:26 +00:00
post-new.php Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/post-new.php. 2015-09-02 18:36:22 +00:00
post.php Respect the force_delete parameter of get_delete_post_link(). 2015-10-03 01:50:25 +00:00
press-this.php Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/press-this.php. 2015-09-02 18:38:21 +00:00
profile.php
revision.php Revisions screen: change language from "Return to post editor" to "Return to editor" - more generic for usage by custom post types. 2015-09-09 03:23:23 +00:00
setup-config.php foreach is a statement, not a function. 2015-08-25 20:28:22 +00:00
theme-editor.php Switch the remaining user-facing links to wordpress.org over to HTTPS. 2015-10-02 22:46:28 +00:00
theme-install.php Themes: Don't use HTML entities for placeholders. 2015-09-12 19:48:24 +00:00
themes.php Notices: Add styles for use against white backgrounds. 2015-09-21 15:26:25 +00:00
tools.php Bump H3 headings to H2 on Tools screen for better accessibility. 2015-08-31 03:32:21 +00:00
update-core.php Plugins: Don't request all fields via plugins_api( 'plugin_information' ) for plugin installs and update checks. 2015-09-26 15:50:25 +00:00
update.php Plugins: Don't request all fields via plugins_api( 'plugin_information' ) for plugin installs and update checks. 2015-09-26 15:50:25 +00:00
upgrade-functions.php
upgrade.php
upload.php Merge some strings in wp-admin/upload.php with existing strings with the same meaning. 2015-10-03 13:57:27 +00:00
user-edit.php MS: Use *_network_option() functions throughout core. 2015-10-02 19:08:26 +00:00
user-new.php Profile: on user-new.php, don't allow the password fields to be hidden. When hidden, you can't add a user. 2015-09-26 06:15:26 +00:00
users.php Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top. 2015-09-27 19:11:26 +00:00
widgets.php Widgets: Introduce a delete_widget action, which fires after a widget has been marked for deletion. 2015-09-30 03:21:26 +00:00