BuddyDev

Search

[Resolved] Point comment on media notification link to activity and not media

  • Participant
    Level: Initiated
    Posts: 2
    Corrado on #24728

    Hi there!
    After a long time using rtMedia I’ve decided to move to Mediapress because of speed and because of how it works!
    I have a Buddypress website with the Kleo theme from themeforest.
    I have disabled commenting on single media and galleries but users can post their pictures and people can comment on the activity page.
    The problem if that when someone comments on my picture, I get a notification and that notification link brings me to the gallery, but I don’t have comments enabled there.
    Is there a way that the link in the notification would bring me to the buddypress activity instead of the gallery?
    Thanks!
    C.

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #24743

    Hi C,
    Thank you for using MediaPress.

    Please put this code in your bp-custom.php or your theme’s functions.php

    
    /**
     * Disable filtering of activity permalink by MediaPress.
     */
    add_action( 'mpp_init', function () {
    
    	if ( has_filter( 'bp_activity_get_permalink', 'mpp_filter_activity_permalink' ) ) {
    		remove_filter( 'bp_activity_get_permalink', 'mpp_filter_activity_permalink', 10 );
    	}
    
    } );
    
    

    That should remove the filtering of activity permalink and resolve the issue.

    Please do let me know if it works for you or not?

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 2
    Corrado on #24751

    Hi Brajesh

    Works like a charm! 🙂

    Thank you so much! And congratulations for the great work with the Mediapress plugin!

    Regards
    Corrado

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #24770

    Hi Corrado,
    Thank you.

    I am glad you like MediaPress.

    Regards
    Brajesh

The topic ‘ [Resolved] Point comment on media notification link to activity and not media’ is closed to new replies.

This topic is: resolved