* @package WordPress
*/
-require_once('./wp-load.php');
+require_once( dirname( __FILE__ ) . '/wp-load.php' );
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
$link_cat = '';
<head>
<title><?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?></title>
<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
- <?php do_action('opml_head'); ?>
+ <?php
+ /**
+ * Fires in the OPML header.
+ *
+ * @since 3.0.0
+ */
+ do_action( 'opml_head' );
+ ?>
</head>
<body>
<?php
$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 );
?>
<outline type="category" title="<?php echo esc_attr($catname); ?>">
<?php
$bookmarks = get_bookmarks(array("category" => $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 );
?>
<outline text="<?php echo esc_attr($title); ?>" type="link" xmlUrl="<?php echo esc_attr($bookmark->link_rss); ?>" htmlUrl="<?php echo esc_attr($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />
<?php
endforeach; // $cats
?>
</body>
-</opml>
\ No newline at end of file
+</opml>