#4 plugin breaks editing of web links title
This commit is contained in:
parent
c47822f70e
commit
adb34d2732
1 changed files with 8 additions and 2 deletions
10
shaargem.php
10
shaargem.php
|
@ -62,7 +62,13 @@ function shaargem_init($conf)
|
|||
*/
|
||||
function hook_shaargem_render_editlink($data)
|
||||
{
|
||||
$data['link']['title'] = fetch_iri_title($data['link']['url']);
|
||||
// fetch title only for gemini:// iris
|
||||
if(isset($data['link']['url'])) {
|
||||
if(strstr($data['link']['url'],"gemini://"))
|
||||
{
|
||||
$data['link']['title'] = fetch_iri_title($data['link']['url']);
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -194,6 +200,6 @@ function fetch_iri_title($iri)
|
|||
}
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
return $title[1];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue