Webex_Provider::on_post_save( int $post_id, WP_Post $unused_post, bool $update )
Handles updating Webex meetings on post save.
Contents
Parameters
- $post_id
-
(int) (Required) The post ID.
- $unused_post
-
(WP_Post) (Required) The post object.
- $update
-
(bool) (Required) Whether this is an existing post being updated or not.
Source
File: src/Tribe/Meetings/Webex_Provider.php
public function on_post_save( $post_id, $unused_post, $update ) {
if ( ! $update ) {
return;
}
$event = tribe_get_event( $post_id );
if ( ! $event instanceof WP_Post || empty( $event->duration ) ) {
// Hook for the Event meta save to try later in the save request, data might be there then.
if ( ! doing_action( 'tribe_events_update_meta' ) ) {
// But do no re-hook if we're acting on it.
add_action( 'tribe_events_update_meta', [ $this, 'on_post_save' ], 100, 3 );
}
return;
}
$meeting_handler = $this->container->make( Meetings::class );
$meeting_handler->update( $event );
}
Changelog
| Version | Description |
|---|---|
| 1.9.0 | Introduced. |