'brandy-account-element ' . esc_attr( brandy_get_editable_class() ), 'data-builder' => $args['builder'], 'data-section-id' => $section_id, ); $settings = $element['settings']; if ( empty( $settings ) ) { return; } $current_state = Account::get_state(); $account_data = array( 'icon' => Account::get_account_icon( $settings ), 'label' => Account::get_account_label( $settings ), 'account_link' => Account::get_account_link( $settings ), 'icon_style' => $settings[ $current_state ]['icon_style'] ?? 'outline', 'display_type' => $settings[ $current_state ]['display_type'] ?? 'icon', 'label_position' => $settings[ $current_state ]['label_position'] ?? 'right', 'label_enable' => $settings[ $current_state ]['label_enable'] ?? array( 'desktop' => false, 'tablet' => true, 'mobile' => null, ), ); ?>
>
'brandy-account trigger-tooltip trigger-icon', 'aria-label' => Account::LOGGED_IN_STATE === $current_state ? 'View account' : 'Login', 'href' => $account_data['account_link'], 'in-toggle' => ( $args['in_toggle'] ?? false ) ? 'true' : 'false', ); ?> > 'brandy-account__icon' ) ); ?> 'brandy-account__label', ); if ( ! Helpers::get_device_value( $account_data['label_enable'], 'desktop' ) ) { $label_attributes['class'] .= ' is-tooltip'; } if ( ! Helpers::get_device_value( $account_data['label_enable'], 'tablet' ) ) { $label_attributes['class'] .= ' hidden-md'; } if ( ! Helpers::get_device_value( $account_data['label_enable'], 'mobile' ) ) { $label_attributes['class'] .= ' hidden-sm'; } ?>
>
$section_id, ) ); } ?>