• Resolved henebry

    (@henebry)


    Is there a quick way for me to activate revision history for Events? When one of my editors makes a change to a WP Posts, I can rely on being able to roll back changes if they’re no good. But while EM treats Events as Posts in all other respects, it doesn’t give me access to the post’s revision history.

    If there’s a quick fix for this, like adding text to my Custom Theme’s Function file, I’m just computer savvy enough to do that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Here you go:

    function em_enable_event_revisions( $args ) {
    	if( !in_array( 'revisions', $args['supports'] ) ) {
    		$args['supports'][] = 'revisions';
    	}
    	return $args;
    }
    add_filter('em_cpt_event', 'em_enable_event_revisions', 10, 1);
    add_filter('em_cpt_event_recurring', 'em_enable_event_revisions', 10, 1);
    
    Thread Starter henebry

    (@henebry)

    That’s done the trick! Thanks so much!

    Hate to be dense but where do I put this code snippet? Trying to get revision history on event pages. Thanks.

    Thread Starter henebry

    (@henebry)

    Add it to your theme’s functions.php file. If you’re not using a child theme, you should set that up, as otherwise any changes to functions.php will be overwritten if/when your theme gets updated by its creator.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding Revision Support to Events’ is closed to new replies.