stuttter / wp-user-activity

The best way to log activity in WordPress
https://wordpress.org/plugins/wp-user-activity/
GNU General Public License v2.0
42 stars 13 forks source link

How to log the status changes of a post #7

Open garubi opened 8 years ago

garubi commented 8 years ago

I would like to extend the plugin so that I can log when users change the status of a post (Draft, Pending, Published). I looked at the filters and the source code but I'm really lost. WP provides the actions need to trigger it: https://codex.wordpress.org/Post_Status_Transitions but how i can i log them? Some directions, or an example/mockup of the code would be great.

JJJ commented 8 years ago

Check out WP_User_Activity_Type_Posts::transition_post_status().

Basically, I'd appreciate a pull request for the different transition types, so WP User Activity can include support for them out of the box.

Right now, create and future are a little greedy.

JJJ commented 6 years ago

Bumping to 2.1.0.