acf_get_post_latest_revision()
acf_get_post_latest_revision
This function will return the latest revision for a given post
Хуков нет.
Возвращает
$post_id
. (int)
Использование
acf_get_post_latest_revision( $post_id );
- $post_id (обязательный)
- -
Список изменений
С версии 5.3.8 | Введена. |
Код acf_get_post_latest_revision() acf get post latest revision ACF 6.0.4
function acf_get_post_latest_revision( $post_id ) { // vars $revisions = wp_get_post_revisions( $post_id ); // shift off and return first revision (will return null if no revisions) $revision = array_shift( $revisions ); // return return $revision; }