Tagged: mediapress Gallery
You may use
$count = mpp_get_gallery_count( array( 'component' => 'members', 'component_id' => $user_id, // replace with user id. 'type' => 'photo',// photo, video,audio,doc 'status' => 'public',// if empty, will check for all accessible galleries for the visitor ) );
- This reply was modified 1 week, 4 days ago by Brajesh Singh. Reason: updated code
Please make sure to avoid the return statement. I have updated the code.
1. Please clarify the question. I am not sure of the question.
2. The php code can be used in your ajax handler, I do not see any issue. If you want to implement a client side check using js, you can create an ajax andpoint for your own implementation that checks the status.
1. Do you need to know the count of media in a gallery? do want to knwo it with privacy or without privacy?
2. I will suggest looking at anyone of the tutorials in the search
The topic ‘ [Resolved] Check via PHP if user have galleries Mediapress’ is closed to new replies.