diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-02 14:49:51 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-02 14:49:51 -0800 |
commit | 2daafe80a5cc9af9fb40712135490c86155fb9cf (patch) | |
tree | 2f169b2d66bb769ddda993d3c49c48223c53deba /include | |
parent | e2ee565f05a43bb5fa461df3fd857dc27c8d9b67 (diff) | |
download | volse-hubzilla-2daafe80a5cc9af9fb40712135490c86155fb9cf.tar.gz volse-hubzilla-2daafe80a5cc9af9fb40712135490c86155fb9cf.tar.bz2 volse-hubzilla-2daafe80a5cc9af9fb40712135490c86155fb9cf.zip |
move opensearch to plugins
Diffstat (limited to 'include')
-rwxr-xr-x | include/plugin.php | 32 |
1 files changed, 29 insertions, 3 deletions
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() . '/'; |