Revisions support with Email Post Changes plugin
This topic contains 14 replies, has 4 voices, and was last updated by Paolo 10 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: changes, Custom Post Types, Revisions
-
AuthorPosts
-
December 16, 2014 at 6:28 am #24442
I’m wanting to use the “Email Post Changes” plugin to keep track of edits that take place on my site. However, the GeoDirectory custom post type for Places doesn’t seem to support revisions, even though I tried to modify the plugin to maintain revisions.
The Email Post Changes plugin only tracks changes to post types that support revisions, which makes it useless for GeoDirectory. Is there a way that I can change the setting to make the plugins work together?
Thanks.
December 16, 2014 at 9:30 am #24451Have a look at this post: https://wpgeodirectory.com/support/topic/does-the-framework-got-wordpress-revisions/
Let us know how you went.
December 16, 2014 at 3:46 pm #24513I already checked wp-config, and it was already enabled, and I even tried changing this:
if ( !defined('WP_POST_REVISIONS') ) define( 'WP_POST_REVISIONS', 0);But nothing changed. I was looking here: http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
Under “supports,” and I was wondering if the gd_place custom post type has actually been registered as supporting revisions.
December 16, 2014 at 9:16 pm #24572I’ll get Stiofan to have a look at this.
December 16, 2014 at 9:16 pm #24573It doesn’t support revisions and you can see what it supports by default in the custom post type menu:
Author
Thumbnail
Excerpt
Custom fields
Comments
Post formatsHowever there is a hook there and we can add anything on the fly…
Try this:
add_filter(‘geodir_post_type_args’,’geodir_post_type_args_my_filter’,10,2);
function geodir_post_type_args_my_filter( $args , $post_type){
if($post_type==’gd_place’){
$args[‘supports’][]=’revisions’;
}
return $args;
}This should add revisions to gd_places.
we haven’t tested it.
Let us know,
Thx
December 17, 2014 at 2:57 am #24636Awesome…but exactly where am I adding this code?
December 17, 2014 at 9:45 am #24654That would be in your child theme’s functions.php
December 20, 2014 at 11:38 pm #25154Ok, this is the error I’m getting:
Parse error: syntax error, unexpected 'supports' (T_STRING) in /home/kjbonly/kjbonly.com/wp-content/themes/geodir_gdf-modern-child/functions.php on line 11On this:
$args['supports'][]=’revisions’;Anything I can change?
December 20, 2014 at 11:46 pm #25156WP Admin details please.
December 21, 2014 at 1:28 am #25166This reply has been marked as private.December 21, 2014 at 1:28 am #25167I commented out the errant lines so that the site would function.
December 22, 2014 at 6:16 pm #25274I’ve asked Stiofan to review the function.
Thanks for your patience,
December 22, 2014 at 8:03 pm #25287I’m going with a different plugin instead, and hopefully that will work. I do think that revisions is an important feature to add to GD.
July 10, 2015 at 2:59 pm #45235Paolo, did Stiofan ever get this resolved? I’m going to need revisions for my listings. In the past we have had people with malicious intent come in and damage listings, delete content, etc.
July 10, 2015 at 3:26 pm #45238Hi,
GD will not able to use posts revisions as part of the information isn’t available in regular wp_posts database table, but they are only available in custom tables, so any revision would have missing information.
A regular backup is a much better solution for your problem.
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket