Update/fix inline docs for `update_object_term_cache()`.

Props DrewAPicture.
Fixes #30731.


git-svn-id: https://develop.svn.wordpress.org/trunk@31012 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-12-31 18:11:22 +00:00
parent b7d63c3192
commit 32e0a1c7b8
1 changed files with 10 additions and 12 deletions

View File

@ -3692,23 +3692,21 @@ function get_object_term_cache($id, $taxonomy) {
}
/**
* Updates the cache for Term ID(s).
* Updates the cache for the given term object ID(s).
*
* Will only update the cache for terms not already cached.
* Note: Due to performance concerns, great care should be taken to only update
* term caches when necessary. Processing time can increase exponentially depending
* on both the number of passed term IDs and the number of taxonomies those terms
* belong to.
*
* The $object_ids expects that the ids be separated by commas, if it is a
* string.
*
* It should be noted that update_object_term_cache() is very time extensive. It
* is advised that the function is not called very often or at least not for a
* lot of terms that exist in a lot of taxonomies. The amount of time increases
* for each term and it also increases for each taxonomy the term belongs to.
* Caches will only be updated for terms not already cached.
*
* @since 2.3.0
*
* @param string|array $object_ids Single or list of term object ID(s)
* @param array|string $object_type The taxonomy object type
* @return null|false Null value is given with empty $object_ids. False if
* @param string|array $object_ids Comma-separated list or array of term object IDs..
* @param array|string $object_type The taxonomy object type.
* @return null|false Null if `$object_ids` is empty, false if all of the terms in
* `$object_ids` are already cached.
*/
function update_object_term_cache($object_ids, $object_type) {
if ( empty($object_ids) )