xwp / stream

🗄️ Stream plugin for WordPress

Home Page:https://wordpress.org/plugins/stream/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notification Rule meta data being saved to all post types

fjarrett opened this issue · comments

A user reported in the plugin forum that they were seeing strange post meta appearing on their posts.

triggers: a:0:{}
groups: a:0:{}
alerts: a:0:{}

screen shot 2015-01-21 at 12 28 20 am

I believe this is being caused by the save_post action in WP_Stream_Notifications_Post_Type not properly limiting itself to only adding meta information to Notification Rule posts.

Here is a gist that will remove the unwanted meta from all other post types: https://gist.github.com/fjarrett/be5423e0899895558d75