| | |
| | | */ |
| | | function altr_get_artist_top_styles($post_id) |
| | | { |
| | | if (!function_exists('JVBase\\meta\\MetaManager')) { |
| | | // Fallback if MetaManager not available |
| | | if (!function_exists('JVBase\\meta\\Meta')) { |
| | | // Fallback if Meta not available |
| | | $styles = wp_get_post_terms($post_id, BASE . 'style', array('fields' => 'names')); |
| | | if (is_wp_error($styles) || empty($styles)) { |
| | | return 'custom-tattoos'; |
| | |
| | | } |
| | | |
| | | // Get top highlighted styles first |
| | | $meta = new JVBase\meta\MetaManager($post_id, 'post'); |
| | | $highlighted = explode(',', $meta->getValue('top_style')) ?: array(); |
| | | $meta = new JVBase\meta\Meta($post_id, 'post'); |
| | | $highlighted = explode(',', $meta->get('top_style')) ?: array(); |
| | | |
| | | if (!empty($highlighted)) { |
| | | $style_names = array(); |