The What
Syntax
string beans_close_markup( string $id, string|bool $tag [, mixed $... ]] );
Description
This function builds the HTML for the specified closing tag’s HTML and then returns it back for further processing. It provides flexibility for 3rd party customization (i.e. child theme and/or plugins) to remove or change the HTML.
The power of Beans is the ability to customize whatever you need via the unique ID and internal functionality. Using the specified $id
, a child theme or plugin can register to various events in order to customize. You can:
- Remove the HTML completely.
- Add content before the closing tag.
- Add content after the closing tag.
It provides you with the means to customize the default behavior within Beans or your custom child theme or plugin.
Parameters
id
- The unique ID for the closing tag, which is used as part of the filter event’s name. This ID can contain sub-hooks.
tag
- The HTML tag to be built for this ID.
...
- optional Additional argument(s) to be passed to the registered callbacks.
Return Values
Returns the closing tag’s filtered HTML.
Available Event Hooks
This function generates the following event hooks, which are available for for third party code to register and customize the HTML:
- Tag filter
$id . '_markup'
– to change or remove the tag.- Before filter
$id . '_append_markup'
– to add content before the closing tag.- After filter
$id . '_after_markup'
– to add content after the closing tag.
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
Show It in Action
More coming soon…keep checking back.
Go DeepPro
In this section, you will go deeper into the instruction.