$value ) { $schema['hasPart'][$key]['@type'] = 'Clip'; $schema['hasPart'][$key]['name'] = wp_strip_all_tags( (string) $value['clip-name'] ); $schema['hasPart'][$key]['startOffset'] = wp_strip_all_tags( (string) $value['clip-start-offset'] ); $schema['hasPart'][$key]['endOffset'] = wp_strip_all_tags( (string) $value['clip-end-offset'] ); $schema['hasPart'][$key]['url'] = esc_url( $value['clip-url'] ); } } if ( isset( $data['seekto-action-start-offset'] ) && ! empty( $data['seekto-action-start-offset'] ) && isset( $data['content-url'] ) ) { $schema['potentialAction']['@type'] = 'SeekToAction'; $schema['potentialAction']['target'] = esc_url( $data['seekto-action-target'] ) . '?t={seek_to_second_number}'; $schema['potentialAction']['startOffset-input'] = 'required name=seek_to_second_number'; } if ( isset( $data['regions-allowed'] ) && ! empty( $data['regions-allowed'] ) ) { $schema['regionsAllowed'] = wp_strip_all_tags( (string) $data['regions-allowed'] ); } if ( isset( $data['is-live-broadcast'] ) && $data['is-live-broadcast'] ) { $schema['publication']['@type'] = 'BroadcastEvent'; $schema['publication']['isLiveBroadcast'] = true; $schema['publication']['startDate'] = ! empty( $data['start-date'] ) ? wp_strip_all_tags( (string) $data['start-date'] ) : null; $schema['publication']['endDate'] = ! empty( $data['end-date'] ) ? wp_strip_all_tags( (string) $data['end-date'] ) : null; } return apply_filters( 'wp_schema_pro_schema_video_object', $schema, $data, $post ); } } }