update_postmeta_cache()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
update_postmeta_cache( int[] $post_ids ): array|false
Описание
Выполняет SQL-запрос для получения метаданных по идентификаторам записей и обновляет кэш метаданных этих записей. Благодаря этому функциям, вызывающим её, не нужно выполнять SQL-запросы самостоятельно.
Оригинал (английский)
Performs SQL query to retrieve the metadata for the post IDs and updates the metadata cache for the posts. Therefore, the functions, which call this function, do not need to perform SQL queries on their own.
Параметры
$post_ids
int[]
обязательный
Возвращаемое значение
array|false
Исходный код
wp-includes/post.php:7869
function update_postmeta_cache( $post_ids ) {
return update_meta_cache( 'post', $post_ids );
}
История изменений
| Версия | Описание |
|---|---|
| 2.1.0 | Introduced. |

