-
+ 8A4E1AB5F6709AD07BE91152C60AF30A7EF72EE01525156E658992CC419570C32FFAAF35C2C238DBF3478C87573DE788770C519DDF2C545F55D8AEB7BE0F8EB8
mp-wp/wp-links-opml.php
(0 . 0)(1 . 65)
159610 <?php
159611 /**
159612 * Outputs the OPML XML format for getting the links defined in the link
159613 * administration. This can be used to export links from one blog over to
159614 * another. Links aren't exported by the WordPress export, so this file handles
159615 * that.
159616 *
159617 * This file is not added by default to WordPress theme pages when outputting
159618 * feed links. It will have to be added manually for browsers and users to pick
159619 * up that this file exists.
159620 *
159621 * @package WordPress
159622 */
159623
159624 if (empty($wp)) {
159625 require_once('./wp-load.php');
159626 wp();
159627 }
159628
159629 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
159630 $link_cat = $_GET['link_cat'];
159631 if ((empty ($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
159632 $link_cat = '';
159633 } else { // be safe
159634 $link_cat = '' . urldecode($link_cat) . '';
159635 $link_cat = intval($link_cat);
159636 }
159637 ?><?php echo '<?xml version="1.0"?'.">\n"; ?>
159638 <?php the_generator( 'comment' ); ?>
159639 <opml version="1.0">
159640 <head>
159641 <title>Links for <?php echo attribute_escape(get_bloginfo('name', 'display').$cat_name); ?></title>
159642 <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
159643 </head>
159644 <body>
159645 <?php
159646
159647 if (empty ($link_cat))
159648 $cats = get_categories("type=link&hierarchical=0");
159649 else
159650 $cats = get_categories('type=link&hierarchical=0&include='.$link_cat);
159651
159652 foreach ((array) $cats as $cat) {
159653 $catname = apply_filters('link_category', $cat->name);
159654
159655 ?>
159656 <outline type="category" title="<?php echo attribute_escape($catname); ?>">
159657 <?php
159658
159659 $bookmarks = get_bookmarks("category={$cat->term_id}");
159660 foreach ((array) $bookmarks as $bookmark) {
159661 $title = attribute_escape(apply_filters('link_title', $bookmark->link_name));
159662 ?>
159663 <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; ?>" />
159664 <?php
159665
159666 }
159667 ?>
159668 </outline>
159669 <?php
159670
159671 }
159672 ?>
159673 </body>
159674 </opml>