2
0
forked from Wavyzz/dolibarr

add hooke in print_social_networks (#30797)

add hooke in print_social_networks
This commit is contained in:
Frédéric FRANCE
2024-08-29 17:25:54 +02:00
committed by GitHub
parent c496e84916
commit 77c88e9750

View File

@@ -3946,7 +3946,7 @@ function getArrayOfSocialNetworks()
*/
function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetworks = array())
{
global $user, $langs;
global $hookmanager, $langs, $user;
$htmllink = $value;
@@ -4019,6 +4019,23 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
$langs->load("errors");
$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;
}