Created
January 27, 2021 17:02
-
-
Save yousufansa/0bf3a36ecf982f8a5ab7860c35651113 to your computer and use it in GitHub Desktop.
MAS Videos - Upload Date Structure Data Issue Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function masvideos_structured_data_video_object_upload_date( $data, $post_object ) { | |
$data['uploadDate'] = $post_object->get_date_created()->date( 'c' ); | |
return $data; | |
} | |
add_filter( 'masvideos_structured_data_movie', 'masvideos_structured_data_video_object_upload_date', 10, 2 ); | |
add_filter( 'masvideos_structured_data_video', 'masvideos_structured_data_video_object_upload_date', 10, 2 ); | |
add_filter( 'masvideos_structured_data_tv_show', 'masvideos_structured_data_video_object_upload_date', 10, 2 ); | |
add_filter( 'masvideos_structured_data_episode', 'masvideos_structured_data_video_object_upload_date', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment