Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter khelmar

    (@khelmar)

    I’ll take a look – I worked out a way around this using Advanced Custom Fields to create version and a document state item metadata on each document, then, when I loop through all the documents, I use this code:

    $args3 = array(
    'orderby' => 'modified', 
    'order' => 'DESC',
    'fields' => 'ids',
    );
            
    $revisions = wp_get_post_revisions(get_the_ID(), $args3);

    if (get_field(‘document_status’) == “final”) {
    <output code here>
    }

    It means I don’t use WP Document Revision’s workflow state, but it seems to work for now. Thanks for all the advice!

    Thread Starter khelmar

    (@khelmar)

    Thanks! I just figured out yesterday that taxonomies aren’t saved with revisions, so this is really helpful!

Viewing 2 replies - 1 through 2 (of 2 total)