if ( $meta->post_id !=
$post_id ) { continue;
} if ( is_protected_meta( $meta->meta_key, 'post'
) || !
current_user_can( 'delete_post_meta',
$post_id,
$meta->meta_key
) ) { continue;
} delete_meta( $key );
} } // Attachment stuff.
if ( 'attachment' ===
$post_data['post_type'
] ) { if ( isset( $post_data['_wp_attachment_image_alt'
] ) ) { $image_alt =
wp_unslash( $post_data['_wp_attachment_image_alt'
] );
if ( get_post_meta( $post_id, '_wp_attachment_image_alt', true
) !==
$image_alt ) { $image_alt =
wp_strip_all_tags( $image_alt, true
);