From dd8fee805fd09cc8ba1ece7f8f9ca5d95d654da8 Mon Sep 17 00:00:00 2001 From: pfefferle Date: Fri, 17 Jul 2015 23:36:53 +0200 Subject: [PATCH] version bump --- readme.txt | 14 +++++++++----- xrds-simple.php | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/readme.txt b/readme.txt index 8902417..ca9c294 100644 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,9 @@ === XRDS-Simple === -Contributors: singpolyma, wnorris +Contributors: singpolyma, wnorris, pfefferle Tags: xrds, xrds-simple, discovery Requires at least: 2.1 -Tested up to: 2.6.0 -Stable tag: 1.1 +Tested up to: 4.3 +Stable tag: 1.2 Provides framework for other plugins to advertise services via XRDS. @@ -16,7 +16,7 @@ plugin provides a generic framework to allow other plugins to contribute their own service endpoints to be included in the XRDS service document for the domain. -[XRDS-Simple]: http://xrds-simple.net/ +[XRDS-Simple]: https://de.wikipedia.org/wiki/XRDS#XRDS_Simple [OpenID]: http://openid.net/ [OAuth]: http://oauth.net/ @@ -44,7 +44,11 @@ the file. Project maintined on github at [diso/wordpress-xrds-simple](https://github.com/diso/wordpress-xrds-simple). -= version 1.0 (Nov 16, 2012)= += version 1.2 (Jul 17, 2015)= + - allow 'xri://$xrds*simple' Type to be filtered out + - check if $_SERVER['HTTP_ACCEPT'] exist to avoid notice that break the xrds file + += version 1.1 (Nov 16, 2012)= - fix various PHP and WordPress errors and warnings - add ability to fetch plain text XRDS document (mainly for debugging. see [example](http://willnorris.com/?xrds=1&format=text)) diff --git a/xrds-simple.php b/xrds-simple.php index 4569ecc..edfb004 100644 --- a/xrds-simple.php +++ b/xrds-simple.php @@ -3,7 +3,7 @@ Plugin Name: XRDS-Simple Plugin URI: https://github.com/diso/wordpress-xrds-simple Description: Provides framework for other plugins to advertise services via XRDS. -Version: 1.2-alpha +Version: 1.2 Author: DiSo Development Team Author URI: http://diso-project.org/ License: MIT license (http://www.opensource.org/licenses/mit-license.php) @@ -39,9 +39,9 @@ function xrds_add_xrd($xrds, $id, $type=array(), $expires=false) { * @param array $content content to be included in the service definition. Format: * * array( - * 'NodeName (ie, Type)' => array( - * array('attribute' => 'value', 'content' => 'content string'), - * ... + * 'NodeName (ie, Type)' => array( + * array('attribute' => 'value', 'content' => 'content string'), + * ... * ), * ... * ) @@ -59,9 +59,9 @@ function xrds_add_service($xrds, $xrd_id, $name, $content, $priority=10) { } /** - * Convenience function for adding a new service with minimal options. - * Services will always be added to the 'main' XRD with the default priority. - * No additional parameters such as httpMethod on URIs can be passed. If those + * Convenience function for adding a new service with minimal options. + * Services will always be added to the 'main' XRD with the default priority. + * No additional parameters such as httpMethod on URIs can be passed. If those * are necessary, use xrds_add_service(). * * @param array $xrds current XRDS-Simple structure @@ -118,7 +118,7 @@ function xrds_write() { ), ); $xrds = apply_filters('xrds_simple', $xrds); - + //make sure main is last if($xrds['main']) { $o = $xrds['main']; @@ -222,13 +222,13 @@ function xrds_admin_menu() { */ function xrds_parse_request($wp) { $accept = array(); - + if (isset($_SERVER['HTTP_ACCEPT'])) { $accept = explode(',', $_SERVER['HTTP_ACCEPT']); } - + if(isset($_GET['xrds']) || in_array('application/xrds+xml', $accept)) { - if (isset($_REQUEST['format']) && $_REQUEST['format'] == 'text') { + if (isset($_REQUEST['format']) && $_REQUEST['format'] == 'text') { header('Content-type: text/plain'); } else { header('Content-type: application/xrds+xml'); @@ -249,7 +249,7 @@ function xrds_parse_request($wp) { * @return array updated XRDS-Simple array */ function xrds_atompub_service($xrds) { - $xrds = xrds_add_service($xrds, 'main', 'AtomPub Service', + $xrds = xrds_add_service($xrds, 'main', 'AtomPub Service', array( 'Type' => array( array('content' => 'http://www.w3.org/2007/app') ), 'MediaType' => array( array('content' => 'application/atomsvc+xml') ),