We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e2affb commit efd5a26Copy full SHA for efd5a26
1 file changed
inc/mpd-functions.php
@@ -638,6 +638,13 @@ function mpd_get_image_alt_tags($post_media_attachments){
638
639
foreach ($post_media_attachments as $post_media_attachment) {
640
641
+
642
+ //pull request fix error in mpd_get_image_alt_tags #54
643
+ if ( array_key_exists( "object", $post_media_attachment ) ) {
644
+ $post_id = $post_media_attachment[ "object" ]->ID;
645
+ } else {
646
+ $post_id = $post_media_attachment->ID;
647
+ }
648
$alt_tag = get_post_meta($post_media_attachment->ID, '_wp_attachment_image_alt', true);
649
650
$alt_tags_to_be_copied[$attachement_count] = $alt_tag;
0 commit comments