gedex / wp-better-hipchat

This plugin allows you to send notifications to HipChat rooms when certain events in WordPress occur
http://wordpress.org/plugins/better-hipchat/
GNU General Public License v2.0
17 stars 3 forks source link

Specify Own Post Types #4

Closed JamesBurgess closed 2 years ago

JamesBurgess commented 9 years ago

Just a small addition I ended up needing today and thought I'd pass across in case it was useful.

It simply adds an extra field to the settings for each Integration which is a comma-separated list of post types. These post types are then used as the $notified_post_types currently referenced by the existing notifications.

I wasn't particularly sure what to do with the get_events() call in dispatch_events(), but the way I've done it seems to be the cleanest way to get said data into the callbacks for the hooks :smile:

It probably could do with some kind of means to add the post type to the notification output, but that was beyond the scope of what I needed. I'm not aware of any complications this causes elsewhere, it's been firing off notifications fine on this end all afternoon!