Hi George,
you can use
if( function_exists('mediapress') ) { // }
to check if MediaPress is active.
To mark a gallery as global shared, you can do the follwoing
mpp_update_gallery_meta( $gallery_id, '_mpp_is_all_upload_allowed', 1);
Hope that helps.
Hi George,
If you are using the global shared gallery, the codempp_update_gallery_meta( $gallery_id, '_mpp_is_all_upload_allowed', 0)
Marks a gallery as shared and anyone can upload to it.
To undo that, you should delete the meta.
The above code does not change the status of the gallery. For changing status/privacy, please see my post about mpp_update_gallery.
Regards
BrajeshPS:- We will release Shared Gallery anytime soon where a user can give fine grained control like ‘view’, ‘edit’, ‘upload’, ‘delete’ to other specific members.
Thank you George.
To delete a gallery, you can use the following
mpp_delete_gallery( $gallery_id, true );
Hope that helps.
Regards
BrajeshThat’s great, nice and simple.
Now there is something that’s come up. As you recall I’ve created a custom post-type with custom fields. The strange thing is that the galleries seem to have adopted some of my custom fields – so when I go to edit a gallery direct, five of my custom fields show up in the custom fields section, two of them ppulated with data from the post. I can’t think why that would happen as the gallery has a different post_id to the custom post. I’ve got some ideas as to why that may be (probably coding errors) but off-hand I can’t see how it’s happening.
Hi George,
That is very strange.Can you please post the code somewhere and link me?
Thank you
Brajesh
The topic ‘ [Resolved] Adding a gallery automatically on post creation’ is closed to new replies.