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 to open markup.
  • 'echo'
    (bool) Flag indicating whether to echo or return the resultant string.

Default value: array()


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;
}

Changelog

Changelog
Version Description
3.3.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.