Tagged: mediapress Gallery
Hi,
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 ) );
Regards
Brajesh- This reply was modified 4 years, 2 months ago by Brajesh Singh. Reason: updated code
Hi Giacomo,
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.Regards
BrajeshHi
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
https://www.google.com/search?q=wordpress+ajax+example&oq=wordpress+ajax+exampleRegards
BrajeshSure,
$count = mpp_gallery_get_media_count( $gallery_id );// please change gallery id.
Regards
Brajesh
The topic ‘ [Resolved] Check via PHP if user have galleries Mediapress’ is closed to new replies.