Description
Fires after a video post was updated with the latest details from YouTube by the Update videos tool or the Update video data row and bulk actions. Available since Video Hub 2.3.0.
Parameters
- $post_id
- (int)(required) The post ID.
- $video
- (array)(required) The video details.
- $fields
- (array)(required) The optional fields that were updated:
title,description,image,tags.
Examples
Store the latest view count in a custom field.
add_action( 'cbc_video_post_updated', function( $post_id, $video, $fields ) {
if ( isset( $video['stats']['views'] ) ) {
update_post_meta( $post_id, 'video_views', (int) $video['stats']['views'] );
}
}, 10, 3 );