The Identity Dynamic Shortcode is a part of the Dynamic Shortcodes system. Unlike traditional shortcodes, the Identity Dynamic Shortcode provides a straightforward yet powerful way to return the value of its single argument without any modifications.
This feature is particularly useful in scenarios where you need to dynamically retrieve and display data exactly as it is input.
Identity will assume the value of the only argument passed.
Syntax
The Identity Dynamic Shortcode follows the basic syntax:
{identity:arg}
arg
represents the value that will be returned as is by the shortcode
The Identity Dynamic Shortcode accepts only one argument.
Examples
Basic Usage
{identity:sampleText}
This example returns the string
sampleText
.Number as Argument
{identity:123}
Here, the shortcode returns the number
123
.Using a Filter Function
{identity:argument|function}
In this example, the Identity Dynamic Shortcode is used in conjunction with a filter function.
The shortcode
{identity:argument}
initially returns the stringargument
.The
|function
part represents a filter applied to this output.
โ