Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created January 4, 2021 06:56
Show Gist options
  • Save yousufansa/b33391d89f2e450352e08ac92800ccfc to your computer and use it in GitHub Desktop.
Save yousufansa/b33391d89f2e450352e08ac92800ccfc to your computer and use it in GitHub Desktop.
MAS Videos - Structured Data Type Issue Fix
if( ! function_exists( 'masvideos_video_object_structured_data_type_for_page' ) ) {
function masvideos_video_object_structured_data_type_for_page( $types ) {
$key = array_search( 'video', $types );
if ( false !== $key ){
$types[$key] = strtolower( 'VideoObject' );
}
return $types;
}
}
add_filter( 'masvideos_structured_data_type_for_page', 'masvideos_video_object_structured_data_type_for_page' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment