[rtmedia_gallery global="false" context="post" context_id="23" media_type="photo" media_author="1"]
- Default is FALSE.
- If set to TRUE, context, context_id, album_id, author_id will be ignored. Only media_type value will be processed.
- The context from which the media should be listed
- a post_type (post, page, event, topic, reply, etc)
- a BuddyPress Component (activity, profile, group)
- a custom context, registered via code
If not provided, the current post type is assumed as the context. If BuddyPress is installed, the context is assumed to be the component on the current page. If bbPress is installed and user is on a forum, the context is set to the current topic or reply.
- id of the current post_type (post, page, event, topic, reply, etc)
- id of the current BuddyPress Component (activity, profile, group)
- id of a custom context, registered via code
This provides the unique id of the context. For custom contexts, the database table and the id column have to be registered via code.
If not specified, all media types will be loaded (except albums).
- If media uploaded by a particular user needs to be displayed, set the user ID here.
- If media uploaded to a particular album needs to be displayed, set the album ID here.
- before : uploader on top of gallery
- after : uploader at the end of gallery
- true : uploader at the end of gallery (alias for after)
If you want to show the uploader along with the gallery, use this “uploader” attribute with above values. Default is FALSE.
Please note that purpose of this shortcode is to provide a simpler way to display public galleries of media content on your site.
Hence for safety of your users,
rtmedia_gallery will always fetch public content only. Some intended side-effects include:
- Uploads in private buddypress groups won’t show even if a user can access by going to that particular buddypress-group
- Uploads for buddypress-profiles, limited to friends/logged-in users won’t show up even if viewer can access them directly by going to a user profile.
Idea is to protect privacy by default.