MediaPress 1.0.4 available now
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 the photo
- Fix lightbox settings to be applied properly(enabling/disabling)
- Adding basic debug info for Media
- The default status is set to public for media list shortcode to avoid listing private media
- Fix Wall Gallery issue with the Doctype.
- Single Media/Gallery Activity Fix:- Now, will show the activity from all members
- Limit number of media visible in the activity stream
- Add the "Galleries" link to the 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 lightbox in settings, you can use the following API to open lightboxes.
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 a 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 an inline element
- items:- Array of items recognized by magnific popup as the 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.
Quick 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 every 15 minutes. We initialize the job when MediaPress is activated to avoid multiple cron job issues. 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 hearing about your experience.