Revisions support with Email Post Changes plugin

This topic contains 14 replies, has 4 voices, and was last updated by  Paolo 8 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #24442

    MC1171611
    Full Member
    Post count: 180

    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.

    #24451

    Guust
    Moderator
    Post count: 29970
    #24513

    MC1171611
    Full Member
    Post count: 180

    I 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.

    #24572

    Guust
    Moderator
    Post count: 29970

    I’ll get Stiofan to have a look at this.

    #24573

    Paolo
    Site Admin
    Post count: 31206

    It 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 formats

    However 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

    #24636

    MC1171611
    Full Member
    Post count: 180

    Awesome…but exactly where am I adding this code?

    #24654

    Guust
    Moderator
    Post count: 29970

    That would be in your child theme’s functions.php

    #25154

    MC1171611
    Full Member
    Post count: 180

    Ok, 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 11

    On this:

    $args['supports'][]=’revisions’;

    Anything I can change?

    #25156

    Guust
    Moderator
    Post count: 29970

    WP Admin details please.

    #25166

    MC1171611
    Full Member
    Post count: 180
    This reply has been marked as private.
    #25167

    MC1171611
    Full Member
    Post count: 180

    I commented out the errant lines so that the site would function.

    #25274

    Paolo
    Site Admin
    Post count: 31206

    I’ve asked Stiofan to review the function.

    Thanks for your patience,

    #25287

    MC1171611
    Full Member
    Post count: 180

    I’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.

    #45235

    jkirker
    Lifetime Member
    Post count: 298

    Paolo, 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.

    #45238

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

Viewing 15 posts - 1 through 15 (of 15 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket