示例#1
0
/**
 * Gets the links associated with category 'cat_name' and display rating stars/chars.
 *
 * @since 0.71
 * @deprecated 2.1
 * @deprecated Use get_bookmarks()
 * @see get_bookmarks()
 *
 * @param string $cat_name The category name to use. If no match is found uses all
 * @param string $before The html to output before the link
 * @param string $after The html to output after the link
 * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true
 * @param bool $show_images Whether to show images (if defined).
 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
 *		'description', or 'rating'. Or maybe owner. If you start the name with an
 *		underscore the order will be reversed. You can also specify 'rand' as the
 *		order which will return links in a random order.
 * @param bool $show_description Whether to show the description if show_images=false/not defined
 * @param int $limit Limit to X entries. If not specified, all entries are shown.
 * @param int $show_updated Whether to show last updated timestamp
 */
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0)
{
    _deprecated_function(__FUNCTION__, '2.1', 'get_bookmarks()');
    get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
}
示例#2
0
</option>
          <?php 
    get_archives('monthly', '', 'option', '', '', '');
    ?>
        </select>		
        <?php 
    include TEMPLATEPATH . '/searchform.php';
    ?>
	  </div>
	  <div class="title">
        <h2>Links</h2>
      </div>
	  <div class="post">
	    <ul>
          <?php 
    get_linksbyname('', '<li>', '</li>', '', TRUE, 'name', FALSE);
    ?>
		</ul>
      </div>
	  <div class="title">
        <h2>Subscribe</h2>
      </div>
	  <div class="post">
	    <ul>
		<li><a href="<?php 
    bloginfo('rss2_url');
    ?>
"><?php 
    _e('Entries (RSS)');
    ?>
</a></li>
/** function get_linksbyname_withrating()
 ** Gets the links associated with category 'cat_name' and display rating stars/chars.
 ** Parameters:
 **   cat_name (default 'noname')  - The category name to use. If no
 **     match is found uses all
 **   before (default '')  - the html to output before the link
 **   after (default '<br />')  - the html to output after the link
 **   between (default ' ')  - the html to output between the link/image
 **     and it's description. Not used if no image or show_images == true
 **   show_images (default true) - whether to show images (if defined).
 **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
 **     'url' or 'description'. Or maybe owner. If you start the
 **     name with an underscore the order will be reversed.
 **     You can also specify 'rand' as the order which will return links in a
 **     random order.
 **   show_description (default true) - whether to show the description if
 **     show_images=false/not defined
 **   limit (default -1) - Limit to X entries. If not specified, all entries
 **     are shown.
 **   show_updated (default 0) - whether to show last updated timestamp
 */
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0)
{
    get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
}
示例#4
0
<?php 
the_content();
?>
</div>

<div id="primary">
<?php 
$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM {$wpdb->categories} WHERE link_count > 0");
foreach ($link_cats as $link_cat) {
    ?>
	<h3><?php 
    echo $link_cat->cat_name;
    ?>
</h3>
	<ul class="navlist" id="linkcat-<?php 
    echo $link_cat->cat_id;
    ?>
">
		<?php 
    get_linksbyname($link_cat->cat_name, '<li>', '</li>', ' ', false, 'name', false, false, -1, false);
    ?>
	</ul>
<?php 
}
?>
</div>
<?php 
if (!get_option('tarski_hide_sidebar')) {
    get_sidebar();
}
get_footer();