[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: widget-getintouch.php
<?php class GetInTouch_Widget extends WP_Widget { function __construct() { parent::__construct( 'getintouch_widget', esc_html__('* Get In Touch', 'alico'), array('description' => esc_html__('Get In Touch Widget', 'alico'),) ); } function widget($args, $instance) { extract($args); $title = isset($instance['title']) ? (!empty($instance['title']) ? $instance['title']: '') : ''; $address_label = isset($instance['address_label']) ? (!empty($instance['address_label']) ? $instance['address_label']: '') : ''; $address_text = isset($instance['address_text']) ? (!empty($instance['address_text']) ? $instance['address_text']: '') : ''; $phone_label = isset($instance['phone_label']) ? (!empty($instance['phone_label']) ? $instance['phone_label']: '') : ''; $phone_text = isset($instance['phone_text']) ? (!empty($instance['phone_text']) ? $instance['phone_text']: '') : ''; $time_label = isset($instance['time_label']) ? (!empty($instance['time_label']) ? $instance['time_label']: '') : ''; $time_text = isset($instance['time_text']) ? (!empty($instance['time_text']) ? $instance['time_text']: '') : ''; $btn_text = isset($instance['btn_text']) ? (!empty($instance['btn_text']) ? $instance['btn_text']: '') : ''; $btn_link = isset($instance['btn_link']) ? (!empty($instance['btn_link']) ? $instance['btn_link']: '') : ''; ?> <section class="ct-getintouch widget"> <?php if(!empty($title)) : ?> <h3 class="widget-title"><?php echo esc_attr($title); ?></h3> <?php endif; ?> <div class="ct-getintouch-inner"> <?php if(!empty($address_label) || !empty($address_text)): ?> <div class="ct-getintouch-item"> <div class="ct-getintouch-icon"><i class="flaticon-maps-and-flags"></i></div> <div class="ct-getintouch-meta"> <label><?php echo esc_attr( $address_label ); ?></label> <span><?php echo esc_attr( $address_text ); ?></span> </div> </div> <?php endif; ?> <?php if(!empty($phone_label) || !empty($phone_text)): ?> <div class="ct-getintouch-item"> <div class="ct-getintouch-icon"><i class="flaticon-telephone"></i></div> <div class="ct-getintouch-meta"> <label><?php echo esc_attr( $phone_label ); ?></label> <span><?php echo esc_attr( $phone_text ); ?></span> </div> </div> <?php endif; ?> <?php if(!empty($time_label) || !empty($time_text)): ?> <div class="ct-getintouch-item"> <div class="ct-getintouch-icon"><i class="far fac-clock"></i></div> <div class="ct-getintouch-meta"> <label><?php echo esc_attr( $time_label ); ?></label> <span><?php echo esc_attr( $time_text ); ?></span> </div> </div> <?php endif; ?> <?php if(!empty($btn_text)) : ?> <div class="ct-getintouch-item"> <a class="btn" href="<?php echo esc_url($btn_link); ?>"><i class="fac fac-location-arrow space-right"></i><?php echo esc_attr( $btn_text ); ?></a> </div> <?php endif; ?> </div> </section> <?php } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['address_label'] = strip_tags($new_instance['address_label']); $instance['address_text'] = strip_tags($new_instance['address_text']); $instance['phone_label'] = strip_tags($new_instance['phone_label']); $instance['phone_text'] = strip_tags($new_instance['phone_text']); $instance['time_label'] = strip_tags($new_instance['time_label']); $instance['time_text'] = strip_tags($new_instance['time_text']); $instance['btn_text'] = strip_tags($new_instance['btn_text']); $instance['btn_link'] = strip_tags($new_instance['btn_link']); return $instance; } function form( $instance ) { $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; $address_label = isset($instance['address_label']) ? esc_attr($instance['address_label']) : ''; $address_text = isset($instance['address_text']) ? esc_attr($instance['address_text']) : ''; $phone_label = isset($instance['phone_label']) ? esc_attr($instance['phone_label']) : ''; $phone_text = isset($instance['phone_text']) ? esc_attr($instance['phone_text']) : ''; $time_label = isset($instance['time_label']) ? esc_attr($instance['time_label']) : ''; $time_text = isset($instance['time_text']) ? esc_attr($instance['time_text']) : ''; $btn_text = isset($instance['btn_text']) ? esc_attr($instance['btn_text']) : ''; $btn_link = isset($instance['btn_link']) ? esc_attr($instance['btn_link']) : ''; ?> <p><label for="<?php echo esc_url($this->get_field_id('title')); ?>"><?php esc_html_e( 'Title', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('address_label')); ?>"><?php esc_html_e( 'Address Label', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('address_label') ); ?>" name="<?php echo esc_attr( $this->get_field_name('address_label') ); ?>" type="text" value="<?php echo esc_attr( $address_label ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('address_text')); ?>"><?php esc_html_e( 'Address', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('address_text') ); ?>" name="<?php echo esc_attr( $this->get_field_name('address_text') ); ?>" type="text" value="<?php echo esc_attr( $address_text ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('phone_label')); ?>"><?php esc_html_e( 'Phone Label', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('phone_label') ); ?>" name="<?php echo esc_attr( $this->get_field_name('phone_label') ); ?>" type="text" value="<?php echo esc_attr( $phone_label ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('phone_text')); ?>"><?php esc_html_e( 'Phone', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('phone_text') ); ?>" name="<?php echo esc_attr( $this->get_field_name('phone_text') ); ?>" type="text" value="<?php echo esc_attr( $phone_text ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('time_label')); ?>"><?php esc_html_e( 'Time Label', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('time_label') ); ?>" name="<?php echo esc_attr( $this->get_field_name('time_label') ); ?>" type="text" value="<?php echo esc_attr( $time_label ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('time_text')); ?>"><?php esc_html_e( 'Time', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('time_text') ); ?>" name="<?php echo esc_attr( $this->get_field_name('time_text') ); ?>" type="text" value="<?php echo esc_attr( $time_text ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('btn_text')); ?>"><?php esc_html_e( 'Button Text', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('btn_text') ); ?>" name="<?php echo esc_attr( $this->get_field_name('btn_text') ); ?>" type="text" value="<?php echo esc_attr( $btn_text ); ?>" /></p> <p><label for="<?php echo esc_url($this->get_field_id('btn_link')); ?>"><?php esc_html_e( 'Button Link', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('btn_link') ); ?>" name="<?php echo esc_attr( $this->get_field_name('btn_link') ); ?>" type="text" value="<?php echo esc_attr( $btn_link ); ?>" /></p> <?php } } function register_getintouch_widget() { if(function_exists('ct_register_wp_widget')){ ct_register_wp_widget( 'GetInTouch_Widget' ); } } add_action('widgets_init', 'register_getintouch_widget');
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.63 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002