move opensearch to plugins

This commit is contained in:
zotlabs
2017-02-02 14:49:51 -08:00
parent e2ee565f05
commit 2daafe80a5
7 changed files with 44 additions and 43 deletions

View File

@@ -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() . '/';