本文整理汇总了PHP中bp_activity_set_action函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_activity_set_action函数的具体用法?PHP bp_activity_set_action怎么用?PHP bp_activity_set_action使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_activity_set_action函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_course_register_actions
function bp_course_register_actions()
{
global $bp;
$bp_course_action_desc = array('remove_from_course' => __('Removed a student from Course', 'vibe'), 'submit_course' => __('Student submitted a Course', 'vibe'), 'start_course' => __('Student started a Course', 'vibe'), 'submit_quiz' => __('Student submitted a Quiz', 'vibe'), 'start_quiz' => __('Student started a Course', 'vibe'), 'unit_complete' => __('Student submitted a Course', 'vibe'), 'reset_course' => __('Course reset for Student', 'vibe'), 'bulk_action' => __('Bulk action by instructor', 'vibe'), 'course_evaluated' => __('Course Evaluated for student', 'vibe'), 'student_badge' => __('Student got a Badge', 'vibe'), 'student_certificate' => __('Student got a certificate', 'vibe'), 'quiz_evaluated' => __('Quiz Evaluated for student', 'vibe'), 'subscribe_course' => __('Student subscribed for course', 'vibe'));
foreach ($bp_course_action_desc as $key => $value) {
bp_activity_set_action($bp->activity->id, $key, $value);
}
}
示例2: register_activity_types
/**
* register_activity_types()
*
* Function registers the activity type for Courseware components
*/
function register_activity_types()
{
global $bp;
bp_activity_set_action($bp->groups->id, 'assignment_add', __('New assignment', 'bpsp'));
bp_activity_set_action($bp->groups->id, 'lecture_add', __('New lecture', 'bpsp'));
bp_activity_set_action($bp->groups->id, 'response_add', __('New response', 'bpsp'));
bp_activity_set_action($bp->groups->id, 'schedule_add', __('New Schedule', 'bpsp'));
}
示例3: xprofile_register_activity_action
function xprofile_register_activity_action($key, $value)
{
global $bp;
if (!bp_is_active('activity')) {
return false;
}
return apply_filters('xprofile_register_activity_action', bp_activity_set_action($bp->profile->id, $key, $value), $key, $value);
}
示例4: friends_register_activity_actions
function friends_register_activity_actions()
{
global $bp;
if (!bp_is_active('activity')) {
return false;
}
bp_activity_set_action($bp->friends->id, 'friends_register_activity_action', __('New friendship created', 'buddypress'));
do_action('friends_register_activity_actions');
}
示例5: gmw_fl_activity_actions
function gmw_fl_activity_actions()
{
global $bp;
// Bail if activity is not active
if (!bp_is_active('activity')) {
return false;
}
bp_activity_set_action($bp->gmw_location->id, 'gmw_location', __("Member's location updated", 'GMW'));
do_action('gmw_fl_activity_actions');
}
示例6: bp_members_register_activity_actions
/**
* Register the 'new member' activity type.
*
* @since BuddyPress (2.2.0)
*
* @uses bp_activity_set_action()
* @uses buddypress()
*/
function bp_members_register_activity_actions()
{
bp_activity_set_action(buddypress()->members->id, 'new_member', __('New member registered', 'buddypress'), 'bp_members_format_activity_action_new_member', __('New Members', 'buddypress'), array('activity'));
/**
* Fires after the default 'new member' activity types are registered.
*
* @since BuddyPress (2.2.0)
*/
do_action('bp_members_register_activity_actions');
}
示例7: humcore_deposits_register_activity_actions
/**
* Register the activity actions for Humanities CORE.
*/
function humcore_deposits_register_activity_actions()
{
if (!bp_is_active('activity')) {
return false;
}
$bp = buddypress();
bp_activity_set_action($bp->humcore_deposits->id, 'new_deposit', __('New Deposits', 'humcore_domain'), 'humcore_format_activity_action_new_deposit', __('New Deposits', 'humcore_domain'), array('activity', 'member', 'groups'));
bp_activity_set_action($bp->groups->id, 'new_group_deposit', __('New Group Deposits', 'humcore_domain'), 'humcore_format_activity_action_new_group_deposit', __('New Group Deposits', 'humcore_domain'), array('member_groups', 'groups'));
do_action('humcore_deposits_register_activity_actions');
}
示例8: rendez_vous_register_activity_actions
/**
* Register the activity actions
*
* @package Rendez Vous
* @subpackage Activity
*
* @since Rendez Vous (1.0.0)
*/
function rendez_vous_register_activity_actions()
{
$bp = buddypress();
// Bail if activity is not active
if (!bp_is_active('activity')) {
return false;
}
bp_activity_set_action($bp->rendez_vous->id, 'new_rendez_vous', __('New rendez-vous', 'rendez-vous'), 'rendez_vous_format_activity_action', __('New rendez-vous', 'rendez-vous'), array('activity', 'member'));
bp_activity_set_action($bp->rendez_vous->id, 'updated_rendez_vous', __('Updated a rendez-vous', 'rendez-vous'), 'rendez_vous_format_activity_action', __('Updated a rendez-vous', 'rendez-vous'), array('activity', 'member'));
do_action('rendez_vous_register_activity_actions');
}
示例9: bp_blogs_register_activity_actions
function bp_blogs_register_activity_actions()
{
global $bp;
if (!bp_is_active('activity')) {
return false;
}
bp_activity_set_action($bp->blogs->id, 'new_blog', __('New site created', 'buddypress'));
bp_activity_set_action($bp->blogs->id, 'new_blog_post', __('New post published', 'buddypress'));
bp_activity_set_action($bp->blogs->id, 'new_blog_comment', __('New post comment posted', 'buddypress'));
do_action('bp_blogs_register_activity_actions');
}
示例10: groups_register_activity_actions
function groups_register_activity_actions()
{
global $bp;
if (!bp_is_active('activity')) {
return false;
}
bp_activity_set_action($bp->groups->id, 'created_group', __('Created a group', 'buddypress'));
bp_activity_set_action($bp->groups->id, 'joined_group', __('Joined a group', 'buddypress'));
bp_activity_set_action($bp->groups->id, 'new_forum_topic', __('New group forum topic', 'buddypress'));
bp_activity_set_action($bp->groups->id, 'new_forum_post', __('New group forum post', 'buddypress'));
do_action('groups_register_activity_actions');
}
示例11: bp_blogs_register_activity_actions
/**
* Register activity actions for the blogs component.
*
* @since 1.0.0
*
* @return bool|null Returns false if activity component is not active.
*/
function bp_blogs_register_activity_actions()
{
if (is_multisite()) {
bp_activity_set_action(buddypress()->blogs->id, 'new_blog', __('New site created', 'buddypress'), 'bp_blogs_format_activity_action_new_blog', __('New Sites', 'buddypress'), array('activity', 'member'), 0);
}
/**
* Fires after the registry of the default blog component activity actions.
*
* @since 1.1.0
*/
do_action('bp_blogs_register_activity_actions');
}
示例12: friends_register_activity_actions
/**
* Register the activity actions for bp-friends.
*/
function friends_register_activity_actions()
{
if (!bp_is_active('activity')) {
return false;
}
$bp = buddypress();
// These two added in BP 1.6
bp_activity_set_action($bp->friends->id, 'friendship_accepted', __('Friendships accepted', 'buddypress'), 'bp_friends_format_activity_action_friendship_accepted');
bp_activity_set_action($bp->friends->id, 'friendship_created', __('New friendships', 'buddypress'), 'bp_friends_format_activity_action_friendship_created');
// < BP 1.6 backpat
bp_activity_set_action($bp->friends->id, 'friends_register_activity_action', __('New friendship created', 'buddypress'));
do_action('friends_register_activity_actions');
}
示例13: bp_blogs_register_activity_actions
/**
* Register activity actions for the blogs component.
*
* @since BuddyPress (1.0.0)
*
* @global object $bp The BuddyPress global settings object.
*
* @return bool|null Returns false if activity component is not active.
*/
function bp_blogs_register_activity_actions()
{
global $bp;
// Bail if activity is not active
if (!bp_is_active('activity')) {
return false;
}
if (is_multisite()) {
bp_activity_set_action($bp->blogs->id, 'new_blog', __('New site created', 'buddypress'), 'bp_blogs_format_activity_action_new_blog');
}
bp_activity_set_action($bp->blogs->id, 'new_blog_post', __('New post published', 'buddypress'), 'bp_blogs_format_activity_action_new_blog_post');
bp_activity_set_action($bp->blogs->id, 'new_blog_comment', __('New post comment posted', 'buddypress'), 'bp_blogs_format_activity_action_new_blog_comment');
do_action('bp_blogs_register_activity_actions');
}
示例14: compliments_register_activity_actions
/**
* Register the activity actions for compliments.
*
* @since 0.0.2
* @package BuddyPress_Compliments
*/
function compliments_register_activity_actions()
{
if (!bp_is_active('activity')) {
return false;
}
$bp = buddypress();
bp_activity_set_action($bp->compliments->id, 'compliment_received', sprintf(__('%s Received', 'bp-compliments'), BP_COMP_SINGULAR_NAME), 'compliments_format_activity_action_compliment_received', BP_COMP_PLURAL_NAME, array('activity'));
bp_activity_set_action($bp->compliments->id, 'compliment_sent', sprintf(__('%s Sent', 'bp-compliments'), BP_COMP_SINGULAR_NAME), 'compliments_format_activity_action_compliment_sent', BP_COMP_PLURAL_NAME, array('activity'));
/**
* Use this hook to register additional activity actions.
*
* @since 0.0.1
* @package BuddyPress_Compliments
*/
do_action('compliments_register_activity_actions');
}
示例15: groups_register_activity_actions
/**
* Register activity actions for the Groups component.
*
* @return bool|null False on failure.
*/
function groups_register_activity_actions()
{
$bp = buddypress();
if (!bp_is_active('activity')) {
return false;
}
bp_activity_set_action($bp->groups->id, 'created_group', __('Created a group', 'buddypress'), 'bp_groups_format_activity_action_created_group', __('New Groups', 'buddypress'), array('activity', 'member', 'member_groups'));
bp_activity_set_action($bp->groups->id, 'joined_group', __('Joined a group', 'buddypress'), 'bp_groups_format_activity_action_joined_group', __('Group Memberships', 'buddypress'), array('activity', 'group', 'member', 'member_groups'));
// These actions are for the legacy forums
// Since the bbPress plugin also shares the same 'forums' identifier, we also
// check for the legacy forums loader class to be extra cautious
if (bp_is_active('forums') && class_exists('BP_Forums_Component')) {
bp_activity_set_action($bp->groups->id, 'new_forum_topic', __('New group forum topic', 'buddypress'), false, __('Forum Topics', 'buddypress'), array('activity', 'group', 'member', 'member_groups'));
bp_activity_set_action($bp->groups->id, 'new_forum_post', __('New group forum post', 'buddypress'), false, __('Forum Replies', 'buddypress'), array('activity', 'group', 'member', 'member_groups'));
}
do_action('groups_register_activity_actions');
}