forked from Wavyzz/dolibarr
add hooke in print_social_networks (#30797)
add hooke in print_social_networks
This commit is contained in:
@@ -3946,7 +3946,7 @@ function getArrayOfSocialNetworks()
|
|||||||
*/
|
*/
|
||||||
function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetworks = array())
|
function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetworks = array())
|
||||||
{
|
{
|
||||||
global $user, $langs;
|
global $hookmanager, $langs, $user;
|
||||||
|
|
||||||
$htmllink = $value;
|
$htmllink = $value;
|
||||||
|
|
||||||
@@ -4019,6 +4019,23 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$htmllink .= img_warning($langs->trans("ErrorBadSocialNetworkValue", $value));
|
$htmllink .= img_warning($langs->trans("ErrorBadSocialNetworkValue", $value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($hookmanager) {
|
||||||
|
$parameters = array(
|
||||||
|
'value'=> $value,
|
||||||
|
'cid' => $cid,
|
||||||
|
'socid' => $socid,
|
||||||
|
'type' => $type,
|
||||||
|
'dictsocialnetworks' => $dictsocialnetworks,
|
||||||
|
);
|
||||||
|
|
||||||
|
$reshook = $hookmanager->executeHooks('printSocialNetworks', $parameters);
|
||||||
|
if ($reshook > 0) {
|
||||||
|
$htmllink = '';
|
||||||
|
}
|
||||||
|
$htmllink .= $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
return $htmllink;
|
return $htmllink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user