1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

BC fix for PM shortcode.

This commit is contained in:
Cameron
2021-01-09 09:34:46 -08:00
parent fa4900e2c4
commit 3b06fac636

View File

@@ -654,15 +654,19 @@ if(!class_exists('plugin_pm_pm_shortcodes'))
}
}
public function sc_pm_send_pm_link()
/**
* @example {PM_SEND_PM_LINK}
* @bcfix If broken on old theme try {PM_SEND_PM_LINK=button}
* @param null $parm
* @return string
*/
public function sc_pm_send_pm_link($parm=null)
{
$pm_outbox = $this->pmManager->pm_getInfo('outbox');
if($pm_outbox['outbox']['filled'] < 100)
{
// $link = $this->url('action/new');
// return "<a class='btn btn-mini btn-xs btn-default' href='{$link}'>".LAN_PLUGIN_PM_NEW."</a>";
return $this->url('action/new');
$link = $this->url('action/new');
return ($parm === 'button') ? "<a class='btn btn-mini btn-xs btn-primary' href='{$link}'>".LAN_PLUGIN_PM_NEW."</a>" : $link ;
}
// return '';
}