diff options
author | Sem <sembrestels@riseup.net> | 2012-04-25 19:09:22 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-04-25 19:09:22 +0200 |
commit | 9fe063022e08a4b6fa5f5935f8f185d5d95814a4 (patch) | |
tree | 87377f7b889efc639935508556beb9baf010e821 /mod/blog/start.php | |
parent | 24690ed95198c093e6fbb91a94b5d0544c740f89 (diff) | |
download | elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.gz elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.bz2 |
Upgraded to Elgg 1.8.4.
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r-- | mod/blog/start.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index a8553b4b8..73056f1c9 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -227,6 +227,33 @@ function blog_entity_menu_setup($hook, $type, $return, $params) { } /** + * Set the notification message body + * + * @param string $hook Hook name + * @param string $type Hook type + * @param string $message The current message body + * @param array $params Parameters about the blog posted + * @return string + */ +function blog_notify_message($hook, $type, $message, $params) { + $entity = $params['entity']; + $to_entity = $params['to_entity']; + $method = $params['method']; + if (elgg_instanceof($entity, 'object', 'blog')) { + $descr = $entity->excerpt; + $title = $entity->title; + $owner = $entity->getOwnerEntity(); + return elgg_echo('blog:notification', array( + $owner->name, + $title, + $descr, + $entity->getURL() + )); + } + return null; +} + +/** * Register blogs with ECML. */ function blog_ecml_views_hook($hook, $entity_type, $return_value, $params) { |