| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | defined( 'ABSPATH' ) || exit; |
| 3 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Included inside block render methods; variables are local. | |
| 3 | 4 | |
| 4 | 5 | $attr['catStyle'] = sanitize_html_class( $attr['catStyle'] ); |
| 5 | 6 | $attr['catPosition'] = sanitize_html_class( $attr['catPosition'] ); |
| 6 | 7 | |
| @@ -17,9 +18,9 @@ | ||
| 17 | 18 | break; } |
| 18 | 19 | $color = ''; |
| 19 | 20 | if ( isset( $attr['customCatColor'] ) ) { |
| 20 | 21 | if ( $attr['customCatColor'] ) { |
| 21 | - $color = get_term_meta( $val->term_id, 'ultp_category_color', true ); | |
| 22 | + $color = ultimate_post()->get_term_color( $val ); | |
| 22 | 23 | $color = $color == 1 ? '#CE2746' : $color; |
| 23 | 24 | if ( isset( $attr['onlyCatColor'] ) ) { |
| 24 | 25 | if ( $attr['onlyCatColor'] ) { |
| 25 | 26 | $color = 'style="color: ' . ( $color ? $color : '#CE2746' ) . '"'; |