diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-23 18:27:04 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-23 18:27:04 -0700 |
commit | e45958b967d3b455167191fa91b0c2b6983b6ad5 (patch) | |
tree | 258c5258db862b1e304ee15963fd96ce170a4fb5 | |
parent | f506f73d3fc80fb68f63f654b5e93a6920780d6f (diff) | |
download | volse-hubzilla-e45958b967d3b455167191fa91b0c2b6983b6ad5.tar.gz volse-hubzilla-e45958b967d3b455167191fa91b0c2b6983b6ad5.tar.bz2 volse-hubzilla-e45958b967d3b455167191fa91b0c2b6983b6ad5.zip |
add plugin hooks to channel sync/import/export
-rw-r--r-- | include/identity.php | 4 | ||||
-rw-r--r-- | include/zot.php | 2 | ||||
-rw-r--r-- | mod/import.php | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/identity.php b/include/identity.php index b5235e7ff..47738a8fa 100644 --- a/include/identity.php +++ b/include/identity.php @@ -616,6 +616,10 @@ function identity_basic_export($channel_id, $items = false) { } } + $addon = array('channel_id' => $channel_id,'data' => $ret); + call_hooks('identity_basic_export',$addon); + $ret = $addon['data']; + if(! $items) return $ret; diff --git a/include/zot.php b/include/zot.php index 288493b07..9bddb520d 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3319,6 +3319,8 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) { if(array_key_exists('item_id',$arr) && $arr['item_id']) sync_items($channel,$arr['item_id']); + $addon = array('channel' => $channel,'data' => $arr); + call_hooks('process_channel_sync_delivery',$addon); // we should probably do this for all items, but usually we only send one. diff --git a/mod/import.php b/mod/import.php index 563967aa2..b6e36d734 100644 --- a/mod/import.php +++ b/mod/import.php @@ -450,6 +450,8 @@ function import_post(&$a) { if(is_array($data['menu'])) import_menus($channel,$data['menu']); + $addon = array('channel' => $channel,'data' => $data); + call_hooks('import_channel',$addon); $saved_notification_flags = notifications_off($channel['channel_id']); |