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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing new ImportListener interfaces #54
- Loading branch information
Showing
5 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php # -*- coding: utf-8 -*- | ||
|
||
namespace W2M\Import\Data; | ||
|
||
use | ||
W2M\Import\Type, | ||
WP_Comment; | ||
|
||
interface CommentImportListenerInterface { | ||
|
||
/** | ||
* @wp-hook w2m_comment_imported | ||
* | ||
* @param WP_Comment $wp_comment | ||
* @param Type\ImportCommentInterface $import_comment | ||
*/ | ||
public function record_comment( WP_Comment $wp_comment, Type\ImportCommentInterface $import_comment ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php # -*- coding: utf-8 -*- | ||
|
||
namespace W2M\Import\Data; | ||
|
||
/** | ||
* Interface ImportListenerInterface | ||
* | ||
* Will replace deprecated IdObserverInterface | ||
* see https://github.com/inpsyde/wpml2mlp/issues/54 | ||
* | ||
* @package W2M\Import\Data | ||
*/ | ||
interface ImportListenerInterface extends | ||
CommentImportListenerInterface, | ||
PostImportListenerInterface, | ||
TermImportListenerInterface, | ||
UserImportListenerInterface | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php # -*- coding: utf-8 -*- | ||
|
||
namespace W2M\Import\Data; | ||
|
||
use | ||
W2M\Import\Type, | ||
WP_Post; | ||
|
||
interface PostImportListenerInterface { | ||
|
||
/** | ||
* @wp-hook w2m_post_imported | ||
* | ||
* @param WP_Post $wp_post | ||
* @param Type\ImportPostInterface $import_post | ||
*/ | ||
public function record_post( WP_Post $wp_post, Type\ImportPostInterface $import_post ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php # -*- coding: utf-8 -*- | ||
|
||
namespace W2M\Import\Data; | ||
|
||
use | ||
W2M\Import\Type, | ||
WP_Term, | ||
stdClass; | ||
|
||
interface TermImportListenerInterface { | ||
|
||
/** | ||
* @wp-hook w2m_term_imported | ||
* | ||
* @param WP_Term|stdClass $wp_term | ||
* @param Type\ImportTermInterface $import_term | ||
*/ | ||
public function record_term( WP_Term $wp_term, Type\ImportTermInterface $import_term ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php # -*- coding: utf-8 -*- | ||
|
||
namespace W2M\Import\Data; | ||
|
||
use | ||
W2M\Import\Type, | ||
WP_User; | ||
|
||
interface UserImportListenerInterface { | ||
|
||
/** | ||
* @wp-hook w2m_user_imported | ||
* | ||
* @param WP_User $wp_user | ||
* @param Type\ImportUserInterface $import_user | ||
*/ | ||
public function record_user( WP_User $wp_user, Type\ImportUserInterface $import_user ); | ||
} |