Edit Flow 0.8 and bbPress activity fix

Edit Flow 0.8 and bbPress

19 Sep 2014


Edit Flow and bbPress status fix

We recently discovered an issue on a client site using Edit Flow 0.8 and bbPress where any bbPress activity rendered in a status feed would disappear if the ‘Custom Status’ module of Edit Flow was enabled. This Edit Flow and bbPress conflict didn’t occur with version 0.7.6 so we investigated 0.8 to resolve the issue.

After some more digging I found that the line breaking everything is here:

File: edit-flow/modules/custom-status/custom-status.php
Function: fix_custom_status_timestamp($data, $postarr)
Line: 1332

Although the function has been updated it has not been commented/documented. If you hide/remove this part everything works:

Basically what is happening is that the status post_date_gmt is being overwritten as this part of the function fires on a filter (wp_insert_post_data). Luckily we don’t have to fork or hack the core of Edit Flow to fix this, we simply apply another filter to our functions.php that runs after, as follows:

This will make sure the bbPress activity status has the right post_date_gmt stored and appears in your status feeds correctly.