When the payload comes from GitHub you have to parse_str on the raw data and then access the payload key, that is what retains the JSON. However, in the interest of backwards compatibility I left the same old method there, but only ran the new method if it failed.
As for the date - it was due to the post_date being empty prior to being passed to get_gmt_from_date so now if it's empty, but is still set, we will now use current_time() to get the WordPress time during import, and no longer pass an empty string to the GMT function.
This fixes #185
Two issues here.
When the payload comes from GitHub you have to
parse_str
on the raw data and then access thepayload
key, that is what retains the JSON. However, in the interest of backwards compatibility I left the same old method there, but only ran the new method if it failed.As for the date - it was due to the
post_date
being empty prior to being passed toget_gmt_from_date
so now if it's empty, but is still set, we will now usecurrent_time()
to get the WordPress time during import, and no longer pass an empty string to the GMT function.