e number of newest activities for * the 'Mentions', 'My Groups' & 'My Friends' tabs */ if ( 'all' === $scope ) { if ( 'groups' === $component && bp_is_active( $component ) ) { // Is the current user a member of the group the activity is attached to? if ( groups_is_user_member( $user_id, bp_get_activity_item_id() ) ) { $my_classes[] = 'bp-my-groups'; } } // Friends can post in groups the user is a member of if ( bp_is_active( 'friends' ) && (int) $user_id !== (int) bp_get_activity_user_id() ) { if ( friends_check_friendship( $user_id, bp_get_activity_user_id() ) ) { $my_classes[] = 'bp-my-friends'; } } // A mention can be posted by a friend within a group if ( true === bp_activity_do_mentions() ) { $new_mentions = bp_get_user_meta( $user_id, 'bp_new_mentions', true ); // The current activity is one of the new mentions if ( is_array( $new_mentions ) && in_array( bp_get_activity_id(), $new_mentions, true ) ) { $my_classes[] = 'bp-my-mentions'; } } /* * This class will be used to highlight the newest activities when * viewing the 'Mentions', 'My Groups' or the 'My Friends' tabs */ } elseif ( 'friends' === $scope || 'groups' === $scope || 'mentions' === $scope ) { $my_classes[] = 'newest_' . $scope . '_activity'; } // Leave other components do their specific stuff if needed. /** * Filters the classes to be applied to the newest activity item. * * Leave other components do their specific stuff if needed. * * @since 3.0.0 * * @param array $my_classes Array of classes to output to class attribute. * @param string $scope Current scope for the activity type. */ $my_classes = (array) apply_filters( 'bp_nouveau_activity_scope_newest_class', $my_classes, $scope ); if ( ! empty( $my_classes ) ) { $classes .= ' ' . join( ' ', $my_classes ); } } return $classes; } /** * Get the activity query args for the widget. * * @since 3.0.0 * * @return array The activity arguments. */ function bp_nouveau_activity_widget_query() { $args = array(); $bp_nouveau = bp_nouveau(); if ( isset( $bp_nouveau->activity->widget_args ) ) { $args = $bp_nouveau->activity->widget_args; } /** * Filter to edit the activity widget arguments. * * @since 3.0.0 * * @param array $args The activity arguments. */ return apply_filters( 'bp_nouveau_activity_widget_query', $args ); } /** * Register notifications filters for the activity component. * * @since 3.0.0 */ function bp_nouveau_activity_notification_filters() { $notifications = array( array( 'id' => 'new_at_mention', 'label' => __( 'New mentions', 'buddypress' ), 'position' => 5, ), array( 'id' => 'update_reply', 'label' => __( 'New update replies', 'buddypress' ), 'position' => 15, ), array( 'id' => 'comment_reply', 'label' => __( 'New update comment replies', 'buddypress' ), 'position' => 25, ), ); foreach ( $notifications as $notification ) { bp_nouveau_notifications_register_filter( $notification ); } } /** * Add controls for the settings of the customizer for the activity component. * * @since 3.0.0 * * @param array $controls Optional. The controls to add. * * @return array the controls to add. */ function bp_nouveau_activity_customizer_controls( $controls = array() ) { return array_merge( $controls, array( 'act_dir_layout' => array( 'label' => __( 'Use column navigation for the Activity directory.', 'buddypress' ), 'section' => 'bp_nouveau_dir_layout', 'settings' => 'bp_nouveau_appearance[activity_dir_layout]', 'type' => 'checkbox', ), 'act_dir_tabs' => array( 'label' => __( 'Use tab styling for Activity directory navigation.', 'buddypress' ), 'section' => 'bp_nouveau_dir_layout', 'settings' => 'bp_nouveau_appearance[activity_dir_tabs]', 'type' => 'checkbox', ), ) ); } /** * Remove brackets around the "Read more" text. * * @since 7.0.0 * * @param string $read_more The read more text. * @return string The read more text without brackets. */ function bp_nouveau_activity_excerpt_append_text( $read_more = '' ) { /** * As this was added during a string freeze period, we * are using the `str_replace()` function. */ return str_replace( array( '[', ']' ), '', $read_more ); } add_filter( 'bp_activity_excerpt_append_text', 'bp_nouveau_activity_excerpt_append_text', 10, 1 ); /** * Register Activity Ajax actions. * * @since 12.0.0 */ function bp_nouveau_register_activity_ajax_actions() { $ajax_actions = array( 'activity_filter', 'get_single_activity_content', 'activity_mark_fav', 'activity_mark_unfav', 'activity_clear_new_mentions', 'delete_activity', 'new_activity_comment', 'bp_nouveau_get_activity_objects', 'post_update', 'bp_spam_activity', 'heartbeat' ); foreach ( $ajax_actions as $ajax_action ) { bp_ajax_register_action( $ajax_action ); } } {"version":"1.0","provider_name":"Tranny Newbies","provider_url":"http:\/\/www.trannynewbies.com\/blog","author_name":"admin2","author_url":"http:\/\/www.trannynewbies.com\/blog\/author\/admin2\/","title":"Karen cums again.","type":"rich","width":600,"height":338,"html":"
Karen cums again.<\/a><\/blockquote>\n