WordPress.org

Forums

WP Document Revisions
Echoing File Type on Front End (3 posts)

  1. webrob
    Member
    Posted 1 year ago #

    I have looked in the code and I see that there is a function for get_file_type() & get_file_type().

    How can I get those to echo on the front end???

    http://wordpress.org/extend/plugins/wp-document-revisions/

  2. webrob
    Member
    Posted 1 year ago #

    I have looked through the code cook book and I cannot figure out how to get this part done.

  3. cojennin
    Member
    Posted 1 year ago #

    Try using the global $wpdr class.

    So let's say I did:
    $posts = get_posts ( array( 'post_type' => 'document' ) );

    And it returned an array with one document in it, I could do:
    $wpdr->get_file_type( $posts[0] );

    And that would return the file type of that post. Feel free to post back here if you're still having issues implementing it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.