aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php2
-rw-r--r--include/markdown.php (renamed from include/bb2diaspora.php)2
-rwxr-xr-xinclude/plugin.php32
3 files changed, 31 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index 559992b7f..139c637e5 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2191,7 +2191,7 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
// since Diaspora doesn't handle edits we can only do this for the original text and not update it.
- require_once('include/bb2diaspora.php');
+ require_once('include/markdown.php');
$signed_body = bb2diaspora_itembody($datarray,$walltowall);
if($walltowall) {
diff --git a/include/bb2diaspora.php b/include/markdown.php
index 1759154f0..b4656f769 100644
--- a/include/bb2diaspora.php
+++ b/include/markdown.php
@@ -1,6 +1,6 @@
<?php
/**
- * @file include/bb2diaspora.php
+ * @file include/markdown.php
* @brief Some functions for BB conversions for Diaspora protocol.
*/
diff --git a/include/plugin.php b/include/plugin.php
index 80c303b42..3a64f67cc 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -556,21 +556,47 @@ function head_add_css($src, $media = 'screen') {
function head_remove_css($src, $media = 'screen') {
$index = array_search(array($src, $media), App::$css_sources);
- if ($index !== false)
+ if($index !== false)
unset(App::$css_sources[$index]);
}
function head_get_css() {
$str = '';
$sources = App::$css_sources;
- if (count($sources)) {
- foreach ($sources as $source)
+ if(count($sources)) {
+ foreach($sources as $source)
$str .= format_css_if_exists($source);
}
return $str;
}
+function head_add_link($arr) {
+ if($arr) {
+ App::$linkrel[] = $arr;
+ }
+}
+
+function head_get_links() {
+ $str = '';
+ $sources = App::$linkrel;
+ if(count($sources)) {
+ foreach($sources as $source) {
+ if(is_array($source) && count($source)) {
+ $str .= '<link';
+ foreach($source as $k => $v) {
+ $str .= ' ' . $k . '="' . $v . '"';
+ }
+ $str .= ' />' . "\r\n";
+
+ }
+ }
+ }
+
+ return $str;
+}
+
+
function format_css_if_exists($source) {
$path_prefix = script_path() . '/';