Add RSD support. See http://archipelago.phrasewise.com/rsd
git-svn-id: http://svn.automattic.com/wordpress/trunk@3009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9587b46a27
commit
af8c37fd71
|
@ -83,5 +83,6 @@ add_filter('the_author', 'ent2ncr', 8);
|
|||
|
||||
// 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";
|
||||
}
|
||||
|
||||
?>
|
22
xmlrpc.php
22
xmlrpc.php
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue