I am trying to fetch the image information after multiple images being uploaded to nggallery. Below is my code

    function action_ngg_after_new_images_added( $galleryid, $image_ids ){
foreach($image_ids as $imageid){    

                $this_image = apply_filters( 'ngg_image_object', $galleryid, $imageid );
                if($this_image){
                        print_r($this_image);
                } else {
                        echo "Image not found";
                }
        }
        exit();
}
add_action( 'ngg_after_new_images_added', 'action_ngg_after_new_images_added', 10, 2 );

Please, if someone know the solution, kindly share.

Thanks in advance.

Read more here: Which hook to use to fetch image meta from wordpress nggallery?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: