_acf_get_stored_values_post_id()
The internal ACF function to return the object whose stored values a save is compared against. Revisions don't store values of their own yet, so they're compared against their parent post.
Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.
Хуков нет.
Возвращает
integer|string.
Использование
_acf_get_stored_values_post_id( $post_id );
- $post_id(int|строка) (обязательный)
- The ACF post ID being saved.
Список изменений
| С версии 6.8.11 | Введена. |
Код _acf_get_stored_values_post_id() acf get stored values post id ACF 6.8.11
function _acf_get_stored_values_post_id( $post_id ) {
$decoded = acf_decode_post_id( $post_id );
$parent = 'post' === $decoded['type'] ? wp_is_post_revision( (int) $decoded['id'] ) : false;
return $parent ? $parent : $post_id;
}