Wordpress/tests
Peter Wilson 36ef9cbca9 Taxonomy: Improve performance of term recounting database queries.
When modifying terms assigned to an object, replace full term recounts with incrementing/decrementing the count as appropriate. This provides a significant performance boost on sites with a high number of term/object relationships and/or posts.

Introduces the functions `wp_increment_term_count()`, `wp_decrement_term_count()`, `wp_modify_term_count_by()` and `wp_modify_term_count_by_now()` for updating the term count.

Introduces the function `_wp_prevent_term_counting()` for preventing double counting on posts that are about to transition.

Adds the parameter `update_count_by_callback` to `register_taxonomy()` to allow developers to use a custom callback for incrementing or decrementing a term count.

Props boonebgorges, davidbaumwald, hellofromTonya, johnbillion, lcyh78, mattoperry, peterwilsoncc, rebasaurus, whyisjake.
Fixes #40351.



git-svn-id: https://develop.svn.wordpress.org/trunk@49141 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-14 00:49:52 +00:00
..
e2e Editor: update JavaScript packages 2020-06-26 13:31:11 +00:00
gutenberg Editor: update packages; Port block supports to WordPress core. 2020-10-13 13:07:23 +00:00
phpunit Taxonomy: Improve performance of term recounting database queries. 2020-10-14 00:49:52 +00:00
qunit REST API: Introduce search post format handler. 2020-10-12 19:52:57 +00:00