aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-03 09:24:09 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-03 09:24:09 +0100
commitdd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc (patch)
treecd4aa364519bee76e1cbec9d5f776bb494fc543f /include
parent028b2a655de8c9d7b1f0de05a869e59c2b219818 (diff)
parent7e1e9ac94a1cf2fb01a3052f7fd9d0f2049079b5 (diff)
downloadvolse-hubzilla-dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc.tar.gz
volse-hubzilla-dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc.tar.bz2
volse-hubzilla-dd2a5e6b28d537b9a8c2bb1a978faa46dfb869cc.zip
Merge branch 'dev' into wip-app-bin
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() . '/';