MediaPress 1.0.4 contains numerous enhancements and fixes. The following section lists the improvements:-
- Enabling lightbox for media list shortcode using lightbox=1 in the shortcode
- Enabling lightbox when clicking on single photo in the activity comment on photo
- Fix lightbox settings to be applied properly(enabling/disabling)
- Adding basic debug info for Media
- Default status is set to public for media list shortcode to avoid listing private media
- Fix Wall Gallery issue with the Doc type.
- Single Media/Gallery Activity Fix:- Now, will show the activity from all members
- Limit number of media visible in activity stream
- Add “Galleries” link to User list in the admin for quickly viewing user galleries
- Implementation of the Orphaned Media deletion using wp cron
- Fallback to default view when the active view is not available
If you have enabled the lighbox in settings, you can use the following API to open ligboxes
mpp.lightbox.gallery(gallery_id, position, fallback_url)
Open all photos of the gallery in the lightbox.
- gallery_id : numeric gallery id
- position:- index of the media to be shown as the first when lightbox opens
- fallback_url:- the url to redirect if the lightbox fails to open
Open one or more media in the lightbox
- media_ids:- Comma separated string containing one or more media ids. E.g “1” or “2,3,4” etc
- position:- Index of the media to be shown as first when opening the lightbox
- fallback_url: url to redirect if the lightbox fails
mpp.lightbox.activity( activity_id, position, fallback_url )
Open all photos attached to the given activity in lightbox.
- activity_id:- numeric activity id
- position:- index of the media to be displayed as first
- fallback_url:- where to redirect if lightbox fails
mpp.lightbox.open(items, position, fallback_url)
Low level API, allows opening the collection of items to be opened in the lightbox. The “items” is an array of item recognized by magnific popup as inline element
- items:- Array of items recognized by magnific popup as inline item
- position:- index of the item to be displayed as first
- fallback_url:- where to redirect if lightbox fails.
Limiting no. of displayable Media in the activity:-
Please visit MediaPress->Settings->BuddyPress and you will see this at the bottom
Viewing Debug Info:-
First of all, please Visit MediaPress->Settings->General and enable the debug mode.
After that, please visit Media->Click on individual media and then click on “Edit more details” as shown below.
That will show the debug info for individual media as shown below.
Quickn link to User Galleries of a user from the user list:-
Please note that it doe not check if the user has created a gallery or not(we did it to avoid any performance issue)
Enabling Deletion of Orphaned Media:-
The implementation uses WordPress Cron jobs and schedules the cleanup each 15 minutes. We initialize the job when MediaPress is activated to avoid multiple cron job issue. So, if you want this and you have MediaPress Active, you will need to deactivate and reactivate. For new installs, It will work just fine.
Please get a copy of the updated plugin here.
Looking forward to hear your experience.