Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Commit

Permalink
Introducing new ImportListener interfaces #54
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaber-de committed Feb 7, 2016
1 parent 47fcccf commit 4020f04
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
18 changes: 18 additions & 0 deletions inc/Import/Data/CommentImportListenerInterface.php
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 );
}
18 changes: 18 additions & 0 deletions inc/Import/Data/ImportListenerInterface.php
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
{}
18 changes: 18 additions & 0 deletions inc/Import/Data/PostImportListenerInterface.php
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 );
}
19 changes: 19 additions & 0 deletions inc/Import/Data/TermImportListenerInterface.php
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 );
}
18 changes: 18 additions & 0 deletions inc/Import/Data/UserImportListenerInterface.php
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 );
}

0 comments on commit 4020f04

Please sign in to comment.