A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. In our plugin, we use shortcodes to make the data from Arlo available in your WordPress site.
Shortcodes can also be used with additional attributes. The value of the attribute should always be a string.
All of our shortcodes can be used with the following attributes:
- label (string): defines a <label> HTML element before the content
- wrap (string): the content of the shortcode can be wrapped around with the defined text. It has to contain a type specifier - usually a
'%s'- to represent the content as a string.
- strip_html (bool) From: v2.4: if set to "yes", all of the HTML and PHP tags will be striped from the content.
- strip_html (string) From: v2.4: can be used to specify tags which should not be stripped. For more information, please check the allowable_tags parameter of the PHP's strip_tags function.
[arlo_event_presenters label="Presenter: " wrap="<span>%s</span>"]
This shortcode will generate the following HTML code:
<span> <label>Presenter: </label> Presenter Name </span>
In the Arlo WordPress plugin, we make difference between two types of shortcodes: