mpp_get_gallery_type( $gallery = false )
Returns the type of current gallery in the loop. The possible values are unique names used while registering media types eg. “photo”, “video”, “doc” etc.
Usage
1 | <?php $type = mpp_get_gallery_type();?> |
Parameters
This function takes the MPP_Gallery object or gallery id as parameter if being used outside the gallery loop. In the loop, it will return the type of current gallery.
Returns
String – Any of the registered media type e.g “photo”, “video”, “doc”, “audio” etc.
Note:-
See MediaPress gallery loop on how to use it.
Changelog
- Since 1.0.0