[34268] introduced cache priming for commentmeta, enabled by default. To
ensure performance on single post pages - where commentmeta is most likely
to cause performance issues - we disable up-front cache-priming. Instead, we
prime commentmeta caches for all comments in the loop the first time
`get_comment_meta()` is called on the page.
Props bradt, dd32, wonderboymusic, boonebgorges.
Fixes#16894.
Built from https://develop.svn.wordpress.org/trunk@34270
git-svn-id: http://core.svn.wordpress.org/trunk@34234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When there are hundreds of settings and controls (e.g. nav menu items and widget instances) the resulting object that is JSON-encoded can become very large, and `wp_json_encode()` can consume a lot of memory to serialize it. By breaking down the serialization into multiple calls the peak memory usage can be kept in line.
Moves logic out of `wp-admin/customize.php` into the `WP_Customize_Manager` class with new methods:
* `is_ios()`
* `get_document_title_template()`
* `get_preview_url()`/`set_preview_url()`
* `get_return_url()`/`set_return_url()`
* `get_autofocus()`/`set_autofocus()`
* `customize_pane_settings()`
Includes unit tests for these methods, for which the logic was formerly untestable in `customize.php`.
Fixes#33898.
Built from https://develop.svn.wordpress.org/trunk@34269
git-svn-id: http://core.svn.wordpress.org/trunk@34233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The new 'update_comment_meta_cache' parameter, which defaults to `true`, can
be used to disable this behavior.
`update_comment_cache()` has been updated to support an `$update_meta_cache`
parameter, which also updates to true; this matches the pattern we use for
priming post caches.
See #16894.
Built from https://develop.svn.wordpress.org/trunk@34268
git-svn-id: http://core.svn.wordpress.org/trunk@34232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Related to the toolbar view, remove the `wp_admin_canonical_url()` action in grid mode. Grid views that result from links from the list table view are lenses into the library and need to be indicated as such vs being a full attachment query.
Fixes#29744.
Built from https://develop.svn.wordpress.org/trunk@34256
git-svn-id: http://core.svn.wordpress.org/trunk@34220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When a new user is created in various places throughout the interface,
notifications are sent to the site admin and the new user. Previously, these
notifications were fired through direct calls to `wp_new_user_notification()`,
making it difficult to stop or modify the messages.
This changeset introduces a number of new action hooks in place of direct calls
to `wp_new_user_notification()`, and hooks the new wrapper function
`wp_send_new_user_notifications()` to these hooks.
Props dshanske, thomaswm, boonebgorges.
Fixes#33587.
Built from https://develop.svn.wordpress.org/trunk@34251
git-svn-id: http://core.svn.wordpress.org/trunk@34215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[34106] moved post author notification to a hook, and in the process, missed
the 'spam' check. This changeset restores that check.
To make unit testing easier, the notification callbacks have been refactored
to return values: false when various conditions aren't met (eg, approved
comments should not trigger moderation emails), and the return value of the
`wp_notify_*()` function otherwise.
Props cfinke, kraftbj.
See #33587.
Built from https://develop.svn.wordpress.org/trunk@34250
git-svn-id: http://core.svn.wordpress.org/trunk@34214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[13216] introduced the 'public' argument for `register_taxonomy()`. This param
was used to set defaults for 'show_ui' and a number of other params, but it
never did anything itself.
With this changeset, taxonomies registered with `public=false` will no longer
be queryable on the front end, ie via taxonomy archive queries.
Props wpsmith, ocean90, nacin, ericlewis, boonebgorges.
Fixes#21949.
Built from https://develop.svn.wordpress.org/trunk@34247
git-svn-id: http://core.svn.wordpress.org/trunk@34211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Spaces out parameter documentation for readability, fixes some minor syntactical issues, and adds some missing `@access` tags or reorders tags according to the PHP docs standards.
Also, documents `&$found`, the fourth parameter for the `get()` method, and adds missing parameter and return descriptions for the `_exists()` utility method.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@34227
git-svn-id: http://core.svn.wordpress.org/trunk@34191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds some `@see` tags for corresponding `WP_Object_Cache` methods to DocBlocks for top-level functions. Also adds a standard description for the `@global` tags, spacing for parameter docs readability, and finally, properly marks optional parameters as such.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@34225
git-svn-id: http://core.svn.wordpress.org/trunk@34189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change introduces the vernacular of "meta" vs "primitive" capabilities to core docs, and providing examples for each inline and attempts to make it clear that `$object_id` is really only useful if the passed `$capability` is of the meta cap variety.
Props jliman for the initial patch.
Fixes#32694.
Built from https://develop.svn.wordpress.org/trunk@34224
git-svn-id: http://core.svn.wordpress.org/trunk@34188 1a063a9b-81f0-0310-95a4-ce76da25c4cd