-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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