Function __global->add_custom_comcode_tag
Definitions
sources/custom_comcode.php
- Add a custom Comcode tag.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$tag | ID_TEXT | No | No | required parameter | N/A | N/A | Tag name |
$title | mixed | No | No | required parameter | N/A | N/A | Tag title (string, or content language string ID) |
$description | mixed | No | No | required parameter | N/A | N/A | Tag description (string, or content language string ID) |
$replace | LONG_TEXT | No | No | required parameter | N/A | N/A | Tag replacement text |
$example | LONG_TEXT | No | No | required parameter | N/A | N/A | Tag example |
$parameters | SHORT_TEXT | No | No | required parameter | N/A | N/A | Tag parameters |
$enabled | BINARY | No | No | required parameter | N/A | N/A | Whether the tag is enabled |
$dangerous_tag | BINARY | No | No | required parameter | N/A | N/A | Whether the tag is disabled |
$block_tag | BINARY | No | No | required parameter | N/A | N/A | Whether the tag is a block tag |
$textual_tag | BINARY | No | No | required parameter | N/A | N/A | Whether the tag is a textual tag |
$uniqify | boolean | No | No | False | N/A | N/A | Whether to force the name as unique, if there's a conflict |
Returns
- The tag name
- Type: ID_TEXT
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a custom Comcode tag.
*
* @param ID_TEXT $tag Tag name
* @param mixed $title Tag title (string, or content language string ID)
* @param mixed $description Tag description (string, or content language string ID)
* @param LONG_TEXT $replace Tag replacement text
* @param LONG_TEXT $example Tag example
* @param SHORT_TEXT $parameters Tag parameters
* @param BINARY $enabled Whether the tag is enabled
* @param BINARY $dangerous_tag Whether the tag is disabled
* @param BINARY $block_tag Whether the tag is a block tag
* @param BINARY $textual_tag Whether the tag is a textual tag
* @param boolean $uniqify Whether to force the name as unique, if there's a conflict
* @return ID_TEXT The tag name
*/
function add_custom_comcode_tag(string $tag, $title, $description, string $replace, string $example, string $parameters, int $enabled, int $dangerous_tag, int $block_tag, int $textual_tag, bool $uniqify = false) : string
* Add a custom Comcode tag.
*
* @param ID_TEXT $tag Tag name
* @param mixed $title Tag title (string, or content language string ID)
* @param mixed $description Tag description (string, or content language string ID)
* @param LONG_TEXT $replace Tag replacement text
* @param LONG_TEXT $example Tag example
* @param SHORT_TEXT $parameters Tag parameters
* @param BINARY $enabled Whether the tag is enabled
* @param BINARY $dangerous_tag Whether the tag is disabled
* @param BINARY $block_tag Whether the tag is a block tag
* @param BINARY $textual_tag Whether the tag is a textual tag
* @param boolean $uniqify Whether to force the name as unique, if there's a conflict
* @return ID_TEXT The tag name
*/
function add_custom_comcode_tag(string $tag, $title, $description, string $replace, string $example, string $parameters, int $enabled, int $dangerous_tag, int $block_tag, int $textual_tag, bool $uniqify = false) : string