tribe_update_event( int|bool $postId, array $args )
Update an Event using the legacy method.
Contents
Note: This function is outdated and should be replaced with the TEC ORM tribe_events()->save() method.
See also
Parameters
- $postId
-
(int|bool) (Required) ID of the event to be modified.
- $args
-
(array) (Required) Args for updating the post. See tribe_create_event() for more info.
Return
(int|bool) ID of the event that was created. False if update failed.
Source
File: src/functions/advanced-functions/event.php
function tribe_update_event( $postId, $args ) {
$postId = Tribe__Events__API::updateEvent( $postId, $args );
return is_wp_error( $postId ) ? false : $postId;
}
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |