Forum Replies Created
I might be reading this wrong, but from what I understand you can hardcode the plugin slug in the first parameter instead of passing a second one.
“The plugins_url template tag retrieves the url to the plugins directory or to a specific file within that directory. You can hardcode the plugin slug in $path or pass __FILE__ as a second argument to get the correct folder name.”
ya you are right, I was attacking this problem all wrong. Basically I wanted to filter which user get which updates based on the language the update is posted in.
I finally finished with adding this inside the ass_group_notification_activity() function
$skip = false;
$skip = apply_filters( ‘ass_skip_group_notification_per_user’, $content->id, $user_id, $group_id, $group_status );
I suspect that its not the most optimal way of coding it, it looks bloated for what its doing, but I’m not 100% sure of the standard to represent this type of logic in wordpress. I am open to suggestions. I will send over a svn patch after I’m done everything. I’m also adding
since I might add a few more things I’ll refrain from sending you some half ass things that I’ll change later (like I did before… my apologies)
I’m actually now trying to add the same behavior to supersub and sub. I see the ‘ass_this_activity_is_important’ filter, that could be used to mark things as false to make it not send the email. But that doesn’t give me the info I need since I would need the user ID for atleast my purposes.
I’m wondering if perhaps I should not change the way I was trying to solve this problem by replacing it with something like this inside the subscribed users loop:
$this_activity_is_important = apply_filters( ‘ass_this_activity_is_important_per_user’, $content->id, $user_id, $group_id, $group_status );
Sorry for having submitted something that wasn’t 100% thought out. Again I’m not sure if this is the best way, latching onto the existing is_important, but it seems like re-using the current mechanism wouldn’t be such a bad idea. Your thoughts?
Perfect, I wasn’t sure exactly of the order and what is the preference of what to use. I found 5 instance of ‘wp’ used in actions, do you want me to submit an svn diff or is it just as easy for you to do it yourself since you’re maintaining the plugin?
@boonebgorges Thank you! I’m actually playing around with it some more and plan on adding a few more filters, the summary and the disable notification footer message are the next ones on my list. Is there a better way for me to send you a proper patch for all these to make it easier?