#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
|
@ -61,8 +61,14 @@ function shaargem_init($conf)
|
|||
* @return array altered $data.
|
||||
*/
|
||||
function hook_shaargem_render_editlink($data)
|
||||
{
|
||||
// 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