-
AuthorPosts
-
February 15, 2015 at 2:49 am #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!
February 16, 2015 at 5:56 pm #396858Hey 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,
ElliottMay 24, 2016 at 4:51 pm #637612HI, 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;
}
————————————-May 25, 2016 at 6:51 am #637880Hi!
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,
RikardMay 25, 2016 at 2:36 pm #638040Morining Rikard, I hve added the access information in the private content section.
Thanks,
JohnMay 27, 2016 at 3:56 am #639046Hi,
You should add the code in the theme’s functions.php file, not the functions.php file in the wp-includes folder.
Best regards,
IsmaelMay 27, 2016 at 3:47 pm #639337Ismael,
Thanks for helping with this issue! It is now working perfectly!Regards,
John -
AuthorPosts
- The topic ‘Add revisions for portfolio items’ is closed to new replies.