|
Revision 591, 1.4 kB
(checked in by donncha, 2 years ago)
|
Moved everything in wp-inst down a directory.
Uses's Ryan Boren's htaccess rules and mods
If you're upgrading, try this on a test server first!
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
if (empty($wp)) { |
|---|
| 4 |
require_once('./wp-config.php'); |
|---|
| 5 |
wp(); |
|---|
| 6 |
} |
|---|
| 7 |
|
|---|
| 8 |
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true); |
|---|
| 9 |
$link_cat = $_GET['link_cat']; |
|---|
| 10 |
if ((empty ($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) { |
|---|
| 11 |
$link_cat = ''; |
|---|
| 12 |
} else { |
|---|
| 13 |
$link_cat = '' . urldecode($link_cat) . ''; |
|---|
| 14 |
$link_cat = intval($link_cat); |
|---|
| 15 |
} |
|---|
| 16 |
?><?php echo '<?xml version="1.0"?'.">\n"; ?> |
|---|
| 17 |
<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" --> |
|---|
| 18 |
<opml version="1.0"> |
|---|
| 19 |
<head> |
|---|
| 20 |
<title>Links for <?php echo get_bloginfo('name').$cat_name ?></title> |
|---|
| 21 |
<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated> |
|---|
| 22 |
</head> |
|---|
| 23 |
<body> |
|---|
| 24 |
<?php |
|---|
| 25 |
|
|---|
| 26 |
if (empty ($link_cat)) |
|---|
| 27 |
$cats = get_categories("type=link&hierarchical=0"); |
|---|
| 28 |
else |
|---|
| 29 |
$cats = array (get_category($link_cat)); |
|---|
| 30 |
|
|---|
| 31 |
foreach ((array) $cats as $cat) { |
|---|
| 32 |
?> |
|---|
| 33 |
<outline type="category" title="<?php echo wp_specialchars($cat->cat_name); ?>"> |
|---|
| 34 |
<?php |
|---|
| 35 |
|
|---|
| 36 |
$bookmarks = get_bookmarks("category={$cat->cat_ID}"); |
|---|
| 37 |
foreach ((array) $bookmarks as $bookmark) { |
|---|
| 38 |
?> |
|---|
| 39 |
<outline text="<?php echo wp_specialchars($bookmark->link_name); ?>" type="link" xmlUrl="<?php echo wp_specialchars($bookmark->link_rss); ?>" htmlUrl="<?php echo wp_specialchars($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" /> |
|---|
| 40 |
<?php |
|---|
| 41 |
|
|---|
| 42 |
} |
|---|
| 43 |
?> |
|---|
| 44 |
</outline> |
|---|
| 45 |
<?php |
|---|
| 46 |
|
|---|
| 47 |
} |
|---|
| 48 |
?> |
|---|
| 49 |
</body> |
|---|
| 50 |
</opml> |
|---|
| 51 |
|
|---|