MP_Addon_Chats_Widget::get_viber()
Get viver widget.
Source Source
File: calculator-chats-add-on/inc/MP_Addon_Chats_Widget.php
protected function get_viber() {
$viber = $this->is_isset( get_option( MortgagePlatform::$prefix . 'contact' )['viber_widget'] );
$viber_number = get_option( MortgagePlatform::$prefix . 'contact' )['viber_phone'];
if ( $viber && ! empty( $viber_number ) ) :
?>
<div class="contact-widget-wrapper">
<div class="contact-widget-form">
<div class="contact-widget-form__header">
<h3 class="contact-widget-form__title"><?php echo esc_attr__( 'Viber chat', 'CalculatorChatsAddon' ); ?></h3>
<span class="contact-widget-form__close"></span>
</div>
<div class="contact-widget-form__body">
<span class="contact-widget-form__icon">
<?php echo file_get_contents( esc_url( $this->viber_icon ) ); ?>
</span>
<div class="contact-widget-form__message">
<?php echo esc_attr__( 'Hi! We\'re here to answer any questions you may have.', 'CalculatorChatsAddon' ); ?>
</div>
</div>
<div class="contact-widget-form__footer">
<?php
if ( wp_is_mobile() ) :
?>
<a href="viber://add?number=<?php echo esc_attr( $viber_number ); ?>" class="contact-widget-form__button">
<?php echo esc_attr__( 'Log into Viber', 'CalculatorChatsAddon' ); ?>
</a>
<?php else: ?>
<a href="viber://chat?number=<?php echo esc_attr( $viber_number ); ?>" target="_blank" class="contact-widget-form__button">
<?php echo esc_attr__( 'Log into Viber', 'CalculatorChatsAddon' ); ?>
</a>
<?php
endif;
?>
<div class="contact-widget-form__description">
<?php echo esc_attr__( 'Chat in Viber', 'CalculatorChatsAddon' ); ?>
</div>
</div>
</div>
<div class="contact-widget-item">
<div class="contact-widget-item__tooltip">
<span><?php echo esc_attr( $this->viber_tooltip ); ?></span>
</div>
<span class="<?php echo esc_attr( $this->style ); ?>">
<?php echo file_get_contents( esc_url( $this->viber_icon ) ); ?>
</span>
</div>
</div>
<?php
endif;
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |