Closed sharmashivanand closed 6 years ago
This doesn't really have anything to do with the post format. It's about the type
argument.
But, this is a known issue with some types of media. At the moment, there's no way to distinguish certain items from others.
This should now be better handled in the 5.0 branch. It needs testing.
The equivalent of your code above would be:
echo ( $audio = Hybrid\get_post_media( [ 'type' => 'audio', 'split' => true ] ) );
This should be better now. Only the [embed]
, [playlist]
and auto-embeds aren't covered because they're not specific to any type of media. Those work for both audio and video embeds. I'm not sure how to work around those specifically.
This is going to be a soft close. I'd be happy to reopen with ideas on how to specifically address those 3 cases.
Steps to duplicate: Place the following in content.php content template.
Result: Returns the video media on video post format. Expected result: Return audio media or no media at all.