Add Revision Support

Home Forums Calendar Products Events Calendar PRO Add Revision Support

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #699385
    Stephen Gasser
    Participant

    Good evening,

    I’m currently trying to add revision support to our Calendar and I’m unsuccessful. I have tried both WordPress’ add_post_type_support() and the Tribe Filter tribe_events_register_event_type_args and neither options are working.

    I know I’m in the filter because if I remove the return in the function it takes out everything that’s supported. I have tried returning the support array multiple ways and I’m unsuccessful as well. My code is below and it’s in the functions.php file.

    add_filter( 'tribe_events_register_event_type_args', function( $postTypeArgs ) {
    	$postTypeArgs['supports'][] = 'revisions';
    	return $postTypeArgs;
    }, 10, 1 );
    #700066
    Barry
    Member

    Hmm, seems to work for me. When testing this did you actually do something (ie, update one of the events) so as to generate a revision?

    The meta box won’t actually display unless there are revisions available.

    #701159
    Stephen Gasser
    Participant

    Yes, I updated the event and it still didn’t show up. I also outputted all the filters using $wp_filter and I didn’t see it show up in their (not sure if they would, but figured it would).

    #701317
    Barry
    Member

    I’m afraid I’m not sure what else to suggest.

    That code works as expected on my end, and if I update an event a few times the revision metabox (and corresponding entry in the Screen Options pulldown) appear and are functional.

    Showing revisions in Screen Options dropdown (event editor)

    Is it possible something else is getting in the way? Have you tried this snippet after first running through our standard troubleshooting steps?

    #733264
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add Revision Support’ is closed to new replies.