MP_Addon_Calls_Widget::call_widget()
Call Widget Init.
Source Source
File: calculator-calls-add-on/inc/MP_Addon_Calls_Widget.php
public function call_widget() {
if ( $this->call_phone || $this->call_browser ) {
?>
<?php if ( $this->call_browser ) { ?>
<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__( 'Call', 'CalculatorsCallsAddon' ); ?></h3>
<span class="contact-widget-form__close"></span>
</div>
<div class="contact-widget-form__body">
<div class="call-modal">
<div class="call-box">
<span class="incmg-call"><?php echo esc_attr__( 'Call to admin', 'CalculatorsCallsAddon' ); ?></span>
<p class="t-num"><?php echo esc_attr__( 'Loading..', 'CalculatorsCallsAddon' ); ?></p>
<div class="call-action">
<?php
$svg_args = array(
'svg' => array(
'xmlns' => true,
'width' => true,
'height' => true,
'fill' => true,
'viewbox' => true,
),
'path' => array( 'd' => true ),
);
$phone_icon = wp_remote_get( esc_url( $this->phone_icon ) )['body'];
?>
<button class="btn-recive"><?php wp_kses(wp_remote_get( $phone_icon, $svg_args ), 'post'); ?></button>
<button class="btn-decline"><?php wp_kses(wp_remote_get( $phone_icon, $svg_args ),'post') ; ?></button>
</div>
<div class="btn-end">
<button class="btn-end-decline"><?php echo wp_kses( wp_remote_get( $phone_icon, $svg_args ) ,'post'); ?></button>
</div>
</div>
</div>
</div>
<div class="contact-widget-form__footer ">
</div>
</div>
<div class="contact-widget-item">
<div class="contact-widget-item__tooltip">
<span><?php echo esc_attr( $this->call_widget_tooltip ); ?></span>
</div>
<span class="<?php echo esc_attr( $this->style ); ?>">
<?php echo wp_kses( wp_remote_get( $phone_icon, $svg_args ) ,'post'); ?>
</span>
</div>
</div>
<?php } ?>
<?php if ( $this->call_phone && ! empty( $this->call_phone_number ) ) { ?>
<div class="contact-widget-wrapper">
<div class="contact-widget-phone">
<div class="contact-widget-item__tooltip">
<span><?php echo esc_attr( $this->call_widget_tooltip ); ?></span>
</div>
<a href="tel:<?php echo esc_attr( $this->call_phone_number ); ?>">
<span class="<?php echo esc_attr( $this->style ); ?>">
<?php echo wp_kses( wp_remote_get( $phone_icon, $svg_args ) ,'post'); ?>
</span>
</a>
</div>
</div>
<?php } ?>
<?php
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |