summaryrefslogtreecommitdiff
path: root/actions/attachment.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-17 12:33:56 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-17 12:33:56 -0400
commit3dbbefd5ad63679162659ce736e9e556f2efff21 (patch)
tree7ba64f6b02c7f5f0d7d005bc15f7cb729ddf2815 /actions/attachment.php
parent9b372f5bb7638d5d9b4e48ae425d921bc8559235 (diff)
parent9ed117dc3a405175359d0a541dddfb14cdf15d47 (diff)
Merge branch 'oembed-provider' into 0.8.x
Diffstat (limited to 'actions/attachment.php')
-rw-r--r--actions/attachment.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/actions/attachment.php b/actions/attachment.php
index ee4cd9640..c6a5d0d52 100644
--- a/actions/attachment.php
+++ b/actions/attachment.php
@@ -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'=>'oembed','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'=>'oembed','method'=>'oembed.xml'),
+ array('url'=>
+ common_local_url('attachment',
+ array('attachment' => $this->attachment->id)))),
+ 'title'=>'oEmbed'),null);
+ }
+
/**
* Handle input
*