astra_get_tag_list( string $filter_name, string $style_type_slug, bool $post_meta )
Get tag List.
Description
Parameters
- $filter_name
-
(string) (Required) Filter name.
- $style_type_slug
-
(string) (Required) style type slug.
- $post_meta
-
(bool) (Required) Post meta.
Return
(mixed) Markup.
Source
File: inc/blog/blog-config.php
function astra_get_tag_list( $filter_name, $style_type_slug, $post_meta ) { $style_type_class = ''; $separator = ', '; $tags_list = ''; $style_type = astra_get_option( $style_type_slug ); $separator = 'badge' === $style_type ? ' ' : $separator; $style_type_class = ' ' . $style_type; /* translators: used between list items, there is a space after the comma */ $tags_list_html = get_the_tag_list( '', apply_filters( 'astra_' . $filter_name, $separator ) ); if ( $tags_list_html ) { if ( 'badge' === $style_type ) { /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $tags_list = str_replace( '<a', '<a class="ast-button"', $tags_list_html ); } else { $tags_list = $tags_list_html; } } $post_tax_class = $post_meta ? 'ast-blog-single-element ' : ''; if ( $tags_list ) { return '<span class="' . $post_tax_class . 'ast-taxonomy-container tags-links' . $style_type_class . '">' . $tags_list . '</span>'; } else { return ''; } }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |