Main goal is: Separation of concerns. That leads to a separation to independent classes of the following features:
Meta-data importing
term linking
sicking post
file downloading and
attachment handling
After the refactoring, the one concern of the existing WpPostImporter class will be to fetch data from the Type\ImportPostInterface and pass it to wp_instert_post() and handling errors within this process. The action w2m_post_imported persists as part of this with the current signature.
The interfaces of the newly provided actors will follow the signature of this action as they'll be registered to this hook.
Main goal is: Separation of concerns. That leads to a separation to independent classes of the following features:
After the refactoring, the one concern of the existing
WpPostImporter
class will be to fetch data from theType\ImportPostInterface
and pass it towp_instert_post()
and handling errors within this process. The actionw2m_post_imported
persists as part of this with the current signature.The interfaces of the newly provided actors will follow the signature of this action as they'll be registered to this hook.