From 3b06fac636a335704295abbe68fda65aa83a6782 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 9 Jan 2021 09:34:46 -0800 Subject: [PATCH] BC fix for PM shortcode. --- e107_plugins/pm/pm_shortcodes.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/e107_plugins/pm/pm_shortcodes.php b/e107_plugins/pm/pm_shortcodes.php index 9c5c74738..3bef261d2 100644 --- a/e107_plugins/pm/pm_shortcodes.php +++ b/e107_plugins/pm/pm_shortcodes.php @@ -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 "".LAN_PLUGIN_PM_NEW.""; - return $this->url('action/new'); + $link = $this->url('action/new'); + return ($parm === 'button') ? "".LAN_PLUGIN_PM_NEW."" : $link ; } // return ''; }