Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Need to have action hooks for deleting pictures from albums #5

Closed
oblaksoft opened this Issue · 3 comments

2 participants

@oblaksoft

Here is a patch (authored against http://downloads.wordpress.org/plugin/bp-album.0.1.8.14.zip) that would accomplish this:

--- a/bp-album/includes/bpa.core.php
+++ b/bp-album/includes/bpa.core.php
@@ -675,6 +675,8 @@ function bp_album_delete_picture($id=false){
        @unlink($pic->pic_mid_path);
        @unlink($pic->pic_thumb_path);
 
+       do_action('bp_album_delete_picture', $pic);
+
        bp_album_delete_activity( $pic->id );
 
        return $pic->delete();
@@ -708,6 +710,8 @@ function bp_album_delete_by_user_id($user_id, $remove_files = true){
            @unlink($pic->pic_mid_path);
            @unlink($pic->pic_thumb_path);
 
+           do_action('bp_album_delete_picture', $pic);
+
        }
    }

@fanquake
Collaborator

@oblaksoft

Can you submit the changes as a pull request? We can merge this straight away.

For a small change like this, just hit the "Edit" button on this screen -> https://github.com/BP-Media/bp-album/blob/master/includes/bpa.core.php

You can make the change's you'd like, and when you save them them you'll be taken to a screen for submitting a pull request.

@oblaksoft

@fanquake

Done. Thank you for the tip!

@fanquake
Collaborator

Closing in favour of #6

@fanquake fanquake closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.