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


PHP bp_get_group_name函数代码示例

本文整理汇总了PHP中bp_get_group_name函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_group_name函数的具体用法?PHP bp_get_group_name怎么用?PHP bp_get_group_name使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bp_get_group_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bp_em_record_activity_booking_save

/**
 * @param boolean $result
 * @param EM_Booking $EM_Booking
 * @return boolean
 */
function bp_em_record_activity_booking_save($result, $EM_Booking)
{
    if ($result) {
        $rejected_statuses = array(0, 2, 3);
        //these statuses apply to rejected/cancelled bookings
        $user = $EM_Booking->person;
        $member_slug = function_exists('bp_get_members_root_slug') ? bp_get_members_root_slug() : BP_MEMBERS_SLUG;
        $member_link = trailingslashit(bp_get_root_domain()) . $member_slug . '/' . $user->user_login;
        $user_link = "<a href='" . $member_link . "/'>" . $user->display_name . "</a>";
        $event_link = $EM_Booking->get_event()->output('#_EVENTLINK');
        $status = $EM_Booking->booking_status;
        $EM_Event = $EM_Booking->get_event();
        if (empty($EM_Event->group_id)) {
            if ($status == 1 || !get_option('dbem_bookings_approval') && $status < 2) {
                $action = sprintf(__('%s is attending %s.', 'dbem'), $user_link, $event_link);
            } elseif (($EM_Booking->previous_status == 1 || !get_option('dbem_bookings_approval') && $EM_Booking->previous_status < 2) && in_array($status, $rejected_statuses)) {
                $action = sprintf(__('%s will not be attending %s anymore.', 'dbem'), $user_link, $event_link);
            }
        } else {
            $group = new BP_Groups_Group($EM_Event->group_id);
            $group_link = '<a href="' . bp_get_group_permalink($group) . '">' . bp_get_group_name($group) . '</a>';
            if ($status == 1 || !get_option('dbem_bookings_approval') && $status < 2) {
                $action = sprintf(__('%s is attending %s of the group %s.', 'dbem'), $user_link, $event_link, $group_link);
            } elseif (($EM_Booking->previous_status == 1 || !get_option('dbem_bookings_approval') && $EM_Booking->previous_status < 2) && in_array($status, $rejected_statuses)) {
                $action = sprintf(__('%s will not be attending %s of group %s anymore.', 'dbem'), $user_link, $event_link, $group_link);
            }
        }
        if (!empty($action)) {
            bp_em_record_activity(array('user_id' => $EM_Booking->person->ID, 'action' => $action, 'primary_link' => $EM_Event->output('#_EVENTURL'), 'type' => 'new_booking', 'item_id' => $EM_Event->event_id, 'secondary_item_id' => $EM_Booking->booking_id, 'hide_sitewide' => $EM_Event->event_private));
            //group activity
            if (!empty($EM_Event->group_id)) {
                //tis a group event
                bp_em_record_activity(array('component' => 'groups', 'item_id' => $EM_Event->group_id, 'user_id' => $EM_Booking->person->ID, 'action' => $action, 'primary_link' => $EM_Event->output('#_EVENTURL'), 'type' => 'new_booking', 'secondary_item_id' => $EM_Booking->booking_id, 'hide_sitewide' => $EM_Event->event_private));
            }
        }
    }
    return $result;
}
开发者ID:rajankz,项目名称:webspace,代码行数:43,代码来源:bp-em-activity.php

示例2: bp_em_record_activity_booking_save

/**
 * @param boolean $result
 * @param EM_Booking $EM_Booking
 * @return boolean
 */
