Added oEmbed discovery for attachments and notices
This commit is contained in:
parent
e637e5a8a9
commit
6308539c1d
@ -98,6 +98,28 @@ class AttachmentAction extends Action
|
||||
return $a->title();
|
||||
}
|
||||
|
||||
function extraHead()
|
||||
{
|
||||
$this->element('link',array('rel'=>'alternate',
|
||||
'type'=>'application/json+oembed',
|
||||
'href'=>common_local_url(
|
||||
'api',
|
||||
array('apiaction'=>'laconica','method'=>'oembed.json'),
|
||||
array('url'=>
|
||||
common_local_url('attachment',
|
||||
array('attachment' => $this->attachment->id)))),
|
||||
'title'=>'oEmbed'),null);
|
||||
$this->element('link',array('rel'=>'alternate',
|
||||
'type'=>'text/xml+oembed',
|
||||
'href'=>common_local_url(
|
||||
'api',
|
||||
array('apiaction'=>'laconica','method'=>'oembed.xml'),
|
||||
array('url'=>
|
||||
common_local_url('attachment',
|
||||
array('attachment' => $this->attachment->id)))),
|
||||
'title'=>'oEmbed'),null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle input
|
||||
*
|
||||
|
@ -275,6 +275,20 @@ class ShownoticeAction extends OwnerDesignAction
|
||||
$this->element('meta', array('name' => 'microid',
|
||||
'content' => $id->toString()));
|
||||
}
|
||||
$this->element('link',array('rel'=>'alternate',
|
||||
'type'=>'application/json+oembed',
|
||||
'href'=>common_local_url(
|
||||
'api',
|
||||
array('apiaction'=>'laconica','method'=>'oembed.json'),
|
||||
array('url'=>$this->notice->uri)),
|
||||
'title'=>'oEmbed'),null);
|
||||
$this->element('link',array('rel'=>'alternate',
|
||||
'type'=>'text/xml+oembed',
|
||||
'href'=>common_local_url(
|
||||
'api',
|
||||
array('apiaction'=>'laconica','method'=>'oembed.xml'),
|
||||
array('url'=>$this->notice->uri)),
|
||||
'title'=>'oEmbed'),null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user