astra_markup_close( string $context, array $args = array() )
Generate HTML close markup
Description
Parameters
- $context
-
(string) (Required) unique markup key.
- $args
-
(array) (Optional) Contains markup arguments.
- 'close'
(string) Closing HTML markup. - 'attrs'
(array) Initial attributes to apply toopen
markup. - 'echo'
(bool) Flag indicating whether to echo or return the resultant string.
Default value: array()
- 'close'
Return
(mixed)
Source
File: inc/extras.php
function astra_markup_close( $context, $args = array() ) { $defaults = array( 'close' => '', 'attrs' => array(), 'echo' => true, ); $args = wp_parse_args( $args, $defaults ); if ( $context ) { $args = apply_filters( "astra_markup_{$context}_close", $args ); $close_tag = $args['close']; if ( $args['echo'] ) { echo $close_tag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } else { return $close_tag; } } return false; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |