Example #1
0
 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $show_description = isset($instance['description']) ? $instance['description'] : false;
     $show_name = isset($instance['name']) ? $instance['name'] : false;
     $show_rating = isset($instance['rating']) ? $instance['rating'] : false;
     $show_images = isset($instance['images']) ? $instance['images'] : true;
     $category = isset($instance['category']) ? $instance['category'] : false;
     if (is_admin() && !$category) {
         // Display All Links widget as such in the widgets screen
         echo $before_widget . $before_title . _x('All Links', 'links widget') . $after_title . $after_widget;
         return;
     }
     $before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $before_widget);
     nxt_list_bookmarks(apply_filters('widget_links_args', array('title_before' => $before_title, 'title_after' => $after_title, 'category_before' => $before_widget, 'category_after' => $after_widget, 'show_images' => $show_images, 'show_description' => $show_description, 'show_name' => $show_name, 'show_rating' => $show_rating, 'category' => $category, 'class' => 'linkcat widget')));
 }
Example #2
0
	<div id="content">
		<div class="padder">

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

		<div class="page" id="blog-latest" role="main">

			<h2 class="pagetitle"><?php 
_e('Links', 'buddypress');
?>
</h2>

			<ul id="links-list">
				<?php 
nxt_list_bookmarks();
?>
			</ul>

		</div>

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

		</div>
	</div>

<?php 
get_footer();
Example #3
0
/**
 * Gets the links associated with category.
 *
 * @see get_links() for argument information that can be used in $args
 * @since 1.0.1
 * @deprecated 2.1
 * @deprecated Use nxt_list_bookmarks()
 * @see nxt_list_bookmarks()
 *
 * @param string $args a query string
 * @return null|string
 */
function nxt_get_links($args = '')
{
    _deprecated_function(__FUNCTION__, '2.1', 'nxt_list_bookmarks()');
    if (strpos($args, '=') === false) {
        $cat_id = $args;
        $args = add_query_arg('category', $cat_id, $args);
    }
    $defaults = array('after' => '<br />', 'before' => '', 'between' => ' ', 'categorize' => 0, 'category' => '', 'echo' => true, 'limit' => -1, 'orderby' => 'name', 'show_description' => true, 'show_images' => true, 'show_rating' => false, 'show_updated' => true, 'title_li' => '');
    $r = nxt_parse_args($args, $defaults);
    return nxt_list_bookmarks($r);
}