Esempio n. 1
0
 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);
     }
 }
 /**
  * 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'));
 }
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);
}
Esempio n. 4
0
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');
}
Esempio n. 5
0
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');
}
Esempio n. 6
0
/**
 * 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');
}
Esempio n. 7
0
/**
 * 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');
}
/**
 * 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');
}
Esempio n. 9
0
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');
}
Esempio n. 10
0
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');
}
/**
 * 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');
}
/**
 * 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');
}
/**
 * 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');
}
/**
 * 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');
}
Esempio n. 15
0
/**
 * 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');
}
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'));
    // 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'));
        bp_activity_set_action($bp->groups->id, 'new_forum_post', __('New group forum post', 'buddypress'));
    }
    do_action('groups_register_activity_actions');
}
/**
 * Register the activity actions for bp-friends.
 *
 * @since 1.1.0
 */
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', __('Friendships', 'buddypress'), array('activity', 'member'));
    bp_activity_set_action($bp->friends->id, 'friendship_created', __('New friendships', 'buddypress'), 'bp_friends_format_activity_action_friendship_created', __('Friendships', 'buddypress'), array('activity', 'member'));
    // < BP 1.6 backpat.
    bp_activity_set_action($bp->friends->id, 'friends_register_activity_action', __('New friendship created', 'buddypress'));
    /**
     * Fires after all default bp-friends activity actions have been registered.
     *
     * @since 1.1.0
     */
    do_action('friends_register_activity_actions');
}
Esempio n. 18
0
function em_bp_register_activity_actions()
{
    if (!bp_is_active('events')) {
        return false;
    }
    $bp = buddypress();
    // @todo - Figure out why adding a second bp_activity_set_action creates two 'Bookings' actions in backend and different booking status front-end e.g. when friendships created/accepted do not
    bp_activity_set_action($bp->events->id, 'new_booking', __('Bookings', 'dbem'), 'em_bp_events_format_activity_action_bookings', __('Bookings', 'dbem'), array('activity', 'member'));
    /*
    bp_activity_set_action(
    	$bp->events->id,
    	'booking_cancelled',
    	__( 'Booking Cancelled', 'dbem' ),
    	'em_bp_events_format_activity_action_bookings',
    	__( 'Bookings', 'dbem' ),
    	array( 'activity', 'member' )
    );
    */
    bp_activity_set_action($bp->events->id, 'new_event', __('New Event', 'dbem'), 'em_bp_events_format_activity_action_events', __('Events', 'dbem'), array('activity', 'member'));
}
Esempio n. 19
0
/**
 * Register activity actions for the blogs component.
 *
 * @since BuddyPress (1.0.0)
 *
 * @return bool|null Returns false if activity component is not active.
 */
function bp_blogs_register_activity_actions()
{
    $bp = buddypress();
    // 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', __('New Sites', 'buddypress'), array('activity', 'member'), 0);
    }
    // Only add the comment type if the 'post' post type is trackable
    if (post_type_supports('post', 'buddypress-activity')) {
        bp_activity_set_action($bp->blogs->id, 'new_blog_comment', __('New post comment posted', 'buddypress'), 'bp_blogs_format_activity_action_new_blog_comment', __('Comments', 'buddypress'), array('activity', 'member'), 10);
    }
    /**
     * Fires after the registry of the default blog component activity actions.
     *
     * @since BuddyPress (1.1.0)
     */
    do_action('bp_blogs_register_activity_actions');
}
Esempio n. 20
0
/**
 * Register Activity actions for the enabled components
 */
function mpp_activity_register_actions()
{
    $components = mpp_get_active_components();
    //get the component ids as key
    $components = array_keys($components);
    //add activity to the list of components
    array_push($components, 'activity');
    $contexts = $components;
    //the sad thing is BuddyPress deviates here, It should have used component as the context name, that makes much sense
    foreach ($contexts as $key => $context_component) {
        if ($context_component == 'members') {
            $contexts[$key] = 'member';
        } elseif ($context_component == 'groups') {
            $contexts[$key] = 'group';
        }
    }
    // Register the activity stream actions for all enabled gallery component
    foreach ($components as $component) {
        bp_activity_set_action($component, 'mpp_media_upload', __('User Uploaded a media', 'mediapress'), 'mpp_format_activity_action_media_upload', __('Gallery Updates', 'mediapress'), $contexts);
    }
    do_action('mpp_register_activity_actions');
}
/**
 * Register BP Docs activity actions.
 *
 * @since 1.7.0
 */
