astra_attr( string $context, array $attributes = array(), array $args = array() )
Build list of attributes into a string and apply contextual filter on string.
Description
The contextual filter is of the form astra_attr_{context}_output
.
Parameters
- $context
-
(string) (Required) The context, to build filter name.
- $attributes
-
(array) (Optional) Extra attributes to merge with defaults.
Default value: array()
- $args
-
(array) (Optional) Custom data to pass to filter.
Default value: array()
Return
(string) String of HTML attributes and values.
Source
File: inc/extras.php
function astra_attr( $context, $attributes = array(), $args = array() ) { return Astra_Attr::get_instance()->astra_attr( $context, $attributes, $args ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.6.2 | Introduced. |