function bp_get_link_list_item_name()
{
    return apply_filters('bp_get_link_list_item_name', bp_link_name());
}
    function widget($args, $instance)
    {
        global $bp;
        extract($args);
        echo $before_widget;
        echo $before_title . $widget_name . $after_title;
        ?>

		<?php 
        if (bp_has_links('type=popular&per_page=' . $instance['max_links'] . '&max=' . $instance['max_links'])) {
            ?>
			<div class="item-options" id="links-list-options">
				<span class="ajax-loader" id="ajax-loader-links"></span>
				<a href="<?php 
            echo site_url() . '/' . bp_links_root_slug();
            ?>
" id="newest-links"><?php 
            _e("Newest", 'buddypress');
            ?>
</a> |
				<?php 
            if (bp_links_is_voting_enabled()) {
                ?>
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="most-votes"><?php 
                _e("Votes", 'buddypress-links');
                ?>
</a> |
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="high-votes"><?php 
                _e("Rating", 'buddypress-links');
                ?>
</a> |
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="popular-links" class="selected"><?php 
                _e("Popular", 'buddypress');
                ?>
</a>
				<?php 
            } else {
                ?>
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="active-links"><?php 
                _e("Active", 'buddypress');
                ?>
</a>
				<?php 
            }
            ?>
			</div>

			<ul id="links-list" class="item-list">
				<?php 
            while (bp_links()) {
                bp_the_link();
                ?>
					<li>
						<div class="item-avatar">
							<a href="<?php 
                bp_link_permalink();
                ?>
"><?php 
                bp_link_avatar(array('width' => bp_core_avatar_thumb_width(), 'height' => bp_core_avatar_thumb_height()));
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title"><a href="<?php 
                bp_link_permalink();
                ?>
" title="<?php 
                bp_link_name();
                ?>
"><?php 
                bp_link_name();
                ?>
</a></div>
							<?php 
                if (bp_links_is_voting_enabled()) {
                    ?>
							<div class="item-meta"><span class="activity"><?php 
                    printf(__('%+d rating', 'buddypress-links'), bp_get_link_vote_total());
                    ?>
</span></div>
							<?php 
                }
                ?>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('bp_links_widget_links_list', '_wpnonce-links');
            ?>
			<input type="hidden" name="links_widget_max" id="links_widget_max" value="<?php 
            echo attribute_escape($instance['max_links']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('There are no links to display.', 'buddypress-links');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
Example #3
0
]" />
						</th>
						<td><?php 
        bp_link_avatar_mini();
        ?>
</td>
						<td><?php 
        bp_link_id();
        ?>
</td>
						<td>
							<a href="<?php 
        bp_link_permalink();
        ?>
"><?php 
        bp_link_name();
        ?>
</a>
							<?php 
        bp_link_description_excerpt();
        ?>
						</td>
						<td><?php 
        bp_link_category_name();
        ?>
</td>
						<td><?php 
        bp_link_type();
        ?>
</td>
						<td align="center"><?php