This repository has been archived by the owner on Nov 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Prevent double Imports (Implement Import Filters) #49
Labels
Milestone
Comments
Sure thing, thats a missing feature. Some thoughts about this…
namespace W2M\Import\Filter;
use
W2M\Import\Type;
interface PostImportFilterInterface {
/**
* Checks if a post should be imported or not
*
* @param Type\ImportPostInterface $import_post
*
* @return bool
*/
public function post_to_import( Type\ImportPostInterface $import_post );
}
namespace W2M\Import\Filter;
use
W2M\Import\Type,
WP_Post;
class DuplicatePostFilter implements PostFilterInterface {
/**
* Checks if a post should be imported or not
*
* @param Type\ImportPostInterface $import_post
*
* @return bool
*/
public function post_to_import( Type\ImportPostInterface $import_post ) {
// check for existing post here
}
/**
* Records new imported post
*
* @wp-hook w2m_post_imported
*
* @param WP_Post $wp_post
* @param Type\ImportPostInterface $import_post
*/
public function mark_imported_post( WP_Post $wp_post, Type\ImportPostInterface $import_post ) {
// save post meta to identify the post here
}
} Update |
dnaber-de
changed the title
Prevent double Imports
Prevent double Imports (Implement Import Filters)
Feb 2, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
dnaber-de
added a commit
that referenced
this issue
Feb 7, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When we run the Import more then one time, then we get doublicated data.
The text was updated successfully, but these errors were encountered: