wp/wp-links-opml.php
changeset 7 cf61fcea0001
parent 0 d970ebf37754
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
    24 
    24 
    25 echo '<?xml version="1.0"?'.">\n";
    25 echo '<?xml version="1.0"?'.">\n";
    26 ?>
    26 ?>
    27 <opml version="1.0">
    27 <opml version="1.0">
    28 	<head>
    28 	<head>
    29 		<title><?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?></title>
    29 		<title><?php
       
    30 			/* translators: 1: Site name */
       
    31 			printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) );
       
    32 		?></title>
    30 		<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
    33 		<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
    31 		<?php
    34 		<?php
    32 		/**
    35 		/**
    33 		 * Fires in the OPML header.
    36 		 * Fires in the OPML header.
    34 		 *
    37 		 *
    44 else
    47 else
    45 	$cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0, 'include' => $link_cat));
    48 	$cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0, 'include' => $link_cat));
    46 
    49 
    47 foreach ( (array)$cats as $cat ) :
    50 foreach ( (array)$cats as $cat ) :
    48 	/**
    51 	/**
    49 	 * Filter the OPML outline link category name.
    52 	 * Filters the OPML outline link category name.
    50 	 *
    53 	 *
    51 	 * @since 2.2.0
    54 	 * @since 2.2.0
    52 	 *
    55 	 *
    53 	 * @param string $catname The OPML outline category name.
    56 	 * @param string $catname The OPML outline category name.
    54 	 */
    57 	 */
    58 <outline type="category" title="<?php echo esc_attr($catname); ?>">
    61 <outline type="category" title="<?php echo esc_attr($catname); ?>">
    59 <?php
    62 <?php
    60 	$bookmarks = get_bookmarks(array("category" => $cat->term_id));
    63 	$bookmarks = get_bookmarks(array("category" => $cat->term_id));
    61 	foreach ( (array)$bookmarks as $bookmark ) :
    64 	foreach ( (array)$bookmarks as $bookmark ) :
    62 		/**
    65 		/**
    63 		 * Filter the OPML outline link title text.
    66 		 * Filters the OPML outline link title text.
    64 		 *
    67 		 *
    65 		 * @since 2.2.0
    68 		 * @since 2.2.0
    66 		 *
    69 		 *
    67 		 * @param string $title The OPML outline title text.
    70 		 * @param string $title The OPML outline title text.
    68 		 */
    71 		 */