Make WordPress Core

Ticket #25229: wp-links-opml.diff

File wp-links-opml.diff, 1.6 KB (added by netweb, 11 years ago)

wp-links-opml.php 1st pass

  • src/wp-links-opml.php

    diff --git a/src/wp-links-opml.php b/src/wp-links-opml.php
    index e30869b..9b63205 100644
    a b echo '<?xml version="1.0"?'.">\n"; 
    2828        <head>
    2929                <title><?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?></title>
    3030                <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
    31                 <?php do_action('opml_head'); ?>
     31
     32                <?php
     33                /**
     34                 * Generate the OPML header.
     35                 *
     36                 * @since 2.5.1
     37                 */
     38                do_action('opml_head'); ?>
    3239        </head>
    3340        <body>
    3441<?php
    else 
    3845        $cats = get_categories(array('taxonomy' => 'link_category', 'hierarchical' => 0, 'include' => $link_cat));
    3946
    4047foreach ( (array)$cats as $cat ) :
     48
     49        /**
     50         * Allows you to filter the OPML outline link category name.
     51         *
     52         * @since 2.0.7
     53         *
     54         * @param string $catname The OPML outline category name
     55         */
    4156        $catname = apply_filters('link_category', $cat->name);
    4257
    4358?>
    foreach ( (array)$cats as $cat ) : 
    4560<?php
    4661        $bookmarks = get_bookmarks(array("category" => $cat->term_id));
    4762        foreach ( (array)$bookmarks as $bookmark ) :
     63
     64                /**
     65             * Allows you to filter the OPML outline link title text.
     66             *
     67             * @since 2.0.7
     68             *
     69             * @param string $title The OPML outline title text
     70             */
    4871                $title = apply_filters('link_title', $bookmark->link_name);
    4972?>
    5073        <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; ?>" />