Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Jul 17, 2015
1 parent c88cb14 commit dd8fee8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
14 changes: 9 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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/

Expand Down Expand Up @@ -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))

Expand Down
24 changes: 12 additions & 12 deletions xrds-simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
* <code>
* array(
* 'NodeName (ie, Type)' => array(
* array('attribute' => 'value', 'content' => 'content string'),
* ...
* 'NodeName (ie, Type)' => array(
* array('attribute' => 'value', 'content' => 'content string'),
* ...
* ),
* ...
* )
Expand All @@ -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
Expand Down Expand Up @@ -118,7 +118,7 @@ function xrds_write() {
),
);
$xrds = apply_filters('xrds_simple', $xrds);

//make sure main is last
if($xrds['main']) {
$o = $xrds['main'];
Expand Down Expand Up @@ -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');
Expand All @@ -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') ),
Expand Down

0 comments on commit dd8fee8

Please sign in to comment.