mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 01:25:56 +00:00
* add (disabled) shortcut syntax for plugin methods
* add controls shortcut for pluginhandler tags * add similar shortcut for frontend * allow plugins to selectively exclude their methods from CSRF checking
This commit is contained in:
@@ -11,6 +11,17 @@
|
||||
return $rv;
|
||||
}
|
||||
|
||||
// shortcut syntax (disabled)
|
||||
/* function pluginhandler_tags(\Plugin $plugin, string $method) {
|
||||
return hidden_tag("op", strtolower(get_class($plugin) . \PluginHost::PUBLIC_METHOD_DELIMITER . $method));
|
||||
} */
|
||||
|
||||
function pluginhandler_tags(\Plugin $plugin, string $method) {
|
||||
return hidden_tag("op", "pluginhandler") .
|
||||
hidden_tag("plugin", strtolower(get_class($plugin))) .
|
||||
hidden_tag("method", $method);
|
||||
}
|
||||
|
||||
function button_tag(string $value, string $type, array $attributes = []) {
|
||||
return "<button dojoType=\"dijit.form.Button\" ".attributes_to_string($attributes)." type=\"$type\">".htmlspecialchars($value)."</button>";
|
||||
}
|
||||
@@ -155,4 +166,3 @@
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user