Custom post type support? (8 posts)

  1. stl99
    Posted 4 years ago #


    Thanks for the plugin!!

    I really like the export feature of your plugin but I need to track custom post types as wells - any chance you will add this anytime soon? Is there maybe a hack available until then?



  2. Miguel Peixe
    Posted 4 years ago #

    Hey stl99,

    I was wondering that too. Apparently this code on your functions file should do the trick:

    add_action('publish_{$post-type}', 'act_post_add');
    add_action('{$post-type}_updated', 'act_post_update');
    add_action('delete_{$post-type}', 'act_post_del');

    But for some reason it creates a duplicate entry for publish, no entry for updated and the delete works fine.

    Any ideas?

  3. Miguel Peixe
    Posted 4 years ago #

    Oh, and {$post-type} should be replaced with your custom post type

  4. Dric
    Plugin Author

    Posted 4 years ago #


    It seems like there is no action hook for modified custom type posts.
    I still can't understand why custom type posts are not processed the same way as regular posts.

    @Miguel : Do you know in wich WordPress file is the do_action('publish_{$post-type}') ? I can't find it.

  5. Miguel Peixe
    Posted 4 years ago #

    Hi Dric,

    The action hook is actually this one:
    add_action('{$new_status}_{$post->post_type}', 'your_function');

    It's suppose to work just like the post action hook (used in WP-Activity). Still looking for a solution.

  6. Miguel Peixe
    Posted 4 years ago #

  7. Dric
    Plugin Author

    Posted 4 years ago #

    I found the code :

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    With 'transition_post_status' action, I should be able to handle custom type posts as well as regular posts.
    But for updated custom type posts...

  8. Miguel Peixe
    Posted 3 years ago #

    Any news on this matter?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Activity
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic