What steps will reproduce the problem?
1. Write a WP plugin that defines a 'ngg_delete_picture' action
2. See it work when deleting an image with the 'delete' link from the admin page
3. See it NOT work when deleting images through 'Bulk actions'
What version of the product are you using? On what operating system?
NGG 1.9.0 on WP 3.2.1
Please provide any additional information below.
When a single image is deleted via the 'delete' link, an action named
'ngg_delete_picture' is run from function processor().
When a gallery is deleted, an action named 'ngg_delete_gallery' is run from
function post_processor_galleries().
However, when one or more images are deleted by selecting them and choosing
'delete images' from the Bulk actions menu, no hooks are activated.
In function post_processor_images(), which processes the bulk action, no
do_action call of any sort is done.
For consistence, please add a hook there as well. My plugin needs it :-)
I propose to add:
do_action('ngg_delete_picture', $imageID);
just below:
$image = $nggdb->find_image( $imageID );
if ($image) {
in function post_processor_images().
Original issue reported on code.google.com by martijng...@gmail.com on 9 Dec 2011 at 8:32
Original issue reported on code.google.com by
martijng...@gmail.com
on 9 Dec 2011 at 8:32