cbc video post updated

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 );

Start importing in minutes

Bring your YouTube content into WordPress and let it update itself. Includes automatic updates and support.