function bp_docs_register_activity_actions()
{
    bp_activity_set_action('bp_docs', 'bp_doc_created', __('Created a Doc', 'bp-docs'), 'bp_docs_format_activity_action_bp_doc_created');
    bp_activity_set_action('bp_docs', 'bp_doc_edited', __('Edited a Doc', 'bp-docs'), 'bp_docs_format_activity_action_bp_doc_edited');
    bp_activity_set_action('bp_docs', 'bp_doc_comment', __('Commented on a Doc', 'bp-docs'), 'bp_docs_format_activity_action_bp_doc_comment');
}
Esempio n. 22
0
 /**
  * Set rtmedia buddypress update type.
  *
  * @access public
  *
  * @param  void
  *
  * @return void
  */
 public function rtmedia_bp_add_update_type()
 {
     if (class_exists('BuddyPress') && function_exists('bp_activity_set_action')) {
         bp_activity_set_action('rtmedia_update', 'rtmedia_update', 'rtMedia Update');
     }
 }
Esempio n. 23
0
/**
 * Register the activity stream actions for updates
 *
 * @since BuddyPress (1.6.0)
 */
function bp_activity_register_activity_actions()
{
    $bp = buddypress();
    bp_activity_set_action($bp->activity->id, 'activity_update', __('Posted a status update', 'buddypress'), 'bp_activity_format_activity_action_activity_update', __('Updates', 'buddypress'), array('activity', 'group', 'member', 'member_groups'));
    bp_activity_set_action($bp->activity->id, 'activity_comment', __('Replied to a status update', 'buddypress'), 'bp_activity_format_activity_action_activity_comment', __('Activity Comments', 'buddypress'));
    do_action('bp_activity_register_activity_actions');
    // Backpat. Don't use this.
    do_action('updates_register_activity_actions');
}
Esempio n. 24
0
 /**
  * Register our activity actions with BuddyPress
  *
  * @since bbPress (r3395)
  * @uses bp_activity_set_action()
  */
 public function register_activity_actions()
 {
     bp_activity_set_action($this->component, $this->topic_create, __('New topic created', 'bbpress'));
     bp_activity_set_action($this->component, $this->reply_create, __('New reply created', 'bbpress'));
 }
 /**
  * @group activity_action
  */
 public function test_instantiated_action_with_dynamic_callback()
 {
     bp_activity_set_action('foo', 'bar', 'Foo Bar', array($this, 'action_cb'));
     // Create the activity item with a manual activity string
     $a = $this->factory->activity->create(array('component' => 'foo', 'type' => 'bar', 'action' => 'baz'));
     $a_obj = new BP_Activity_Activity($a);
     $this->assertSame('Woo Hoo!', $a_obj->action);
 }
/**
 * Register an activity action for the Extended Profiles component.
 *
 * @since 1.0.0
 *
 * @param string $key Key.
 * @param string $value Value.
 *
 * @return bool True if success, false on failure.
 */
function xprofile_register_activity_action($key, $value)
{
    // Bail if activity component is not active.
    if (!bp_is_active('activity')) {
        return false;
    }
    /**
     * Filters the return value of bp_activity_set_action.
     *
     * @since 1.1.0
     *
     * @param bool   $value Whether or not an action was successfully registered.
     * @param string $key   Key used for the registered action.
     * @param string $value Value used for the registered action.
     */
    return apply_filters('xprofile_register_activity_action', bp_activity_set_action(buddypress()->profile->id, $key, $value), $key, $value);
}
Esempio n. 27
0
function wp_ulike_register_activity_actions()
{
    global $bp;
    bp_activity_set_action($bp->activity->id, 'wp_like_group', __('WP ULike Activity', 'alimir'));
}
Esempio n. 28
0
function wp_ulike_register_activity_actions()
{
    global $bp;
    bp_activity_set_action($bp->activity->id, 'wp_like_group', __('WP ULike Activity', WP_ULIKE_SLUG));
}
Esempio n. 29
0
/**
 * Register the activity stream actions for updates
 *
 * @since 1.2.0
 *
 * @global object $bp BuddyPress global settings
 * @uses bp_activity_set_action()
 * @uses do_action() To call the 'updates_register_activity_actions' hook
 */
function updates_register_activity_actions()
{
    global $bp;
    bp_activity_set_action($bp->activity->id, 'activity_update', __('Posted an update', 'buddypress'));
    do_action('updates_register_activity_actions');
}
Esempio n. 30
0
/**
 * Register an activity action for the Extended Profiles component
 *
 * @since BuddyPress (1.0.0)
 *
 * @param string $key
 * @param string $value
 * @return bool True if success, false on failure
 */
function xprofile_register_activity_action($key, $value)
{
    // Bail if activity component is not active
    if (!bp_is_active('activity')) {
        return false;
    }
    return apply_filters('xprofile_register_activity_action', bp_activity_set_action(buddypress()->profile->id, $key, $value), $key, $value);
}