Permalink
Browse files

Add RSD support. See http://archipelago.phrasewise.com/rsd

git-svn-id: http://svn.automattic.com/wordpress/trunk@3009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 9587b46 commit af8c37fd719445efb227f942c505d760ad23fd47 matt committed Nov 7, 2005
Showing with 27 additions and 0 deletions.
  1. +1 −0 wp-includes/default-filters.php
  2. +4 −0 wp-includes/template-functions-general.php
  3. +22 −0 xmlrpc.php
@@ -83,5 +83,6 @@
// Actions
add_action('publish_post', 'generic_ping');
+add_action('wp_head', 'rsd_link');
?>
@@ -653,4 +653,8 @@ function the_weekday_date($before='',$after='') {
echo $the_weekday_date;
}
+function rsd_link() {
+ echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('url') . "/xmlrpc.php?rsd\" />\n";
+}
+
?>
View
@@ -4,6 +4,28 @@
$HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
include('./wp-config.php');
+
+if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
+header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
+
+?>
+<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
+<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
+ <service>
+ <engineName>WordPress</engineName>
+ <engineLink>http://wordpress.org/</engineLink>
+ <homePageLink><?php bloginfo_rss('url') ?></homePageLink>
+ <apis>
+ <api name="Movable Type" blogID="1" preferred="true" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
+ <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
+ <api name="Blogger" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" />
+ </apis>
+ </service>
+</rsd>
+<?php
+exit;
+}
+
include_once(ABSPATH . WPINC . '/class-IXR.php');
// Turn off all warnings and errors.

0 comments on commit af8c37f

Please sign in to comment.