X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..8d3bb1a5dcfdea9857d3c88c3751f09593e34dc8:/wp-links-opml.php diff --git a/wp-links-opml.php b/wp-links-opml.php index 069d7a5f..ea3a50b4 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"; <?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?> 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); + /** + * Filters 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); + /** + * Filters 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 ); ?>