Hey man, I just had the same issue. I’ve found a solution adding a verification for the $attr['ids']
and the $attr['include']
:
if ( is_array( $attr['ids'] ) ) {
$attachment_ids = array_merge( $attachment_ids, $attr['ids'] );
} else {
$attachment_ids = array_merge( $attachment_ids, explode( ',', $attr['ids'] ) );
}
Make this with the next sentence ($attr['include']
).