X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..5d244c8fd9a27c9f89dd08da2af6fbc67d4fce63:/wp-links-opml.php
diff --git a/wp-links-opml.php b/wp-links-opml.php
index 069d7a5f..b196f736 100644
--- a/wp-links-opml.php
+++ b/wp-links-opml.php
@@ -12,10 +12,7 @@
* @package WordPress
*/
-if ( empty($wp) ) {
- require_once('./wp-load.php');
- wp();
-}
+require_once( dirname( __FILE__ ) . '/wp-load.php' );
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
$link_cat = '';
@@ -31,24 +28,45 @@ echo '\n";
GMT
-
+
'link', 'hierarchical' => 0));
+ $cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0));
else
- $cats = get_categories(array('type' => 'link', 'hierarchical' => 0, 'include' => $link_cat));
+ $cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0, 'include' => $link_cat));
foreach ( (array)$cats as $cat ) :
- $catname = apply_filters('link_category', $cat->name);
+ /**
+ * Filter the OPML outline link category name.
+ *
+ * @since 2.2.0
+ *
+ * @param string $catname The OPML outline category name.
+ */
+ $catname = apply_filters( 'link_category', $cat->name );
?>
$cat->term_id));
foreach ( (array)$bookmarks as $bookmark ) :
- $title = apply_filters('link_title', $bookmark->link_name);
+ /**
+ * Filter the OPML outline link title text.
+ *
+ * @since 2.2.0
+ *
+ * @param string $title The OPML outline title text.
+ */
+ $title = apply_filters( 'link_title', $bookmark->link_name );
?>