Published on 02/22/2021
Published by amit
Structure of an Awesome Shortcode
All awesome shortcodes follow the structure as shown in the image above.
- Before the shortcode is executed, the conditional(c.*) is checked, and if it is evaluated to ‘true’ then the shortcode is executed.
- After the shortcode has done its work, the output of the shortcode is passed to the modifier(m.*). Modifies can change the output and return the changed value.
- Finally, if Output (o.*) is specified then the passed to the output handler and it decides what to do with the output.