Add new Content\BBCode::getShareOpeningTag
This commit is contained in:
parent
db9f798bcd
commit
cd74fb8609
|
@ -2223,4 +2223,33 @@ class BBCode
|
|||
|
||||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $author
|
||||
* @param $profile
|
||||
* @param $avatar
|
||||
* @param $guid
|
||||
* @param $posted
|
||||
* @param $link
|
||||
* @return string
|
||||
* @TODO Rewrite to handle over whole record array
|
||||
*/
|
||||
public static function getShareOpeningTag($author, $profile, $avatar, $guid, $posted, $link)
|
||||
{
|
||||
$header = "[share author='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $author).
|
||||
"' profile='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $profile).
|
||||
"' avatar='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $avatar);
|
||||
|
||||
if ($guid) {
|
||||
$header .= "' guid='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $guid);
|
||||
}
|
||||
|
||||
if ($posted) {
|
||||
$header .= "' posted='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $posted);
|
||||
}
|
||||
|
||||
$header .= "' link='" . str_replace(["'", "[", "]"], ["'", "[", "]"], $link)."']";
|
||||
|
||||
return $header;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user