2003-12-18 10:12:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** function wp_get_links()
|
|
|
|
** Gets the links associated with category n.
|
|
|
|
** Parameters:
|
|
|
|
** category (no default) - The category to use.
|
2005-04-01 05:15:18 +00:00
|
|
|
** or:
|
|
|
|
** a query string
|
2003-12-18 10:12:34 +00:00
|
|
|
**/
|
2005-04-01 05:15:18 +00:00
|
|
|
function wp_get_links($args = '') {
|
|
|
|
global $wpdb;
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-05-11 03:10:05 +00:00
|
|
|
if ( strpos( $args, '=' ) === false ) {
|
2006-02-27 04:57:30 +00:00
|
|
|
$cat_id = $args;
|
2007-05-11 03:10:05 +00:00
|
|
|
$args = add_query_arg( 'category', $cat_id, $args );
|
2005-04-01 05:15:18 +00:00
|
|
|
}
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-05-11 03:10:05 +00:00
|
|
|
$defaults = array(
|
|
|
|
'category' => -1, 'before' => '',
|
|
|
|
'after' => '<br />', 'between' => ' ',
|
|
|
|
'show_images' => true, 'orderby' => 'name',
|
|
|
|
'show_description' => true, 'show_rating' => false,
|
|
|
|
'limit' => -1, 'show_updated' => true,
|
|
|
|
'echo' => true
|
|
|
|
);
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-05-11 03:10:05 +00:00
|
|
|
$r = wp_parse_args( $args, $defaults );
|
|
|
|
extract( $r );
|
2006-02-27 04:57:30 +00:00
|
|
|
|
|
|
|
return get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated, $echo);
|
2003-12-18 10:12:34 +00:00
|
|
|
} // end wp_get_links
|
|
|
|
|
|
|
|
/** function get_links()
|
|
|
|
** Gets the links associated with category n.
|
|
|
|
** Parameters:
|
|
|
|
** category (default -1) - The category to use. If no category supplied
|
|
|
|
** 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
|
2005-08-20 01:46:18 +00:00
|
|
|
** and its description. Not used if no image or show_images == true
|
2003-12-18 10:12:34 +00:00
|
|
|
** show_images (default true) - whether to show images (if defined).
|
|
|
|
** orderby (default 'id') - 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.
|
|
|
|
** show_description (default true) - whether to show the description if
|
|
|
|
** show_images=false/not defined .
|
|
|
|
** show_rating (default false) - show rating stars/chars
|
|
|
|
** limit (default -1) - Limit to X entries. If not specified, all entries
|
|
|
|
** are shown.
|
|
|
|
** show_updated (default 0) - whether to show last updated timestamp
|
2005-08-20 01:46:18 +00:00
|
|
|
** echo (default true) - whether to echo the results, or return them instead
|
2003-12-18 10:12:34 +00:00
|
|
|
*/
|
2005-08-20 01:46:18 +00:00
|
|
|
function get_links($category = -1,
|
|
|
|
$before = '',
|
|
|
|
$after = '<br />',
|
|
|
|
$between = ' ',
|
|
|
|
$show_images = true,
|
|
|
|
$orderby = 'name',
|
|
|
|
$show_description = true,
|
|
|
|
$show_rating = false,
|
|
|
|
$limit = -1,
|
|
|
|
$show_updated = 1,
|
|
|
|
$echo = true) {
|
2003-12-18 10:12:34 +00:00
|
|
|
|
2005-08-20 01:46:18 +00:00
|
|
|
global $wpdb;
|
2003-12-18 10:12:34 +00:00
|
|
|
|
2006-03-04 20:39:51 +00:00
|
|
|
$order = 'ASC';
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( substr($orderby, 0, 1) == '_' ) {
|
2006-03-04 20:39:51 +00:00
|
|
|
$order = 'DESC';
|
|
|
|
$orderby = substr($orderby, 1);
|
|
|
|
}
|
2006-08-22 09:24:31 +00:00
|
|
|
|
|
|
|
if ( $category == -1 ) //get_bookmarks uses '' to signify all categories
|
2006-03-24 19:22:22 +00:00
|
|
|
$category = '';
|
2006-03-04 20:39:51 +00:00
|
|
|
|
|
|
|
$results = get_bookmarks("category=$category&orderby=$orderby&order=$order&show_updated=$show_updated&limit=$limit");
|
2003-12-18 10:12:34 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !$results )
|
2005-08-20 01:46:18 +00:00
|
|
|
return;
|
2006-02-27 04:57:30 +00:00
|
|
|
|
2005-08-20 01:46:18 +00:00
|
|
|
$output = '';
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
foreach ( (array) $results as $row ) {
|
|
|
|
if ( !isset($row->recently_updated) )
|
|
|
|
$row->recently_updated = false;
|
|
|
|
$output .= $before;
|
|
|
|
if ( $show_updated && $row->recently_updated )
|
2006-08-30 21:46:31 +00:00
|
|
|
$output .= get_option('links_recently_updated_prepend');
|
2005-08-20 01:46:18 +00:00
|
|
|
$the_link = '#';
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !empty($row->link_url) )
|
2007-03-17 08:46:59 +00:00
|
|
|
$the_link = clean_url($row->link_url);
|
2005-08-20 01:46:18 +00:00
|
|
|
$rel = $row->link_rel;
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '' != $rel )
|
2005-08-20 01:46:18 +00:00
|
|
|
$rel = ' rel="' . $rel . '"';
|
2004-04-04 23:25:55 +00:00
|
|
|
|
2006-12-21 10:10:04 +00:00
|
|
|
$desc = attribute_escape($row->link_description);
|
|
|
|
$name = attribute_escape($row->link_name);
|
2005-08-20 01:46:18 +00:00
|
|
|
$title = $desc;
|
2003-12-18 10:12:34 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $show_updated )
|
|
|
|
if (substr($row->link_updated_f, 0, 2) != '00')
|
2006-11-28 21:51:13 +00:00
|
|
|
$title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * 3600)) . ')';
|
2005-08-20 01:46:18 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '' != $title )
|
2005-08-20 01:46:18 +00:00
|
|
|
$title = ' title="' . $title . '"';
|
|
|
|
|
|
|
|
$alt = ' alt="' . $name . '"';
|
|
|
|
|
|
|
|
$target = $row->link_target;
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '' != $target )
|
2005-08-20 01:46:18 +00:00
|
|
|
$target = ' target="' . $target . '"';
|
|
|
|
|
|
|
|
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $row->link_image != null && $show_images ) {
|
|
|
|
if ( strpos($row->link_image, 'http') !== false )
|
2005-08-20 01:46:18 +00:00
|
|
|
$output .= "<img src=\"$row->link_image\" $alt $title />";
|
2004-05-10 08:26:42 +00:00
|
|
|
else // If it's a relative path
|
2006-08-30 21:46:31 +00:00
|
|
|
$output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />";
|
2005-08-20 01:46:18 +00:00
|
|
|
} else {
|
|
|
|
$output .= $name;
|
|
|
|
}
|
2003-12-18 10:12:34 +00:00
|
|
|
|
2005-08-20 01:46:18 +00:00
|
|
|
$output .= '</a>';
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $show_updated && $row->recently_updated )
|
2006-08-30 21:46:31 +00:00
|
|
|
$output .= get_option('links_recently_updated_append');
|
2005-08-20 01:46:18 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $show_description && '' != $desc )
|
2005-08-20 01:46:18 +00:00
|
|
|
$output .= $between . $desc;
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-03-31 19:43:49 +00:00
|
|
|
if ($show_rating) {
|
|
|
|
$output .= $between . get_linkrating($row);
|
|
|
|
}
|
2006-08-22 09:24:31 +00:00
|
|
|
|
2005-08-20 01:46:18 +00:00
|
|
|
$output .= "$after\n";
|
|
|
|
} // end while
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !$echo )
|
2005-03-22 00:08:57 +00:00
|
|
|
return $output;
|
2006-08-22 09:24:31 +00:00
|
|
|
echo $output;
|
2003-12-18 10:12:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function get_linkrating($link) {
|
2006-11-19 07:56:05 +00:00
|
|
|
return apply_filters('link_rating', $link->link_rating);
|
2003-12-18 10:12:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/** function get_linkcatname()
|
|
|
|
** Gets the name of category n.
|
|
|
|
** Parameters: id (default 0) - The category to get. If no category supplied
|
|
|
|
** uses 0
|
|
|
|
*/
|
|
|
|
function get_linkcatname($id = 0) {
|
2006-04-22 00:02:00 +00:00
|
|
|
$id = (int) $id;
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( empty($id) )
|
|
|
|
return '';
|
|
|
|
|
2006-02-27 04:57:30 +00:00
|
|
|
$cats = wp_get_link_cats($id);
|
|
|
|
|
|
|
|
if ( empty($cats) || ! is_array($cats) )
|
|
|
|
return '';
|
|
|
|
|
2007-03-23 02:16:16 +00:00
|
|
|
$cat_id = (int) $cats[0]; // Take the first cat.
|
2006-02-27 04:57:30 +00:00
|
|
|
|
|
|
|
$cat = get_category($cat_id);
|
2007-05-23 18:59:12 +00:00
|
|
|
return $cat->name;
|
2003-12-18 10:12:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/** function links_popup_script()
|
|
|
|
** This function contributed by Fullo -- http://sprite.csr.unibo.it/fullo/
|
|
|
|
** Show the link to the links popup and the number of links
|
|
|
|
** Parameters:
|
|
|
|
** text (default Links) - the text of the link
|
|
|
|
** width (default 400) - the width of the popup window
|
|
|
|
** height (default 400) - the height of the popup window
|
|
|
|
** file (default linkspopup.php) - the page to open in the popup window
|
|
|
|
** count (default true) - the number of links in the db
|
|
|
|
*/
|
2006-08-22 09:24:31 +00:00
|
|
|
function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
|
|
|
|
if ( $count )
|
|
|
|
$counts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links");
|
|
|
|
|
|
|
|
$javascript = "<a href=\"#\" onclick=\"javascript:window.open('$file?popup=1', '_blank', 'width=$width,height=$height,scrollbars=yes,status=no'); return false\">";
|
|
|
|
$javascript .= $text;
|
|
|
|
|
|
|
|
if ( $count )
|
|
|
|
$javascript .= " ($counts)";
|
|
|
|
|
|
|
|
$javascript .= "</a>\n\n";
|
|
|
|
echo $javascript;
|
2003-12-18 10:12:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* function get_links_list()
|
|
|
|
*
|
|
|
|
* added by Dougal
|
|
|
|
*
|
|
|
|
* Output a list of all links, listed by category, using the
|
2004-05-24 08:22:18 +00:00
|
|
|
* settings in $wpdb->linkcategories and output it as a nested
|
2003-12-18 10:12:34 +00:00
|
|
|
* HTML unordered list.
|
|
|
|
*
|
|
|
|
* Parameters:
|
|
|
|
* order (default 'name') - Sort link categories by 'name' or 'id'
|
|
|
|
* hide_if_empty (default true) - Supress listing empty link categories
|
|
|
|
*/
|
2004-01-01 22:13:06 +00:00
|
|
|
function get_links_list($order = 'name', $hide_if_empty = 'obsolete') {
|
2003-12-18 10:12:34 +00:00
|
|
|
$order = strtolower($order);
|
|
|
|
|
|
|
|
// Handle link category sorting
|
2006-02-27 04:57:30 +00:00
|
|
|
$direction = 'ASC';
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '_' == substr($order,0,1) ) {
|
2006-02-27 04:57:30 +00:00
|
|
|
$direction = 'DESC';
|
2003-12-18 10:12:34 +00:00
|
|
|
$order = substr($order,1);
|
|
|
|
}
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !isset($direction) )
|
|
|
|
$direction = '';
|
2006-02-27 04:57:30 +00:00
|
|
|
|
2006-03-24 19:22:22 +00:00
|
|
|
$cats = get_categories("type=link&orderby=$order&order=$direction&hierarchical=0");
|
2003-12-18 10:12:34 +00:00
|
|
|
|
|
|
|
// Display each category
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $cats ) {
|
|
|
|
foreach ( (array) $cats as $cat ) {
|
2003-12-18 10:12:34 +00:00
|
|
|
// Handle each category.
|
|
|
|
|
|
|
|
// Display the category name
|
2007-05-23 18:59:12 +00:00
|
|
|
echo ' <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . $cat->name . "</h2>\n\t<ul>\n";
|
2003-12-18 10:12:34 +00:00
|
|
|
// Call get_links() with all the appropriate params
|
2007-05-23 18:59:12 +00:00
|
|
|
get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
|
2003-12-18 10:12:34 +00:00
|
|
|
|
|
|
|
// Close the last category
|
2004-01-01 22:13:06 +00:00
|
|
|
echo "\n\t</ul>\n</li>\n";
|
2003-12-18 10:12:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-06-16 23:35:48 +00:00
|
|
|
function _walk_bookmarks($bookmarks, $args = '' ) {
|
2007-05-11 03:10:05 +00:00
|
|
|
$defaults = array(
|
|
|
|
'show_updated' => 0, 'show_description' => 0,
|
|
|
|
'show_images' => 1, 'before' => '<li>',
|
|
|
|
'after' => '</li>', 'between' => "\n"
|
|
|
|
);
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-05-11 03:10:05 +00:00
|
|
|
$r = wp_parse_args( $args, $defaults );
|
|
|
|
extract( $r );
|
2006-06-16 23:35:48 +00:00
|
|
|
|
|
|
|
foreach ( (array) $bookmarks as $bookmark ) {
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !isset($bookmark->recently_updated) )
|
|
|
|
$bookmark->recently_updated = false;
|
|
|
|
$output .= $before;
|
|
|
|
if ( $show_updated && $bookmark->recently_updated )
|
2006-08-30 21:46:31 +00:00
|
|
|
$output .= get_option('links_recently_updated_prepend');
|
2006-06-16 23:35:48 +00:00
|
|
|
|
|
|
|
$the_link = '#';
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !empty($bookmark->link_url) )
|
2007-03-17 08:46:59 +00:00
|
|
|
$the_link = clean_url($bookmark->link_url);
|
2006-06-16 23:35:48 +00:00
|
|
|
|
|
|
|
$rel = $bookmark->link_rel;
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '' != $rel )
|
2006-06-16 23:35:48 +00:00
|
|
|
$rel = ' rel="' . $rel . '"';
|
|
|
|
|
2007-03-10 01:13:49 +00:00
|
|
|
$desc = attribute_escape(apply_filters('link_description', $bookmark->link_description));
|
|
|
|
$name = attribute_escape(apply_filters('link_title', $bookmark->link_name));
|
|
|
|
$title = $desc;
|
2006-06-16 23:35:48 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $show_updated )
|
2006-09-05 18:52:24 +00:00
|
|
|
if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) {
|
|
|
|
$title .= ' ';
|
|
|
|
$title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)));
|
|
|
|
$title .= ')';
|
|
|
|
}
|
2006-06-16 23:35:48 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '' != $title )
|
2006-06-16 23:35:48 +00:00
|
|
|
$title = ' title="' . $title . '"';
|
|
|
|
|
|
|
|
$alt = ' alt="' . $name . '"';
|
|
|
|
|
|
|
|
$target = $bookmark->link_target;
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( '' != $target )
|
2006-06-16 23:35:48 +00:00
|
|
|
$target = ' target="' . $target . '"';
|
|
|
|
|
|
|
|
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $bookmark->link_image != null && $show_images ) {
|
|
|
|
if ( strpos($bookmark->link_image, 'http') !== false )
|
2006-06-16 23:35:48 +00:00
|
|
|
$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
|
|
|
|
else // If it's a relative path
|
2006-08-30 21:46:31 +00:00
|
|
|
$output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
|
2006-06-16 23:35:48 +00:00
|
|
|
} else {
|
|
|
|
$output .= $name;
|
|
|
|
}
|
|
|
|
|
|
|
|
$output .= '</a>';
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $show_updated && $bookmark->recently_updated )
|
2006-08-30 21:46:31 +00:00
|
|
|
$output .= get_option('links_recently_updated_append');
|
2006-06-16 23:35:48 +00:00
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( $show_description && '' != $desc )
|
2006-06-16 23:35:48 +00:00
|
|
|
$output .= $between . $desc;
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-03-31 19:43:49 +00:00
|
|
|
if ($show_rating) {
|
|
|
|
$output .= $between . get_linkrating($bookmark);
|
|
|
|
}
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2006-06-16 23:35:48 +00:00
|
|
|
$output .= "$after\n";
|
|
|
|
} // end while
|
|
|
|
|
|
|
|
return $output;
|
|
|
|
}
|
|
|
|
|
2006-03-03 21:38:36 +00:00
|
|
|
function wp_list_bookmarks($args = '') {
|
2007-05-11 03:10:05 +00:00
|
|
|
$defaults = array(
|
|
|
|
'orderby' => 'name', 'order' => 'ASC',
|
|
|
|
'limit' => -1, 'category' => '',
|
|
|
|
'category_name' => '', 'hide_invisible' => 1,
|
|
|
|
'show_updated' => 0, 'echo' => 1,
|
|
|
|
'categorize' => 1, 'title_li' => __('Bookmarks'),
|
|
|
|
'title_before' => '<h2>', 'title_after' => '</h2>',
|
|
|
|
'category_orderby' => 'name', 'category_order' => 'ASC',
|
|
|
|
'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">',
|
|
|
|
'category_after' => '</li>'
|
|
|
|
);
|
2007-06-14 02:25:30 +00:00
|
|
|
|
2007-05-11 03:10:05 +00:00
|
|
|
$r = wp_parse_args( $args, $defaults );
|
|
|
|
extract( $r );
|
2006-08-22 09:24:31 +00:00
|
|
|
|
2006-06-16 23:35:48 +00:00
|
|
|
$output = '';
|
|
|
|
|
|
|
|
if ( $categorize ) {
|
2006-10-02 18:01:07 +00:00
|
|
|
//Split the bookmarks into ul's for each category
|
2007-05-27 17:21:04 +00:00
|
|
|
$cats = get_terms('link_category', "category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0");
|
2006-10-02 18:01:07 +00:00
|
|
|
|
2006-06-16 23:35:48 +00:00
|
|
|
foreach ( (array) $cats as $cat ) {
|
2007-05-23 18:59:12 +00:00
|
|
|
$params = array_merge($r, array('category'=>$cat->term_id));
|
2007-03-04 01:59:57 +00:00
|
|
|
$bookmarks = get_bookmarks($params);
|
2006-06-16 23:35:48 +00:00
|
|
|
if ( empty($bookmarks) )
|
|
|
|
continue;
|
2007-05-23 18:59:12 +00:00
|
|
|
$output .= str_replace(array('%id', '%class'), array("linkcat-$cat->term_id", $class), $category_before);
|
|
|
|
$catname = apply_filters( "link_category", $cat->name );
|
2007-03-10 01:13:49 +00:00
|
|
|
$output .= "$title_before$catname$title_after\n\t<ul>\n";
|
2006-06-16 23:35:48 +00:00
|
|
|
$output .= _walk_bookmarks($bookmarks, $r);
|
2006-11-02 22:12:13 +00:00
|
|
|
$output .= "\n\t</ul>\n$category_after\n";
|
2006-06-16 23:35:48 +00:00
|
|
|
}
|
2006-10-02 18:01:07 +00:00
|
|
|
} else {
|
|
|
|
//output one single list using title_li for the title
|
2007-03-04 01:59:57 +00:00
|
|
|
$bookmarks = get_bookmarks($r);
|
2007-02-27 15:24:54 +00:00
|
|
|
|
2006-10-02 18:01:07 +00:00
|
|
|
if ( !empty($bookmarks) ) {
|
2007-01-25 02:02:21 +00:00
|
|
|
if ( !empty( $title_li ) ){
|
|
|
|
$output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before);
|
|
|
|
$output .= "$title_before$title_li$title_after\n\t<ul>\n";
|
|
|
|
$output .= _walk_bookmarks($bookmarks, $r);
|
|
|
|
$output .= "\n\t</ul>\n$category_after\n";
|
|
|
|
} else {
|
|
|
|
$output .= _walk_bookmarks($bookmarks, $r);
|
|
|
|
}
|
2006-10-02 18:01:07 +00:00
|
|
|
}
|
2006-06-16 23:35:48 +00:00
|
|
|
}
|
|
|
|
|
2006-08-22 09:24:31 +00:00
|
|
|
if ( !$echo )
|
|
|
|
return $output;
|
|
|
|
echo $output;
|
2006-03-03 21:38:36 +00:00
|
|
|
}
|
|
|
|
|
2006-10-02 18:01:07 +00:00
|
|
|
?>
|