Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created December 9, 2021 14:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/c382a05bf3d573fa919429cab01a8859 to your computer and use it in GitHub Desktop.
Save jesseeproductions/c382a05bf3d573fa919429cab01a8859 to your computer and use it in GitHub Desktop.
Add the Event Scheduled to the Event Status if no value for it is exists.
/**
* Add the Event Scheduled to the Event Status if no value for it is exists.
*/
add_filter( 'tribe_json_ld_event_object', function ( $data, $args, $post ) {
if ( ! empty( $data->eventStatus ) ) {
return $data;
}
$data->eventStatus = 'https://schema.org/EventScheduled';
return $data;
}, 1000, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment