new profile_sidebar_enter hook, changed profile_sidebar to array
This commit is contained in:
parent
3da2b24951
commit
b093bdeace
|
@ -100,9 +100,13 @@ Current hooks:
|
||||||
'contact' => contact (array) record for the person from the database
|
'contact' => contact (array) record for the person from the database
|
||||||
'entry' => the (string) HTML of the generated entry
|
'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
|
'profile_sidebar' - called when generating the sidebar "short" profile for a page
|
||||||
$b is the (string) generated HTML of the entry
|
$b is an array
|
||||||
(The profile array details are in $a->profile)
|
'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
|
'contact_block_end' - called when formatting the block of contacts/friends on a
|
||||||
profile sidebar has completed
|
profile sidebar has completed
|
||||||
|
|
7
boot.php
7
boot.php
|
@ -2009,6 +2009,8 @@ function profile_sidebar($profile) {
|
||||||
if((! is_array($profile)) && (! count($profile)))
|
if((! is_array($profile)) && (! count($profile)))
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
call_hooks('profile_sidebar_enter', $profile);
|
||||||
|
|
||||||
$fullname = '<div class="fn">' . $profile['name'] . '</div>';
|
$fullname = '<div class="fn">' . $profile['name'] . '</div>';
|
||||||
|
|
||||||
$pdesc = '<div class="title">' . $profile['pdesc'] . '</div>';
|
$pdesc = '<div class="title">' . $profile['pdesc'] . '</div>';
|
||||||
|
@ -2062,7 +2064,10 @@ function profile_sidebar($profile) {
|
||||||
'$homepage' => $homepage
|
'$homepage' => $homepage
|
||||||
));
|
));
|
||||||
|
|
||||||
call_hooks('profile_sidebar', $o);
|
|
||||||
|
$arr = array('profile' => $profile, 'entry' => $o);
|
||||||
|
|
||||||
|
call_hooks('profile_sidebar', $arr);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user