Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #396273

    Hi there! Is it possible to add revisions (history of edits/restore previous versions) for Portfolio items? This would be a huge help for our site.

    Thanks!

    #396858

    Hey koken13!

    Try adding this to the bottom of your functions.php file.

    add_filter( 'avf_portfolio_cpt_args', 'enfold_customization_revisions', 1 );
    function enfold_customization_revisions( $args ) {
    	$args['supports'] = array( 'title', 'thumbnail', 'excerpt', 'editor', 'comments', 'revisions' );
    	return $args;
    }

    Regards,
    Elliott

    #637612

    HI, i ADDED THE CODE BUT i AM GETTING THE FOLLOWING ERROR WHEN i OPEN MY WEBSITE:

    Fatal error: Call to undefined function add_filter() in /home/storage/2/69/39/tenstep/public_html/tenstep/wp-includes/functions.php on line 5175

    Below is the last few lines of code from the functions.php file located in the wp-includes file. Am I missing something?

    Thanks,
    John

    —————————————–
    <?php
    }

    /**
    * Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601/RFC3339.
    *
    * Explicitly strips timezones, as datetimes are not saved with any timezone
    * information. Including any information on the offset could be misleading.
    *
    * @since 4.4.0
    *
    * @param string $date_string Date string to parse and format.
    * @return string Date formatted for ISO8601/RFC3339.
    */
    function mysql_to_rfc3339( $date_string ) {
    $formatted = mysql2date( ‘c’, $date_string, false );

    // Strip timezone information
    return preg_replace( ‘/(?:Z|[+-]\d{2}(?::\d{2})?)$/’, ”, $formatted );
    }

    add_filter( ‘avf_portfolio_cpt_args’, ‘enfold_customization_revisions’, 1 );
    function enfold_customization_revisions( $args ) {
    $args[‘supports’] = array( ‘title’, ‘thumbnail’, ‘excerpt’, ‘editor’, ‘comments’, ‘revisions’ );
    return $args;
    }
    ————————————-

    #637880

    Hi!

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #638040

    Morining Rikard, I hve added the access information in the private content section.

    Thanks,
    John

    #639046

    Hi,

    You should add the code in the theme’s functions.php file, not the functions.php file in the wp-includes folder.

    Best regards,
    Ismael

    #639337

    Ismael,
    Thanks for helping with this issue! It is now working perfectly!

    Regards,
    John

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Add revisions for portfolio items’ is closed to new replies.