From c1175070a2ef0b6d40a4a3c10063cc615780d06e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 5 Mar 2019 10:01:08 +0300 Subject: [PATCH] add P_sprintf --- classes/pluginhost.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 2ad9ae11d..ab2e3f979 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -13,6 +13,14 @@ function P_ngettext($plugin, $singular, $plural, $number) { return _dngettext(PLuginHost::object_to_domain($plugin), $singular, $plural, $number); } +function P_sprintf() { + $args = func_get_args(); + $plugin = array_shift($args); + $msgid = array_shift($args); + + return vsprintf(P__($plugin, $msgid), $args); +} + class PluginHost { private $pdo; private $hooks = array();