WordPress/wp-includes
Sergey Biryukov 285d38bd83 Options, Meta APIs: Avoid a race condition causing the first of two subsequent requests updating different options at the same time to lose changes.
Every time an autoloaded option is updated or deleted, the `alloptions` cache is similarly updated. Due to the race condition, on any autoloaded option being updated, every other autoloaded option had its value set to the value at load time, causing a mismatch between the data in the persistent cache and the database.

This change introduces a `$force_cache` parameter for `wp_load_alloptions()` to force an update of the local `alloptions` cache from the persistent cache when an option is added, updated, or deleted, to minimize the chance of affecting other options.

Props fabifott, rmccue, tollmanz, johnjamesjacoby, spacedmonkey, dd32, jipmoors, tellyworth, jeremyclarke, joehoyle, boonebgorges, danielbachhuber, flixos90, jeichorn, mihdan, Grzegorz.Janoszka, SergeyBiryukov.
See #31245.
Built from https://develop.svn.wordpress.org/trunk@46753


git-svn-id: http://core.svn.wordpress.org/trunk@46553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-20 13:42:03 +00:00
..
blocks Docs: Remove some funky nested filters. 2019-10-28 19:04:05 +00:00
certificates HTTP: Update the Root Certificate bundle. 2019-09-12 12:04:59 +00:00
css Block Editor: Revert [46663] which was itself an erroneous revert. 2019-11-05 21:59:03 +00:00
customize Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
fonts
ID3 External Library: Update getid3 to 1.9.18 2019-09-18 14:54:57 +00:00
images Build/Test tools: Update grunt-contrib-imagemin and run it 2019-10-05 14:20:59 +00:00
IXR
js Accessibility: Media: Add an aria-pressed attribute to active button within a button group. 2019-11-18 22:23:03 +00:00
pomo Docs: Correct spelling of "subclass" and "overridden" in various docblocks and error messages. 2019-11-17 07:43:01 +00:00
random_compat
Requests External Libraries: Fix PHP 7.4 compatibility issue in the Requests library. 2019-10-06 17:14:02 +00:00
rest-api Docs: Correct parameter type for $item in WP_REST_Terms_Controller::prepare_item_for_response(). 2019-11-14 08:55:02 +00:00
SimplePie External Libraries: Fix PHP 7.4 compatibility issues in the SimplePie library. 2019-09-23 18:17:58 +00:00
sodium_compat
Text External Libraries: Remove usage of each() from the Text_Diff_Engine_native class. 2017-10-26 12:52:53 +00:00
theme-compat Docs: Correct some more invalid inline docs. 2019-10-31 21:20:02 +00:00
widgets Docs: Correct invalid hook docblock placement. 2019-10-27 19:35:01 +00:00
admin-bar.php Toolbar: Use add_node() instead of add_menu() in core. 2019-11-03 22:14:01 +00:00
atomlib.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
author-template.php Build/Test Tools: Introduce automated PHP compatibility checking. 2019-09-25 13:47:58 +00:00
blocks.php Docs: Docs on docs. Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:30:03 +00:00
bookmark-template.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
bookmark.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
cache.php
canonical.php Docs: Add missing description for $wp_query and $wp_the_query globals. 2019-08-04 01:59:56 +00:00
capabilities.php Docs: Use the {@see ...} tag for the replacement in @deprecated tags, so that Developer Reference could automatically link to the replacement. 2019-11-09 13:05:02 +00:00
category-template.php Docs: Add a @since note about new parameters with the spread operator added to function signatures. 2019-10-09 04:28:02 +00:00
category.php I18N: Improve translator comments. 2019-09-01 17:13:59 +00:00
class-feed.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
class-http.php Coding Standards: Fix WPCS issue in [46690]. 2019-11-10 01:45:02 +00:00
class-IXR.php
class-json.php Docs: Correct @see references for PHP 4 constructors in wp-includes/class-json.php. 2019-11-02 20:13:02 +00:00
class-oembed.php
class-phpass.php Docs: Update URLs in some @link tags and switch them to HTTPS. 2019-11-01 14:57:02 +00:00
class-phpmailer.php General: Patch PHMailer for PHP 7.4 compatibility. 2019-10-03 15:45:59 +00:00
class-pop3.php
class-requests.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class-simplepie.php Autoload: Introduce shim for SPL autoloading. 2016-06-06 03:24:29 +00:00
class-smtp.php Mail: Update PHPMailer to 5.2.27. 2019-09-12 14:37:57 +00:00
class-snoopy.php
class-walker-category-dropdown.php
class-walker-category.php Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:06:03 +00:00
class-walker-comment.php Docs: Add missing description for $comment global. 2019-10-04 22:19:57 +00:00
class-walker-nav-menu.php Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:06:03 +00:00
class-walker-page-dropdown.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
class-walker-page.php Menus: In Walker_Nav_Menu, Walker_Category, and Walker_Page, properly output link attributes having a legitimate "empty" value, for example an HTML data attribute with a value of zero (0). 2019-10-06 15:06:03 +00:00
class-wp-admin-bar.php Toolbar: Properly escape the onclick attribute. 2019-11-15 23:24:02 +00:00
class-wp-ajax-response.php
class-wp-block-parser.php
class-wp-block-styles-registry.php Editor: Fix typo in an error message in WP_Block_Styles_Registry::register(). 2019-10-27 14:09:02 +00:00
class-wp-block-type-registry.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
class-wp-block-type.php
class-wp-comment-query.php Code Modernisation: Replace call_user_func_array() in various __call() methods with dynamic function calls. 2019-09-15 11:53:56 +00:00
class-wp-comment.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class-wp-customize-control.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
class-wp-customize-manager.php Docs: Move the @link tag for Customize API in WP_Customize_Manager::add_setting() and WP_Customize_Setting to a more appropriate place. 2019-11-10 01:43:02 +00:00
class-wp-customize-nav-menus.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
class-wp-customize-panel.php Code Modernisation: Replace call_user_func_array() in wp-includes/class-wp-customize-*.php with direct function calls in combination with the spread operator. 2019-09-15 11:27:55 +00:00
class-wp-customize-section.php Customize: Formally deprecate unused Customizer classes. 2019-11-03 16:48:00 +00:00
class-wp-customize-setting.php Docs: Move the @link tag for Customize API in WP_Customize_Manager::add_setting() and WP_Customize_Setting to a more appropriate place. 2019-11-10 01:43:02 +00:00
class-wp-customize-widgets.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
class-wp-date-query.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
class-wp-dependency.php Docs: Add a @since note about new parameters with the spread operator added to function signatures. 2019-10-09 04:28:02 +00:00
class-wp-editor.php Editor: Pass $editor_id parameter to tiny_mce_plugins, mce_external_plugins, and mce_external_languages filters, for consistency with teeny_mce_plugins. 2019-11-16 16:36:02 +00:00
class-wp-embed.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class-wp-error.php
class-wp-fatal-error-handler.php Site Health: Add a link to "Debugging in WordPress" support article to fatal PHP error handler's default message. 2019-09-16 17:23:55 +00:00
class-wp-feed-cache-transient.php
class-wp-feed-cache.php
class-wp-hook.php Code Modernisation: Replace call_user_func_array() in combination with an empty array in wp-includes/class-wp-hook.php with call_user_func(). 2019-09-15 11:45:56 +00:00
class-wp-http-cookie.php
class-wp-http-curl.php Code Modernization: Remove a workaround for CURLOPT_PROTOCOLS in WP_Http_Curl::request(). 2019-09-20 22:23:58 +00:00
class-wp-http-encoding.php Docs: Switch more docs over to typed array notation, plus some fixes. 2019-10-26 21:09:04 +00:00
class-wp-http-ixr-client.php
class-wp-http-proxy.php Docs: Docblock corrections and improvements, mostly related to various pre_* filters. 2019-09-21 17:41:57 +00:00
class-wp-http-requests-hooks.php
class-wp-http-requests-response.php Docs: Fix and improve inline documentation for the HTTP API. 2019-10-12 18:05:04 +00:00
class-wp-http-response.php Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations. 2019-07-01 08:01:57 +00:00
class-wp-http-streams.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
class-wp-image-editor-gd.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
class-wp-image-editor-imagick.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
class-wp-image-editor.php Docs: Correct spelling of "subclass" and "overridden" in various docblocks and error messages. 2019-11-17 07:43:01 +00:00
class-wp-list-util.php Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes. 2019-07-02 23:42:58 +00:00
class-wp-locale-switcher.php
class-wp-locale.php Code Modernization: Remove all code using a version_compare() with a PHP version older than PHP 5.6. 2019-09-20 22:02:57 +00:00
class-wp-matchesmapregex.php
class-wp-meta-query.php Query: Expand the list of operators available to compare_key in WP_Meta_Query. 2019-09-19 15:03:56 +00:00
class-wp-metadata-lazyloader.php
class-wp-network-query.php Multisite: improve sites_pre_query and networks_pre_query filters, avoiding db queries. 2019-09-12 22:17:55 +00:00
class-wp-network.php Multisite: Improve performance by caching not found lookups for sites and networks. 2019-08-29 12:42:56 +00:00
class-wp-oembed-controller.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
class-wp-oembed.php Code Modernisation: Replace call_user_func_array() in various __call() methods with dynamic function calls. 2019-09-15 11:53:56 +00:00
class-wp-paused-extensions-storage.php
class-wp-post-type.php REST API: Ensure rest_controller instantiates the post type's declared REST controller class. 2019-10-08 13:43:02 +00:00
class-wp-post.php
class-wp-query.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class-wp-recovery-mode-cookie-service.php
class-wp-recovery-mode-email-service.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class-wp-recovery-mode-key-service.php Bootstrap/Load: Allow more than one recovery link to be valid at a time. 2019-04-16 05:09:51 +00:00
class-wp-recovery-mode-link-service.php
class-wp-recovery-mode.php
class-wp-rewrite.php Docs: Use the {@see ...} tag for the replacement in @deprecated tags, so that Developer Reference could automatically link to the replacement. 2019-11-09 13:05:02 +00:00
class-wp-role.php Docs: Switch more docs over to typed array notation, plus some fixes. 2019-10-26 21:09:04 +00:00
class-wp-roles.php Docs: Switch more docs over to typed array notation, plus some fixes. 2019-10-26 21:09:04 +00:00
class-wp-session-tokens.php
class-wp-simplepie-file.php
class-wp-simplepie-sanitize-kses.php
class-wp-site-query.php Multisite: improve sites_pre_query and networks_pre_query filters, avoiding db queries. 2019-09-12 22:17:55 +00:00
class-wp-site.php Multisite: Improve performance by caching not found lookups for sites and networks. 2019-08-29 12:42:56 +00:00
class-wp-tax-query.php
class-wp-taxonomy.php Taxonomy: Correct the initial value for WP_Taxonomy::$labels to match get_taxonomy_labels() return type. 2019-11-18 07:58:59 +00:00
class-wp-term-query.php Docs: Correct and improve the readability of some parameters of WP_Term_Query. 2019-11-04 17:50:02 +00:00
class-wp-term.php
class-wp-text-diff-renderer-inline.php
class-wp-text-diff-renderer-table.php Docs: Correct some invalid hook docblocks. 2019-11-12 22:42:02 +00:00
class-wp-theme.php Docs: Clarify that WP_Theme::get(), ::display(), and several related methods treat the Tags theme header as an array. 2019-11-20 08:31:03 +00:00
class-wp-user-meta-session-tokens.php Docs: Add @see WP_Session_Tokens to the WP_User_Meta_Session_Tokens docblock. 2019-01-09 05:04:50 +00:00
class-wp-user-query.php Docs: Correct accepted values for search_columns parameter in WP_User_Query. 2019-09-17 15:43:56 +00:00
class-wp-user-request.php
class-wp-user.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class-wp-walker.php Docs: Tweak the @since note in Walker::walk() and ::paged_walk() for better readability and consistency with other notes. 2019-10-09 04:35:01 +00:00
class-wp-widget-factory.php Docs: Add missing @deprecated tags to PHP 4 constructors in WP_Widget and WP_Widget_Factory(). 2019-11-02 20:06:03 +00:00
class-wp-widget.php Docs: Correct spelling of "subclass" and "overridden" in various docblocks and error messages. 2019-11-17 07:43:01 +00:00
class-wp-xmlrpc-server.php XML-RPC: Pass correct variable as the URL parameter to http_headers_useragent filter in wp_xmlrpc_server::pingback_ping(). 2019-11-19 11:07:03 +00:00
class-wp.php Docs: Use the {@see ...} tag for the replacement in @deprecated tags, so that Developer Reference could automatically link to the replacement. 2019-11-09 13:05:02 +00:00
class.wp-dependencies.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class.wp-scripts.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
class.wp-styles.php Docs: Further improve documentation of known return types, plus other docs fixes. 2019-11-05 21:27:02 +00:00
comment-template.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
comment.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
compat.php Code Modernization: Remove JSON related polyfills. 2019-09-20 20:16:58 +00:00
cron.php Docs: Docblock corrections and improvements, mostly related to various pre_* filters. 2019-09-21 17:41:57 +00:00
date.php
default-constants.php Bundled Themes: Make Twenty Twenty the new default theme. 2019-09-23 21:00:58 +00:00
default-filters.php Coding Standards: Correct the number of accepted arguments in add_action() calls in wp-includes/default-filters.php for functions that don't accept any arguments. 2019-10-08 03:20:02 +00:00
default-widgets.php
deprecated.php Build/Test Tools: Introduce automated PHP compatibility checking. 2019-09-25 13:47:58 +00:00
embed-template.php
embed.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
error-protection.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
feed-atom-comments.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
feed-atom.php
feed-rdf.php Feeds: improve structure and naming of feed build date helper function. 2019-04-18 17:08:52 +00:00
feed-rss2-comments.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
feed-rss2.php Feeds: improve structure and naming of feed build date helper function. 2019-04-18 17:08:52 +00:00
feed-rss.php
feed.php Docs: Remove incorrect @return tags. 2019-11-14 09:57:03 +00:00
formatting.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
functions.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
functions.wp-scripts.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
functions.wp-styles.php Docs: Correct the documentation placement for wp_print_styles and shortcode_atts_{$shortcode} hooks. 2019-11-09 13:43:01 +00:00
general-template.php Customize: Remove the deprecated -precomposed suffix from apple-touch-icon link in wp_site_icon(). 2019-11-11 10:00:01 +00:00
http.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
kses.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
l10n.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
link-template.php Docs: Clarify default value for the $link parameter in edit_tag_link(), edit_term_link(), and edit_bookmark_link(). 2019-10-03 23:12:57 +00:00
load.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
locale.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
media-template.php Accessibility: Add an aria-current attribute to the Media Library switch links. 2019-11-18 16:51:02 +00:00
media.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
meta.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
ms-blogs.php Docs: Use the {@see ...} tag for the replacement in @deprecated tags, so that Developer Reference could automatically link to the replacement. 2019-11-09 13:05:02 +00:00
ms-default-constants.php
ms-default-filters.php
ms-deprecated.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
ms-files.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-functions.php Networks and Sites: Pass the $blog_id parameter to the newblog_notify_siteadmin filter. 2019-11-11 09:53:02 +00:00
ms-load.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
ms-network.php Multisite: Introduce ms-site.php and ms-network.php files. 2019-01-08 09:15:49 +00:00
ms-settings.php
ms-site.php Docs: Use the {@see ...} tag for the replacement in @deprecated tags, so that Developer Reference could automatically link to the replacement. 2019-11-09 13:05:02 +00:00
nav-menu-template.php Docs: Switch more docs over to typed array notation, plus some fixes. 2019-10-26 21:09:04 +00:00
nav-menu.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
option.php Options, Meta APIs: Avoid a race condition causing the first of two subsequent requests updating different options at the same time to lose changes. 2019-11-20 13:42:03 +00:00
pluggable-deprecated.php
pluggable.php Build/Test Tools: Adjust the test for wp_redirect() status codes added in [46641] per the documentation and coding standards. 2019-11-04 12:59:01 +00:00
plugin.php Docs: Use 3-digit, x.x.x style semantic versioning for $version argument in do_action_deprecated() and apply_filters_deprecated() calls. 2019-11-09 13:57:03 +00:00
post-formats.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
post-template.php Docs: Miscellaneous docblock corrections. 2019-10-28 19:48:01 +00:00
post-thumbnail-template.php
post.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
query.php Docs: Improve documentation of known return types, plus other docs fixes. 2019-11-05 21:23:02 +00:00
registration-functions.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
registration.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
rest-api.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
revision.php
rewrite.php
rss-functions.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
rss.php
script-loader.php Script Loader: In wp_default_packages_inline_scripts(), make sure the root URL middleware is registered before using the media middleware. 2019-11-11 15:10:02 +00:00
session.php Docs: Add missing @deprecated tags in the file docblock of some deprecated files. 2019-10-08 17:19:04 +00:00
shortcodes.php Docs: Correct the documentation placement for wp_print_styles and shortcode_atts_{$shortcode} hooks. 2019-11-09 13:43:01 +00:00
spl-autoload-compat.php
taxonomy.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
template-loader.php
template.php Docs: Add missing description for $comment global. 2019-10-04 22:19:57 +00:00
theme.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
update.php I18N: Capitalize translator comments consistently, add trailing punctuation. 2019-09-03 00:41:05 +00:00
user.php Docs: Use the {@see ...} tag for the replacement in @deprecated tags, so that Developer Reference could automatically link to the replacement. 2019-11-09 13:05:02 +00:00
vars.php
version.php Options, Meta APIs: Avoid a race condition causing the first of two subsequent requests updating different options at the same time to lose changes. 2019-11-20 13:42:03 +00:00
widgets.php Docs: Add a @since note about new parameters with the spread operator added to function signatures. 2019-10-09 04:28:02 +00:00
wlwmanifest.xml
wp-db.php Docs: In various @return tags, list the expected type first, instead of WP_Error. 2019-11-11 02:43:03 +00:00
wp-diff.php Code is Poetry. 2017-11-30 23:11:00 +00:00