本文整理汇总了PHP中bp_get_activity_secondary_avatar函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_activity_secondary_avatar函数的具体用法?PHP bp_get_activity_secondary_avatar怎么用?PHP bp_get_activity_secondary_avatar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_activity_secondary_avatar函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_dtheme_activity_secondary_avatars
/**
* Add secondary avatar image to this activity stream's record, if supported.
*
* @param string $action The text of this activity
* @param BP_Activity_Activity $activity Activity object
* @package BuddyPress Theme
* @return string
* @since 1.2.6
*/
function bp_dtheme_activity_secondary_avatars($action, $activity)
{
switch ($activity->component) {
case 'groups':
case 'friends':
// Only insert avatar if one exists
if ($secondary_avatar = bp_get_activity_secondary_avatar()) {
$reverse_content = strrev($action);
$position = strpos($reverse_content, 'a<');
$action = substr_replace($action, $secondary_avatar, -$position - 2, 0);
}
break;
}
return $action;
}
示例2: bp_tpack_activity_secondary_avatars
/**
* Hooks into the 'bp_get_activity_action_pre_meta' action to add secondary activity avatar support
*
* @since 1.2
*/
function bp_tpack_activity_secondary_avatars($action, $activity)
{
// sanity check - some older versions of BP do not utilize secondary activity avatars
if (function_exists('bp_get_activity_secondary_avatar')) {
switch ($activity->component) {
case 'groups':
case 'friends':
// Only insert avatar if one exists
if ($secondary_avatar = bp_get_activity_secondary_avatar()) {
$reverse_content = strrev($action);
$position = strpos($reverse_content, 'a<');
$action = substr_replace($action, $secondary_avatar, -$position - 2, 0);
}
break;
}
}
return $action;
}
示例3: bp_activity_secondary_avatar
/**
* Output the avatar of the object that action was performed on
*
* @since 1.2.0
*
* @param array $args optional
*
* @uses bp_get_activity_secondary_avatar()
*/
function bp_activity_secondary_avatar($args = '')
{
echo bp_get_activity_secondary_avatar($args);
}