本文整理汇总了PHP中bp_get_member_permalink函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_get_member_permalink函数的具体用法?PHP bp_get_member_permalink怎么用?PHP bp_get_member_permalink使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_get_member_permalink函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$params = array('type' => $type, 'per_page' => $number);
if ($perline != '') {
$class .= ' ' . $perline . '-thumbs';
}
if ($animation != '') {
$anim1 = ' animate-when-almost-visible';
$class .= ' kleo-thumbs-animated th-' . $animation;
}
if ($rounded == 'rounded') {
$class .= ' rounded';
}
if (function_exists('bp_is_active')) {
// begin bp members loop
if (bp_has_members($params)) {
$output .= '<div class="wpb_wrapper">';
$output .= '<div class="kleo-gallery' . $anim1 . '">';
$output .= '<div class="kleo-thumbs-images ' . $class . '">';
while (bp_members()) {
bp_the_member();
$output .= '<a href="' . bp_get_member_permalink() . '" title="' . bp_get_member_name() . '">';
$output .= bp_get_member_avatar(array('type' => 'full', 'width' => '250', 'height' => '250'));
$output .= kleo_get_img_overlay();
$output .= '</a>';
}
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
}
} else {
$output = __("This shortcode must have Buddypress installed to work.", "k-elements");
}
示例2: build_html
function build_html()
{
// Get the total member count
global $members_template;
$total = $members_template->total_member_count;
// Add everything to an array
$members = array();
while (bp_members()) {
bp_the_member();
$members[] = sprintf('<a href="%1$s" title="%2$s User Profile">%2$s</a>', bp_get_member_permalink(), bp_get_member_name());
}
if ($total > $this->number) {
$members[] = sprintf('<a href="%1$s" title="View all online members">%2$d More</a>', bp_get_members_directory_permalink(), $total - $this->number);
}
// Implode the members with separator
$members = implode(" | ", $members);
// Store everything in an output buffer
ob_start();
?>
<div id="sidebar-members-widget" class="widget">
<header class="widget-header">
<h3 class="widget-title">Online Members</h3>
</header>
<p class="online-members"><i class="fa fa-users"></i>
<?php
if ($total > 1) {
printf('There are currently <span class="activity-count">%d</span> members online:', $total);
} elseif ($total == 1) {
printf('There is currently <span class="activity-count">%d</span> member online:', $total);
} else {
echo 'There are currently no members online:';
}
?>
</p>
<p class="online-members"><?php
echo $members;
?>
</p>
</div><?php
// Get the contents of the buffer
$html = ob_get_contents();
ob_end_clean();
// Return the html to the class
return $html;
}
示例3: bp_get_member_link
/**
* Alias of {@link bp_get_member_permalink()}.
*/
function bp_get_member_link()
{
return bp_get_member_permalink();
}
示例4: info_window_content
/**
* create the content of the info window
* @since 2.5
* @param unknown_type $member
* @return string
*/
public function info_window_content($member)
{
if (!empty($member->formatted_address)) {
$address = $member->formatted_address;
} elseif (!empty($member->address)) {
$address = $member->address;
} else {
$address = $this->form['labels']['search_results']['not_avaliable'];
}
$output = array();
$output['start'] = '<div class="gmw-fl-infow-window-wrapper wppl-fl-info-window">';
$output['thumb'] = '<div class="thumb wppl-info-window-thumb">' . bp_get_member_avatar($args = 'type=full') . '</div>';
$output['content_start'] = '<div class="content wppl-info-window-info"><table>';
$output['name'] = '<tr><td><span class="wppl-info-window-permalink"><a href="' . bp_get_member_permalink() . '">' . $member->display_name . '</a></span></td></tr>';
$output['address'] = '<tr><td><span>' . $this->form['labels']['info_window']['address'] . '</span>' . $address . '</td></tr>';
if (isset($member->distance)) {
$output['distance'] = '<tr><td><span>' . $this->form['labels']['info_window']['distance'] . '</span>' . $member->distance . ' ' . $this->form['units_array']['name'] . '</td></tr>';
}
$output['content_end'] = '</table></div>';
$output['end'] = '</div>';
$output = apply_filters('gmw_fl_info_window_content', $output, $member, $this->form);
$output = apply_filters("gmw_fl_info_window_content_{$this->form['ID']}", $output, $member, $this->form);
return implode(' ', $output);
}
示例5: extract
<?php
$output = '';
extract(shortcode_atts(array('type' => '', 'max_item' => 10, 'max_slides' => 7, 'min_slides' => 1, 'item_width' => 175), $atts));
$params = array('type' => $type, 'per_page' => $max_item);
if (function_exists('bp_has_members')) {
// begin bp members loop
if (bp_has_members($params)) {
$output .= '<div class="clearfix">';
$output .= '<ul data-max-slides="' . $max_slides . '" data-min-slides="' . $min_slides . '"
data-item-width="' . $item_width . '" class="gears-carousel-standard bp-members-carousel">';
while (bp_members()) {
bp_the_member();
$output .= '<li class="carousel-item">';
$name = bp_get_member_name();
$permalink = bp_get_member_permalink();
$last_active = bp_get_member_last_active();
$output .= '<a class="members-name" href="' . esc_url($permalink) . '" title="' . esc_attr($name) . '">';
$output .= esc_attr($name);
$output .= '</a>';
$output .= '<a href="' . esc_url($permalink) . '" title="' . esc_attr($name) . '">';
$output .= bp_get_member_avatar(array('type' => 'full'));
$output .= '</a>';
if (class_exists('BP_Follow')) {
if (method_exists('BP_Follow', 'get_counts')) {
$follow_count = BP_Follow::get_counts(bp_get_member_user_id());
$follow_label = $follow_count['followers'] == 1 ? 'Follower' : 'Followers';
$output .= '<p><strong>' . $follow_count['followers'] . ' ' . $follow_label . '</strong></p>';
}
}
$output .= '</li>';
示例6: dpa_member_get_achievements_link
/**
* Returns a button to the current member's Achievements page; used on the Achievement "unlocked by" screen.
* Use only in the members' template loop.
*
* @global object $bp BuddyPress global settings
* @global BP_Core_Members_Template $members_template
* @return string
* @since 2.0
*/
function dpa_member_get_achievements_link()
{
global $bp, $members_template;
$button = '<p><div class="generic-button" id="view-achievements-button">';
$button .= '<a href="' . esc_url(bp_get_member_permalink() . DPA_SLUG) . '">' . __("View Achievements", 'dpa') . '</a>';
$button .= '</div></p>';
return apply_filters('dpa_member_get_achievements_button', $button);
}
示例7: esc_url
<div class="bboss_ajax_search_item bboss_ajax_search_member">
<a href="<?php
echo esc_url(add_query_arg(array('no_frame' => '1'), bp_get_member_permalink()));
?>
">
<div class="item-avatar">
<?php
bp_member_avatar('type=thumb&width=60&height=60');
?>
</div>
<div class="item">
<div class="item-title"><?php
bp_member_name();
?>
</div>
</div>
</a>
</div>
示例8: bp_members_list
/**
* BP Members List
*/
function bp_members_list($atts)
{
$output = '';
extract(shortcode_atts(array('type' => 'active', 'max_item' => 10), $atts));
// available columns are 1, 2, 3, and 4
$params = array('type' => $type, 'per_page' => $max_item);
if (function_exists('bp_has_members')) {
// begin bp members loop
if (bp_has_members($params)) {
$output .= '<div class="clearfix">';
$output .= '<ul class="gears-bp-members-list clear">';
while (bp_members()) {
$output .= '<li class="clearfix bp-members-list-item ">';
bp_the_member();
$output .= bp_get_member_avatar(array('type' => 'full', 'class' => 'col-md-3 col-xs-3 col-sm-3 trans avatar'));
$output .= '<div class="col-md-9 col-sm-9 col-xs-9">';
$output .= '<h5><a href="' . bp_get_member_permalink() . '" title="' . bp_get_member_name() . '">' . bp_get_member_name() . '</a></h5>';
$output .= '<div class="item-meta"><span class="small activity">' . bp_get_member_last_active() . '</span></div>';
do_action('bp_directory_members_item');
$output .= '</div>';
$output .= '</li>';
}
$output .= '</ul>';
$output .= '</div>';
return $output;
}
} else {
return $this->bp_not_installed;
}
}
示例9: ob_start
$rounded = 'rounded';
}
if (function_exists('bp_is_active')) {
if (bp_has_members($params)) {
ob_start();
echo '<div class="wpb_wrapper">';
echo '<div id="members-dir-list" class="members dir-list">';
echo '<ul id="members-list" class="item-list row kleo-isotope masonry ' . $class . '">';
while (bp_members()) {
bp_the_member();
echo '<li class="kleo-masonry-item">' . '<div class="member-inner-list animated animate-when-almost-visible bottom-to-top">' . '<div class="item-avatar ' . $rounded . '">' . '<a href="' . bp_get_member_permalink() . '">' . bp_get_member_avatar() . kleo_get_img_overlay() . '</a>';
if ($online == 'show') {
echo kleo_get_online_status(bp_get_member_user_id());
}
echo '</div>' . '<div class="item">
<div class="item-title">' . '<a href="' . bp_get_member_permalink() . '">' . bp_get_member_name() . '</a>
</div>
<div class="item-meta"><span class="activity">' . bp_get_member_last_active() . '</span></div>';
if (bp_get_member_latest_update()) {
echo '<span class="update"> ' . bp_get_member_latest_update() . '</span>';
}
do_action('bp_directory_members_item');
echo '</div>';
echo '<div class="action">';
do_action('bp_directory_members_actions');
echo '</div>';
echo '</div><!--end member-inner-list-->
</li>';
}
echo '</ul>';
echo '</div>';