当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_get_activity_secondary_avatar函数代码示例

本文整理汇总了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;
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:24,代码来源:buddypress-functions.php

示例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;
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:23,代码来源:bpt-functions.php

示例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);
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:13,代码来源:bp-activity-template.php


注:本文中的bp_get_activity_secondary_avatar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。