function bp_em_record_activity_booking_save($result, $EM_Booking)
{
    if ($result) {
        $user = $EM_Booking->person;
        $user_link = "<a href='" . get_bloginfo('wpurl') . '/' . BP_MEMBERS_SLUG . '/' . $user->user_login . "/'>" . $user->display_name . "</a>";
        $event_link = $EM_Booking->get_event()->output('#_EVENTLINK');
        $status = $EM_Booking->status;
        if ($status == 1 || !get_option('dbem_bookings_approval') && $status < 2) {
            $action = sprintf(__('%s is attending %s.', 'dbem'), $user_link, $event_link);
        } elseif (($EM_Booking->previous_status == 1 || !get_option('dbem_bookings_approval') && $EM_Booking->previous_status < 2) && ($status > 1 || empty($status) || !get_option('dbem_bookings_approval') && $status != 1)) {
            $action = sprintf(__('%s will not be attending %s anymore.', 'dbem'), $user_link, $event_link);
        }
        $EM_Event = $EM_Booking->get_event();
        if (!empty($EM_Event->group_id)) {
            $group = new BP_Groups_Group($EM_Event->group_id);
            $group_link = '<a href="' . bp_get_group_permalink($group) . '">' . bp_get_group_name($group) . '</a>';
            if ($status == 1 || !get_option('dbem_bookings_approval') && $status < 2) {
                $action = sprintf(__('%s is attending %s of the group %s.', 'dbem'), $user_link, $event_link, $group_link);
            } elseif (($EM_Booking->previous_status == 1 || !get_option('dbem_bookings_approval') && $EM_Booking->previous_status < 2) && ($status > 1 || empty($status) || !get_option('dbem_bookings_approval') && $status != 1)) {
                $action = sprintf(__('%s will not be attending %s of group %s anymore.', 'dbem'), $user_link, $event_link, $group_link);
            }
        }
        if (!empty($action)) {
            bp_em_record_activity(array('user_id' => $EM_Booking->person->ID, 'action' => $action, 'primary_link' => $EM_Event->output('#_EVENTURL'), 'type' => 'new_booking', 'item_id' => $EM_Event->id, 'secondary_item_id' => $EM_Booking->id));
            //group activity
            if (!empty($EM_Event->group_id)) {
                //tis a group event
                bp_em_record_activity(array('component' => 'groups', 'item_id' => $EM_Event->group_id, 'user_id' => $EM_Booking->person->ID, 'action' => $action, 'primary_link' => $EM_Event->output('#_EVENTURL'), 'type' => 'new_booking', 'secondary_item_id' => $EM_Booking->id));
            }
        }
    }
    return $result;
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:38,代码来源:bp-em-activity.php

示例3: dispatch_creation_activity_update

 function dispatch_creation_activity_update($post_id)
 {
     if (!function_exists('bp_activity_get')) {
         return false;
     }
     // WTF
     $created = $this->_data->get_option('bp-activity_autoupdate-event_created');
     if (!$created) {
         return false;
     }
     $event = new Eab_EventModel(get_post($post_id));
     if (!$event->is_published()) {
         return false;
     }
     $user_link = bp_core_get_userlink($event->get_author());
     $update = false;
     $group_id = $this->_is_group_event($event->get_id());
     $public_announcement = $this->_is_public_announcement($event->get_id());
     if ('any' == $created) {
         $update = sprintf(__('%s created an event', Eab_EventsHub::TEXT_DOMAIN), $user_link);
     } else {
         if ('group' == $created && $group_id) {
             $group = groups_get_group(array('group_id' => $group_id));
             $group_link = bp_get_group_permalink($group);
             $group_name = bp_get_group_name($group);
             $update = sprintf(__('%s created an event in <a href="%s">%s</a>', Eab_EventsHub::TEXT_DOMAIN), $user_link, $group_link, $group_name);
         } else {
             if ('pa' == $created && $public_announcement) {
                 $update = sprintf(__('%s created a public announcement', Eab_EventsHub::TEXT_DOMAIN), $user_link);
             }
         }
     }
     if (!$update) {
         return false;
     }
     $update = sprintf("{$update}, <a href='%s'>%s</a>", get_permalink($event->get_id()), $event->get_title());
     $existing = bp_activity_get(array("filter" => array("object" => 'eab_events', "action" => 'event_created', 'primary_id' => $event->get_id())));
     if (isset($existing['activities']) && !empty($existing['activities'])) {
         return false;
     }
     $activity = array('action' => $update, 'component' => 'eab_events', 'type' => 'event_created', 'item_id' => $event->get_id(), 'user_id' => $event->get_author());
     bp_activity_add($activity);
     if ($this->_data->get_option('bp-activity_autoupdate-created_group_post') && $group_id) {
         global $bp;
         $group_activity = $activity;
         $group_activity['component'] = $bp->groups->id;
         $group_activity['item_id'] = $group_id;
         $group_activity['secondary_item_id'] = $event->get_id();
         $existing = bp_activity_get(array("filter" => array('user_id' => $user_id, "object" => $bp->groups->id, "action" => 'event_created', 'primary_id' => $group_id, 'secondary_id' => $event->get_id())));
         if (isset($existing['activities']) && !empty($existing['activities'])) {
             $old = reset($existing['activities']);
             if (is_object($old) && isset($old->id)) {
                 $group_activity['id'] = $old->id;
             }
         }
         // Add group activity update
         groups_record_activity($group_activity);
     }
 }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:59,代码来源:eab-buddypres-activity.php

示例4: mpp_group_form_uploaded_activity_action

function mpp_group_form_uploaded_activity_action($action, $activity, $media_id, $media_ids, $gallery)
{
    if ($gallery->component != 'groups') {
        return $action;
    }
    $media_count = count($media_ids);
    $type = $gallery->type;
    //we need the type plural in case of mult
    $type = _n($type, $type . 's', $media_count);
    //photo vs photos etc
    $group_id = $activity->item_id;
    $group = new BP_Groups_Group($group_id);
    $group_link = sprintf("<a href='%s'>%s</a>", bp_get_group_permalink($group), bp_get_group_name($group));
    $action = sprintf(__('%s uploaded %d new %s to %s', 'mediapress'), mpp_get_user_link($activity->user_id), $media_count, $type, $group_link);
    return $action;
}
开发者ID:enboig,项目名称:mediapress,代码行数:16,代码来源:mpp-bp-groups-hooks.php

示例5: thatcamp_camp_summary

function thatcamp_camp_summary()
{
    $summary = 'A new THATCamp has been registered at <a href="http://thatcamp.org">thatcamp.org</a>:<br /><br />';
    $summary .= 'Name: ' . bp_get_group_name() . '<br />';
    $permalink = thatcamp_get_camp_permalink();
    $summary .= 'URL: <a href="' . thatcamp_get_camp_permalink() . '">' . thatcamp_get_camp_permalink() . '</a><br />';
    $location = thatcamp_get_location(bp_get_group_id());
    if ($location) {
        $summary .= 'Location: ' . $location . '<br />';
    }
    $date = thatcamp_get_camp_date_pretty(bp_get_group_id());
    if ($date) {
        $summary .= 'Date: ' . $date . '<br />';
    }
    echo $summary;
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:16,代码来源:thatcamp-new-groups-feed.php

示例6: get_data

 /**
  * Gets user data for a forum reply or article comment
  */
 function get_data($group_id)
 {
     // Get the meta from cache
     $allmeta = wp_cache_get('bp_groups_allmeta_' . $group_id, 'bp');
     // Otherwise query the groupmeta table
     if (false === $allmeta) {
         global $bp, $wpdb;
         $allmeta = array();
         $rawmeta = $wpdb->get_results($wpdb->prepare("SELECT meta_key, meta_value FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d", $group_id));
         foreach ($rawmeta as $meta) {
             $allmeta[$meta->meta_key] = $meta->meta_value;
         }
         wp_cache_set('bp_groups_allmeta_' . $group_id, $allmeta, 'bp');
     }
     // Add data to the class object
     $this->id = $group_id;
     $this->fullname = bp_get_group_name();
     $this->domain = bp_get_group_permalink();
     $this->slug = bp_get_group_slug();
     $this->guild = isset($allmeta['is_guild']) ? $allmeta['is_guild'] : 0;
     $this->members = bp_get_group_member_count();
     $this->alliance = isset($allmeta['group_faction']) ? $allmeta['group_faction'] : 'neutral';
     $this->server = isset($allmeta['group_server']) ? $allmeta['group_server'] : NULL;
     $this->style = isset($allmeta['group_style']) ? $allmeta['group_style'] : NULL;
     $this->interests = isset($allmeta['group_interests']) ? unserialize($allmeta['group_interests']) : array();
     $this->website = isset($allmeta['group_website']) ? $allmeta['group_website'] : NULL;
     // Get some derived data
     $this->type = $this->type();
     $this->faction = $this->allegiance();
     $this->servname = $this->server_name($this->server);
     $this->tooltip = $this->tooltip();
     // Get some extra stuff on user profiles
     if ($this->context == 'profile') {
         $this->byline = $this->byline();
         $this->admins = $this->admins();
         $this->mods = $this->mods();
     }
 }
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:41,代码来源:groups.php

示例7: invite_anyone_screen_two_content


//.........这里部分代码省略.........
"><?php 
        _e('Clear all invitations', 'invite-anyone');
        ?>
</a></li>
				  </ul>
				 </td>
				</tr>
				</tfoot>

				<tbody>
				<?php 
        while ($invites->have_posts()) {
            $invites->the_post();
            ?>

				<?php 
            $emails = wp_get_post_terms(get_the_ID(), invite_anyone_get_invitee_tax_name());
            // Should never happen, but was messing up my test env
            if (empty($emails)) {
                continue;
            }
            // Before storing taxonomy terms in the db, we replaced "+" with ".PLUSSIGN.", so we need to reverse that before displaying the email address.
            $email = str_replace('.PLUSSIGN.', '+', $emails[0]->name);
            $post_id = get_the_ID();
            $query_string = preg_replace("|clear=[0-9]+|", '', $_SERVER['QUERY_STRING']);
            $clear_url = $query_string ? $base_url . '?' . $query_string . '&clear=' . $post_id : $base_url . '?clear=' . $post_id;
            $clear_url = wp_nonce_url($clear_url, 'invite_anyone_clear');
            $clear_link = '<a class="clear-entry confirm" title="' . __('Clear this invitation', 'invite-anyone') . '" href="' . $clear_url . '">x<span></span></a>';
            $groups = wp_get_post_terms(get_the_ID(), invite_anyone_get_invited_groups_tax_name());
            if (!empty($groups)) {
                $group_names = '<ul>';
                foreach ($groups as $group_term) {
                    $group = new BP_Groups_Group($group_term->name);
                    $group_names .= '<li>' . bp_get_group_name($group) . '</li>';
                }
                $group_names .= '</ul>';
            } else {
                $group_names = '-';
            }
            global $post;
            $date_invited = invite_anyone_format_date($post->post_date);
            $accepted = get_post_meta(get_the_ID(), 'bp_ia_accepted', true);
            if ($accepted) {
                $date_joined = invite_anyone_format_date($accepted);
                $accepted = true;
            } else {
                $date_joined = '-';
                $accepted = false;
            }
            ?>

					<tr <?php 
            if ($accepted) {
                ?>
 class="accepted" <?php 
            }
            ?>
>
						<td><?php 
            echo $clear_link;
            ?>
</td>
						<td><?php 
            echo esc_html($email);
            ?>
</td>
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:67,代码来源:by-email.php

示例8: run_stat_hub_csv

 /**
  * Create the hub overview CSV when requested.
  *
  * @since    1.0.0
  */
 public function run_stat_hub_csv()
 {
     global $wpdb;
     $bp = buddypress();
     // Output headers so that the file is downloaded rather than displayed.
     header('Content-Type: text/csv; charset=utf-8');
     header('Content-Disposition: attachment; filename=cc-hubs-overview.csv');
     // Create a file pointer connected to the output stream.
     $output = fopen('php://output', 'w');
     // Write a header row.
     $row = array('Hub ID', 'Name', 'Slug', 'Status', 'Date Created', 'Last Activity', 'Parent Hub ID', 'Total Members', 'Creator ID', 'Creator Email', 'Forum', 'BP Docs', 'CC Hub Home Page', 'CC Hub Pages', 'CC Hub Narratives', 'Custom Plugins');
     fputcsv($output, $row);
     // Groups Loop
     if (bp_has_groups(array('order' => 'ASC', 'orderby' => 'date_created', 'page' => null, 'per_page' => null, 'max' => false, 'show_hidden' => true, 'user_id' => null, 'meta_query' => false, 'include' => false, 'exclude' => false, 'populate_extras' => false, 'update_meta_cache' => false))) {
         while (bp_groups()) {
             bp_the_group();
             $group_id = bp_get_group_id();
             $group_object = groups_get_group(array('group_id' => (int) $group_id, 'populate_extras' => true));
             // Hub ID
             $row = array($group_id);
             // Name
             $row[] = bp_get_group_name();
             // Slug
             $row[] = bp_get_group_slug();
             // Status
             $row[] = bp_get_group_status();
             // Date Created
             $row[] = $group_object->date_created;
             // Date of last activity
             $row[] = $group_object->last_activity;
             // Parent Hub ID
             $row[] = $wpdb->get_var($wpdb->prepare("SELECT g.parent_id FROM {$bp->groups->table_name} g WHERE g.id = %d", $group_id));
             // Total Members
             $row[] = groups_get_total_member_count($group_id);
             // Creator ID
             $creator_id = $group_object->creator_id;
             $row[] = $creator_id;
             // Creator Email
             $creator = get_user_by('id', $creator_id);
             $row[] = $creator->user_email;
             // Forum
             $row[] = $group_object->enable_forum;
             // BP Docs
             if (function_exists('bp_docs_is_docs_enabled_for_group')) {
                 $row[] = bp_docs_is_docs_enabled_for_group($group_id);
             } else {
                 $row[] = '';
             }
             // CC Hub Home Page
             if (function_exists('cc_get_group_home_page_post') && cc_get_group_home_page_post($group_id)->have_posts()) {
                 $row[] = 1;
             } else {
                 $row[] = 0;
             }
             // CC Hub Pages
             $row[] = (bool) groups_get_groupmeta($group_id, "ccgp_is_enabled");
             // CC Hub Narratives
             $row[] = (bool) groups_get_groupmeta($group_id, "ccgn_is_enabled");
             // Custom Plugins
             // To make your group-specific plugin be counted, so something like this:
             /*	add_filter( 'cc_stats_custom_plugins', 'prefix_report_custom_plugin', 10, 2 );
              *	function prefix_report_custom_plugin( $custom_plugins, $group_id ) {
              *		if ( $group_id == sa_get_group_id() ) {
              *			$custom_plugins[] = "CC Salud America";
              *		}
              *		return $custom_plugins;
              *	}
              */
             $custom_plugins = apply_filters('cc_stats_custom_plugins', array(), $group_id);
             $custom_plugins = implode(' ', $custom_plugins);
             $row[] = $custom_plugins;
             // Write the row.
             fputcsv($output, $row);
         }
     }
     fclose($output);
     exit;
 }
开发者ID:careshub,项目名称:cc-stats,代码行数:83,代码来源:class-cc-stats-admin.php

示例9: groups_join_group

function groups_join_group($group_id, $user_id = 0)
{
    global $bp;
    if (empty($user_id)) {
        $user_id = bp_loggedin_user_id();
    }
    // Check if the user has an outstanding invite. If so, delete it.
    if (groups_check_user_has_invite($user_id, $group_id)) {
        groups_delete_invite($user_id, $group_id);
    }
    // Check if the user has an outstanding request. If so, delete it.
    if (groups_check_for_membership_request($user_id, $group_id)) {
        groups_delete_membership_request($user_id, $group_id);
    }
    // User is already a member, just return true
    if (groups_is_user_member($user_id, $group_id)) {
        return true;
    }
    $new_member = new BP_Groups_Member();
    $new_member->group_id = $group_id;
    $new_member->user_id = $user_id;
    $new_member->inviter_id = 0;
    $new_member->is_admin = 0;
    $new_member->user_title = '';
    $new_member->date_modified = bp_core_current_time();
    $new_member->is_confirmed = 1;
    if (!$new_member->save()) {
        return false;
    }
    if (!isset($bp->groups->current_group) || !$bp->groups->current_group || $group_id != $bp->groups->current_group->id) {
        $group = groups_get_group(array('group_id' => $group_id));
    } else {
        $group = $bp->groups->current_group;
    }
    // Record this in activity streams
    groups_record_activity(array('action' => apply_filters('groups_activity_joined_group', sprintf(__('%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_get_group_permalink($group) . '">' . esc_attr(bp_get_group_name($group)) . '</a>')), 'type' => 'joined_group', 'item_id' => $group_id, 'user_id' => $user_id));
    // Modify group meta
    groups_update_groupmeta($group_id, 'last_activity', bp_core_current_time());
    do_action('groups_join_group', $group_id, $user_id);
    return true;
}
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:41,代码来源:bp-groups-functions.php

示例10: bp_groups_admin_delete

/**
 * Display the Group delete confirmation screen.
 *
 * We include a separate confirmation because group deletion is truly
 * irreversible.
 *
 * @since 1.7.0
 */
function bp_groups_admin_delete()
{
    if (!bp_current_user_can('bp_moderate')) {
        die('-1');
    }
    $group_ids = isset($_REQUEST['gid']) ? $_REQUEST['gid'] : 0;
    if (!is_array($group_ids)) {
        $group_ids = explode(',', $group_ids);
    }
    $group_ids = wp_parse_id_list($group_ids);
    $groups = groups_get_groups(array('include' => $group_ids, 'show_hidden' => true, 'per_page' => null));
    // Create a new list of group ids, based on those that actually exist.
    $gids = array();
    foreach ($groups['groups'] as $group) {
        $gids[] = $group->id;
    }
    $base_url = remove_query_arg(array('action', 'action2', 'paged', 's', '_wpnonce', 'gid'), $_SERVER['REQUEST_URI']);
    ?>

	<div class="wrap">
		<h1><?php 
    _e('Delete Groups', 'buddypress');
    ?>
</h1>
		<p><?php 
    _e('You are about to delete the following groups:', 'buddypress');
    ?>
</p>

		<ul class="bp-group-delete-list">
		<?php 
    foreach ($groups['groups'] as $group) {
        ?>
			<li><?php 
        echo esc_html(bp_get_group_name($group));
        ?>
</li>
		<?php 
    }
    ?>
		</ul>

		<p><strong><?php 
    _e('This action cannot be undone.', 'buddypress');
    ?>
</strong></p>

		<a class="button-primary" href="<?php 
    echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'do_delete', 'gid' => implode(',', $gids)), $base_url), 'bp-groups-delete'));
    ?>
"><?php 
    _e('Delete Permanently', 'buddypress');
    ?>
</a>
		<a class="button" href="<?php 
    echo esc_attr($base_url);
    ?>
"><?php 
    _e('Cancel', 'buddypress');
    ?>
</a>
	</div>

	<?php 
}
开发者ID:buddypress,项目名称:BuddyPress-build,代码行数:73,代码来源:bp-groups-admin.php

示例11: do_action

<?php

do_action('bp_before_group_request_membership_content');
?>

<?php 
if (!bp_group_has_requested_membership()) {
    ?>
	<p><?php 
    printf(__("You are requesting to become a member of the group '%s'.", "buddypress"), bp_get_group_name(false));
    ?>
</p>

	<form action="<?php 
    bp_group_form_action('request-membership');
    ?>
" method="post" name="request-membership-form" id="request-membership-form" class="standard-form">
		<label for="group-request-membership-comments"><?php 
    _e('Comments (optional)', 'buddypress');
    ?>
</label>
		<textarea name="group-request-membership-comments" id="group-request-membership-comments"></textarea>

		<?php 
    do_action('bp_group_request_membership_content');
    ?>

		<p><input type="submit" name="group-request-send" id="group-request-send" value="<?php 
    _e('Send Request', 'buddypress');
    ?>
 &rarr;" />
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:31,代码来源:request-membership.php

示例12: bp_get_current_group_name

/**
 * Returns the name of the current group.
 *
 * @since 1.5.0
 *
 * @return string The name of the current group, if there is one.
 */
function bp_get_current_group_name()
{
    $current_group = groups_get_current_group();
    $current_name = bp_get_group_name($current_group);
    /**
     * Filters the name of the current group.
     *
     * @since 1.2.0
     *
     * @param string $current_name  Name of the current group.
     * @param object $current_group Instance holding the current group.
     */
    return apply_filters('bp_get_current_group_name', $current_name, $current_group);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:21,代码来源:bp-groups-template.php

示例13: bp_group_name

"><?php 
        bp_group_name();
        ?>
</a></h1>
				<p class="status"><?php 
        bp_group_type();
        ?>
</p>
			</div>

			<div class="info-group">
				<?php 
        if (function_exists('bp_wire_get_post_list')) {
            ?>
					<?php 
            bp_wire_get_post_list(bp_get_group_id(), __('Group Wire', 'buddypress'), sprintf(__('The are no wire posts for %s', 'buddypress'), bp_get_group_name()), bp_group_is_member(), true);
            ?>
				<?php 
        }
        ?>
			</div>
			
		</div>
	</div>
	
	<?php 
    }
}
?>

</div>
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:31,代码来源:wire.php

示例14: gtags_activity_for_item

function gtags_activity_for_item($args)
{
    global $wpdb, $bp;
    ob_start();
    $defaults = array('group_ids' => '', 'scope' => '', 'show' => 4, 'show_more' => 8, 'truncate' => 190);
    $args = wp_parse_args($args, $defaults);
    extract($args, EXTR_SKIP);
    if ($scope == 'my' && is_user_logged_in()) {
        $my_groups = BP_Groups_Member::get_group_ids($bp->loggedin_user->id);
        $group_ids = array_intersect($group_ids, $my_groups['groups']);
        $show_hidden = true;
    }
    if (empty($group_ids)) {
        echo '<div class="recent recent-none-found">' . __('Sorry no groups were found.', 'gtags') . '</div>';
        return;
    }
    ?>
<div class="recent"><?php 
    // generate source group links
    foreach ($group_ids as $group_id) {
        $group = groups_get_group(array('group_id' => $group_id));
        $avatar = bp_core_fetch_avatar('object=group&type=thumb&width=50&height=50&item_id=' . $group->id);
        $group_output .= $sep . '<a href="' . bp_get_group_permalink($group) . '" class="recent-group-avatar">' . $avatar . '&nbsp;' . $group->name . '</a>';
        $sep = ', ';
        //compile group data to be used in loop below
        $the_groups[$group->id] = array('permalink' => bp_get_group_permalink($group), 'name' => bp_get_group_name($group), 'avatar' => $avatar);
    }
    ?>
	<div class="gtags-recent-groups">
		<?php 
    _e('Recent Activity From', 'gtags');
    ?>
 <a href="#" class="gtags-more-groups"><?php 
    _e('these groups +', 'gtags');
    ?>
</a>
		<div class="gtags-recent-groups-list"><?php 
    echo $group_output;
    ?>
</div>
	</div>
	<?php 
    // fetch a whole bunch of activity so we can sort them by date below, otherwise they are sorted by group
    $filter = array('user_id' => false, 'object' => 'groups', 'action' => false, 'primary_id' => implode(',', (array) $group_ids));
    $activity = bp_activity_get(array('max' => 1000, 'per_page' => 1000, 'filter' => $filter, 'show_hidden' => $show_hidden));
    //$type_skip = apply_filters( 'gtags_type_skip', array( 'joined_group' ) ); // array of activity types to skip
    // generate a cleaned array of content
    foreach ($activity['activities'] as $item) {
        if (in_array($item->type, (array) $type_skip)) {
            continue;
        }
        $action = preg_replace('/:$/', '', $item->action);
        // remove trailing colon in activity
        $action = apply_filters('gtags_action', $action);
        $content = strip_tags(stripslashes($item->content));
        if ($truncate && strlen($content) > $truncate) {
            $content = substr($content, 0, $truncate) . '... ';
        }
        if ($content) {
            $content .= ' &nbsp;<a href="' . $item->primary_link . '">view</a>';
        }
        $activity_list[$item->date_recorded] = array('action' => $action, 'group_id' => $item->item_id, 'content' => $content, 'primary_link' => $item->primary_link, 'user_id' => $item->user_id);
    }
    if (empty($activity_list)) {
        echo __("Sorry, there was no activity found.", 'gtags');
        echo "</div>";
        //close the div
        return;
    }
    // sort them by date (regardless of group)
    ksort($activity_list);
    $activity_list = array_reverse($activity_list);
    // output pretty html for recent activity for groups
    foreach ((array) $activity_list as $date => $item) {
        $i++;
        $group_id = $item['group_id'];
        $action = $item['action'];
        // show only a certain amount, after that make a 'show more' link and show the rest in a hidden div
        if ($i == $show + 1 && $show_more) {
            ?>
<a href="#" class="gtags-more-activity"><?php 
            _e('show more +', 'gtags');
            ?>
</a>
			<div class="gtags-more-content"><?php 
            $more_link = true;
        }
        if ($i > $show + $show_more + 1) {
            break;
        }
        // for repeating group content, remove group link and shrink group avatar
        if ($prev_group_id == $group_id) {
            $action = preg_replace('/ in the group(.*)$/i', '', $action);
            $dup_class = ' duplicate-group';
        } else {
            $dup_class = '';
        }
        $prev_group_id = $group_id;
        // group avatar
        echo '<a href="' . $the_groups[$group_id]['permalink'] . '" title="' . $the_groups[$group_id]['name'] . '" class="gtags-item-group-avatar' . $dup_class . '">' . $the_groups[$group_id]['avatar'] . '</a>';
//.........这里部分代码省略.........
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:101,代码来源:bp-group-tags.php

示例15: bp_loggedin_user_domain

?>

	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height());
?>
		</a>
	</div>

	<h5><?php 
if (bp_is_group()) {
    printf(__("What's new in %s, %s?", 'vibe'), bp_get_group_name(), bp_get_user_firstname());
} else {
    printf(__("What's new, %s?", 'vibe'), bp_get_user_firstname());
}
?>
</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" class="bp-suggestions" id="whats-new" cols="50" rows="10"><?php 
if (isset($_GET['r'])) {
    ?>
@<?php 
    echo esc_attr($_GET['r']);
    ?>
 <?php 
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:31,代码来源:post-form.php


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