1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:25:55 +00:00

* implement shortcut syntax for exposed plugin methods

* move shared article rendering code to share plugin
This commit is contained in:
Andrew Dolgov
2021-02-17 09:59:14 +03:00
parent 7adcada324
commit 273ada7353
4 changed files with 180 additions and 167 deletions

View File

@@ -18,6 +18,7 @@ class PluginHost {
private static $instance;
const API_VERSION = 2;
const PUBLIC_METHOD_DELIMITER = "--";
// Hooks marked with *1 are run in global context and available
// to plugins loaded in config.php only
@@ -617,9 +618,7 @@ class PluginHost {
http_build_query(
array_merge(
[
"op" => "pluginhandler",
"plugin" => strtolower(get_class($sender)),
"pmethod" => $method
"op" => strtolower(get_class($sender) . PluginHost::PUBLIC_METHOD_DELIMITER . $method),
],
$params));
} else {