diff --git a/addon/README b/addon/README index 89f39e399e..33b84e10d0 100644 --- a/addon/README +++ b/addon/README @@ -100,9 +100,13 @@ Current hooks: 'contact' => contact (array) record for the person from the database 'entry' => the (string) HTML of the generated entry +'profile_sidebar_enter' - called prior to generating the sidebar "short" profile for a page + $b is (array) the person's profile array + 'profile_sidebar' - called when generating the sidebar "short" profile for a page - $b is the (string) generated HTML of the entry - (The profile array details are in $a->profile) + $b is an array + 'profile' => profile (array) record for the person from the database + 'entry' => the (string) HTML of the generated entry 'contact_block_end' - called when formatting the block of contacts/friends on a profile sidebar has completed diff --git a/boot.php b/boot.php index 0567e41d65..d7f32dbafe 100644 --- a/boot.php +++ b/boot.php @@ -2009,6 +2009,8 @@ function profile_sidebar($profile) { if((! is_array($profile)) && (! count($profile))) return $o; + call_hooks('profile_sidebar_enter', $profile); + $fullname = '
' . $profile['name'] . '
'; $pdesc = '
' . $profile['pdesc'] . '
'; @@ -2062,7 +2064,10 @@ function profile_sidebar($profile) { '$homepage' => $homepage )); - call_hooks('profile_sidebar', $o); + + $arr = array('profile' => $profile, 'entry' => $o); + + call_hooks('profile_sidebar', $arr); return $o; }}