Loading...
 
Skip to main content

Plugin parameters

This page documents parameters with built-in special behaviors, such as the following:

1. buttons

Used to include HTML buttons in the plugin. Its value is a string of comma-separated values, each representing a button with the corresponding text. These buttons can be further customized by utilizing a few other accompanying parameters:

  • buttonsClassNames: Allows adding class names to the buttons. Its value follows the same pattern as its 'elder' – the buttons parameter – with comma-separated values, matching or fewer than the number of buttons. Each value will be bound to its matching index button.
  • buttonsActions: Allows specifying which JavaScript function gets called when the button is clicked. The pattern remains the same: each value can be the name of an existing function in the browser or custom JavaScript code. Be cautious when using custom code, as this method is not yet efficient due to the value being passed inline to the plugin function, which could cause escaping issues.


In the edit plugin UI, the following is to be expected:
Image

An example is the usage in the plugin dialog code: https://gitlab.com/tikiwiki/tiki/-/blob/master/lib/wiki-plugins/wikiplugin_dialog.php

Show PHP error messages