ap_get_category_icon( integer $term_id, string $attributes = '' )
Description #
Return category icon.
Parameters #
- $term_idinteger (Required) Term ID.
- $attributesstring (Optional) Custom attributes. Default value: ''
Source #
File: includes/taxo.php
function ap_get_category_icon( $term_id, $attributes = '' ) { $option = get_term_meta( $term_id, 'ap_category', true ); $color = ! empty( $option['color'] ) ? ' background:' . $option['color'] . ';' : ''; $style = 'style="' . $color . '"' . $attributes; if ( ! empty( $option['icon'] ) ) { return '<span class="ap-category-icon ' . $option['icon'] . '"' . $style . '></span>'; } }
Expand full source code Collapse full source code View on GitHub: includes/taxo.php:277
Add your comment