4 require_once('./wp-config.php');
8 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
9 $link_cat = $_GET['link_cat'];
10 if ((empty ($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
13 $link_cat = '' . urldecode($link_cat) . '';
14 $link_cat = intval($link_cat);
16 ?><?php echo '<?xml version="1.0"?'.">\n"; ?>
17 <?php the_generator( 'comment' ); ?>
20 <title>Links for <?php echo attribute_escape(get_bloginfo('name', 'display').$cat_name); ?></title>
21 <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
26 if (empty ($link_cat))
27 $cats = get_categories("type=link&hierarchical=0");
29 $cats = get_categories('type=link&hierarchical=0&include='.$link_cat);
31 foreach ((array) $cats as $cat) {
32 $catname = apply_filters('link_category', $cat->name);
35 <outline type="category" title="<?php echo attribute_escape($catname); ?>">
38 $bookmarks = get_bookmarks("category={$cat->term_id}");
39 foreach ((array) $bookmarks as $bookmark) {
40 $title = attribute_escape(apply_filters('link_title', $bookmark->link_name));
42 <outline text="<?php echo $title; ?>" type="link" xmlUrl="<?php echo attribute_escape($bookmark->link_rss); ?>" htmlUrl="<?php echo attribute_escape($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />