Astra_Customizer_Config_Base::section_get_description( array $args )
Section Description
Description
Parameters
- $args
-
(array) (Required) Description arguments.
Return
(mixed) Markup of the section description.
Source
File: inc/customizer/configurations/class-astra-customizer-config-base.php
public function section_get_description( $args ) { // Return if white labeled. if ( astra_is_white_labelled() ) { return ''; } // Description. $content = '<div class="astra-section-description">'; $content .= wp_kses_post( astra_get_prop( $args, 'description' ) ); // Links. if ( astra_get_prop( $args, 'links' ) ) { $content .= '<ul>'; foreach ( $args['links'] as $index => $link ) { if ( astra_get_prop( $link, 'attrs' ) ) { $content .= '<li>'; // Attribute mapping. $attributes = ' target="_blank" '; foreach ( astra_get_prop( $link, 'attrs' ) as $attr => $attr_value ) { $attributes .= ' ' . $attr . '="' . esc_attr( $attr_value ) . '" '; } $content .= '<a ' . $attributes . '>' . esc_html( astra_get_prop( $link, 'text' ) ) . '</a></li>'; $content .= '</li>'; } } $content .= '</ul>'; } $content .= '</div><!-- .astra-section-description -->'; return $content; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.4.3 | Introduced. |